org.apache.synapse.mediators.builtin
Class PropertyMediator
java.lang.Object
org.apache.synapse.mediators.AbstractMediator
org.apache.synapse.mediators.builtin.PropertyMediator
- All Implemented Interfaces:
- AspectConfigurable, Mediator, SynapseArtifact
public class PropertyMediator
- extends AbstractMediator
The property mediator would save(or remove) a named property as a local property of
the Synapse Message Context or as a property of the Axis2 Message Context or
as a Transport Header.
Properties set this way could be extracted through the XPath extension function
"synapse:get-property(scope,prop-name)"
Methods inherited from class org.apache.synapse.mediators.AbstractMediator |
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACTION_SET
public static final int ACTION_SET
- The Action - set or remove
- See Also:
- Constant Field Values
ACTION_REMOVE
public static final int ACTION_REMOVE
- See Also:
- Constant Field Values
PropertyMediator
public PropertyMediator()
mediate
public boolean mediate(MessageContext synCtx)
- Sets a property into the current (local) Synapse Context or into the Axis Message Context
or into Transports Header and removes above properties from the corresponding locations.
- Parameters:
synCtx
- the message context
- Returns:
- true always
getName
public String getName()
setName
public void setName(String name)
getValue
public Object getValue()
setValue
public void setValue(String value)
setValue
public void setValue(String value,
String type)
- Set the value to be set by this property mediator and the data type
to be used when setting the value. Accepted type names are defined in
XMLConfigConstants.DATA_TYPES enumeration. Passing null as the type
implies that 'STRING' type should be used.
- Parameters:
value
- the value to be set as a stringtype
- the type name
getType
public String getType()
- Description copied from class:
AbstractMediator
- Returns the class name of the mediator
- Specified by:
getType
in interface Mediator
- Overrides:
getType
in class AbstractMediator
- Returns:
- the class name of the mediator
getValueElement
public OMElement getValueElement()
setValueElement
public void setValueElement(OMElement valueElement)
getExpression
public SynapseXPath getExpression()
setExpression
public void setExpression(SynapseXPath expression)
setExpression
public void setExpression(SynapseXPath expression,
String type)
getScope
public String getScope()
setScope
public void setScope(String scope)
getAction
public int getAction()
setAction
public void setAction(int action)
getPattern
public Pattern getPattern()
setPattern
public void setPattern(Pattern pattern)
getGroup
public int getGroup()
setGroup
public void setGroup(int group)
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.