1 package org.kuali.ole.docstore.transaction;
2
3 import org.kuali.ole.docstore.OleDocStoreException;
4 import org.kuali.ole.docstore.model.xmlpojo.ingest.RequestDocument;
5 import org.kuali.ole.docstore.model.xmlpojo.ingest.ResponseDocument;
6 import org.kuali.ole.docstore.process.batch.BulkProcessRequest;
7 import org.kuali.ole.docstore.utility.BatchIngestStatistics;
8
9 import javax.jcr.AccessDeniedException;
10 import javax.jcr.ItemExistsException;
11 import javax.jcr.RepositoryException;
12 import java.util.List;
13
14
15
16
17
18
19
20
21 public interface TransactionManager {
22
23 public enum TransactionState {
24 IDLE, STARTED, COMMITTED, ABORTED, FAILED
25 }
26
27 public List<ResponseDocument> ingest(List<RequestDocument> requestDocuments) throws Exception;
28
29 public List<ResponseDocument> checkIn(List<RequestDocument> requestDocuments) throws Exception;
30
31 public List<ResponseDocument> checkOut(List<RequestDocument> requestDocuments, Object object) throws Exception;
32
33 public List<ResponseDocument> bind(List<RequestDocument> requestDocuments, String operation) throws Exception;
34
35 public List<ResponseDocument> unbind(List<RequestDocument> requestDocuments, String operation) throws Exception;
36
37 public List<ResponseDocument> delete(List<RequestDocument> requestDocuments) throws Exception;
38
39 public List<ResponseDocument> deleteVerify(List<RequestDocument> requestDocuments) throws Exception;
40
41 public void transferInstances(List<RequestDocument> requestDocuments) throws Exception;
42
43 public void transferItems(List<RequestDocument> requestDocuments) throws Exception;
44
45 public void batchIngest(BulkProcessRequest bulkProcessRequest, List<RequestDocument> requestDocuments)
46 throws Exception;
47
48 public void startTransaction(String user, String operation) throws Exception;
49
50 public void startSession(String user, String operation) throws Exception;
51
52 public void commit() throws Exception;
53
54 public void closeSession();
55
56 public void abort();
57
58 }