|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.chwf.resources.ResourceLocator
A locator for resources. It delegates is calls to the appropriate [@link ResourceFactory}.
| Constructor Summary | |
ResourceLocator()
|
|
| Method Summary | |
static java.lang.Object |
getResource(java.lang.Class type)
Get a resource from its default factory. |
static java.lang.Object |
getResource(java.lang.Class type,
java.lang.String factoryName)
Get a resource from a named factory. |
static boolean |
hasFactory(java.lang.Class resource)
True if the resource has a (default) factory. |
static boolean |
hasFactory(java.lang.Class resource,
java.lang.String factoryName)
True if the resource has a factory with the given name. |
static boolean |
isManaged(java.lang.Class resource)
True if this resource is managed for the default factory. |
static boolean |
isManaged(java.lang.Class resource,
java.lang.String factoryName)
True if this resource is managed for the given named factory. |
static boolean |
isManagementActive()
True if management is initialized. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ResourceLocator()
| Method Detail |
public static boolean hasFactory(java.lang.Class resource)
resource - The resource class.
public static boolean hasFactory(java.lang.Class resource,
java.lang.String factoryName)
resource - The resource class.factoryName - The factory name.public static boolean isManaged(java.lang.Class resource)
resource - The resource class.
public static boolean isManaged(java.lang.Class resource,
java.lang.String factoryName)
resource - The resource class.factoryName - The factory name.
public static java.lang.Object getResource(java.lang.Class type)
throws ResourceException,
ResourceInitException
type - The resource type.ResourceException - If there is no factory for this resource.ResourceInitException - If the factory cannot be found.
public static java.lang.Object getResource(java.lang.Class type,
java.lang.String factoryName)
throws ResourceException,
ResourceInitException
type - The resource type.factoryName - The factory name.ResourceException - If there is no factory with this name.ResourceInitException - If the factory cannot be found.public static boolean isManagementActive()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||