All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

## com.sas.services
Class ServiceProfile

    com.sas.services.ServiceProfile

All Implemented Interfaces:
  ExportServiceConfigInterface, MergeServiceConfigInterface

    public class ServiceProfile

implements ExportServiceConfigInterface, MergeServiceConfigInterface

Profile describing a foundation service's capabilities.

Since:
  9.2

Field Summary
`static int` | `ACTION_EXPORT` Service supports exporting its configuration to an XML file.
`static int` | `ACTION_INSTALL` Service supports installing a configuration which may be layered upon existing configuration(s).
`static int` | `ACTION_MERGE` Service supports merging a configuration read from an XML file into its existing configuration.

Constructor Summary
`ServiceProfile(ServiceComponentConfigInterface serviceComponentConfiguration, int supportedActions, java.lang.String[] dependentServiceInterfaces, java.lang.String serviceInterfaceClass, java.lang.String serviceImplementationClass, java.lang.String configUserInterfaceClassName, boolean isSingletonService)` Constructs a profile that describes a foundation service.

Method Summary
`AbstractServiceComponentConfig` | `createConfig(java.lang.String configName, org.w3c.dom.Document document)` Creates a service configuration by parsing the specified XML document.
`org.w3c.dom.Document` | `createDocument(com.sas.metadata.remote.ServiceComponent serviceComponent)` Creates an XML document representation of the service's configuration.
`AbstractServiceComponentConfig` | `createServiceComponentConfig(java.lang.String configName, org.w3c.dom.Document document)` Creates a service component configuration initialized using the text store associated with the specified XML.
`AbstractServiceComponentConfig` | `createServiceConfig(ServiceConfigDocument serviceConfigDocument)` Creates a service component configuration initialized using the text store associated with the specified property.
`AbstractServiceComponentConfig` | `createServiceConfigForProperty(com.sas.metadata.remote.Property property)` Creates a service component configuration initialized using the text store associated with the specified property.
`com.sas.metadata.remote.Property` | `createServiceConfigProperty(com.sas.metadata.remote.ServiceComponent serviceComponent, java.lang.String configName, java.lang.String configDesc, org.w3c.dom.Document configDocument)` Creates a new property for the specified service initializing it with a default configuration.
`com.sas.metadata.remote.Property` | `createServiceConfigProperty(com.sas.metadata.remote.ServiceComponent serviceComponent, java.lang.String configName, java.lang.String configDesc, org.w3c.dom.Document configDocument, boolean isApplicationConfig)` Creates a new property for the specified service initializing it with a default configuration.
`void` | `exportServiceConfig(java.io.File file, ServiceAggregateConfig serviceAggregateConfig, boolean isExportingBaseConfig, java.util.List consumerNames)` Exports the service configuration to a UTF-8 encoded XML file.
`java.lang.String` | `getBeanIdForService(com.sas.metadata.remote.CMetadata cMetadata)` Gets the ID for the service that is to be represented as a bean.
`java.lang.String` | `getConfigUserInterfaceClassName()` Gets the fully-qualified class name of the user interface which provides a view for this configuration.
`protected java.lang.String` | `getDefaultFilename()` Gets the name of the service.
`AbstractServiceComponentConfig` | `getDefaultServiceConfig(java.lang.String configName)` Gets the default configuration for the service.
`java.lang.String` | `getDefaultServiceConfigFilename()` Gets the default filename for an XML file that contains this service's configuration.
`java.lang.String[]` | `getDependentServiceInterfaces()` Gets an array of strings representing the Java interfaces of service(s) for the services required by this service.
`ServiceComponentConfigInterface` | `getServiceComponentConfiguration()` Gets the service component's configuration that governs the configuration metadata that may be used to initialize or re-configure the service component.
`static ServiceConfigDocument` | `getServiceConfigDocument(com.sas.metadata.remote.Property property)` Creates a value object that relates the name of a configuration to an XML document that represents a service configuration.
`ExportServiceConfigInterface` | `getServiceConfigExporter()` Gets a utility which can be used to export a foundation service's configuration to a UTF-8 encoded XML file.
`MergeServiceConfigInterface` | `getServiceConfigMerger()` Gets a utility which can be used to merge a foundation service's configuration read from UTF-8 encoded XML file into a pre-existing configuration.
`java.lang.String` | `getServiceDisplayDescription()` Gets a localized description of the service.
`java.lang.String` | `getServiceDisplayName()` Gets a localized name for the service.
`java.lang.String` | `getServiceImplementationClass()` Gets the implementation class for the service created by this factory.
`java.lang.String` | `getServiceInterfaceClass()` The fully-qualified Java class name of the primary interface implemented by a service created by this factory.
`boolean` | `hasServiceConfig()` Determines whether the service supports configuration data.
`boolean` | `hasServiceConfig(com.sas.metadata.remote.ServiceComponent serviceComponent)` Determines whether the service contains configuration data.
`boolean` | `isDeprecated()` Determines whether or not this service is deprecated.
`boolean` | `isSingletonService()` Determines whether or not this service is a singleton.
`void` | `mergeServiceConfig(java.io.File file, ServiceDeployment serviceDeployment, com.sas.metadata.remote.ServiceComponent serviceComponent, com.sas.metadata.remote.Property applicationConfigProperty)` Merges the service configuration from a UTF-8 encoded XML file into a foundation service's configuration.
`void` | `setConfigUserInterfaceClassName(java.lang.String configUserInterfaceClassName)` Sets the fully-qualified class name of the user interface which provides a view for this configuration.
`void` | `setDeprecated(boolean isDeprecated)` Set whether or not this service is deprecated.
`void` | `setServiceComponentConfiguration(ServiceComponentConfigInterface serviceComponentConfiguration)` Specifies the service component's configuration that governs the configuration metadata that may be used to initialize or re-configure the service component.
`void` | `setServiceImplementationClass(java.lang.String serviceImplemenationClass)` Sets the implementation class for the service created by this factory.
`void` | `setServiceInterfaceClass(java.lang.String serviceInterface)` Sets the implementation class for the service created by this factory.
`boolean` | `supportsAction(int desiredActions)` Determines whether the service provides support for the specified action.

