org.apache.synapse.mediators
Class Value

java.lang.Object
  extended by 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
Value(String staticKey)
          Create a key instance using a static key
Value(SynapseXPath expression)
          Create a key instance using a dynamic key (Xpath Expression)
 
Method Summary
 String evaluateValue(MessageContext synCtx)
          Evaluating key based on message context used when key is a xpath expression
 SynapseXPath getExpression()
          Retrieving dynamic key
 String getKeyValue()
          Retrieving static key
 String getName()
          Get the name of the value attribute
 boolean hasExprTypeKey()
          checks whether key returned by #getKeyValue() is a string of an expression type.
 void setNamespaces(OMElement elem)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Value

public Value(String staticKey)
Create a key instance using a static key

Parameters:
staticKey - static key

Value

public Value(SynapseXPath expression)
Create a key instance using a dynamic key (Xpath Expression)

Parameters:
expression - SynapseXpath for dynamic key
Method Detail

getKeyValue

public String getKeyValue()
Retrieving static key

Returns:
static key

getExpression

public SynapseXPath getExpression()
Retrieving dynamic key

Returns:
SynapseXpath

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

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

setNamespaces

public void setNamespaces(OMElement elem)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.