com.vinculumtech.carrierwave.plansource
Class PlanSourceRoot

java.lang.Object
  extended bycom.vinculumtech.carrierwave.plansource.PlanSourceRoot

public final class PlanSourceRoot
extends java.lang.Object

The PlanSourceRoot class owns all the GraphPlanSource instances in a given process space.
GraphPlanSource instances are organized first by context, then by their authority order value. The context allows multiple sessions in a process space to have a unique set of GraphPlanSources. The context may be null.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/plansource/PlanSourceRoot.java#4 $

Method Summary
static void destroyContext(java.lang.Object context)
          Removes the registred GraphPlanSources for the given context.
This is to prevent memory/resource leaks in client applications.
static java.util.Collection getAllGraphPlanSourceNames(java.lang.Object context)
           
static GraphPlanSource getNamedGraphPlanSource(java.lang.Object context, java.lang.String sourceName)
           
static java.util.Map getNamedGraphPlanSources(java.lang.Object context)
           
static GraphPlanSource getOrderedGraphPlanSource(java.lang.Object context, java.lang.Integer authorityValue)
           
static java.util.Map getOrderedGraphPlanSources(java.lang.Object context)
           
static void registerGraphPlanSource(java.lang.Object context, GraphPlanSource graphPlanSource)
          Associates the given GraphPlanSource instance with the given conext object.
static GraphPlanSource unregisterGraphPlanSource(java.lang.Object context, java.lang.String sourceName)
          Disassociates the named GraphPlanSource instance with the given conext object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerGraphPlanSource

public static final void registerGraphPlanSource(java.lang.Object context,
                                                 GraphPlanSource graphPlanSource)
Associates the given GraphPlanSource instance with the given conext object.

Parameters:
context -
graphPlanSource -
Throws:
java.lang.IllegalStateException - thrown if graphPlanSource with same authority order already registered

unregisterGraphPlanSource

public static final GraphPlanSource unregisterGraphPlanSource(java.lang.Object context,
                                                              java.lang.String sourceName)
Disassociates the named GraphPlanSource instance with the given conext object.

Parameters:
context -
sourceName -
Returns:

getNamedGraphPlanSources

public static final java.util.Map getNamedGraphPlanSources(java.lang.Object context)
Parameters:
context -
Returns:
the Map of GraphPlanSource instances associated with the given context object

getOrderedGraphPlanSources

public static final java.util.Map getOrderedGraphPlanSources(java.lang.Object context)
Parameters:
context -
Returns:
the Map of ordered (by authority value) GraphPlanSource instances associated with the given context object

getNamedGraphPlanSource

public static final GraphPlanSource getNamedGraphPlanSource(java.lang.Object context,
                                                            java.lang.String sourceName)
Parameters:
context -
sourceName -
Returns:
the GraphPlanSource instance in the given context with the given sourceName

getOrderedGraphPlanSource

public static final GraphPlanSource getOrderedGraphPlanSource(java.lang.Object context,
                                                              java.lang.Integer authorityValue)
Parameters:
context -
authorityValue -
Returns:
the GraphPlanSource instance in the given context with the given authorityValue

getAllGraphPlanSourceNames

public static final java.util.Collection getAllGraphPlanSourceNames(java.lang.Object context)
Parameters:
context -
Returns:
all the GraphPlanSource names associated with the given context

destroyContext

public static final void destroyContext(java.lang.Object context)
Removes the registred GraphPlanSources for the given context.
This is to prevent memory/resource leaks in client applications.

Parameters:
context -


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.