1 package org.kuali.ole.docstore.document;
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.pojo.OleException;
8
9 import javax.jcr.Node;
10 import javax.jcr.RepositoryException;
11 import javax.jcr.Session;
12 import java.io.FileNotFoundException;
13 import java.util.List;
14
15
16
17
18
19
20
21
22 public interface DocumentManager {
23
24
25
26
27
28
29
30
31
32 public List<ResponseDocument> ingest(List<RequestDocument> requestDocuments, Session session)
33 throws OleDocStoreException;
34
35
36
37
38
39
40
41
42
43 public ResponseDocument ingest(RequestDocument requestDocument, Session session, ResponseDocument respDoc) throws OleDocStoreException;
44
45 public List<ResponseDocument> checkout(List<RequestDocument> requestDocuments) throws OleDocStoreException;
46
47 public ResponseDocument checkout(RequestDocument requestDocument, Session session) throws OleDocStoreException;
48
49 public List<ResponseDocument> checkin(List<RequestDocument> requestDocuments) throws OleDocStoreException;
50
51 public ResponseDocument checkin(RequestDocument requestDocument, Session session, ResponseDocument respDoc) throws OleDocStoreException;
52
53 public List<ResponseDocument> delete(List<RequestDocument> requestDocuments) throws OleDocStoreException;
54
55 public ResponseDocument delete(RequestDocument requestDocument,Session session) throws Exception;
56
57 public ResponseDocument buildResponseDocument(RequestDocument requestDocument);
58
59 public void validateInput(RequestDocument requestDocument, Session session, List<String> valuesList)throws OleDocStoreException;
60
61
62
63
64
65
66
67 public void bulkIngest(BulkProcessRequest bulkProcessRequest, List<RequestDocument> requestDocuments)
68 throws OleDocStoreException;
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97 public void index(List<RequestDocument> requestDocuments, boolean commit) throws OleDocStoreException;
98
99
100
101
102
103
104
105
106
107 public Node storeDocument(RequestDocument requestDocument, Session session, ResponseDocument responseDocument) throws OleDocStoreException;
108
109 ResponseDocument bind(RequestDocument requestDocument, Session session, String operation) throws OleDocStoreException, RepositoryException, OleException, FileNotFoundException;
110 public ResponseDocument unbind(RequestDocument requestDocument, Session session, String operation) throws OleDocStoreException, RepositoryException, OleException, FileNotFoundException;
111
112 public List<ResponseDocument> deleteVerify(List<RequestDocument> requestDocument, Session session);
113 public ResponseDocument deleteVerify(RequestDocument requestDocument, Session session) throws Exception;
114 }