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 StringQUOTE_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 StringgetFormat()ValuegetFormatKey()To get the key which is used to pick the format definition from the local registryStringgetOutputType()TemplateProcessorgetTemplateProcessor()StringgetTemplateType()StringgetType()Returns the class name of the mediatorbooleanisContentAltering()This is used to indicate whether message payload get modified during mediationbooleanisEscapeXmlChars()booleanisFormatDynamic()booleanmediate(MessageContext synCtx)Contains 2 paths - one when JSON Streaming is in use (mediateJsonStreamPayload) and the other for regular builders (mediatePayload).voidsetEscapeXmlChars(boolean escapeXmlChars)voidsetFormat(String format)voidsetFormatDynamic(boolean formatDynamic)voidsetFormatKey(Value key)To set the local registry key in order to pick the format definitionvoidsetTemplateProcessor(TemplateProcessor templateProcessor)voidsetTemplateType(String templateType)voidsetType(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:AbstractMediatorReturns the class name of the mediator- Specified by:
getTypein interfaceMediator- Overrides:
getTypein 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:
getOutputTypein classAbstractMediator
-
isContentAltering
public boolean isContentAltering()
Description copied from interface:MediatorThis is used to indicate whether message payload get modified during mediation- Specified by:
isContentAlteringin interfaceMediator- Overrides:
isContentAlteringin 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)
-
-