*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.deployment
Class URLMetadataSource
java.lang.Object
com.sas.services.deployment.AbstractMetadataSource
com.sas.services.deployment.URLMetadataSource
- All Implemented Interfaces:
MetadataSourceInterface,Serializable
@SASScope("ALL")
@BinaryCompatibilityOnly
public final 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:
-
Constructor Summary
ConstructorsConstructorDescriptionURLMetadataSource(InputStream inputStream, String softwareComponentName) Constructs an instance with the specified URL metadata source and theSoftwareComponentname.URLMetadataSource(InputStream inputStream, String softwareComponentName, String serviceGroupName) Constructs an instance with the specified URL metadata source,SoftwareComponentname, and deployment group name.URLMetadataSource(InputStream inputStream, String softwareComponentName, Set<String> serviceGroupNames) Constructs a metadata source that is capable of reading services deployment metadata from an input stream.URLMetadataSource(URL url) Constructs an instance with the specified URL metadata source and theSoftwareComponentname.URLMetadataSource(URL url, String softwareComponentName) Constructs an instance with the specified URL metadata source and theSoftwareComponentname.URLMetadataSource(URL url, String softwareComponentName, String serviceGroupName) Constructs an instance with the specified URL metadata source,SoftwareComponentname, and deployment group name.URLMetadataSource(URL url, String softwareComponentName, Set<String> serviceGroupNames) Constructs an instance with the specified URL metadata source,SoftwareComponentname(s), and deployment group name(s).URLMetadataSource(URL url, Set<String> serviceGroupNames) Constructs an instance with the specified URL metadata source,SoftwareComponentname(s), and deployment group name(s). -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(Object other) Determines whether or not the other object equals this object.protected StringGets a message describing this metadata source's inability to deploy services.StringGets foundation service deployment metadata from the metadata source.URLgetURL()Gets the URL.inthashCode()Gets a hash code for this service attribute.StringtoString()Gets a string describing this source.Methods inherited from class com.sas.services.deployment.AbstractMetadataSource
addRMIBinding, addServiceDeploymentName, createMdStore, destroy, getApplicationServiceDeployment, getMdObjectStore, getProperties, getRMIClientSocketFactory, getRMIServerSocketFactory, getServiceDeploymentNames, getSoftwareComponentName, getStringFromInputSource, isServiceDeploymentDeployable, isServiceDeploymentDeployable, lookupServices, removeServiceDeploymentName, setApplicationServiceDeployment, setProperties, setRMIClientSocketFactory, setRMIServerSocketFactory, setServiceDeploymentNames, setSoftwareComponentNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sas.services.deployment.MetadataSourceInterface
destroy, getApplicationServiceDeployment, getMdObjectStore, getProperties, getServiceDeploymentNames, isServiceDeploymentDeployable, isServiceDeploymentDeployable, setApplicationServiceDeployment, setProperties
-
Constructor Details
-
URLMetadataSource
public URLMetadataSource(URL url) Constructs an instance with the specified URL metadata source and theSoftwareComponentname. TheSoftwareComponentname is used to restrict theServiceComponentelements 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. UseURLMetadataSource(url, softwareComponentName, serviceDeploymentGroup)to deploy one deployment group within the software component orURLMetadataSource(url, softwareComponentName, serviceDeploymentGroups)to deploy multiple deployment groups within the software component, but not any other groups.- Parameters:
url- URL to a source that contains the metadata.- Throws:
IllegalArgumentException- if an invalid URL is specified.
-
URLMetadataSource
Constructs an instance with the specified URL metadata source and theSoftwareComponentname. TheSoftwareComponentname is used to restrict theServiceComponentelements 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. UseURLMetadataSource(url, softwareComponentName, serviceDeploymentGroup)to deploy one deployment group within the software component orURLMetadataSource(url, softwareComponentName, serviceDeploymentGroups)to deploy multiple deployment groups within the software component.- Parameters:
url- URL to a source that contains the metadata.softwareComponentName-SoftwareComponentname.- Throws:
InitializationException- if anullsoftware 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 theSoftwareComponentname. TheSoftwareComponentname is used to restrict theServiceComponentelements 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. UseURLMetadataSource(inputStream, softwareComponentName, serviceDeploymentGroup)to deploy one deployment group within the software component orURLMetadataSource(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-SoftwareComponentname.- Throws:
InitializationException- if anullsoftware component is specified.IllegalArgumentException- if an invalid input stream is specified.
-
URLMetadataSource
public URLMetadataSource(URL url, String softwareComponentName, String serviceGroupName) throws InitializationException Constructs an instance with the specified URL metadata source,SoftwareComponentname, and deployment group name. TheSoftwareComponentname is used to restrict theServiceComponentelements queried from the OMA metadata to only those that exist under the specified software component. UseURLMetadataSource(url, softwareComponentName)to deploy all deployment groups within the software component.- Parameters:
url- URL to a source that contains the metadata.softwareComponentName-SoftwareComponentname.serviceGroupName- The name of a service group that is to be deployed. Only services that are defined in this group will be deployed. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.- Throws:
InitializationException- if anullsoftware component or deployment group is specified.IllegalArgumentException- if an invalid URL is specified.
-
URLMetadataSource
public URLMetadataSource(InputStream inputStream, String softwareComponentName, String serviceGroupName) throws InitializationException Constructs an instance with the specified URL metadata source,SoftwareComponentname, and deployment group name. TheSoftwareComponentname is used to restrict theServiceComponentelements queried from the OMA metadata to only those that exist under the specified software component. UseURLMetadataSource(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-SoftwareComponentname.serviceGroupName- The name of a service group that is to be deployed. Only services that are defined in this group will be deployed. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.- Throws:
InitializationException- if anullsoftware component or deployment group is specified.IllegalArgumentException- if an invalid input stream is specified.
-
URLMetadataSource
Constructs an instance with the specified URL metadata source,SoftwareComponentname(s), and deployment group name(s).- Parameters:
url- URL to a source that contains the metadata.serviceGroupNames-SetofStringnames designating the service groups that are to be deployed. Use this parameter if you want to deploy services that belong to specified groups, but not all groups (e.g. services in the "Core" and "Stored Process" groups, but not in any other groups). If anullor empty set is specified, then no filter will be applied. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.- Throws:
InitializationException- if anullsoftware component is specified.IllegalArgumentException- if an invalid URL is specified.
-
URLMetadataSource
public URLMetadataSource(URL url, String softwareComponentName, Set<String> serviceGroupNames) throws InitializationException Constructs an instance with the specified URL metadata source,SoftwareComponentname(s), and deployment group name(s).- Parameters:
url- URL to a source that contains the metadata.softwareComponentName-SoftwareComponentname.serviceGroupNames-SetofStringnames designating the service groups that are to be deployed. Use this parameter if you want to deploy services that belong to specified groups, but not all groups (e.g. services in the "Core" and "Stored Process" groups, but not in any other groups). If anullor empty set is specified, then no filter will be applied. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.- Throws:
InitializationException- if anullsoftware component is specified.IllegalArgumentException- if an invalid URL is specified.
-
URLMetadataSource
public URLMetadataSource(InputStream inputStream, String softwareComponentName, Set<String> serviceGroupNames) 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-SoftwareComponentname.serviceGroupNames-SetofStringnames designating the service groups that are to be deployed. Use this parameter if you want to deploy services that belong to specified groups, but not all groups (e.g. services in the "Core" and "Stored Process" groups, but not in any other groups). If anullor empty set is specified, then no filter will be applied. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.- Throws:
InitializationException- if anullsoftware component is specified.IllegalArgumentException- if an invalid input stream is specified.
-
-
Method Details
-
getURL
public URL getURL()Gets the URL.- Returns:
- URL.
-
toString
public String toString()Gets a string describing this source.- Overrides:
toStringin classAbstractMetadataSource- Returns:
- String describing this metadata source.
-
getMetadata
Gets foundation service deployment metadata from the metadata source.- Specified by:
getMetadatain interfaceMetadataSourceInterface- Specified by:
getMetadatain classAbstractMetadataSource- Returns:
- Foundation service deployment metadata.
- Throws:
ServiceException- if unable to obtain the foundation service deployment metadata.- See Also:
-
getDeployFailureMessage
protected String getDeployFailureMessage()Gets a message describing this metadata source's inability to deploy services.- Overrides:
getDeployFailureMessagein classAbstractMetadataSource- Returns:
- Message describing a failure to deploy services.
-
hashCode
public int hashCode()Gets a hash code for this service attribute. The hash is an XOR of all of this service's fields.- Overrides:
hashCodein classAbstractMetadataSource- Returns:
- Hash code.
-
equals
public boolean equals(Object other) Determines whether or not the other object equals this object.- Overrides:
equalsin classAbstractMetadataSource- Parameters:
other- Other object.- Returns:
trueif the objects are equivalent.
-