Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.automation.server.jaxrs.batch
Class BatchManagerComponent

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.automation.server.jaxrs.batch.BatchManagerComponent
All Implemented Interfaces:
BatchManager, Adaptable, Component, Extensible

public class BatchManagerComponent
extends DefaultComponent
implements BatchManager

Runtime Component implementing the BatchManager service

Since:
5.4.2
Author:
Tiry (tdelprat@nuxeo.com)

Constructor Summary
BatchManagerComponent()
           
 
Method Summary
 void addStream(String batchId, String idx, InputStream is, String name, String mime)
          Add an inputStream in a batch Will create a new Batch if needed Streams are persisted as temporary files
 void clean(String batchId)
          Cleanup the temporary storage associated to the batch
 Blob getBlob(String batchId, String fileId)
           
 List<Blob> getBlobs(String batchId)
          Get Blobs associated to a given batch.
 String initBatch(String batchId, String contextName)
          Initialize a batch with a given batchId and Context Name If batchId is not provided, it will be automatically generated
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, applicationStarted, deactivate, getAdapter, registerContribution, registerExtension, unregisterContribution, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchManagerComponent

public BatchManagerComponent()
Method Detail

initBatch

public String initBatch(String batchId,
                        String contextName)
Description copied from interface: BatchManager
Initialize a batch with a given batchId and Context Name If batchId is not provided, it will be automatically generated

Specified by:
initBatch in interface BatchManager
Returns:
the batchId

addStream

public void addStream(String batchId,
                      String idx,
                      InputStream is,
                      String name,
                      String mime)
               throws IOException
Description copied from interface: BatchManager
Add an inputStream in a batch Will create a new Batch if needed Streams are persisted as temporary files

Specified by:
addStream in interface BatchManager
Throws:
IOException

getBlobs

public List<Blob> getBlobs(String batchId)
Description copied from interface: BatchManager
Get Blobs associated to a given batch. Returns null if batch does not exist

Specified by:
getBlobs in interface BatchManager
Returns:

getBlob

public Blob getBlob(String batchId,
                    String fileId)
Specified by:
getBlob in interface BatchManager

clean

public void clean(String batchId)
Description copied from interface: BatchManager
Cleanup the temporary storage associated to the batch

Specified by:
clean in interface BatchManager

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.