|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.bigbross.bossa.resource.ResourceRegistry
This class stores registered resources.
| Constructor Summary | |
ResourceRegistry(String id)
Creates a new empty resource registry. |
|
| Method Summary | |
Expression |
compile(String expression)
Compiles a resource expression. |
Resource |
createResource(String id)
Creates a new resource in this registry. |
Resource |
createResourceImpl(String id,
boolean notify)
Creates a new resource in this registry. |
String |
getId()
Returns the id of this registry. |
Resource |
getResource(String id)
Returns the resource with the given id. |
List |
getResources()
Returns all registered resources. |
ResourceRegistry |
getSuperContext()
Returns the super context of this registry. |
boolean |
registerSubContext(ResourceRegistry context)
Registers another resource registry as a sub context of this resource registry. |
boolean |
removeResource(Resource resource)
Removes a resource from this registry. |
boolean |
removeResourceImpl(Resource resource,
boolean notify)
Removes a resource from this registry. |
boolean |
removeSubContext(ResourceRegistry context)
Remove the provided registry from the list of registered sub contexts of this registry. |
void |
setSuperContext(ResourceRegistry context)
Sets a context as the super context of this registry. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ResourceRegistry(String id)
id - the id of this registry.| Method Detail |
public String getId()
public void setSuperContext(ResourceRegistry context)
context - the super context.public ResourceRegistry getSuperContext()
public Resource getResource(String id)
id - the resource id.
Resource object,
null if there is no resource with this id.public List getResources()
public Resource createResource(String id)
throws BossaException
id - the id of the resource to be created.
Resource object,
null if there is already a resource with this id.
PersistenceException - if an error occours when making the
execution of this method persistent.
BossaException
public Resource createResourceImpl(String id,
boolean notify)
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.
id - the id of the resource to be created.notify - if this operation should be notified.
Resource object,
null if there is already a resource with this id.
public boolean removeResource(Resource resource)
throws BossaException
resource - the resource to be removed.
true if the resource was removed,
false if the resource was not found.
PersistenceException - if an error occours when making the
execution of this method persistent.
BossaException
public boolean removeResourceImpl(Resource resource,
boolean notify)
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.
resource - the resource to be removed.notify - if this operation should be notified.
true if the resource was removed,
false if the resource was not found.public boolean registerSubContext(ResourceRegistry context)
Also, if this registry tree is rooted at a resource manager, the registry tree being registered is put in the global registry index.
context - the sub context.
true if the sub context was added,
false if the sub context was already present.public boolean removeSubContext(ResourceRegistry context)
Also, if this registry tree is rooted at a resource manager, the registry tree being removed is removed from the global registry index.
context - the sub context.
true if the sub context was removed,
false if the sub context was not found.public Expression compile(String expression)
It uses this ResourceManager to link the resources in
the expression.
expression - the resource expression to be compiled.
Expression representing the compiled resource
expression.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||