Field Detail

### ACTION_EXPORT

    public static final int ACTION_EXPORT

  Service supports exporting its configuration to an XML file.

  See Also:
    Constant Field Values

### ACTION_MERGE

    public static final int ACTION_MERGE

  Service supports merging a configuration read from an XML file into its existing configuration.

  See Also:
    Constant Field Values

### ACTION_INSTALL

    public static final int ACTION_INSTALL

  Service supports installing a configuration which may be layered upon existing configuration(s).

  See Also:
    Constant Field Values

Constructor Detail

### ServiceProfile

    public ServiceProfile(ServiceComponentConfigInterface serviceComponentConfiguration,
                          int supportedActions,
                          java.lang.String[] dependentServiceInterfaces,
                          java.lang.String serviceInterfaceClass,
                          java.lang.String serviceImplementationClass,
                          java.lang.String configUserInterfaceClassName,
                          boolean isSingletonService)
                   throws java.lang.IllegalArgumentException

  Constructs a profile that describes a foundation service.

  Parameters:
    `serviceComponentConfiguration` - The service component's configuration.
    `supportedActions` - The actions that this service supports. Specify the logical OR of any of the following actions.
    - `ACTION_EXPORT`
    - `ACTION_INSTALL`
    - `ACTION_MERGE`
    `dependentServiceInterfaces` - The fully-qualified names of the Java interfaces that a service manufactured by this factory depends upon. Specify `null` if there are no dependencies.
    `serviceInterfaceClass` - Fully-qualified name of the primary interface implemented by a service created by this factory.
    `serviceImplementationClass` - Fully-qualified name of the implementation class for the service created by this factory.
    `configUserInterfaceClassName` - Fully-qualified class name of the user interface which is used to view/edit this configuration. This class will extend `com.sas.console.plugins.services.AbstractBIPServiceInitDataView`.
    `isSingletonService` - `true` if the service is a singleton.
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid parameter value is specified.

Method Detail

### hasServiceConfig

    public boolean hasServiceConfig()

  Determines whether the service supports configuration data.

  Returns:
    `true` if the service supports configuration data.

### hasServiceConfig

    public boolean hasServiceConfig(com.sas.metadata.remote.ServiceComponent serviceComponent)
                             throws com.sas.metadata.remote.MdException,
                                    java.rmi.RemoteException

  Determines whether the service contains configuration data. This can be indicated by an empty XML configuration data String or by that String containing `mode="deprecated"`.

  Parameters:
    `serviceComponent` - of service in question
  Returns:
    `true` if the service contains configuration data.
  Throws:
    `com.sas.metadata.remote.MdException`
    `java.rmi.RemoteException`

