| java.lang.Object com.bigbross.bossa.resource.ResourceRegistry
All known Subclasses: com.bigbross.bossa.resource.ResourceManager,
ResourceRegistry | public ResourceRegistry(String id)(Code) | | Creates a new empty resource registry.
Parameters: id - the id of this registry. |
compile | public Expression compile(String expression)(Code) | | Compiles a resource expression.
It uses this ResourceManager to link the resources in
the expression.
Parameters: expression - the resource expression to be compiled. a Expression representing the compiled resourceexpression. |
createResource | public Resource createResource(String id) throws BossaException(Code) | | Creates a new resource in this registry.
Parameters: id - the id of the resource to be created. the created Resource object,null if there is already a resource with this id. exception: PersistenceException - if an error occours when making theexecution of this method persistent. |
createResourceImpl | public Resource createResourceImpl(String id, boolean notify)(Code) | | Creates a new resource in this registry.
This method does not create a transaction in the prevalent system. The
execution of this method will not be persistent unless it is called
inside an appropriate transaction.
Parameters: id - the id of the resource to be created. Parameters: notify - if this operation should be notified. the created Resource object,null if there is already a resource with this id. |
getBossa | Bossa getBossa()(Code) | | Returns the bossa engine this resource registry is part, if any.
the bossa engine this resource registry is part,null if not part of a bossa engine. |
getGlobalId | String getGlobalId()(Code) | | Returns the global id of this registry. This is the id that allows
the retrieval of this registry from the resource manager.
the resource manager. |
getId | public String getId()(Code) | | Returns the id of this registry.
the id of this registry. |
getResource | public Resource getResource(String id)(Code) | | Returns the resource with the given id.
Parameters: id - the resource id. the Resource object,null if there is no resource with this id. |
getResourceManager | ResourceManager getResourceManager()(Code) | | Returns the top level resource registry, the resource manager.
the resource manager, null if the root registryis not a resource manager. |
getResources | public List getResources()(Code) | | Returns all registered resources.
a list of all resources registered. |
getSubContext | ResourceRegistry getSubContext(String id)(Code) | | Returns the registered sub context with the given id.
Parameters: id - the sub context id. the sub context,null if the sub context was not found. |
getSuperContext | public ResourceRegistry getSuperContext()(Code) | | Returns the super context of this registry.
the super context of this registry. |
registerSubContext | public boolean registerSubContext(ResourceRegistry context)(Code) | | Registers another resource registry as a sub context of this resource
registry. All entries in the sub context are expected to possibly
depend on the entries of this registry, and are notified of resource
removals.
Also, if this registry tree is rooted at a resource manager, the
registry tree being registered is put in the global registry index.
Parameters: context - the sub context. true if the sub context was added,false if the sub context was already present. |
removeResource | public boolean removeResource(Resource resource) throws BossaException(Code) | | Removes a resource from this registry.
Parameters: resource - the resource to be removed. true if the resource was removed,false if the resource was not found. exception: PersistenceException - if an error occours when making theexecution of this method persistent. |
removeResourceImpl | public boolean removeResourceImpl(Resource resource, boolean notify)(Code) | | Removes a resource from this registry.
This method does not create a transaction in the prevalent system. The
execution of this method will not be persistent unless it is called
inside an appropriate transaction.
Parameters: resource - the resource to be removed. Parameters: notify - if this operation should be notified. true if the resource was removed,false if the resource was not found. |
removeSubContext | public boolean removeSubContext(ResourceRegistry context)(Code) | | Remove the provided registry from the list of registered sub contexts
of this registry.
Also, if this registry tree is rooted at a resource manager, the
registry tree being removed is removed from the global registry index.
Parameters: context - the sub context. true if the sub context was removed,false if the sub context was not found. |
setSuperContext | public void setSuperContext(ResourceRegistry context)(Code) | | Sets a context as the super context of this registry.
Parameters: context - the super context. |
|
|