Class JsonPathSplitter
- java.lang.Object
-
- com.adaptris.core.services.splitter.MessageSplitterImp
-
- com.adaptris.core.services.splitter.json.JsonPathSplitter
-
- All Implemented Interfaces:
MessageSplitter
@ComponentProfile(summary="Split a JSON Array specified by a JSON path into indvidual JSON objects", tag="json,splitting") public class JsonPathSplitter extends MessageSplitterImp
JSON path splitter.In the adapter configuration file this class is aliased as json-path-splitter which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.services.splitter.MessageSplitterImp
MessageSplitterImp.SplitMessageIterator
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.services.splitter.MessageSplitterImp
logR
-
-
Constructor Summary
Constructors Constructor Description JsonPathSplitter()
JsonPathSplitter(DataInputParameter<java.lang.String> source, DataInputParameter<java.lang.String> path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
execute(Service s, AdaptrisMessage msg)
DataInputParameter<java.lang.String>
getJsonPath()
Get the JSON path.DataInputParameter<java.lang.String>
getJsonSource()
Get the JSON source.MessageSplitter
getMessageSplitter()
Get the message splitter.void
setJsonPath(DataInputParameter<java.lang.String> jsonPath)
Set the JSON path.void
setJsonSource(DataInputParameter<java.lang.String> jsonSource)
Set the JSON source.void
setMessageSplitter(MessageSplitter messageSplitter)
Set the message splitter.java.lang.Iterable<AdaptrisMessage>
splitMessage(AdaptrisMessage message)
Split JSON path.-
Methods inherited from class com.adaptris.core.services.splitter.MessageSplitterImp
copyMetadata, getCopyMetadata, getCopyObjectMetadata, getMessageFactory, selectFactory, setCopyMetadata, setCopyObjectMetadata, setMessageFactory
-
-
-
-
Constructor Detail
-
JsonPathSplitter
public JsonPathSplitter()
-
JsonPathSplitter
public JsonPathSplitter(DataInputParameter<java.lang.String> source, DataInputParameter<java.lang.String> path)
-
-
Method Detail
-
splitMessage
public java.lang.Iterable<AdaptrisMessage> splitMessage(AdaptrisMessage message) throws CoreException
Split JSON path. .- Parameters:
message
- The Adaptris message with the JSON payload.- Throws:
CoreException
-
execute
public static void execute(Service s, AdaptrisMessage msg) throws CoreException
- Throws:
CoreException
-
getJsonSource
public DataInputParameter<java.lang.String> getJsonSource()
Get the JSON source.- Returns:
- The JSON source.
-
setJsonSource
public void setJsonSource(DataInputParameter<java.lang.String> jsonSource)
Set the JSON source.- Parameters:
jsonSource
- The JSON source.
-
getJsonPath
public DataInputParameter<java.lang.String> getJsonPath()
Get the JSON path.- Returns:
- The JSON path.
-
setJsonPath
public void setJsonPath(DataInputParameter<java.lang.String> jsonPath)
Set the JSON path.- Parameters:
jsonPath
- The JSON path.
-
getMessageSplitter
public MessageSplitter getMessageSplitter()
Get the message splitter.- Returns:
- The message splitter.
-
setMessageSplitter
public void setMessageSplitter(MessageSplitter messageSplitter)
Set the message splitter.- Parameters:
messageSplitter
- The message splitter.
-
-