|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.kernel.util.LocatorUtils
Locator Utils are to allow walking the component hierarchy tree so you can reference components by a 'path name' instead of walking it manually yourself
Beacuse there are potentially more than one Runtime Environment in a Virtual Machine, you must associate a LocatorUtils object with any component within a tree. Once it has that figured out, it can locate any other component in the tree
| Constructor Summary | |
LocatorUtils(ExpressoComponent component)
Base constructor that locates the root component in the hierarchy as soon as it is instantiated. |
|
| Method Summary | |
DataContext |
getDataContext(ExpressoComponent component)
Retrieve the DataContext that the given component is a part of |
String |
getDataContextName(ExpressoComponent component)
Given the component that we loaded, find the data context name we're a part of. |
String |
getPath(ExpressoComponent component)
Return a path that the Locator utils could find later to relocate this component. |
ExpressoComponent |
locateComponent(String pathName)
Allows you to locate the component via a 'bean utils' style string. |
ComponentConfig |
locateConfiguration(String pathName)
Allows you to locate the component via a 'bean utils' style string. |
ComponentMetadata |
locateMetadata(String pathName)
Allows you to locate the component metadata via a 'bean utils' style string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LocatorUtils(ExpressoComponent component)
component - any component in the Runtime Hierarchy| Method Detail |
public ExpressoComponent locateComponent(String pathName)
Allows you to locate the component via a 'bean utils' style string.
Examples:
Locate a component in default context by the name of myComponent:
ExpressoComponent mycomponent = locator.locateComponent("default.myComponent");
Locate the root container:
ExpressoComponent rootContainer = locator.locateComponent("");
pathName - The pathname to use to locate the particular component as
described in the above javadocs.
IllegalArgumentException - if either the pathName is improper or
if the component doesn't seem to exist in the given traversalpublic ComponentConfig locateConfiguration(String pathName)
Allows you to locate the component via a 'bean utils' style string.
Examples:
Locate a components configuration in default context by the name of myComponent:
ComponentConfig myconfig = locator.locateComponent("default.myComponent");
Locate the root container:
ComponentConfig rootContainerConfig = locator.locateComponent("");
pathName - The pathname to use to locate the particular component as
described in the above javadocs.
IllegalArgumentException - if either the pathName is improper or
if the component doesn't seem to exist in the given traversalpublic ComponentMetadata locateMetadata(String pathName)
Allows you to locate the component metadata via a 'bean utils' style string.
Examples:
Locate a components configuration in default context by the name of myComponent:
ComponentConfig myconfig = locator.locateComponent("default.myComponent");
Locate the root container:
ComponentConfig rootContainerConfig = locator.locateComponent("");
pathName - The pathname to use to locate the particular component as
described in the above javadocs.
IllegalArgumentException - if either the pathName is improper or
if the component doesn't seem to exist in the given traversalpublic String getPath(ExpressoComponent component)
component - The component to get the location string.
public String getDataContextName(ExpressoComponent component)
component - the name of the component to retrieve the context name
public DataContext getDataContext(ExpressoComponent component)
component - the component in the hierarchy that we want to find
what data context it is a part of.
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||