Class PayloadFactoryMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.transform.PayloadFactoryMediator
-
- All Implemented Interfaces:
AspectConfigurable
,Mediator
,SynapseArtifact
public class PayloadFactoryMediator extends AbstractMediator
-
-
Field Summary
Fields Modifier and Type Field Description static String
QUOTE_STRING_IN_PAYLOAD_FACTORY_JSON
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
trace, traceState
-
-
Constructor Summary
Constructors Constructor Description PayloadFactoryMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFormat()
Value
getFormatKey()
To get the key which is used to pick the format definition from the local registryString
getOutputType()
TemplateProcessor
getTemplateProcessor()
String
getTemplateType()
String
getType()
Returns the class name of the mediatorboolean
isContentAltering()
This is used to indicate whether message payload get modified during mediationboolean
isEscapeXmlChars()
boolean
isFormatDynamic()
boolean
mediate(MessageContext synCtx)
Contains 2 paths - one when JSON Streaming is in use (mediateJsonStreamPayload) and the other for regular builders (mediatePayload).void
setEscapeXmlChars(boolean escapeXmlChars)
void
setFormat(String format)
void
setFormatDynamic(boolean formatDynamic)
void
setFormatKey(Value key)
To set the local registry key in order to pick the format definitionvoid
setTemplateProcessor(TemplateProcessor templateProcessor)
void
setTemplateType(String templateType)
void
setType(String type)
-
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, handleException, handleException, isBreakPoint, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
Field Detail
-
QUOTE_STRING_IN_PAYLOAD_FACTORY_JSON
public static final String QUOTE_STRING_IN_PAYLOAD_FACTORY_JSON
- See Also:
- Constant Field Values
-
-
Method Detail
-
mediate
public boolean mediate(MessageContext synCtx)
Contains 2 paths - one when JSON Streaming is in use (mediateJsonStreamPayload) and the other for regular builders (mediatePayload).- Parameters:
synCtx
- the current message for mediation- Returns:
-
getFormat
public String getFormat()
-
setFormat
public void setFormat(String format)
-
getType
public String getType()
Description copied from class:AbstractMediator
Returns the class name of the mediator- Specified by:
getType
in interfaceMediator
- Overrides:
getType
in classAbstractMediator
- Returns:
- the class name of the mediator
-
setType
public void setType(String type)
-
getTemplateType
public String getTemplateType()
-
setTemplateType
public void setTemplateType(String templateType)
-
getFormatKey
public Value getFormatKey()
To get the key which is used to pick the format definition from the local registry- Returns:
- return the key which is used to pick the format definition from the local registry
-
setFormatKey
public void setFormatKey(Value key)
To set the local registry key in order to pick the format definition- Parameters:
key
- the local registry key
-
isFormatDynamic
public boolean isFormatDynamic()
-
setFormatDynamic
public void setFormatDynamic(boolean formatDynamic)
-
getOutputType
public String getOutputType()
- Overrides:
getOutputType
in classAbstractMediator
-
isContentAltering
public boolean isContentAltering()
Description copied from interface:Mediator
This is used to indicate whether message payload get modified during mediation- Specified by:
isContentAltering
in interfaceMediator
- Overrides:
isContentAltering
in classAbstractMediator
- Returns:
- whether mediator modify the payload
-
isEscapeXmlChars
public boolean isEscapeXmlChars()
-
setEscapeXmlChars
public void setEscapeXmlChars(boolean escapeXmlChars)
-
getTemplateProcessor
public TemplateProcessor getTemplateProcessor()
-
setTemplateProcessor
public void setTemplateProcessor(TemplateProcessor templateProcessor)
-
-