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

Package com.sas.services.deployment.ioc

# Class DeploymentContextFactory

java.lang.Object
com.sas.services.deployment.ioc.DeploymentContextFactory

@SASScope("ALL") @BinaryCompatibilityOnly public class DeploymentContextFactory extends Object
Factory used to create a `DeploymentDescriptorContext` which may be used to define a descriptor for foundation services which are to be deployed in a particular type of container.

Since:
  9.2

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `CONTAINER_JBOSSMC`
  Container type: JBoss Microcontainer.
  `static final String`
  `CONTAINER_SPRING`
  Container type: Spring Framework.
  `static final String`
  `PROPERTYNAME_CONTAINER`
  This property may be used to designate the type of container in which the services are to be deployed.
  `static final String`
  `PROPERTYNAME_STRATEGYCLASSNAME`
  This property may be used to designate the fully-qualified Java name for a class that extends `AbstractDeploymentStrategy` which provides the implementation of the deployment strategy.
  `static final String`
  `STRATEGY_JBOSSMC`
  Fully-qualified Java classname of a `AbstractDeploymentStrategy` for use with a JBoss Microcontainer.
  `static final String`
  `STRATEGY_SPRING`
  Fully-qualified Java classname of a `AbstractDeploymentStrategy` for use with a Spring Framework container.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DeploymentDescriptorContext`
  `createDeploymentContext(Properties properties, ClassLoader classLoader)`
  Creates a deployment context associated with a strategy.
  `static final boolean`
  `isValidContainerType(String containerType)`
  Determines if the container type is valid.

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

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

- ## Field Details

  - ### PROPERTYNAME_STRATEGYCLASSNAME

    public static final String PROPERTYNAME_STRATEGYCLASSNAME
    This property may be used to designate the fully-qualified Java name for a class that extends `AbstractDeploymentStrategy` which provides the implementation of the deployment strategy.

    If specified, this property will take precedence over the `PROPERTYNAME_CONTAINER` property.

    See Also:
      - `PROPERTYNAME_CONTAINER`
      - Constant Field Values

  - ### PROPERTYNAME_CONTAINER

    public static final String PROPERTYNAME_CONTAINER
    This property may be used to designate the type of container in which the services are to be deployed. Assign one of the following values to this property.
    - `CONTAINER_JBOSSMC`
    - `CONTAINER_SPRING`

    If the `PROPERTYNAME_STRATEGYCLASSNAME` is not specified, then this property must be specified to designate the container type using one of the supported container types.

    See Also:
      - `PROPERTYNAME_STRATEGYCLASSNAME`
      - Constant Field Values

  - ### CONTAINER_JBOSSMC

    public static final String CONTAINER_JBOSSMC
    Container type: JBoss Microcontainer.
    See Also:
      - Constant Field Values

  - ### CONTAINER_SPRING

    public static final String CONTAINER_SPRING
    Container type: Spring Framework.
    See Also:
      - Constant Field Values

  - ### STRATEGY_JBOSSMC

    public static final String STRATEGY_JBOSSMC
    Fully-qualified Java classname of a `AbstractDeploymentStrategy` for use with a JBoss Microcontainer.
    See Also:
      - Constant Field Values

  - ### STRATEGY_SPRING

    public static final String STRATEGY_SPRING
    Fully-qualified Java classname of a `AbstractDeploymentStrategy` for use with a Spring Framework container.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### createDeploymentContext

    public static DeploymentDescriptorContext createDeploymentContext(Properties properties, ClassLoader classLoader) throws ServiceException
    Creates a deployment context associated with a strategy.

    The properties specify the fully-qualified name of the Java class implementation of the AbstractDeploymentStrategy using the key `PROPERTYNAME_STRATEGYCLASSNAME`.

    Parameters:
      `properties` - Properties used to intialize a deployment descriptor context. The fully-qualified name of the strategy class must be specified using the `PROPERTYNAME_STRATEGYCLASSNAME` property
      `classLoader` - The class loader which will load the class that implements the strategy required to create the context.
    Returns:
      A non-`null` deployment descriptor context.
    Throws:
      `ServiceException` - if unable to create a deployment context.

  - ### isValidContainerType

    public static final boolean isValidContainerType(String containerType)
    Determines if the container type is valid.
    Parameters:
      `containerType` -
    Returns:
      `true` if the container type is valid.