Class Value


  • public class Value
    extends Object
    Represents a Value Handling both static and dynamic(Xpath) keys. User can give Xpath expression as a key and derive real key based on message context
    • Constructor Detail

      • Value

        public Value​(String staticKey)
        Create a key instance using a static key
        Parameters:
        staticKey - static key
      • Value

        public Value​(SynapsePath expression)
        Create a key instance using a dynamic key (Xpath or JsonPath Expression)
        Parameters:
        expression - SynapsePath for dynamic key
    • Method Detail

      • getKeyValue

        public String getKeyValue()
        Retrieving static key
        Returns:
        static key
      • getExpression

        public SynapsePath getExpression()
        Retrieving dynamic key
        Returns:
        SynapsePath
      • evaluateValue

        public String evaluateValue​(MessageContext synCtx)
        Evaluating key based on message context used when key is a xpath expression
        Parameters:
        synCtx - message context
        Returns:
        string value of evaluated key
      • resolveObject

        public Object resolveObject​(MessageContext synCtx)
        Resolve the object defined in the Value
        Parameters:
        synCtx - Message Context
        Returns:
        Object defined in the Value
      • getName

        public String getName()
        Get the name of the value attribute
        Returns:
        name of the value attribute
      • hasExprTypeKey

        public boolean hasExprTypeKey()
        checks whether key returned by #getKeyValue() is a string of an expression type.
        Returns:
        if true if this is an expression
      • hasPropertyEvaluateExpr

        public boolean hasPropertyEvaluateExpr()
      • setNamespaces

        public void setNamespaces​(org.apache.axiom.om.OMElement elem)