Interface InheritedActivityConfiguration

  • All Superinterfaces:
    InheritedConfiguration

    public interface InheritedActivityConfiguration
    extends InheritedConfiguration
    This interface extends the InheritedConfiguration by the means to retrieve configuration values from input parameters and process configurations.
    Before setting a value, it needs to be checked whether the configuration of any parent entity sets the value to fixed. Fixed configuration values must not be overridden which includes retrieving them from an input parameter or from the process configuration.

    If a parent configuration has a configuration value and you want to override this and read the value from an input parameter or the process configuration, just set this appropriately via the ChangeableActivityConfiguration. Vice versa, if a parent configuration reads a configuration value from an input parameter or the process configuration and you need to change that, provide the desired value as normal configuration value and remove the retrieval from or parameter or process configuration.

    To ensure that inheritance with nested configuration works right, always check the methods of this interface first! If the designated configuration value is to be retrieved from an input parameter or the process configuration, the value returned by the InheritedConfiguration-interface has to be ignored.

    Author:
    Ulrich Kreher
    • Method Detail

      • getAllEntries

        Set<String> getAllEntries()
        Gets all entry names that have a value different from null in this configuration. This entry names also include the values retrieved from an input parameter or a process configuration.
        Specified by:
        getAllEntries in interface InheritedConfiguration
        Returns:
        All entry names that have a value in this configuration or are retrieved from an input parameter or a process configuration.
      • fromInputParameter

        String fromInputParameter​(String entryName)
        Gets the name of the input parameter, the configuration value for the designated entry is provided at runtime. This input parameter exists and has the right type in the corresponding activity.
        If the specified configuration value is not retrieved from a parameter, this method will return null.
        Parameters:
        entryName - The name of the entry for which to get the name of the input parameter that provides the configuration value at runtime.
        Returns:
        The name of the input parameter, the designated configuration value is retrieved of or null in case the configuration value does not stem from an input parameter.
      • fromProcessConfiguration

        String fromProcessConfiguration​(String entryName)
        Gets the name of the entry of the process configuration, the value for this configuration and the designated entry is provided at runtime. The entry in the process configuration has to exist in the process model and has to have the right type in the corresponding process configuration.
        If the specified configuration value is not retrieved from the corresponding process configuration, this method will return null.
        Parameters:
        entryName - The name of the entry for which to get the name of the configuration key of the process configuration that provides the configuration value at runtime.
        Returns:
        The name of the entry of the process configuration, the designated configuration value is retrieved of or null in case the configuration value does not stem from the process configuration.
      • remove

        void remove​(String entryName)
        Removes the value for the entry with the designated name from this configuration that overrides a configuration value from a parent entity. Afterwards the value is inherited again.
        This configuration value applies to this configuration and its children.
        Calling this method will have no effects if the value of the designated entry is already inherited or unknown. This also removes retrieving the designated configuration value from an input parameter or the process configuration if appropriate.
        Specified by:
        remove in interface InheritedConfiguration
        Parameters:
        entryName - The name of the configuration entry to remove from this configuration and to inherit from a parent entity again. This must neither be null nor the empty string.
      • setFromInputParameter

        void setFromInputParameter​(String entryName,
                                   String inputParameterName)
        Sets the name of the input parameter, the configuration value for the designated entry is taken from at runtime. This input parameter has to exist and has to have the right type in the corresponding activity. Neither the name of the entry nor the name of the input parameter may be null.
        Parameters:
        entryName - The name of the entry for which to set the name of the input parameter that provides the configuration value at runtime. This must not be null.
        inputParameterName - The name of the input parameter, the designated configuration value is retrieved of. This must not be null.
      • setFromProcessConfiguration

        void setFromProcessConfiguration​(String entryName,
                                         String configurationEntry)
        Sets the name of the entry of the process configuration, the value for this configuration and the designated entry provided from at runtime. The entry in the process configuration has to exist in the process model and has to have the right type in the corresponding process configuration. Neither the name of the activity configuration entry nor the name of the process configuration entry may be null.
        Parameters:
        entryName - The name of the entry for which to set the entry name of the process configuration that provides the configuration value at runtime. This must not be null.
        configurationEntry - The name of the entry of the process configuration, the designated configuration value is retrieved of. This must not be null.
      • hasOwnFromInputParameter

        boolean hasOwnFromInputParameter​(String entryName)
        Gets whether the designated configuration entry has an own parameter name for retrieval from an input parameter within this configuration. That is, if the designated entry defines an own input parameter to be retrieved from for this configuration true will be returned, otherwise false.
        Parameters:
        entryName - The name of the configuration entry of which to get whether it defines an own input parameter within this configuration.
        Returns:
        Whether the designated configuration entry is set within this configuration to be retrieved from an input parameter.
      • hasOwnFromProcessConfiguration

        boolean hasOwnFromProcessConfiguration​(String entryName)
        Gets whether the designated configuration entry has not an process configuration entry name for retrieval from the process configuration within this configuration. That is, if the designated entry is part of this configuration (regardless of the parent configuration) and it is retrieved from the process configuration parameter for this configuration (regardless of the parent configuration), true will be returned, otherwise false.
        Parameters:
        entryName - The name of the configuration entry of which to get whether it defines an own process configuration entry within this configuration.
        Returns:
        Whether the designated configuration entry is not set within this configuration to be retrieved from the process configuration.