@ComponentProfile(summary="Split a JSON Array specified by a JSON path into indvidual JSON objects", tag="json,splitting") public class JsonPathSplitter extends MessageSplitterImp
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.
MessageSplitterImp.SplitMessageIterator
logR
Constructor and Description |
---|
JsonPathSplitter() |
JsonPathSplitter(DataInputParameter<java.lang.String> source,
DataInputParameter<java.lang.String> path) |
Modifier and Type | Method and 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.
|
copyMetadata, getCopyMetadata, getCopyObjectMetadata, getMessageFactory, selectFactory, setCopyMetadata, setCopyObjectMetadata, setMessageFactory
public JsonPathSplitter()
public JsonPathSplitter(DataInputParameter<java.lang.String> source, DataInputParameter<java.lang.String> path)
public java.lang.Iterable<AdaptrisMessage> splitMessage(AdaptrisMessage message) throws CoreException
message
- The Adaptris message with the JSON payload.CoreException
public static void execute(Service s, AdaptrisMessage msg) throws CoreException
CoreException
public DataInputParameter<java.lang.String> getJsonSource()
public void setJsonSource(DataInputParameter<java.lang.String> jsonSource)
jsonSource
- The JSON source.public DataInputParameter<java.lang.String> getJsonPath()
public void setJsonPath(DataInputParameter<java.lang.String> jsonPath)
jsonPath
- The JSON path.public MessageSplitter getMessageSplitter()
public void setMessageSplitter(MessageSplitter messageSplitter)
messageSplitter
- The message splitter.