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 String
BATCH_HANDLER_NAME
Transient store key for the batch handler name.protected String
name
static String
PROP_TRANSIENT_STORE_NAME
protected String
transientStoreName
-
Constructor Summary
Constructors Constructor Description AbstractBatchHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
generateBatchId()
protected Map<String,Serializable>
getBatchParameters(String batchId)
Gets the batch parameters, ornull
if the batch is not found.String
getName()
Gets the batch handler's name.TransientStore
getTransientStore()
Gets the transient store used by this batch handler.void
initialize(String name, Map<String,String> properties)
Initializes this batch handler with the given name and configuration properties.protected void
initialize(Map<String,String> properties)
Batch
newBatch(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:BatchHandler
Gets the batch handler's name.- Specified by:
getName
in interfaceBatchHandler
- Returns:
- the batch handler's name
-
initialize
public void initialize(String name, Map<String,String> properties)
Description copied from interface:BatchHandler
Initializes this batch handler with the given name and configuration properties.- Specified by:
initialize
in interfaceBatchHandler
- Parameters:
name
- the batch handler's nameproperties
- the configuration properties
-
getTransientStore
public TransientStore getTransientStore()
Description copied from interface:BatchHandler
Gets the transient store used by this batch handler.- Specified by:
getTransientStore
in interfaceBatchHandler
-
getBatchParameters
protected Map<String,Serializable> getBatchParameters(String batchId)
Gets the batch parameters, ornull
if the batch is not found.
-
newBatch
public Batch newBatch(String batchId)
Description copied from interface:BatchHandler
Initiates a new batch with an optional externally provided id.- Specified by:
newBatch
in interfaceBatchHandler
- Parameters:
batchId
- the id to use for the batch, ornull
to generate it- Returns:
- a newly created batch
-
generateBatchId
protected String generateBatchId()
-
-