Class 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)"
    • Constructor Detail

      • PropertyMediator

        public PropertyMediator()
    • Method Detail

      • 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 string
        type - the type name
      • getValueElement

        public org.apache.axiom.om.OMElement getValueElement()
      • setValueElement

        public void setValueElement​(org.apache.axiom.om.OMElement valueElement)
      • setExpression

        public void setExpression​(SynapsePath expression)
      • setExpression

        public void setExpression​(SynapsePath 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)
      • getMediatorName

        public String getMediatorName()
        Description copied from class: AbstractMediator
        Returns the name of the class of respective mediator. This was introduced to provide a unique way to get the mediator name because getType is implemented in different ways in different mediators (e.g. PayloadFactoryMediator)
        Specified by:
        getMediatorName in interface Mediator
        Overrides:
        getMediatorName in class AbstractMediator
        Returns:
        a String of the mediator class name
      • setDynamicNameValue

        public void setDynamicNameValue​(Value nameValue)
        Setter for the Value of the Name attribute when it has a dynamic value.
        Parameters:
        nameValue - Value of the dynamic name value