Package org.apache.synapse.mediators
Class Value
- java.lang.Object
-
- org.apache.synapse.mediators.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 Summary
Constructors Constructor Description Value(String staticKey)
Create a key instance using a static keyValue(SynapsePath expression)
Create a key instance using a dynamic key (Xpath or JsonPath Expression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
evaluateObjectValue(MessageContext synCtx)
String
evaluateValue(MessageContext synCtx)
Evaluating key based on message context used when key is a xpath expressionObject
evalutePropertyExpression(MessageContext synCtx)
SynapsePath
getExpression()
Retrieving dynamic keyString
getKeyValue()
Retrieving static keyString
getName()
Get the name of the value attributeboolean
hasExprTypeKey()
checks whether key returned by #getKeyValue() is a string of an expression type.boolean
hasPropertyEvaluateExpr()
Object
resolveObject(MessageContext synCtx)
Resolve the object defined in the Valuevoid
setNamespaces(org.apache.axiom.om.OMElement elem)
String
toString()
-
-
-
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
-
evaluateObjectValue
public Object evaluateObjectValue(MessageContext synCtx)
-
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()
-
evalutePropertyExpression
public Object evalutePropertyExpression(MessageContext synCtx)
-
setNamespaces
public void setNamespaces(org.apache.axiom.om.OMElement elem)
-
-