|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.Factory
public class Factory
The Factory is a class that takes repository-specific objects and turns them into "smart objects". The configuration for the Factory comes from the Information Service. It consists of a mapping of protocol/type/filter to an action string. The action string will ordinarily be a constructor for a Java class. It can, however, specify to use another Platform Service to create an object, or a static method from another class.
Method Summary | |
---|---|
void |
configure(java.util.Map types)
This is called once by the Information Service to configure the Factory class with the mappings of repository-specific types to Java classes. |
static Factory |
getInstance()
|
com.sas.services.information.PluginLoader |
getPluginLoader()
Deprecated. Use PluginLoader.getInstance(PluginLoader.OBJECT_TYPES_LOADER) instead. |
boolean |
isConfigured()
Returns true if configure() has been called, false
otherwise. |
java.lang.Class |
loadClass(java.lang.String className)
|
java.lang.Object |
newInstance(java.lang.String className)
Create a new instance object of the specified class using the default constructor. |
java.lang.Object |
newInstance(java.lang.String className,
java.lang.Class[] initParams,
java.lang.Object[] initArgs)
Create a new instance object of the specified class using a constructor matching the specified parameter classes. |
MetadataInterface |
process(java.lang.Object o)
Deprecated. Use processWithRepository(Object, RepositoryInterface) |
MetadataInterface |
processWithRepository(java.lang.Object o,
RepositoryInterface ri)
Process an object from a repository and turn it into a "smart object". |
java.lang.String |
toString()
Nothing interesting about this. |
Method Detail |
---|
public static Factory getInstance()
public void configure(java.util.Map types)
types
- The map of factory types that determines the return from
a (@link #process} call.public boolean isConfigured()
configure()
has been called, false
otherwise.
public MetadataInterface process(java.lang.Object o) throws ServiceException
processWithRepository(Object, RepositoryInterface)
o
- An object that came from a repository (Ldap, OMR, or DAV) to
be wrapped in a "smart object".
ServiceException
- If an error occurred in the object creation.public MetadataInterface processWithRepository(java.lang.Object o, RepositoryInterface ri) throws ServiceException
o
- An object that came from a repository (Ldap, OMR, or DAV) to
be wrapped in a "smart object".ri
- The RepositoryInterface the data object was retrieved from or
created in.
ServiceException
- If an error occurred in the object creation.public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object newInstance(java.lang.String className) throws java.lang.ClassNotFoundException, ServiceException
className
- class name of object to be instantiated
java.lang.ClassNotFoundException
- Specified class not found by the plugin loader.
ServiceException
- General exception wrapping other exceptions, including
no default constructor, exceptions thrown by the constructor, security exceptions, etc.public java.lang.Object newInstance(java.lang.String className, java.lang.Class[] initParams, java.lang.Object[] initArgs) throws java.lang.ClassNotFoundException, ServiceException
className
- class name of object to be instantiatedinitParams
- constructor argument signatureinitArgs
- arguments to be passed to the constructor.
java.lang.ClassNotFoundException
- Specified class not found by the plugin loader.
ServiceException
- General exception wrapping other exceptions, including
no matching constructor, exceptions thrown by the constructor, security exceptions,
etc.public com.sas.services.information.PluginLoader getPluginLoader()
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |