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

Package com.sas.services.deployment

# Class Configuration

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

@SASScope("ALL") @BinaryCompatibilityOnly public final class Configuration extends Object
Metadata source configuration which defines the properties required to query metadata describing a SAS Foundation Services deployment from a SAS Metadata Server.

Since:
  9.2
See Also:
  - `MetadataSourceFactory`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Configuration(com.sas.metadata.remote.SoftwareComponent softwareComponent)`
  Constructs a default instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getContainerType()`
  Gets the container type.
  `String`
  `getDescForProperty(String propertyName)`
  Gets a localized description for the specified property.
  `Properties`
  `getProperties()`
  Gets properties which may be used to configure a file that describes a SAS Foundation Services deployment which is to be deployed in an IOC container.
  `com.sas.metadata.remote.SoftwareComponent`
  `getSoftwareComponent()`
  Gets the software component.
  `String`
  `localizePropertyGroupName(int groupIndex)`
  Gets a localized name for the specified group property.
  `String`
  `localizePropertyMode(String mode)`
  Gets a localized name for the mode property.
  `String`
  `localizePropertyName(String propertyName)`
  Gets a localized name for the specified property.
  `void`
  `setContainerType(String containerType)`
  Sets the container type.
  `void`
  `setDeploymentGroups(Set<String> groupNames)`
  Sets the groups of services which are enabled for deployment.
  `void`
  `setHost(String host)`
  Sets the Metadata Server's host.
  `void`
  `setMode(String mode)`
  Sets the mode that indicates whether the SAS Foundation Services deployment metadata is to be queried from a Metadata Repository or from a URL.
  `void`
  `setPort(String port)`
  Sets the port on which the SAS Metadata Server is listening for connections.
  `void`
  `setRepository(String repository)`
  Sets the name of the metadata repository which is to be queried to read a SAS Foundation Services deployment.
  `void`
  `setSecurityPackageList(String secpackagelist)`
  Sets the secpackagelist.
  `void`
  `setSecuritySPN(String metaspn)`
  Sets the service principal name ("metaspn").
  `void`
  `setSoftwareComponent(com.sas.metadata.remote.SoftwareComponent softwareComponent)`
  Sets the software component.
  `void`
  `setURL(String url)`
  Sets the URL that can be read to obtain SAS Foundation Services deployment metadata.
  `void`
  `setUserId(String userId)`
  Sets the user ID which will be used to connect to the SAS Metadata Server.
  `void`
  `setUserPassword(String userPassword)`
  Sets the user's password which will be used to connect to the SAS Metadata Server.

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

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

- ## Constructor Details

  - ### Configuration

    public Configuration(com.sas.metadata.remote.SoftwareComponent softwareComponent) throws com.sas.metadata.remote.MdException
    Constructs a default instance.
    Parameters:
      `softwareComponent` - Metadata software component that represents the SAS Foundation Services deployment.
    Throws:
      `com.sas.metadata.remote.MdException` - if unable to construct an instance.

- ## Method Details

  - ### getSoftwareComponent

    public com.sas.metadata.remote.SoftwareComponent getSoftwareComponent()
    Gets the software component.
    Returns:
      Metadata software component that represents the SAS Foundation Services deployment.

  - ### getProperties

    public Properties getProperties()
    Gets properties which may be used to configure a file that describes a SAS Foundation Services deployment which is to be deployed in an IOC container.

    Property Key | Property Value
    --- | ---
    `MetadataSourceFactory.PROPERTY_SOFTWARECOMPONENT` | String name of the SoftwareComponent

    Returns:
      Deployment properties.

  - ### setSoftwareComponent

    public void setSoftwareComponent(com.sas.metadata.remote.SoftwareComponent softwareComponent) throws com.sas.metadata.remote.MdException
    Sets the software component.
    Parameters:
      `softwareComponent` - Metadata software component that represents the SAS Foundation Services deployment.
    Throws:
      `com.sas.metadata.remote.MdException` - if a unable to access metadata.

  - ### setContainerType

    public void setContainerType(String containerType) throws IllegalArgumentException
    Sets the container type.
    Parameters:
      `containerType` - Container type. One of `DeploymentContextFactory.CONTAINER_JBOSSMC` or `DeploymentContextFactory.CONTAINER_SPRING`.
    Throws:
      `IllegalArgumentException` - if an invalid container type is specified.

  - ### getContainerType

    public String getContainerType()
    Gets the container type.
    Returns:
      Container type. One of `DeploymentContextFactory.CONTAINER_JBOSSMC` or `DeploymentContextFactory.CONTAINER_SPRING` or `null` if undefined.

  - ### setRepository

    public void setRepository(String repository)
    Sets the name of the metadata repository which is to be queried to read a SAS Foundation Services deployment.
    Parameters:
      `repository` - Name of the repository that will be queried to read a SAS Foundation Services deployment.

  - ### setSecuritySPN

    public void setSecuritySPN(String metaspn)
    Sets the service principal name ("metaspn").
    Parameters:
      `metaspn` - Security service principal name.
    See Also:
      - `MetadataSourceFactory.PROPERTY_SSO_SECPACKAGELIST`

  - ### setSecurityPackageList

    public void setSecurityPackageList(String secpackagelist)
    Sets the secpackagelist.
    Parameters:
      `secpackagelist` - Security package list. A `null` may be specified (e.g. login credential is used).
    See Also:
      - `MetadataSourceFactory.PROPERTY_SSO_SECPACKAGELIST`

  - ### setUserId

    public void setUserId(String userId)
    Sets the user ID which will be used to connect to the SAS Metadata Server.
    Parameters:
      `userId` - Login ID used to connect to the SAS Metadata Server. A `null` may be specified (e.g. single sign-on).

  - ### setUserPassword

    public void setUserPassword(String userPassword)
    Sets the user's password which will be used to connect to the SAS Metadata Server.
    Parameters:
      `userPassword` - Login ID password used to connect to the SAS Metadata Server. A `null` may be specified (e.g. single sign-on).

  - ### setHost

    public void setHost(String host)
    Sets the Metadata Server's host.
    Parameters:
      `host` - Metadata Server's host.

  - ### setPort

    public void setPort(String port)
    Sets the port on which the SAS Metadata Server is listening for connections.
    Parameters:
      `port` - SAS Metadata Server's port.

  - ### setURL

    public void setURL(String url)
    Sets the URL that can be read to obtain SAS Foundation Services deployment metadata.
    Parameters:
      `url` - URL to a SAS Foundation Services deployment.

  - ### setMode

    public void setMode(String mode)
    Sets the mode that indicates whether the SAS Foundation Services deployment metadata is to be queried from a Metadata Repository or from a URL.
    Parameters:
      `mode` - Specify `MetadataSourceFactory.PROPERTY_METADATASERVER_REPOSITORY` if SAS Foundation Services metadata is to be queried from a SAS Metdata Repository or `MetadataSourceFactory.PROPERTY_URL` if the metadata is to be queried from a URL.

  - ### setDeploymentGroups

    public void setDeploymentGroups(Set<String> groupNames)
    Sets the groups of services which are enabled for deployment. Groups only need to be specified if a deployment contains multiple groups and one does not want to deploy all groups. This method is used to restrict the deployment to the specified groups.
    Parameters:
      `groupNames` - Collection of `String` elements representing the names of the service deployment groups which are enabled for deployment. An empty collection indicates that all services are enabled for deployment.

  - ### localizePropertyName

    public String localizePropertyName(String propertyName)
    Gets a localized name for the specified property.
    Parameters:
      `propertyName` - Name of the property which is to be localized.
    Returns:
      Localized name for the specified property.

  - ### getDescForProperty

    public String getDescForProperty(String propertyName)
    Gets a localized description for the specified property.
    Parameters:
      `propertyName` -
    Returns:
      Localized name for the specified property.

  - ### localizePropertyGroupName

    public String localizePropertyGroupName(int groupIndex)
    Gets a localized name for the specified group property.
    Parameters:
      `groupIndex` -
    Returns:
      Localized name for the specified property.

  - ### localizePropertyMode

    public String localizePropertyMode(String mode)
    Gets a localized name for the mode property.
    Parameters:
      `mode` - The source from which SAS Foundation Services metadata is to be queried.
    Returns:
      Localized name for the specified property.