com.sas.services.deployment
Class URLMetadataSource

java.lang.Object
  |
  +--com.sas.services.deployment.AbstractMetadataSource
        |
        +--com.sas.services.deployment.URLMetadataSource
All Implemented Interfaces:
MetadataSourceInterface,

public class URLMetadataSource
extends AbstractMetadataSource
implements MetadataSourceInterface

URL accessible metadata source for an application's foundation services deployment data.

This class is used to query the metadata XML from a URL accessible source such as a file. Use the Foundation Services Manager plug-in to the SAS Management Console to export an application's foundation services deployment metadata to a UTF-8 encoded XML file which may be used at runtime to deploy services.

Alternatively, one can use the OMRMetadataSource to obtain foundation services deployment metadata from a SAS Metadata Repository.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
URLMetadataSource(InputStream inputStream, String softwareComponentName)
          Constructs an instance with the specified URL metadata source and the SoftwareComponent name.
URLMetadataSource(InputStream inputStream, String softwareComponentName, Set serviceDeploymentNames)
          Constructs a metadata source that is capable of reading services deployment metadata from an input stream.
URLMetadataSource(InputStream inputStream, String softwareComponentName, String serviceDeploymentName)
          Constructs an instance with the specified URL metadata source, SoftwareComponent name, and deployment group name.
URLMetadataSource(URL url)
          Constructs an instance with the specified URL metadata source and the SoftwareComponent name.
URLMetadataSource(URL url, String softwareComponentName)
          Constructs an instance with the specified URL metadata source and the SoftwareComponent name.
URLMetadataSource(URL url, String softwareComponentName, Set serviceDeploymentNames)
          Constructs an instance with the specified URL metadata source, SoftwareComponent name(s), and deployment group name(s).
URLMetadataSource(URL url, String softwareComponentName, String serviceDeploymentName)
          Constructs an instance with the specified URL metadata source, SoftwareComponent name, and deployment group name.
 
Method Summary
protected  String getDeployFailureMessage()
          Gets a message describing this metadata source's inability to deploy services.
 String getMetadata()
          Gets foundation service deployment metadata from the metadata source.
 URL getURL()
          Gets the URL.
 String toString()
          Gets a string describing this source.
 
Methods inherited from class com.sas.services.deployment.AbstractMetadataSource
addServiceDeploymentName, destroy, equals, getApplicationServiceDeployment, getMdObjectStore, getMdObjectStore, getRMIClientSocketFactory, getRMIServerSocketFactory, getServiceDeploymentNames, getSoftwareComponentName, getStringFromInputSource, hashCode, isOKToDestroy, isServiceDeploymentDeployable, isServiceDeploymentDeployable, removeServiceDeploymentName, setApplicationServiceDeployment, setIsOKToClose, setRMIClientSocketFactory, setRMIServerSocketFactory, setServiceDeploymentNames
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sas.services.deployment.MetadataSourceInterface
destroy, getApplicationServiceDeployment, getMdObjectStore, getServiceDeploymentNames, isOKToDestroy, isServiceDeploymentDeployable, isServiceDeploymentDeployable, setApplicationServiceDeployment, setIsOKToClose
 

Constructor Detail

URLMetadataSource

public URLMetadataSource(URL url)
Constructs an instance with the specified URL metadata source and the SoftwareComponent name. The SoftwareComponent name is used to restrict the ServiceComponent elements queried from the OMA metadata to only those that exist under the specified software component. Use this constructor if you want all service deployment groups to be deployed. Use URLMetadataSource(url, softwareComponentName, serviceDeploymentGroup) to deploy one deployment group within the software component or URLMetadataSource(url, softwareComponentName, serviceDeploymentGroups) to deploy multiple deployment groups within the software component.
Parameters:
url - URL to a source that contains the metadata.
Throws:
IllegalArgumentException - if an invalid URL is specified.

URLMetadataSource

public URLMetadataSource(URL url,
                         String softwareComponentName)
                  throws InitializationException
Constructs an instance with the specified URL metadata source and the SoftwareComponent name. The SoftwareComponent name is used to restrict the ServiceComponent elements queried from the OMA metadata to only those that exist under the specified software component. Use this constructor if you want all service deployment groups to be deployed. Use URLMetadataSource(url, softwareComponentName, serviceDeploymentGroup) to deploy one deployment group within the software component or URLMetadataSource(url, softwareComponentName, serviceDeploymentGroups) to deploy multiple deployment groups within the software component.
Parameters:
url - URL to a source that contains the metadata.
softwareComponentName - SoftwareComponent name.
Throws:
InitializationException - if a null software component is specified.
IllegalArgumentException - if an invalid URL is specified.

