*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.information
Class Factory
java.lang.Object
com.sas.services.information.Factory
@SASScope("ALL")
@BinaryCompatibilityOnly
public class Factory
extends Object
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.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(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 FactoryPluginLoaderDeprecated.booleanReturns true ifconfigure()has been called, false otherwise.ClassloadClass(String className) ObjectnewInstance(String className) Create a new instance object of the specified class using the default constructor.ObjectnewInstance(String className, Class[] initParams, Object[] initArgs) Create a new instance object of the specified class using a constructor matching the specified parameter classes.process(Object o) Deprecated.processWithRepository(Object o, RepositoryInterface ri) Process an object from a repository and turn it into a "smart object".StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Method Details
-
getInstance
-
configure
public void configure(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.- Parameters:
types- The map of factory types that determines the return from a (@link #process} call.
-
isConfigured
public boolean isConfigured()Returns true ifconfigure()has been called, false otherwise.- Returns:
- true if the Factory has been configured, false otherwise.
-
process
Deprecated.- Throws:
ServiceException
-
processWithRepository
public MetadataInterface processWithRepository(Object o, RepositoryInterface ri) throws ServiceException Process an object from a repository and turn it into a "smart object". If no other action is found, the object is wrapped with a Metadata object and returned.- Parameters:
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.- Returns:
- The new smart object that wraps the Object.
- Throws:
ServiceException- If an error occurred in the object creation.
-
loadClass
public Class loadClass(String className) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
toString
public String toString()- Overrides:
toStringin classObject
-
newInstance
Create a new instance object of the specified class using the default constructor.- Parameters:
className- class name of object to be instantiated- Returns:
- instantiated object
- Throws:
ClassNotFoundException- Specified class not found by the plug-in loader.ServiceException- General exception wrapping other exceptions, including no default constructor, exceptions thrown by the constructor, security exceptions, etc.
-
newInstance
public Object newInstance(String className, Class[] initParams, Object[] initArgs) throws ClassNotFoundException, ServiceException Create a new instance object of the specified class using a constructor matching the specified parameter classes.- Parameters:
className- class name of object to be instantiatedinitParams- constructor argument signatureinitArgs- arguments to be passed to the constructor.- Returns:
- instantiated object
- Throws:
ClassNotFoundException- Specified class not found by the plug-in loader.ServiceException- General exception wrapping other exceptions, including no matching constructor, exceptions thrown by the constructor, security exceptions, etc.
-
getPluginLoader
@Deprecated public PluginLoader getPluginLoader()Deprecated.
-