Interface InputDataContainer

  • All Superinterfaces:
    AutoCloseable, Closeable, PluginDataContainer, Serializable, UserAttributeContainer
    All Known Subinterfaces:
    DataContainer, IndexedAccessDataContainer, InstanceDataContainer

    public interface InputDataContainer
    extends Serializable, UserAttributeContainer, PluginDataContainer, Closeable
    This interface encapsulates the data context of an application for read-only accessing the values of input parameters of an application. The methods resemble the retrieval methods in ProcessAwareAccess but with less information. When using DataContainer only the name of the corresponding parameter and a session token is necessary since all other information (instance, data element, agent,...) is already provided when retrieving the container.
    The data container may be lazy, which means, it retrieves the values of the data elements when they are accessed. It is also allowed to be eager and store all values internally and it may be in-between, for instance, store simple values internally and retrieve big values lazily.

    Implementations of this interface may not store an Instance internally since a process instance must be accessible by other components. Instead, all needed information has to be encapsulated in the container. The instance may be provided, for instance, in the constructor, but the reference to it has to be released afterwards.

    • Field Detail

      • serialVersionUID

        static final long serialVersionUID
        Generated ID for serialisation.
        See Also:
        Constant Field Values
    • Method Detail

      • isNull

        boolean isNull​(SessionToken session,
                       String parameterName)
                throws NoSuchParameterException
        Returns whether the value of the designated input parameter is NULL which means the data element has not been written or has been consumed yet or has been explicitly set to NULL by a previous application. This method has to be called before retrieving a value.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to check for NULL.
        Returns:
        true if the value of the designated input parameter is NULL and therefore has not been written or has been consumed yet.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
      • retrieveInteger

        long retrieveInteger​(SessionToken session,
                             String parameterName)
                      throws NoSuchParameterException,
                             InvalidDataTypeException
        Retrieves the long value of the designated input parameter of type INTEGER. Callers should first check whether the value is null by calling isNull(SessionToken, String). Otherwise in case of NULL an IllegalStateException will be thrown.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to be read.
        Returns:
        The value of the input parameter of ADEPT2-type INTEGER and of Java-type long.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated input parameter is not of type INTEGER, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated input parameter is NULL an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.INTEGER
      • retrieveFloat

        double retrieveFloat​(SessionToken session,
                             String parameterName)
                      throws NoSuchParameterException,
                             InvalidDataTypeException
        Retrieves the double value of the designated input parameter of type FLOAT. Callers should first check whether the value is null by calling isNull(SessionToken, String). Otherwise in case of NULL an IllegalStateException will be thrown.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to be read.
        Returns:
        The value of the input parameter of ADEPT2-type FLOAT and of Java-type double.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated input parameter is not of type FLOAT, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated input parameter is NULL an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.FLOAT
      • retrieveBoolean

        boolean retrieveBoolean​(SessionToken session,
                                String parameterName)
                         throws NoSuchParameterException,
                                InvalidDataTypeException
        Retrieves the boolean value of the designated input parameter of type BOOLEAN. Callers should first check whether the value is null by calling isNull(SessionToken, String). Otherwise in case of NULL an IllegalStateException will be thrown.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to be read.
        Returns:
        The value of the input parameter of ADEPT2-type BOOLEAN and of Java-type boolean.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated input parameter is not of type BOOLEAN, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated input parameter is NULL an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.BOOLEAN
      • retrieveString

        String retrieveString​(SessionToken session,
                              String parameterName)
                       throws NoSuchParameterException,
                              InvalidDataTypeException
        Retrieves the string value of the designated input parameter of type STRING. Callers should first check whether the value is null by calling isNull(SessionToken, String). Otherwise in case of NULL an IllegalStateException will be thrown.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to be read.
        Returns:
        The value of the input parameter of ADEPT2-type STRING and of Java-type String.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated input parameter is not of type STRING, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated input parameter is NULL an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.STRING
      • retrieveDate

        Date retrieveDate​(SessionToken session,
                          String parameterName)
                   throws NoSuchParameterException,
                          InvalidDataTypeException
        Retrieves the date value of the designated input parameter of type DATE. Callers should first check whether the value is null by calling isNull(SessionToken, String). Otherwise in case of NULL an IllegalStateException will be thrown.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to be read.
        Returns:
        The value of the input parameter of ADEPT2-type DATE and of Java-type java.util.Date.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated input parameter is not of type DATE, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated input parameter is NULL an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.DATE
      • retrieveURI

        URI retrieveURI​(SessionToken session,
                        String parameterName)
                 throws NoSuchParameterException,
                        InvalidDataTypeException
        Retrieves the URI value of the designated input parameter of type URI. Callers should first check whether the value is null by calling isNull(SessionToken, String). Otherwise in case of NULL an IllegalStateException will be thrown.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to be read.
        Returns:
        The value of the input parameter of ADEPT2-type URI and of Java-type java.net.URI.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated input parameter is not of type URI, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated input parameter is NULL an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.URI
      • retrieveUDT

        UDTValue retrieveUDT​(SessionToken session,
                             String parameterName)
                      throws NoSuchParameterException,
                             InvalidDataTypeException
        Retrieves (the proxy of) the value of the designated input parameter of user-defined type (UDT). Callers should first check whether the value is null by calling isNull(SessionToken, String). Otherwise in case of NULL an IllegalStateException will be thrown.
        Parameters:
        session - The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.
        parameterName - The name of the input parameter to be read.
        Returns:
        The value of the input parameter of ADEPT2-type USERDEFINED and of Java-type UDTValue. The UDTValue will be coupled to this InputDataContainer, so do not close it; clone it if required longer than this InputDataContainer.
        Throws:
        NoSuchParameterException - If the input parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated input parameter is not of type USERDEFINED, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated input parameter is NULL an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.USERDEFINED
      • copyMapWrapUdts

        static Map<String,​Serializable> copyMapWrapUdts​(Map<String,​Serializable> map)
        Creates a copy of the designated map, wraps all UDTValue to prevent their closing and makes the copy unmodifiable. If the designated map is null, null will be returned.
        Parameters:
        map - The map which to copy or null.
        Returns:
        A copy of the designated map with all UDTValue values being wrapped to prevent their closing or null.