Package com.proagrica.bip.services
Class ForEachJsonArrayElement
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.proagrica.bip.services.AbstractJsonPathSource
-
- com.proagrica.bip.services.ForEachJsonArrayElement
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Execute a service(s) for each Json array element.", tag="service,bip,json") public class ForEachJsonArrayElement extends AbstractJsonPathSourceRun a services(s) for each Json array element. This service expects the payload to be a Json Array. For each iteration the payload will be set to the Json array element in string format.In the adapter configuration file this class is aliased as for-each-json-array-element which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description ForEachJsonArrayElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseService()voiddoService(AdaptrisMessage message)java.lang.StringgetJsonPath()java.lang.StringgetJsonSource()java.lang.StringgetPayloadId()ServicegetService()protected voidinitService()voidprepare()voidsetJsonPath(java.lang.String jsonPath)voidsetJsonSource(java.lang.String jsonSource)voidsetPayloadId(java.lang.String payloadId)voidsetService(Service service)voidstart()voidstop()-
Methods inherited from class com.proagrica.bip.services.AbstractJsonPathSource
doJsonPath
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage message) throws ServiceException
- Throws:
ServiceException
-
prepare
public void prepare() throws CoreException- Specified by:
preparein interfaceComponentLifecycleExtension- Overrides:
preparein classAbstractJsonPathSource- Throws:
CoreException
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
start
public void start() throws CoreException- Specified by:
startin interfaceComponentLifecycle- Overrides:
startin classServiceImp- Throws:
CoreException
-
stop
public void stop()
- Specified by:
stopin interfaceComponentLifecycle- Overrides:
stopin classServiceImp
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
getService
public Service getService()
-
setService
public void setService(Service service)
-
getJsonPath
public java.lang.String getJsonPath()
-
setJsonPath
public void setJsonPath(java.lang.String jsonPath)
-
getJsonSource
public java.lang.String getJsonSource()
-
setJsonSource
public void setJsonSource(java.lang.String jsonSource)
-
getPayloadId
public java.lang.String getPayloadId()
-
setPayloadId
public void setPayloadId(java.lang.String payloadId)
-
-