### *** 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 Type
  Method
  Description
  `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.
  `static Factory`
  `getInstance()`
  `PluginLoader`
  `getPluginLoader()`
  Deprecated.
  `boolean`
  `isConfigured()`
  Returns true if `configure()` has been called, false otherwise.
  `Class`
  `loadClass(String className)`
  `Object`
  `newInstance(String className)`
  Create a new instance object of the specified class using the default constructor.
  `Object`
  `newInstance(String className, Class[] initParams, Object[] initArgs)`
  Create a new instance object of the specified class using a constructor matching the specified parameter classes.
  `MetadataInterface`
  `process(Object o)`
  Deprecated.
  `MetadataInterface`
  `processWithRepository(Object o, RepositoryInterface ri)`
  Process an object from a repository and turn it into a "smart object".
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static Factory 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 if `configure()` has been called, false otherwise.
    Returns:
      true if the Factory has been configured, false otherwise.

  - ### process

    @Deprecated public MetadataInterface process(Object o) throws ServiceException
    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:
      `toString` in class `Object`

  - ### newInstance

    public Object newInstance(String className) throws ClassNotFoundException, ServiceException
    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 instantiated
      `initParams` - constructor argument signature
      `initArgs` - 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.