### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.deployment

# Class ServiceConfigFactory

java.lang.Object
com.sas.services.deployment.ServiceConfigFactory

@SASScope("ALL") @BinaryCompatibilityOnly public final class ServiceConfigFactory extends Object
Factory used to create a factory which may be used to create a service configuration.

Since:
  9.2
See Also:
  - `MetadataSourceFactory`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `PROPERTYNAME_CONNECTION`
  Name of a mapped property that specifies a `connection` to a SAS metadata repository.
  `static final String`
  `PROPERTYNAME_IOMI`
  Name of a mapped property that specifies an `OMI` interface to a SAS metadata repository.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ServiceConfigFactory()`
  Constructs an instance using the specified configuration properties.
  `ServiceConfigFactory(Properties properties)`
  Constructs an instance using the specified configuration properties.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ServiceConfigFactoryInterface`
  `createFactory()`
  Creates a service configuration factory using properties defined at the time this object was constructed using `ServiceConfigFactory(Properties)` or by calling `setProperties(Properties)`.
  `void`
  `destroy()`
  Release resources.
  `void`
  `setMetadataSourceProperties(MetadataSourceProperties metadataSourceProperties)`
  Sets the properties used to configure a metadata source.
  `void`
  `setProperties(Properties properties)`
  Specify the properties which will be used to determine the implementation type of the service configuration factory.

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

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

- ## Field Details

  - ### PROPERTYNAME_IOMI

    public static final String PROPERTYNAME_IOMI
    Name of a mapped property that specifies an `OMI` interface to a SAS metadata repository. This value is "com.sas.meta.SASIOMI.IOMI".

    In addition to this property one must also specify the ID of the desired SAS metadata repository.

    See Also:
      - `MetadataSourceFactory.PROPERTY_METADATASERVER_REPOSITORY`

  - ### PROPERTYNAME_CONNECTION

    public static final String PROPERTYNAME_CONNECTION
    Name of a mapped property that specifies a `connection` to a SAS metadata repository. This value is "com.sas.services.connection.ConnectionInterface".

    In addition to this property one must also specify the ID of the desired SAS metadata repository.

    See Also:
      - `MetadataSourceFactory.PROPERTY_METADATASERVER_REPOSITORY`

- ## Constructor Details

  - ### ServiceConfigFactory

    public ServiceConfigFactory() throws ServiceException
    Constructs an instance using the specified configuration properties.

    This constructor is intended for use in a case where it isn't possible to pass in the property Map to the constructor such as in the JBoss Microcontainer. In this case, the properties must be set using `setProperties(Properties)` before attempting to call `createFactory()`.

    Throws:
      `ServiceException` - if unable to configure a factory using the properties.
    See Also:
      - `setProperties(Properties)`

  - ### ServiceConfigFactory

    public ServiceConfigFactory(Properties properties) throws ServiceException
    Constructs an instance using the specified configuration properties.

    Use this constructor if the properties are available at the time this factory is constructed.

    Parameters:
      `properties` - Configuration properties used to determine the implementation type of the service factory.
    Throws:
      `ServiceException` - if unable to configure a factory using the properties.
    See Also:
      - `setProperties(Properties)`

- ## Method Details

  - ### setMetadataSourceProperties

    public void setMetadataSourceProperties(MetadataSourceProperties metadataSourceProperties) throws ServiceException
    Sets the properties used to configure a metadata source.
    Parameters:
      `metadataSourceProperties` - Properties used to configure a metadata source.
    Throws:
      `ServiceException` - if unable to set properties.

  - ### setProperties

    public void setProperties(Properties properties) throws ServiceException
    Specify the properties which will be used to determine the implementation type of the service configuration factory.

    Query services metadata from a URL
    Property name | Property value
    --- | ---
    url | The `String` name of the SAS metadata repository (e.g. "Foundation")

    Query services metadata from a SAS metadata server using ConnectionInterface
    Property name | Property value
    --- | ---
    omr_repository | SAS metadata repository `name` (e.g. "Foundation")
    com.sas.services.connection.ConnectionInterface | SAS metadata repository `connection`

    Query services metadata from a SAS metadata server using ConnectionInterface
    Property name | Property value
    --- | ---
    omr_repository | SAS metadata repository `name` (e.g. "Foundation")
    com.sas.metadata.SASIOMI.IOMI | SAS metadata repository `OMI` interface

    Parameters:
      `properties` - Configuration properties used to determine the implementation type of the service factory or `null`. An IOC container, such as the JBoss Microcontainer, may pass in a `null` parameter when a bean is destroyed.
    Throws:
      `ServiceException`
    See Also:
      - `MetadataSourceFactory`

  - ### createFactory

    public ServiceConfigFactoryInterface createFactory() throws ServiceException
    Creates a service configuration factory using properties defined at the time this object was constructed using `ServiceConfigFactory(Properties)` or by calling `setProperties(Properties)`.
    Returns:
      Factory which can be used to create a service configuration from the source specified by the mapped properties.
    Throws:
      `ServiceException` - if unable to create a factory.

  - ### destroy

    public void destroy()
    Release resources.