### *** This interface provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.storedprocess

# Interface StoredProcessServiceInterface

All Superinterfaces:
  `com.sas.entities.EntityKeyInterface`, `Remote`, `RemoteServiceInterface`, `ServiceNotificationBroadcasterInterface`

All Known Implementing Classes:
  `StoredProcessServiceProxy`

@SASScope("ALL") @BinaryCompatibilityOnly public interface StoredProcessServiceInterface extends RemoteServiceInterface
This interface describes a stored process service. It is used to create various objects that are used to represent and run stored processes in the Platform Services context.

Since:
  1.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `EVENT_NAME`
  Name of the event created by `StoredProcessAlertItemInterface`.
  `static final String`
  `NAMESPACE`
  Name of the name space used by the Stored Process service for alert/event creation.

  ### Fields inherited from interface com.sas.services.RemoteServiceInterface

  `CLASS_IDENTIFIER, CLASS_IDENTIFIER_1_1, CLASS_IDENTIFIER_1_2, CLASS_IDENTIFIER_SERVICE_TYPE, CLASS_IDENTIFIER_SERVICE_TYPE_1_1, CLASS_IDENTIFIER_SERVICE_TYPE_1_2`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getClientName()`
  Returns the client name.
  `Object`
  `newStoredProcess(int serverType, StoredProcessOptions options)`
  Create an instance of the current version of a Stored Process service object to be defined by the user.
  `StoredProcessInterface`
  `newStoredProcess(SessionContextInterface sessionContext, int serverType, int resultType)`
  Deprecated.
  The `StoredProcessInterface` service object returned by this method cannot be used with the Prompting Framework.
  `StoredProcessInterface`
  `newStoredProcess(SessionContextInterface sessionContext, StoredProcessInterface storedProcessSmartObject)`
  Deprecated.
  The `StoredProcessInterface` service object returned by this method cannot be used to avail of features introduced in 9.2 or later.
  `Object`
  `newStoredProcess(StoredProcessInterface smartObject, StoredProcessOptions options)`
  Create an instance of a Stored Process service object from metadata using the provided smart object.
  `void`
  `setClientName(String clientName)`
  Sets the client name.

  ### Methods inherited from interface com.sas.entities.EntityKeyInterface

  `getEntityKey, sameEntity, setEntityKey`

  ### Methods inherited from interface com.sas.services.RemoteServiceInterface

  `configure, destroy, getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceProxy, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceState`

  ### Methods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface

  `addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver`

- ## Field Details

  - ### NAMESPACE

    static final String NAMESPACE
    Name of the name space used by the Stored Process service for alert/event creation.
    See Also:
      - Constant Field Values

  - ### EVENT_NAME

    static final String EVENT_NAME
    Name of the event created by `StoredProcessAlertItemInterface`.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### newStoredProcess

    StoredProcessInterface newStoredProcess(SessionContextInterface sessionContext, StoredProcessInterface storedProcessSmartObject) throws InitializationException, TransportException, RemoteException
    Deprecated.
    The `StoredProcessInterface` service object returned by this method cannot be used to avail of features introduced in 9.2 or later. See `newStoredProcess(com.sas.services.storedprocess.metadata.StoredProcessInterface, StoredProcessOptions)`.
    Create an instance of a Stored Process service object from metadata using the provided smart object.

    The typical client does not invoke this method, but uses the Information Service to find stored processes and invokes one of the newServiceObject methods of the `Stored Process smart object` to create new stored process service objects.

    Parameters:
      `sessionContext` - specifies the `SessionContextInterface` under which the stored process will be exploited
      `storedProcessSmartObject` - specifies the stored process smart object which describes the stored process
    Returns:
      a `StoredProcessInterface` representing the created stored process object
    Throws:
      `RemoteException` - if a network anomaly is encountered.
      `IllegalArgumentException` - if the sessionContext is null
      `IllegalStateException` - if the service has been destroyed
      `TransportException` - if the OMR layer encountered problems
      `InitializationException` - if the metadata was ill-formed or is not the original version

  - ### newStoredProcess

    Object newStoredProcess(StoredProcessInterface smartObject, StoredProcessOptions options) throws InitializationException, TransportException, RemoteException
    Create an instance of a Stored Process service object from metadata using the provided smart object.

    The typical client does not invoke this method, but uses the Information Service to find stored processes and invokes one of the newServiceObject methods of the `Stored Process smart object` to create a service object.

    The `StoredProcessOptions` options parameter controls behavior as follows:

    - SessionContext. If no SessionContext is set, the created service object will access the SessionContext from the smart object. SessionContext is typically set if it is desired that the service object use a SessionContext for execution which is different from that available from the smart object.
    - UsageVersion. This setting is only valid for manually created stored processes, that is for stored processes that are not backed by an object in metadata. For compatibility reasons, the behavior for such stored processes is that of a 9.2 (`StoredProcessInterface.NINETWO_VERSION`) stored process based service object.
    The smart object supplied must be `read compatible` for a service object to be returned.
    Parameters:
      `smartObject` - the smart object from which the service object is created
      `options` - controls behavior as described
    Returns:
      a service object as described
    Throws:
      `InitializationException` - if the metadata was ill-formed or the smart object was ill-formed or not read compatible
      `TransportException`
      `RemoteException`
    Since:
      9.2

  - ### newStoredProcess

    StoredProcessInterface newStoredProcess(SessionContextInterface sessionContext, int serverType, int resultType) throws IllegalArgumentException, RemoteException
    Deprecated.
    The `StoredProcessInterface` service object returned by this method cannot be used with the Prompting Framework. See `newStoredProcess(int, StoredProcessOptions)`.
    Create an instance of a pre-9.2 Stored Process service object to be defined by the user.
    Parameters:
      `sessionContext` - specifies the `SessionContextInterface` under which the stored process will be exploited, can be null
      `serverType` - specifies the server on which this stored process will execute. Either
      - `StoredProcessBaseInterface.SERVER_TYPE_STOREDPROCESS` or
      - `StoredProcessBaseInterface.SERVER_TYPE_WORKSPACE`
      `resultType` - specifies the type of result
      - If the serverType is `StoredProcessBaseInterface.SERVER_TYPE_STOREDPROCESS` valid values for resultType are:
        - `StoredProcessInterface.RESULT_TYPE_NONE`
        - `StoredProcessInterface.RESULT_TYPE_TRANSIENT_PACKAGE`
        - `StoredProcessInterface.RESULT_TYPE_PERMANENT_FILE_PACKAGE`
        - `StoredProcessInterface.RESULT_TYPE_PERMANENT_WEBDAV_PACKAGE`
        - `StoredProcessInterface.RESULT_TYPE_STREAM`
      - If the serverType is `StoredProcessBaseInterface.SERVER_TYPE_WORKSPACE` valid values for resultType are:
        - `StoredProcessInterface.RESULT_TYPE_NONE`
        - `StoredProcessInterface.RESULT_TYPE_TRANSIENT_PACKAGE`
        - `StoredProcessInterface.RESULT_TYPE_PERMANENT_FILE_PACKAGE`
        - `StoredProcessInterface.RESULT_TYPE_PERMANENT_WEBDAV_PACKAGE`
    Returns:
      a `StoredProcessInterface` representing the created stored process object
    Throws:
      `RemoteException` - if a network anomaly is encountered.
      `IllegalArgumentException` - if an invalid value is specified for serverType or resultType.
      `IllegalStateException` - if the service has been destroyed

  - ### newStoredProcess

    Object newStoredProcess(int serverType, StoredProcessOptions options) throws IllegalArgumentException, InitializationException, RemoteException
    Create an instance of the current version of a Stored Process service object to be defined by the user.

    The `StoredProcessOptions` options parameter controls behavior as follows:

    - SessionContext. If no SessionContext is set, the created service object will not have an associated SessionContext or UserContext.
    Parameters:
      `serverType` - specifies the server on which this stored process will execute. Either
      - `StoredProcessBaseInterface.SERVER_TYPE_STOREDPROCESS` or
      - `StoredProcessBaseInterface.SERVER_TYPE_WORKSPACE`
      Stored Process results are specified using the prompts and the stored process is created with both stream and package capability if the server type is `StoredProcessBaseInterface.SERVER_TYPE_STOREDPROCESS` and with only package capability if the serverType is `StoredProcessBaseInterface.SERVER_TYPE_WORKSPACE`.
      `options` - as described above
    Returns:
      a Stored Process service object; null otherwise
    Throws:
      `RemoteException` - if a network anomaly is encountered
      `InitializationException` - if there was an initialization exception of some kind
      `IllegalStateException` - if the service has been destroyed
      `IllegalArgumentException`
    Since:
      9.2

  - ### setClientName

    void setClientName(String clientName) throws RemoteException
    Sets the client name. The client name should only be set via this method if the service is not being shared by multiple clients.
    Parameters:
      `clientName` - client name
    Throws:
      `RemoteException`

  - ### getClientName

    String getClientName() throws RemoteException
    Returns the client name. Will be null unless the most recent call to `setClientName(String)` was with a non-null parameter.
    Returns:
      the client name
    Throws:
      `RemoteException`