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

Class MetadataSourceFactory

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

@SASScope("ALL") @BinaryCompatibilityOnly public final class MetadataSourceFactory extends Object
Factory which manufactures a metadata source which may be used to query metadata describing a SAS Foundation Services deployment. Typically, one would specify a properties file that defines whether the services deployment metadata is to be queried from a SAS Metadata Server or from a services deployment UTF-8 encoded XML file which has been exported from the server.

Foundation services deployment metadata may be queried from either a SAS Metadata Server or from a services deployment file which has been exported from a server using the Foundation Services Manager plug-in to the SAS Management Console.

Query Metadata from a SAS Metadata Server

The following options are supported to query foundation services deployment metadata from a SAS Metadata Server.

User ID/Password

Foundation services deployment metadata may be queried from a SAS Metadata Server opening a connection for a specified user ID.
Property NameDescription
software_componentsoftware component name
deployment_group_[n]Optional deployment group restrictions
omr_hostSAS Metadata Server's host
omr_portSAS Metadata Server's port
omr_repositorySAS Metadata Server repository
omr_userUser's login id
omr_passwordUser's password. The password may be plain text or encoded using SasPasswordString.

Single Sign-On

Foundation services deployment metadata may be queried from a SAS Metadata Server using single sign-on.
Property NameDescription
software_componentsoftware component name
deployment_group_[n]Optional deployment group restrictions
omr_hostSAS Metadata Server's host
omr_portSAS Metadata Server's port
omr_repositorySAS Metadata Server repository
metaspnSingle sign-on security principal name.
secpackagelistSingle sign-on security package list (or null to use the default).

Preexisting Connection

Foundation services deployment metadata may be queried from a SAS Metadata Server using a preexisting connection.
Property NameDescription
software_componentsoftware component name
deployment_group_[n]Optional deployment group restrictions
com.sas.services.connection.ConnectionInterfaceAn object which implements ConnectionInterface to the SAS Metadata Server.

Query Metadata from a Services Deployment File URL

If the foundation services deployment metadata is to be queried from a deployment file URL, specify the following properties.

Property NameDescription
deployment_group_[n]Optional deployment group restrictions
urlURL or String representation of a URL to a foundation services deployment file

Restrict Deployment of Services to Specified Group(s)

If all groups of foundation services are to be deployed, then there is no need to designate any deployment group restrictions in the properties file since all groups are deployed by default.

deployment_group_[n] is an optional property and should only be specified if there are some deployment groupings of services which are not to be deployed.

For example, if the foundation services deployment contains three deployment groups.

  • Core
  • Stored Process
  • Events

If one only wishes to deploy the services in the "Core" and "Stored Process" groups, then one would specify the following two properties:

  • deployment_group_1=Core
  • deployment_group_2=Stored Process

Note that we omitted the "Events" deployment group because we do not want to include this group's services in the deployment.

Properties File Character Encoding

