Interface DataContext

  • All Superinterfaces:
    InputDataContext, PluginDataContainer, UserAttributeContainer
    All Known Subinterfaces:
    SerialisableDataContext
    All Known Implementing Classes:
    SettableDataContext

    public interface DataContext
    extends InputDataContext
    This interface provides reading access to all input and output parameters of an application as well as write access to output parameters. Access is based on the name of a parameter. An application may retrieve whether a parameter (input or output) is null and the corresponding values.
    The DataContext is provided by the runtime manager for the actual application. An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.

    This data context may be read-only in which case all store-methods throw an UnsupportedOperationException. A read-only context is used for displaying purpose.

    • Method Detail

      • isReadOnly

        boolean isReadOnly()
        Returns whether this data container is read only and therefore does not allow to store values (and throws an UnsupportedOperationException at the corresponding methods).
        Returns:
        Whether this data container is read only and therefore does not allow to store values.
      • ignoreValue

        void ignoreValue​(String parameterName)
                  throws NoSuchParameterException
        Ignores the value of the designated parameter that is the value has not been written.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the parameter to be ignored.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
      • ignoredValue

        boolean ignoredValue​(String parameterName)
                      throws NoSuchParameterException
        Returns whether the value of the designated output parameter is not or has not been set (ignored) by the application.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to check for being unset.
        Returns:
        true if the value of the designated output parameter is or has not been written.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
      • storeIntegerParameterValue

        void storeIntegerParameterValue​(String parameterName,
                                        long value)
                                 throws NoSuchParameterException,
                                        InvalidDataTypeException
        Writes an output parameter of the type integer (in java: long) to the data context of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to be written.
        value - The value that is written for the designated output parameter.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated parameter is not of type INTEGER, an InvalidDataTypeException will be raised.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
        See Also:
        DataContainer
      • storedIntegerParameterValue

        long storedIntegerParameterValue​(String parameterName)
                                  throws NoSuchParameterException,
                                         InvalidDataTypeException
        Reads the long value of the designated output parameter.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Callers should first check whether the value is null by calling ignoredValue(String). Otherwise in case of NULL an IllegalStateException is thrown.
        Parameters:
        parameterName - The name of the output parameter to be read.
        Returns:
        The value of the parameter of ADEPT2-type INTEGER and of Java-type long.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated output parameter is not of type INTEGER, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated parameter is null an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.INTEGER
      • storeFloatParameterValue

        void storeFloatParameterValue​(String parameterName,
                                      double value)
                               throws NoSuchParameterException,
                                      InvalidDataTypeException
        Writes an output parameter of the type float to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to be written.
        value - The value that is written for the designated output parameter.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated parameter is not of type FLOAT, an InvalidDataTypeException will be raised.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
        See Also:
        DataContainer
      • storedFloatParameterValue

        double storedFloatParameterValue​(String parameterName)
                                  throws NoSuchParameterException,
                                         InvalidDataTypeException
        Reads the double value of the designated output parameter.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Callers should first check whether the value is null by calling ignoredValue(String). Otherwise in case of NULL an IllegalStateException is thrown.
        Parameters:
        parameterName - The name of the output parameter to be read.
        Returns:
        The value of the output parameter of ADEPT2-type FLOAT and of Java-type double.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated output parameter is not of type FLOAT, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated parameter is null an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.FLOAT
      • storeBooleanParameterValue

        void storeBooleanParameterValue​(String parameterName,
                                        boolean value)
                                 throws NoSuchParameterException,
                                        InvalidDataTypeException
        Writes an output parameter of the type boolean to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to be written.
        value - The value that is written for the designated output parameter.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated parameter is not of type BOOLEAN, an InvalidDataTypeException will be raised.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
        See Also:
        DataContainer
      • storedBooleanParameterValue

        boolean storedBooleanParameterValue​(String parameterName)
                                     throws NoSuchParameterException,
                                            InvalidDataTypeException
        Reads the boolean value of the designated output parameter.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Callers should first check whether the value is null by calling ignoredValue(String). Otherwise in case of NULL an IllegalStateException is thrown.
        Parameters:
        parameterName - The name of the output parameter to be read.
        Returns:
        The value of the output parameter of ADEPT2-type BOOLEAN and of Java-type boolean.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated output parameter is not of type BOOLEAN, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated parameter is null an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.BOOLEAN
      • storeStringParameterValue

        void storeStringParameterValue​(String parameterName,
                                       String value)
                                throws NoSuchParameterException,
                                       InvalidDataTypeException
        Writes an output parameter of type String to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to be written.
        value - The value that is written for the designated output parameter.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated parameter is not of type STRING, an InvalidDataTypeException will be raised.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
        See Also:
        DataContainer
      • storedStringParameterValue

        String storedStringParameterValue​(String parameterName)
                                   throws NoSuchParameterException,
                                          InvalidDataTypeException
        Reads the string value of the designated output parameter.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Callers should first check whether the value is null by calling ignoredValue(String). Otherwise in case of NULL an IllegalStateException is thrown.
        Parameters:
        parameterName - The name of the output parameter to be read.
        Returns:
        The value of the output parameter of ADEPT2-type STRING and of Java-type String.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated output parameter is not of type STRING, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated parameter is null an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.STRING
      • storeDateParameterValue

        void storeDateParameterValue​(String parameterName,
                                     Date value)
                              throws NoSuchParameterException,
                                     InvalidDataTypeException
        Writes an output parameter of the type date to the data context of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to be written.
        value - The value that is written for the designated output parameter.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated parameter is not of type DATE, an InvalidDataTypeException will be raised.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
        See Also:
        DataContainer
      • storedDateParameterValue

        Date storedDateParameterValue​(String parameterName)
                               throws NoSuchParameterException,
                                      InvalidDataTypeException
        Reads the date value of the designated output parameter.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Callers should first check whether the value is null by calling ignoredValue(String). Otherwise in case of NULL an IllegalStateException is thrown.
        Parameters:
        parameterName - The name of the output parameter to be read.
        Returns:
        The value of the parameter of ADEPT2-type DATE and of Java-type java.util.Date.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated output parameter is not of type DATE, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated parameter is null an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.DATE
      • storeURIParameterValue

        void storeURIParameterValue​(String parameterName,
                                    URI value)
                             throws NoSuchParameterException,
                                    InvalidDataTypeException
        Writes an output parameter of type URI to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to be written.
        value - The value that is written for the designated output parameter.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated parameter is not of type URI, an InvalidDataTypeException will be raised.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
        See Also:
        DataContainer
      • storedURIParameterValue

        URI storedURIParameterValue​(String parameterName)
                             throws NoSuchParameterException,
                                    InvalidDataTypeException
        Reads the URI value of the designated output parameter.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Callers should first check whether the value is null by calling ignoredValue(String). Otherwise in case of NULL an IllegalStateException is thrown.
        Parameters:
        parameterName - The name of the output parameter to be read.
        Returns:
        The value of the parameter of ADEPT2-type URI and of Java-type java.net.URI.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the output designated parameter is not of type URI, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated parameter is null an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.URI
      • storeUDTParameterValue

        void storeUDTParameterValue​(String parameterName,
                                    UDTValue value)
                             throws NoSuchParameterException,
                                    InvalidDataTypeException
        Writes an output parameter of an user defined type to the data container of the process management system. The RuntimeEnvironment executes some management routines, e. g. access control, and delegates the function call to the DataContainer object.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Parameters:
        parameterName - The name of the output parameter to be written.
        value - The value that is written for the designated output parameter. The caller is responsible for closing.
        Throws:
        NoSuchParameterException - If the parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated parameter is not of type UDT, an InvalidDataTypeException will be raised.
        UnsupportedOperationException - If this data context is only for displaying purpose, an UnsupportedOperationException will be thrown.
        See Also:
        DataContainer
      • storedUDTParameterValue

        UDTValue storedUDTParameterValue​(String parameterName)
                                  throws NoSuchParameterException,
                                         InvalidDataTypeException
        Reads the value of the designated output parameter of user-defined type.
        An InvalidExecutorThreadException will be thrown if the method is not called by the main thread of the corresponding component.
        Callers should first check whether the value is null by calling ignoredValue(String). Otherwise in case of NULL an IllegalStateException is thrown.
        Parameters:
        parameterName - The name of the output parameter to be read.
        Returns:
        The value of the output parameter of ADEPT2-type USERDEFINED and of Java-type UDTValue. The UDTValue will be coupled to this DataContext, so do not close it; clone it if required longer than this DataContext.
        Throws:
        NoSuchParameterException - If the output parameter of the designated name does not exist, a NoSuchParameterException will be thrown.
        InvalidDataTypeException - If the designated output parameter is not of type USERDEFINED, an InvalidDataTypeException will be raised.
        IllegalStateException - If the value of the designated parameter is null an IllegalStateException will be thrown.
        See Also:
        ProcessConstants.AdeptDataType.USERDEFINED