public abstract class AbstractImport<O extends co.ecg.alpaca.toolkit.model.BroadWorksObject,T extends BroadWorksObjectInformation<O>,R extends co.ecg.alpaca.toolkit.messaging.request.Request<co.ecg.alpaca.toolkit.messaging.response.DefaultResponse>,S extends Enum<S>,E extends AbstractImport<O,T,R,S,E>> extends IterableProcess<E,S> implements Executable<O>
BroadWorksObject
given a BroadWorksObjectInformation
Modifier and Type | Field and Description |
---|---|
R |
addRequest |
stepList
errors, log, warnings
Constructor and Description |
---|
AbstractImport(co.ecg.alpaca.toolkit.model.BroadWorksServer bws,
T information,
Class<S> buildStepClass)
Creates a new Object Import with the provided information
|
Modifier and Type | Method and Description |
---|---|
void |
concurrencyCheck() |
abstract R |
getAddRequest() |
co.ecg.alpaca.toolkit.model.BroadWorksServer |
getBroadWorksServer() |
T |
getInformation() |
O |
getOutput() |
protected <R extends co.ecg.alpaca.toolkit.messaging.response.Response,Q extends co.ecg.alpaca.toolkit.messaging.request.Request<R>> |
mapRequestAndFire(Q request,
co.ecg.alpaca.toolkit.messaging.response.Response response,
Consumer<R> responseConsumer,
Consumer<Q> afterMappingConsumer)
Convenience method to map a request to a response and add it to the request bundler
|
protected <R extends co.ecg.alpaca.toolkit.messaging.response.Response> |
mapRequestAndFire(co.ecg.alpaca.toolkit.messaging.request.Request<R> request,
co.ecg.alpaca.toolkit.messaging.response.Response response)
Convenience method to map a request to a response and add it to the request bundler
|
protected <R extends co.ecg.alpaca.toolkit.messaging.response.Response> |
mapRequestAndFire(co.ecg.alpaca.toolkit.messaging.request.Request<R> request,
co.ecg.alpaca.toolkit.messaging.response.Response response,
Consumer<R> responseConsumer)
Convenience method to map a request to a response and add it to the request bundler
|
E |
registerForEvents()
Registers the import to receive events
|
void |
serviceModifyEvent(co.ecg.alpaca.toolkit.event.ServiceModifyEvent event)
Method to handle the subscription to the
EventBus for
ServiceModifyEvent . |
void |
setAddRequest(R request) |
void |
setOutput(O output) |
addStep, addStep, all, allBut, isConcurrent, only, removeStep, setConcurrent, step
checkValidity, exception, getErrors, getReport, getWarnings, hasErrors, isError, isError, isError, printReport, setExceptionOnErrors
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
getSessionLogger, logger
public R extends co.ecg.alpaca.toolkit.messaging.request.Request<co.ecg.alpaca.toolkit.messaging.response.DefaultResponse> addRequest
public AbstractImport(co.ecg.alpaca.toolkit.model.BroadWorksServer bws, T information, Class<S> buildStepClass) throws HelperException
bws
- The BroadWorks server to create the User oninformation
- The information to base the new object onbuildStepClass
- The class of the import build stepsHelperException
- Thrown if unable to create the Import.public void concurrencyCheck()
public E registerForEvents()
public co.ecg.alpaca.toolkit.model.BroadWorksServer getBroadWorksServer()
public O getOutput()
public void setOutput(O output)
public T getInformation()
public abstract R getAddRequest() throws co.ecg.alpaca.toolkit.exception.RequestException
co.ecg.alpaca.toolkit.exception.RequestException
public void setAddRequest(R request)
protected <R extends co.ecg.alpaca.toolkit.messaging.response.Response> void mapRequestAndFire(co.ecg.alpaca.toolkit.messaging.request.Request<R> request, co.ecg.alpaca.toolkit.messaging.response.Response response) throws co.ecg.alpaca.toolkit.exception.RequestException
request
- The output requestresponse
- The input responseco.ecg.alpaca.toolkit.exception.RequestException
- Thrown if unable to map or fire the request.protected <R extends co.ecg.alpaca.toolkit.messaging.response.Response> void mapRequestAndFire(co.ecg.alpaca.toolkit.messaging.request.Request<R> request, co.ecg.alpaca.toolkit.messaging.response.Response response, Consumer<R> responseConsumer) throws co.ecg.alpaca.toolkit.exception.RequestException
request
- The output requestresponse
- The input responseresponseConsumer
- Action to perform on the responseco.ecg.alpaca.toolkit.exception.RequestException
- Thrown if unable to map or fire the request.protected <R extends co.ecg.alpaca.toolkit.messaging.response.Response,Q extends co.ecg.alpaca.toolkit.messaging.request.Request<R>> void mapRequestAndFire(Q request, co.ecg.alpaca.toolkit.messaging.response.Response response, Consumer<R> responseConsumer, Consumer<Q> afterMappingConsumer) throws co.ecg.alpaca.toolkit.exception.RequestException
request
- The output requestresponse
- The input responseresponseConsumer
- A custom consumer for the responseco.ecg.alpaca.toolkit.exception.RequestException
- Thrown if unable to map or fire the request.public void serviceModifyEvent(co.ecg.alpaca.toolkit.event.ServiceModifyEvent event)
EventBus
for
ServiceModifyEvent
. These incoming events allow for the import to be queried to see
if there was any errors.event
- The ServiceModifyEvent to be handledCopyright © 2016. All rights reserved.