### getServiceInterfaceClass

    public java.lang.String getServiceInterfaceClass()

  The fully-qualified Java class name of the primary interface implemented by a service created by this factory.

  Returns:
    The fully-qualified Java class name of the primary interface implemented by this service.

### setServiceInterfaceClass

    public final void setServiceInterfaceClass(java.lang.String serviceInterface)

  Sets the implementation class for the service created by this factory.

  Parameters:
    `serviceInterface` - The fully-qualified Java class name of the primary interface implemented by a service created by this factory.

### getServiceImplementationClass

    public java.lang.String getServiceImplementationClass()

  Gets the implementation class for the service created by this factory.

  Returns:
    The fully-qualified Java name of implementation class for a service created by this factory.

### setServiceImplementationClass

    public final void setServiceImplementationClass(java.lang.String serviceImplemenationClass)

  Sets the implementation class for the service created by this factory.

  Parameters:
    `serviceImplemenationClass` - The fully-qualified Java name of implementation class for a service created by this factory.

### supportsAction

    public final boolean supportsAction(int desiredActions)

  Determines whether the service provides support for the specified action.

  Parameters:
    `desiredActions` - Specify the logical OR of any of the following actions.
    - `ACTION_INSTALL`
    - `ACTION_MERGE`
  Returns:
    `true` if the service supports the specified capability.

### getDependentServiceInterfaces

    public final java.lang.String[] getDependentServiceInterfaces()

  Gets an array of strings representing the Java interfaces of service(s) for the services required by this service.

  Returns:
    Array of 0..* Java interfaces implemented by services that must be available at the time the service factory is asked to get a service. For example, if the User Service depends upon the Authentication Service, then the User Service would return "com.sas.services.security.AuthenticationServiceInterface". If there are no dependencies upon any other services then a zero length array will be returned.

### setServiceComponentConfiguration

    public final void setServiceComponentConfiguration(ServiceComponentConfigInterface serviceComponentConfiguration)

  Specifies the service component's configuration that governs the configuration metadata that may be used to initialize or re-configure the service component.

  Parameters:
    `serviceComponentConfiguration` - The service component's configuration or `null` if the service is not configurable.

### getServiceComponentConfiguration

    public ServiceComponentConfigInterface getServiceComponentConfiguration()

  Gets the service component's configuration that governs the configuration metadata that may be used to initialize or re-configure the service component.

  Returns:
    The service component's configuration or `null` if the service is not configurable.

### createServiceComponentConfig

    public AbstractServiceComponentConfig createServiceComponentConfig(java.lang.String configName,
                                                                       org.w3c.dom.Document document)
                                                                throws ServiceException

  Creates a service component configuration initialized using the text store associated with the specified XML.

  A subclass should override this method if it supports initialization of a service configuration using an XML document.

  Parameters:
    `configName` - Service configuration's name. This corresponds to the `Name` attribute of the property that represents a service's configuration.
    `document` - XML representation of the service's configuration.
  Returns:
    Service configuration or `null` if the service does not have a configuration.
  Throws:
    `ServiceException` - if unable to create a service configuration.

### getServiceConfigDocument

    public static ServiceConfigDocument getServiceConfigDocument(com.sas.metadata.remote.Property property)
                                                          throws ServiceException

  Creates a value object that relates the name of a configuration to an XML document that represents a service configuration.

  Parameters:
    `property` - Configuration property which associated to a TextStore that contains an XML representation of the service's configuration.
  Returns:
    Service configuration document.
  Throws:
    `ServiceException` - if unable to determine a service configuration for the specified property.

### createServiceConfigForProperty

    public AbstractServiceComponentConfig createServiceConfigForProperty(com.sas.metadata.remote.Property property)
                                                                  throws ServiceException

  Creates a service component configuration initialized using the text store associated with the specified property.

  Parameters:
    `property` - Configuration property which associated to a TextStore that contains an XML representation of the service's configuration.
  Returns:
    Service's configuration.
  Throws:
    `ServiceException` - if unable to create a service configuration.
  See Also:
    `createServiceComponentConfig(String, Document)`

