Enum ParameterChangePolicy

  • All Implemented Interfaces:
    Serializable, Comparable<ParameterChangePolicy>

    public enum ParameterChangePolicy
    extends Enum<ParameterChangePolicy>
    Generic operations do not have a fixed interface but may allow to change their input and output parameters. This requires the operation to detect the parameters at runtime. Parameters may be added, changed or removed depending on the operation. This corresponds to the behaviour of programming languages:
    • Adding, changing and removing resembles determining an operation at runtime via reflection.
    • Changing a parameter is comparable to a type hierarchy having a common super type and special subtypes. However, the type hierarchy has some constraints on the kind of changes that are allowed.
    • Adding a parameter is equal to a variable amount of parameters, "varargs " in Java.
    This enum represents different types of changes that are allowed for operations. The order of the elements of the enum specifies the degree of "genericness" of the operation.
    However, the change policies CHANGE_PARAMETERS and ADD_PARAMETERS are at the same level and are mutual exclusive.

    In the inheritance of the activity model, the parameter change policy applies to the next level of entities for parameters, that is, when setting the parameter change policy from GENERIC to FIXED, one may change the parameters of the current entity but not that of the child entity.
    However, the parameter change policy FIXED affects the parameter templates of the current entity. In this case no changes (no addition and no removal) are allowed for parameter templates. This does not make any sense since parameters may not be changed any more.

    • Enum Constant Detail

      • GENERIC

        public static final ParameterChangePolicy GENERIC
        Parameters may be added, changed and removed arbitrarily.
      • ADD_CHANGE_PARAMETERS

        public static final ParameterChangePolicy ADD_CHANGE_PARAMETERS
        Parameters may be added and changed but not removed.
      • ADD_PARAMETERS

        public static final ParameterChangePolicy ADD_PARAMETERS
        Parameters may be added, but no parameters may be changed or removed. This is at the same level of "genericness" as CHANGE_PARAMETERS; these policies are mutual exclusive.
      • CHANGE_PARAMETERS

        public static final ParameterChangePolicy CHANGE_PARAMETERS
        Parameters may be changed, but no parameters may be added or removed. This is at the same level of "genericness" as ADD_PARAMETERS; these policies are mutual exclusive.
      • ADD_VIRTUAL

        public static final ParameterChangePolicy ADD_VIRTUAL
        Parameters may not added, changed or removed. Only virtual parameters may be added which allows to provide additional data flows outside of the process and beyond the interface of the operation.
      • FIXED

        public static final ParameterChangePolicy FIXED
        The interface of the operation is fixed; no parameters may be added, changed or removed even no virtual parameters. This is the normal change policy for operations without any generic behaviour.
    • Method Detail

      • values

        public static ParameterChangePolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ParameterChangePolicy c : ParameterChangePolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ParameterChangePolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getCode

        public byte getCode()
        Returns a byte code representing this parameter change policy. This code is resilient to reordering or renaming the enum constants.
        Returns:
        a byte code representing this parameter change policy
      • valueOf

        public static ParameterChangePolicy valueOf​(byte code)
        Returns the parameter change policy for the given code or null if the code is not recognised.
        Parameters:
        code - the code for which to find the parameter change policy
        Returns:
        the parameter change policy for the given code