### *** 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:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `URLMetadataSource(InputStream inputStream, String softwareComponentName)`
  Constructs an instance with the specified URL metadata source and the `SoftwareComponent` name.
  `URLMetadataSource(InputStream inputStream, String softwareComponentName, String serviceGroupName)`
  Constructs an instance with the specified URL metadata source, `SoftwareComponent` name, 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 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, String serviceGroupName)`
  Constructs an instance with the specified URL metadata source, `SoftwareComponent` name, and deployment group name.
  `URLMetadataSource(URL url, String softwareComponentName, Set<String> serviceGroupNames)`
  Constructs an instance with the specified URL metadata source, `SoftwareComponent` name(s), and deployment group name(s).
  `URLMetadataSource(URL url, Set<String> serviceGroupNames)`
  Constructs an instance with the specified URL metadata source, `SoftwareComponent` name(s), and deployment group name(s).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object other)`
  Determines whether or not the other object equals this object.
  `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.
  `int`
  `hashCode()`
  Gets a hash code for this service attribute.
  `String`
  `toString()`
  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, setSoftwareComponentName`

  ### 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, getProperties, getServiceDeploymentNames, isServiceDeploymentDeployable, isServiceDeploymentDeployable, setApplicationServiceDeployment, setProperties`

- ## Constructor Details

  - ### 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, but not any other groups.
    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 serviceGroupName) 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.
      `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 the `Name` attribute of a metadata `Tree` that is a subtree of the `SoftwareComponent`.
    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 serviceGroupName) 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.
      `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 the `Name` attribute of a metadata `Tree` that is a subtree of the `SoftwareComponent`.
    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, Set<String> serviceGroupNames) 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.
      `serviceGroupNames` - `Set` of `String` names 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 a `null` or empty set is specified, then no filter will be applied. The service deployment name corresponds to the `Name` attribute of a metadata `Tree` that is a subtree of the `SoftwareComponent`.
    Throws:
      `InitializationException` - if a `null` software 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, `SoftwareComponent` name(s), and deployment group name(s).
    Parameters:
      `url` - URL to a source that contains the metadata.
      `softwareComponentName` - `SoftwareComponent` name.
      `serviceGroupNames` - `Set` of `String` names 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 a `null` or empty set is specified, then no filter will be applied. The service deployment name corresponds to the `Name` attribute of a metadata `Tree` that is a subtree of the `SoftwareComponent`.
    Throws:
      `InitializationException` - if a `null` software 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` - `SoftwareComponent` name.
      `serviceGroupNames` - `Set` of `String` names 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 a `null` or empty set is specified, then no filter will be applied. The service deployment name corresponds to the `Name` attribute of a metadata `Tree` that is a subtree of the `SoftwareComponent`.
    Throws:
      `InitializationException` - if a `null` software 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:
      `toString` in class `AbstractMetadataSource`
    Returns:
      String describing this metadata source.

  - ### getMetadata

    public String getMetadata() throws ServiceException
    Gets foundation service deployment metadata from the metadata source.
    Specified by:
      `getMetadata` in interface `MetadataSourceInterface`
    Specified by:
      `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 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.

  - ### 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:
      `hashCode` in class `AbstractMetadataSource`
    Returns:
      Hash code.

  - ### equals

    public boolean equals(Object other)
    Determines whether or not the other object equals this object.
    Overrides:
      `equals` in class `AbstractMetadataSource`
    Parameters:
      `other` - Other object.
    Returns:
      `true` if the objects are equivalent.