org.apache.synapse.mediators
Class GetPropertyFunction

java.lang.Object
  extended by org.apache.synapse.mediators.GetPropertyFunction
All Implemented Interfaces:
Function

public class GetPropertyFunction
extends Object
implements Function

Implements the XPath extension function synapse:get-property(scope,prop-name)


Field Summary
static String NULL_STRING
           
 
Constructor Summary
GetPropertyFunction(MessageContext synCtx)
           
 
Method Summary
 Object call(Context context, List args)
          Returns the string value of the property which is get from the corresponding context to the provided scope .
 Object evaluate(Object scopeObject, Object keyObject, Object dateformat, Navigator navigator)
          Returns the string value of the property using arg one as key and arg two as scope
 MessageContext getSynCtx()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_STRING

public static final String NULL_STRING
See Also:
Constant Field Values
Constructor Detail

GetPropertyFunction

public GetPropertyFunction(MessageContext synCtx)
Method Detail

getSynCtx

public MessageContext getSynCtx()

call

public Object call(Context context,
                   List args)
            throws FunctionCallException
Returns the string value of the property which is get from the corresponding context to the provided scope . The default scope is used to get property from the synapse message context

Specified by:
call in interface Function
Parameters:
context - the context at the point in the expression when the function is called
args - arguments of the functions
Returns:
The string value of a property
Throws:
FunctionCallException

evaluate

public Object evaluate(Object scopeObject,
                       Object keyObject,
                       Object dateformat,
                       Navigator navigator)
Returns the string value of the property using arg one as key and arg two as scope

Parameters:
scopeObject - scope will decide from where property will be picked up from i.e. axis2, transport, default/synapse
keyObject - the key of the property
navigator - object model which can be used for navigation around
dateformat - The dateformat that need to convert
Returns:
The String value of property using arg one as key and arg two as scope


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