### createServiceConfig

    public AbstractServiceComponentConfig createServiceConfig(ServiceConfigDocument serviceConfigDocument)
                                                       throws ServiceException

  Creates a service component configuration initialized using the text store associated with the specified property.

  Parameters:
    `serviceConfigDocument` - Service configuration XML document.
  Returns:
    Service's configuration.
  Throws:
    `ServiceException` - if unable to create a service configuration.
  See Also:
    `createServiceComponentConfig(String, Document)`

### createServiceConfigProperty

    public com.sas.metadata.remote.Property createServiceConfigProperty(com.sas.metadata.remote.ServiceComponent serviceComponent,
                                                                        java.lang.String configName,
                                                                        java.lang.String configDesc,
                                                                        org.w3c.dom.Document configDocument,
                                                                        boolean isApplicationConfig)
                                                                 throws ServiceException

  Creates a new property for the specified service initializing it with a default configuration.

  Parameters:
    `serviceComponent` - The service for which a new configuration property is desired.
    `configName` - The name of the application configuration to be added to the service component.
    `configDesc` - An optional description for the application configuration.
    `configDocument` - An optional parameter which may be used to specify the XML document that represents the service configuration. If a `null` document is specified, then a default configuration will be used.
    `isApplicationConfig` - `true` if the property represents a service configuration for an application.
  Returns:
    Property associated with a TextStore that has been initialized with a default configuration.
  Throws:
    `ServiceException` - if unable to create a configuration property.
  See Also:
    `createServiceConfigProperty(com.sas.metadata.remote.ServiceComponent, String, String, Document)`

### createServiceConfigProperty

    public com.sas.metadata.remote.Property createServiceConfigProperty(com.sas.metadata.remote.ServiceComponent serviceComponent,
                                                                        java.lang.String configName,
                                                                        java.lang.String configDesc,
                                                                        org.w3c.dom.Document configDocument)
                                                                 throws ServiceException

  Creates a new property for the specified service initializing it with a default configuration.

  Parameters:
    `serviceComponent` - The service for which a new configuration property is desired.
    `configName` - The name of the application configuration to be added to the service component.
    `configDesc` - An optional description for the application configuration.
    `configDocument` - An optional parameter which may be used to specify the XML document that represents the service configuration. If a `null` document is specified, then a default configuration will be used.
  Returns:
    Property associated with a TextStore that has been initialized with a default configuration.
  Throws:
    `ServiceException` - if unable to create a configuration property.
  See Also:
    `createServiceConfigProperty(ServiceComponent, String, String, Document, boolean)`

### getDefaultServiceConfig

    public AbstractServiceComponentConfig getDefaultServiceConfig(java.lang.String configName)
                                                           throws ServiceException

  Gets the default configuration for the service.

  A sub-class must override this method if it has a default configuration for its service.

  Parameters:
    `configName` - Service configuration's name.
  Returns:
    Service's default configuration.
  Throws:
    `ServiceException` - if unable to create a default configuration.

### getDefaultServiceConfigFilename

    public java.lang.String getDefaultServiceConfigFilename()

  Gets the default filename for an XML file that contains this service's configuration. The filename will be formatted using the value obtained from the `getDefaultFilename()` method which a subclass should override if it represents a service which is configurable.

  Returns:
    Default name for a file that contains an XML representation of the service's configuration.
  See Also:
    `getDefaultFilename()`

### getDefaultFilename

    protected java.lang.String getDefaultFilename()

  Gets the name of the service. A subclass which represents a configurable service should override this method to specify the name of its service.

  Returns:
    Service's name suitable for use in a filename.
  See Also:
    `getDefaultServiceConfigFilename()`

### createConfig

    public AbstractServiceComponentConfig createConfig(java.lang.String configName,
                                                       org.w3c.dom.Document document)
                                                throws ServiceException

  Creates a service configuration by parsing the specified XML document.

  Parameters:
    `configName` - Service configuration's name.
    `document` - XML document that represents a service's configuration.
  Returns:
    Service configuration initialized from the XML document.
  Throws:
    `ServiceException` - if unable to create a service configuration from the specified XML document.

### createDocument

    public final org.w3c.dom.Document createDocument(com.sas.metadata.remote.ServiceComponent serviceComponent)
                                              throws ServiceException

  Creates an XML document representation of the service's configuration.

  Parameters:
    `serviceComponent` - Service whose configuration document is desired.
  Returns:
    XML document or `null` if a configuration cannot be obtained.
  Throws:
    `ServiceException` - if an error occurred.

