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

com.sas.services.deployment
Class MetadataSourceFactory

com.sas.services.deployment.MetadataSourceFactory

public final class MetadataSourceFactory

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 logon 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).

Pre-existing Connection

Foundation services deployment metadata may be queried from a SAS Metadata Server using a pre-existing 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

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

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
static java.lang.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.
static java.lang.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.
static java.lang.String PROPERTY_METADATASERVER_HOST
          Property named "omr_host" that designates the name of the host on which a SAS Metadata Server is running.
static java.lang.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.
static java.lang.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.
static java.lang.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.
static java.lang.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.
static java.lang.String PROPERTY_MODE
          Property named "metadatasource_mode" that designates a mode of either "url" or "omr_repository".
static java.lang.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.
static java.lang.String PROPERTY_SSO_SECPACKAGELIST
          Property named "secpackagelist" that designates the single sign-on security package list which should be used.
static java.lang.String PROPERTY_SSO_SPN
          Property named "metaspn" that designates the service principal name that should be used during single sign-on.
static java.lang.String PROPERTY_URL
          Property named "url" that designates a URL to a metadata source from which foundation services metadata can be queried.
 
Method Summary
static MetadataSourceInterface createMetadataSource(MetadataSourceProperties metadataSourceProperties, Environment environment)
          Creates a metadata source based upon the specified properties.
static int getMaxNumberOfGroups()
          Gets the maximum number of service deployment groups which may exist within a service deployment.
static java.lang.String getServiceGroupName(int index)
          Gets the name of a service deployment group for the specified index.
static MetadataSourceInterface newMetadataSource(java.util.Properties properties)
          Creates a metadata source based upon the specified properties.
static MetadataSourceInterface newMetadataSource(java.util.Properties properties, Environment environment)
          Creates a metadata source based upon the specified properties.
 

Field Detail

PROPERTY_SOFTWARECOMPONENT

public static final java.lang.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:
Constant Field Values

PROPERTY_DEPLOYMENTGROUP

public static final java.lang.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:
Constant Field Values

PROPERTY_METADATASERVER_HOST

public static final java.lang.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:
Constant Field Values

PROPERTY_METADATASERVER_PORT

public static final java.lang.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:
Constant Field Values

PROPERTY_METADATASERVER_USERID

public static final java.lang.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_METADATASERVER_USERPASSWORD, Constant Field Values

PROPERTY_SSO_SECPACKAGELIST

public static final java.lang.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

PROPERTY_SSO_SPN

public static final java.lang.String PROPERTY_SSO_SPN
Property named "metaspn" that designates the service principal name that should be used during single sign-on.

See Also:
PROPERTY_SSO_SECPACKAGELIST

PROPERTY_METADATASERVER_USERPASSWORD

public static final java.lang.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_USERID, Constant Field Values

PROPERTY_METADATASERVER_REPOSITORY

public static final java.lang.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:
Constant Field Values

PROPERTY_CONNECTION

public static final java.lang.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 java.lang.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:
Constant Field Values

PROPERTY_MODE

public static final java.lang.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:
Constant Field Values
Method Detail

getServiceGroupName

public static java.lang.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:
java.lang.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(java.util.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(java.util.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:
newMetadataSource(Properties, Environment)

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.