Note that the ISO 8859-1 character encoding is used is used to read the properties file. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings.
Since:
1.1.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Property named "com.sas.services.connection.ConnectionInterface" that designates an object which implements a connection which should be used to query services metadata instead of opening a new connection.
    static final String
    Property name prefix "deployment_group_" that designates the name of a metadata Tree which whose members represent a grouping of services which are to be deployed.
    static final String
    Property named "omr_host" that designates the name of the host on which a SAS Metadata Server is running.
    static final String
    Property named "omr_port" that designates the name of the port on which a SAS Metadata Server is listening for connections.
    static final String
    Property named "omr_repository" that designates the name or ID of the SAS Metadata Server's repository which contains the foundation services deployment metadata.
    static final String
    Property named "omr_user" that designates the user ID which should be used to open a connection to the SAS Metadata Server.
    static final String
    Property named "omr_password" that designates the user password which should be used to open a connection to the SAS Metadata Server.
    static final String
    Property named "metadatasource_mode" that designates a mode of either "url" or "omr_repository".
    static final String
    Property named "software_component" that designates the name of the metadata SoftwareComponent associated with the foundation services deployment which is to be queried.
    static final String
    Property named "secpackagelist" that designates the single sign-on security package list which should be used.
    static final String
    Property named "metaspn" that designates the service principal name that should be used during single sign-on.
    static final String
    Property named "url" that designates a URL to a metadata source from which foundation services metadata can be queried.
  • Method Summary

    Modifier and Type
    Method
    Description
    createMetadataSource(MetadataSourceProperties metadataSourceProperties, Environment environment)
    Creates a metadata source based upon the specified properties.
    static int
    Gets the maximum number of service deployment groups which may exist within a service deployment.
    static String
    Gets the name of a service deployment group for the specified index.
    newMetadataSource(Properties properties)
    Creates a metadata source based upon the specified properties.
    newMetadataSource(Properties properties, Environment environment)
    Creates a metadata source based upon the specified properties.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PROPERTY_SOFTWARECOMPONENT

      public static final String PROPERTY_SOFTWARECOMPONENT
      Property named "software_component" that designates the name of the metadata SoftwareComponent associated with the foundation services deployment which is to be queried.
      See Also:
    • PROPERTY_DEPLOYMENTGROUP

      public static final String PROPERTY_DEPLOYMENTGROUP
      Property name prefix "deployment_group_" that designates the name of a metadata Tree which whose members represent a grouping of services which are to be deployed. Suffix this value with an integer value beginning with "1" and incremented by one for each additional deployment group that is to be included (e.g. "deployment_group_1", "deployment_group_2", etc.).

      This is an optional property which is only required if the foundation services deployment metadata contains more than one services deployment group and services in some groups should not be deployed. deployment group restrictions

      If all services should be deployed, then there is no need to specify this property since no restrictions are being applied.

      See Also:
    • PROPERTY_METADATASERVER_HOST

      public static final String PROPERTY_METADATASERVER_HOST
      Property named "omr_host" that designates the name of the host on which a SAS Metadata Server is running.
      See Also:
    • PROPERTY_METADATASERVER_PORT

      public static final String PROPERTY_METADATASERVER_PORT
      Property named "omr_port" that designates the name of the port on which a SAS Metadata Server is listening for connections.
      See Also:
    • PROPERTY_METADATASERVER_USERID

      public static final String PROPERTY_METADATASERVER_USERID
      Property named "omr_user" that designates the user ID which should be used to open a connection to the SAS Metadata Server.
      See Also:
    • PROPERTY_SSO_SECPACKAGELIST

      public static final String PROPERTY_SSO_SECPACKAGELIST
      Property named "secpackagelist" that designates the single sign-on security package list which should be used. This value may be null to indicate that the default should be used or it may be assigned a value such as "Kerberos,NTLM" representing the list of acceptable security packages.

      Set the metaspn property to specify the service principal name to be used for single sign-on.

      See Also:
    • PROPERTY_SSO_SPN

      public static final String PROPERTY_SSO_SPN
      Property named "metaspn" that designates the service principal name that should be used during single sign-on.
      See Also:
    • PROPERTY_METADATASERVER_USERPASSWORD

      public static final String PROPERTY_METADATASERVER_USERPASSWORD
      Property named "omr_password" that designates the user password which should be used to open a connection to the SAS Metadata Server. This password may be encoded using SasPasswordString.
      See Also:
    • PROPERTY_METADATASERVER_REPOSITORY

      public static final String PROPERTY_METADATASERVER_REPOSITORY
      Property named "omr_repository" that designates the name or ID of the SAS Metadata Server's repository which contains the foundation services deployment metadata.
      See Also:
    • PROPERTY_CONNECTION

      public static final String PROPERTY_CONNECTION
      Property named "com.sas.services.connection.ConnectionInterface" that designates an object which implements a connection which should be used to query services metadata instead of opening a new connection.
    • PROPERTY_URL

      public static final String PROPERTY_URL
      Property named "url" that designates a URL to a metadata source from which foundation services metadata can be queried. Typically this value will specify the URL to a foundation services deployment file.

      Use this value if foundation services deployment metadata is to be queried from a URL source instead of the SAS Metadata Server.

      See Also:
    • PROPERTY_MODE

      public static final String PROPERTY_MODE
      Property named "metadatasource_mode" that designates a mode of either "url" or "omr_repository".

      The mode defaults to "url" if this property is not specified and the "url" is defined, otherwise the mode defaults to "omr_repository"

      See Also:
  • Method Details

    • getServiceGroupName

      public static String getServiceGroupName(int index)
      Gets the name of a service deployment group for the specified index.
      Parameters:
      index - Index of the deployment group. Groups are indexed beginning with the value 1 and no more than {#MAX_NUM_GROUPS}.
      Returns:
      Name of a service deployment group.
      Throws:
      IllegalArgumentException - if an invalid index is specified.
    • getMaxNumberOfGroups

      public static int getMaxNumberOfGroups()
      Gets the maximum number of service deployment groups which may exist within a service deployment.
      Returns:
      Maximum number of groups which may exist in a service deployment.
    • createMetadataSource

      public static MetadataSourceInterface createMetadataSource(MetadataSourceProperties metadataSourceProperties, Environment environment) throws ServiceException
      Creates a metadata source based upon the specified properties. Properties can be specified in a file containing the metadata source information describing an OMR or URL metadata source.

      The syntax of these files is described in the package documentation.

      The following links provide sample properties files.

      Parameters:
      metadataSourceProperties - Properties describing how to access the metadata source.
      environment - The environment object encapsulates resources provided by the container.
      Returns:
      Metadata source. TThe caller is responsible for invoking the metadata source's destroy() method after services have been deployed when the metadata source is no longer needed.
      Throws:
      ServiceException - if unable to create a new metadata source.
    • newMetadataSource

      public static MetadataSourceInterface newMetadataSource(Properties properties, Environment environment) throws ServiceException
      Creates a metadata source based upon the specified properties. Properties can be specified in a file containing the metadata source information describing an OMR or URL metadata source.

      The following links provide sample properties files.

      Parameters:
      properties - Properties describing how to access the metadata source.
      environment - The environment object encapsulates resources provided by the container.
      Returns:
      Metadata source. The caller is responsible for invoking the metadata source's destroy() method after services have been deployed when the metadata source is no longer needed.
      Throws:
      ServiceException - if unable to create a new metadata source.
    • newMetadataSource

      public static MetadataSourceInterface newMetadataSource(Properties properties) throws ServiceException
      Creates a metadata source based upon the specified properties. Properties can be specified in a file containing the metadata source information describing an OMR or URL metadata source.

      This method is equivalent to calling newMetadataSource(Properties, Environment) with a null environment parameter.

      The following links provide sample properties files.

      Parameters:
      properties - Properties describing how to access the metadata source.
      Returns:
      Metadata source. The caller is responsible for invoking the metadata source's destroy() method after services have been deployed when the metadata source is no longer needed.
      Throws:
      ServiceException - if unable to create a new metadata source.
      See Also: