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,ConfigComment,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Execute a service(s) for each Json array element.",
tag="service,bip,json")
public class ForEachJsonArrayElement
extends AbstractJsonPathSource
Run 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoiddoService(AdaptrisMessage message) protected voidvoidprepare()voidsetJsonPath(String jsonPath) voidsetJsonSource(String jsonSource) voidsetPayloadId(String payloadId) voidsetService(Service service) voidstart()voidstop()Methods inherited from class com.proagrica.bip.services.AbstractJsonPathSource
doJsonPathMethods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getComments, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setComments, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Constructor Details
-
ForEachJsonArrayElement
public ForEachJsonArrayElement()
-
-
Method Details
-
doService
- Throws:
ServiceException
-
prepare
- Specified by:
preparein interfaceComponentLifecycleExtension- Overrides:
preparein classAbstractJsonPathSource- Throws:
CoreException
-
initService
- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
start
- 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
-
setService
-
getJsonPath
-
setJsonPath
-
getJsonSource
-
setJsonSource
-
getPayloadId
-
setPayloadId
-