Package com.sas.services

# Interface ServiceComponentConfigInterface

All Known Implementing Classes:
  `AbstractServiceComponentConfig`, `SessionServiceInitObject`

public interface ServiceComponentConfigInterface
Interface describing operations which pertain to a foundation service's configuration metadata.

Since:
  1.1.3

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Document`
  `createDocument(com.sas.metadata.remote.ServiceComponent serviceComponent)`
  Creates an XML document representation of the service component's configuration.
  `String`
  `getConfigName()`
  Gets the name of the configuration.
  `Document`
  `getDocument()`
  Creates an XML document represention of foundation service component's configuration that provides the document Element.
  `boolean`
  `isConfigurationUpdateable()`
  Determines whether or not this service component's configuration is updateable.
  `void`
  `mergeConfigFromFile(com.sas.metadata.remote.ServiceComponent serviceComponent, File file)`
  Updates the service's configuration by adding new service configuration read from the specified file to the service component's preexisting configuration.
  `void`
  `setConfigName(String configName)`
  Sets the name of the configuration.
  `void`
  `writeServiceConfigToFile(File file, com.sas.metadata.remote.ServiceComponent serviceComponent)`
  Write the service's configuration to the specified output stream.

- ## Method Details

  - ### isConfigurationUpdateable

    boolean isConfigurationUpdateable()
    Determines whether or not this service component's configuration is updateable.
    Returns:
      `true` if the service configuration is udpateable or `false` if the configuration may not be updated by merging a new configuration.

  - ### getDocument

    Document getDocument() throws ServiceException
    Creates an XML document represention of foundation service component's configuration that provides the document Element.
    Returns:
      Foundation service configuration document.
    Throws:
      `ServiceException` - if unable to create a document.

  - ### createDocument

    Document createDocument(com.sas.metadata.remote.ServiceComponent serviceComponent) throws ServiceException
    Creates an XML document representation of the service component's configuration.
    Parameters:
      `serviceComponent` - Service component's which will be queried for an XML configuration stored in an configuration property text store.
    Returns:
      XML document representation of the service configuration or `null` if a document is unavailable.
    Throws:
      `ServiceException` - if a failure occurred while attempting to create an XML document representation of the service configuration.

  - ### mergeConfigFromFile

    void mergeConfigFromFile(com.sas.metadata.remote.ServiceComponent serviceComponent, File file) throws ServiceException
    Updates the service's configuration by adding new service configuration read from the specified file to the service component's preexisting configuration.
    Parameters:
      `serviceComponent` - The service whose configuration is to be updated.
      `file` - File containing the service configuration which is to be added to the service component's current configuration. Note that only configuration data that is additive in nature can be appended. Configuration data that is non-additive will be ignored.
    Throws:
      `ServiceException` - if unable to update the service's configuration.

  - ### writeServiceConfigToFile

    void writeServiceConfigToFile(File file, com.sas.metadata.remote.ServiceComponent serviceComponent) throws ServiceException
    Write the service's configuration to the specified output stream.
    Parameters:
      `file` - File to which the service's configuration is to be written.
      `serviceComponent` - Service component whose configuration is to be written to the specified file.
    Throws:
      `ServiceException` - in an exception is encountered writing the service component's configuration to the specified file.

  - ### getConfigName

    String getConfigName()
    Gets the name of the configuration.
    Returns:
      The name of this configuration.

  - ### setConfigName

    void setConfigName(String configName)
    Sets the name of the configuration.
    Parameters:
      `configName` - The name of this configuration.