URLMetadataSource

public URLMetadataSource(InputStream inputStream,
                         String softwareComponentName)
                  throws InitializationException
Constructs an instance with the specified URL metadata source and the SoftwareComponent name. The SoftwareComponent name is used to restrict the ServiceComponent elements queried from the OMA metadata to only those that exist under the specified software component. Use this constructor if you want all service deployment groups to be deployed. Use URLMetadataSource(inputStream, softwareComponentName, serviceDeploymentGroup) to deploy one deployment group within the software component or URLMetadataSource(inputStream, softwareComponentName, serviceDeploymentGroups) to deploy multiple deployment groups within the software component.
Parameters:
inputStream - Input stream from which service deployment metadata is to be read. The input stream will be closed once it has been read.
softwareComponentName - SoftwareComponent name.
Throws:
InitializationException - if a null software component is specified.
IllegalArgumentException - if an invalid input stream is specified.

URLMetadataSource

public URLMetadataSource(URL url,
                         String softwareComponentName,
                         String serviceDeploymentName)
                  throws InitializationException
Constructs an instance with the specified URL metadata source, SoftwareComponent name, and deployment group name. The SoftwareComponent name is used to restrict the ServiceComponent elements queried from the OMA metadata to only those that exist under the specified software component. Use URLMetadataSource(url, softwareComponentName) to deploy all deployment groups within the software component.
Parameters:
url - URL to a source that contains the metadata.
softwareComponentName - SoftwareComponent name.
serviceDeploymentName - Deployment group name.
Throws:
InitializationException - if a null software component or deployment group is specified.
IllegalArgumentException - if an invalid URL is specified.

URLMetadataSource

public URLMetadataSource(InputStream inputStream,
                         String softwareComponentName,
                         String serviceDeploymentName)
                  throws InitializationException
Constructs an instance with the specified URL metadata source, SoftwareComponent name, and deployment group name. The SoftwareComponent name is used to restrict the ServiceComponent elements queried from the OMA metadata to only those that exist under the specified software component. Use URLMetadataSource(url, softwareComponentName) to deploy all deployment groups within the software component.
Parameters:
inputStream - Input stream from which service deployment metadata is to be read. The input stream will be closed once it has been read.
softwareComponentName - SoftwareComponent name.
serviceDeploymentName - Deployment group name.
Throws:
InitializationException - if a null software component or deployment group is specified.
IllegalArgumentException - if an invalid input stream is specified.

URLMetadataSource

public URLMetadataSource(URL url,
                         String softwareComponentName,
                         Set serviceDeploymentNames)
                  throws InitializationException
Constructs an instance with the specified URL metadata source, SoftwareComponent name(s), and deployment group name(s).
Parameters:
url - URL to a source that contains the metadata.
softwareComponentName - SoftwareComponent name.
serviceDeploymentNames - Deployment group names. A null or empty set will deploy all services regardless of their deployment group.
Throws:
InitializationException - if a null software component is specified.
IllegalArgumentException - if an invalid URL is specified.

URLMetadataSource

public URLMetadataSource(InputStream inputStream,
                         String softwareComponentName,
                         Set serviceDeploymentNames)
                  throws InitializationException
Constructs a metadata source that is capable of reading services deployment metadata from an input stream.
Parameters:
inputStream - Input stream from which service deployment metadata is to be read. The input stream will be closed once it has been read.
softwareComponentName - SoftwareComponent name.
serviceDeploymentNames - Deployment group names. A null or empty set will deploy all services regardless of their deployment group.
Throws:
InitializationException - if a null software component is specified.
IllegalArgumentException - if an invalid input stream is specified.
Method Detail

getURL

public final URL getURL()
Gets the URL.
Returns:
URL.

toString

public final String toString()
Gets a string describing this source.
Overrides:
toString in class AbstractMetadataSource
Returns:
String describing this metadata source.

getMetadata

public final String getMetadata()
                         throws ServiceException
Gets foundation service deployment metadata from the metadata source.
Specified by:
getMetadata in interface MetadataSourceInterface
Overrides:
getMetadata in class AbstractMetadataSource
Returns:
Foundation service deployment metadata.
Throws:
ServiceException - if unable to obtain the foundation service deployment metadata.
See Also:
MetadataSourceInterface.getMetadata()

getDeployFailureMessage

protected final String getDeployFailureMessage()
Gets a message describing this metadata source's inability to deploy services.
Overrides:
getDeployFailureMessage in class AbstractMetadataSource
Returns:
Message describing a failure to deploy services.




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:53