Class CleanseFunctionContext


  • public class CleanseFunctionContext
    extends java.lang.Object
    Cleanse function execution context. Describes the environment, within a cleanse function executes. Input parameters can be extracted using method getInputParam(String).
    • Method Detail

      • getRuleName

        public java.lang.String getRuleName()
        Gets the name of the rule, being executed.
        Returns:
        the ruleName
      • getFunctionName

        public java.lang.String getFunctionName()
        Gets the cleanse function name, as defined by the model.
        Returns:
        the functionName
      • getCurrentLocale

        public java.util.Locale getCurrentLocale()
        Gets the cleanse function current locale.
        Returns:
        the currentLocale
      • getCustomProperties

        public java.util.Collection<CustomPropertyElement> getCustomProperties()
        Gets the cleanse function custom properties.
        Returns:
        the customProperties
      • getPayload

        public <T> T getPayload()
        Gets the cleanse function payload.
        Type Parameters:
        T - the payload type
        Returns:
        the payload
      • hasPayload

        public boolean hasPayload()
        Returns true, if some payload is set.
        Returns:
        true, if set
      • getInputParam

        @Nullable
        public CleanseFunctionInputParam getInputParam​(java.lang.String portName)
        Gets input param by port name.
        Parameters:
        portName - the port name
        Returns:
        param or null
      • getInputParams

        public java.util.Collection<CleanseFunctionInputParam> getInputParams()
        Returns input params as a collection.
        Returns:
        input params as a collection
      • hasInputParams

        public boolean hasInputParams()
        Returns true, if this result has some input params set.
        Returns:
        true if this result has some input params set
      • getInputPorts

        public java.util.Collection<java.lang.String> getInputPorts()
        Input port names.
        Returns:
        names
      • input

        public void input​(CleanseFunctionInputParam param)
        Puts cleanse function input param to the cleanse function.
        Parameters:
        param - the action to set
      • input

        public void input​(CleanseFunctionInputParam... params)
        Puts many cleanse function input params to the cleanse function.
        Parameters:
        params - the action to set
      • input

        public void input​(java.util.Collection<CleanseFunctionInputParam> params)
        Puts many cleanse function input params to the cleanse function.
        Parameters:
        params - the action to set