Class AbstractBatchHandler
- java.lang.Object
-
- org.nuxeo.ecm.automation.server.jaxrs.batch.handler.AbstractBatchHandler
-
- All Implemented Interfaces:
BatchHandler
- Direct Known Subclasses:
DefaultBatchHandler,S3DirectBatchHandler
public abstract class AbstractBatchHandler extends Object implements BatchHandler
Abstract batch handler: common code.- Since:
- 10.1
-
-
Field Summary
Fields Modifier and Type Field Description static StringBATCH_HANDLER_NAMETransient store key for the batch handler name.protected Stringnamestatic StringPROP_TRANSIENT_STORE_NAMEprotected StringtransientStoreName
-
Constructor Summary
Constructors Constructor Description AbstractBatchHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgenerateBatchId()protected Map<String,Serializable>getBatchParameters(String batchId)Gets the batch parameters, ornullif the batch is not found.StringgetName()Gets the batch handler's name.TransientStoregetTransientStore()Gets the transient store used by this batch handler.voidinitialize(String name, Map<String,String> properties)Initializes this batch handler with the given name and configuration properties.protected voidinitialize(Map<String,String> properties)BatchnewBatch(String batchId)Initiates a new batch with an optional externally provided id.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.automation.server.jaxrs.batch.BatchHandler
completeUpload, getBatch, refreshToken
-
-
-
-
Field Detail
-
PROP_TRANSIENT_STORE_NAME
public static final String PROP_TRANSIENT_STORE_NAME
- See Also:
- Constant Field Values
-
BATCH_HANDLER_NAME
public static final String BATCH_HANDLER_NAME
Transient store key for the batch handler name.- See Also:
- Constant Field Values
-
name
protected String name
-
transientStoreName
protected String transientStoreName
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:BatchHandlerGets the batch handler's name.- Specified by:
getNamein interfaceBatchHandler- Returns:
- the batch handler's name
-
initialize
public void initialize(String name, Map<String,String> properties)
Description copied from interface:BatchHandlerInitializes this batch handler with the given name and configuration properties.- Specified by:
initializein interfaceBatchHandler- Parameters:
name- the batch handler's nameproperties- the configuration properties
-
getTransientStore
public TransientStore getTransientStore()
Description copied from interface:BatchHandlerGets the transient store used by this batch handler.- Specified by:
getTransientStorein interfaceBatchHandler
-
getBatchParameters
protected Map<String,Serializable> getBatchParameters(String batchId)
Gets the batch parameters, ornullif the batch is not found.
-
newBatch
public Batch newBatch(String batchId)
Description copied from interface:BatchHandlerInitiates a new batch with an optional externally provided id.- Specified by:
newBatchin interfaceBatchHandler- Parameters:
batchId- the id to use for the batch, ornullto generate it- Returns:
- a newly created batch
-
generateBatchId
protected String generateBatchId()
-
-