### getConfigUserInterfaceClassName

    public java.lang.String getConfigUserInterfaceClassName()

  Gets the fully-qualified class name of the user interface which provides a view for this configuration.

  Returns:
    Fully-qualified class name of the user interface which is used to view/edit this configuration. This class will extend `com.sas.console.plugins.services.AbstractBIPServiceInitDataView` or `null` if a view class is not defined.

### setConfigUserInterfaceClassName

    public final void setConfigUserInterfaceClassName(java.lang.String configUserInterfaceClassName)

  Sets the fully-qualified class name of the user interface which provides a view for this configuration.

  Parameters:
    `configUserInterfaceClassName` - Fully-qualified class name of the user interface which is used to view/edit this configuration. This class will extend `com.sas.console.plugins.services.AbstractBIPServiceInitDataView`.

### getServiceConfigExporter

    public ExportServiceConfigInterface getServiceConfigExporter()

  Gets a utility which can be used to export a foundation service's configuration to a UTF-8 encoded XML file.

  Returns:
    Service configuration exporter.

### getServiceConfigMerger

    public MergeServiceConfigInterface getServiceConfigMerger()

  Gets a utility which can be used to merge a foundation service's configuration read from UTF-8 encoded XML file into a pre-existing configuration.

  Returns:
    Service configuration exporter.

### exportServiceConfig

    public void exportServiceConfig(java.io.File file,
                                    ServiceAggregateConfig serviceAggregateConfig,
                                    boolean isExportingBaseConfig,
                                    java.util.List consumerNames)
                             throws ServiceException

  Exports the service configuration to a UTF-8 encoded XML file. A subclass should override this method if it requires custom logic to export its service configuration.

  Specified by:
    `exportServiceConfig` in interface `ExportServiceConfigInterface`
  Parameters:
    `file` - The destination file to which a UTF-8 encoded representation of the service configuration will be written as XML.
    `serviceAggregateConfig` - The service configuration that is to be written.
    `isExportingBaseConfig` - `true` if the servie's base configuration is being exported or `false` if it isn't.
    `consumerNames` - Collection of `String` elements representing the names of the service's layered application configurations which are being exported.
  Throws:
    `ServiceException` - if unable to export the service's configuration to a file.

### mergeServiceConfig

    public void mergeServiceConfig(java.io.File file,
                                   ServiceDeployment serviceDeployment,
                                   com.sas.metadata.remote.ServiceComponent serviceComponent,
                                   com.sas.metadata.remote.Property applicationConfigProperty)
                            throws ServiceException

  Merges the service configuration from a UTF-8 encoded XML file into a foundation service's configuration.

  Specified by:
    `mergeServiceConfig` in interface `MergeServiceConfigInterface`
  Parameters:
    `file` - The destination file to which a UTF-8 encoded representation of the service configuration will be written as XML.
    `serviceDeployment` - Service deployment.
    `serviceComponent` - The service component whose configuration is to be updated.
    `applicationConfigProperty` - The service configuration property into which the configuration is to be merged.
  Throws:
    `ServiceException` - if unable to export the service's configuration to a file.

### getServiceDisplayName

    public java.lang.String getServiceDisplayName()

  Gets a localized name for the service.

  A subclass should override this method to specify a non-default name.

  Returns:
    Localized name for the service.

### getServiceDisplayDescription

    public java.lang.String getServiceDisplayDescription()

  Gets a localized description of the service.

  A subclass should override this method to specify a non-default name.

  Returns:
    Localized description of the service.

### getBeanIdForService

    public java.lang.String getBeanIdForService(com.sas.metadata.remote.CMetadata cMetadata)
                                         throws com.sas.metadata.remote.MdException

  Gets the ID for the service that is to be represented as a bean.

  Parameters:
    `cMetadata` - Metadata representing a service.
  Returns:
    Id of the bean that represents a service.
  Throws:
    `com.sas.metadata.remote.MdException` - if unable to obtain the ID for the service.

### isSingletonService

    public boolean isSingletonService()

  Determines whether or not this service is a singleton.

  Returns:
    `true` if the service is a singleton.

### isDeprecated

    public boolean isDeprecated()

  Determines whether or not this service is deprecated.

  Returns:
    `true` if the service is deprecated.

### setDeprecated

    public void setDeprecated(boolean isDeprecated)

  Set whether or not this service is deprecated.

  Parameters:
    `isDeprecated` - `true` if the service is deprecated.

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

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.