1 package org.kuali.ole.docstore.process.batch;
2
3 import java.util.HashSet;
4 import java.util.List;
5 import java.util.Set;
6 import javax.jcr.Session;
7
8 import org.kuali.ole.docstore.model.xmlpojo.ingest.RequestDocument;
9 import org.kuali.ole.docstore.transaction.TransactionManager;
10 import org.kuali.ole.docstore.utility.BulkIngestStatistics;
11
12
13
14
15
16
17 @Deprecated
18 public class BulkProcessRequest {
19
20 public static Set<String> validOperationSet = getValidOperationSet();
21 protected String user;
22 protected BulkProcessOperation operation;
23 protected BulkProcessAction action;
24 protected String docCategory;
25 protected String docType;
26 protected String docFormat;
27 protected BulkIngestDataFormat dataFormat;
28 protected String dataFolder;
29 protected boolean doIndex;
30 protected int commitSize;
31
32 protected TransactionManager transactionManager;
33 protected Session session;
34 protected BulkProcessStatus status;
35 protected BulkIngestStatistics bulkIngestStatistics = BulkIngestStatistics.getInstance();
36 protected List<RequestDocument> previousBatchDocuments;
37
38 protected String bulkIngestFolder;
39
40 public enum BulkIngestDataFormat {
41 DOCSTORE, STANDARD
42 }
43
44 public enum BulkProcessAction {
45 START, STOP, STATUS, CLEAR
46 }
47
48 public enum BulkProcessStatus {
49 STARTED, STOPPED, DONE
50 }
51
52 public enum BulkProcessOperation {
53 INGEST, REINDEX, LINK
54 }
55
56 public String getUser() {
57 return user;
58 }
59
60 public void setUser(String user) {
61 this.user = user;
62 }
63
64 public BulkProcessOperation getOperation() {
65 return operation;
66 }
67
68 public void setOperation(BulkProcessOperation operation) {
69 this.operation = operation;
70 }
71
72 public BulkProcessAction getAction() {
73 return action;
74 }
75
76 public void setAction(BulkProcessAction action) {
77 this.action = action;
78 }
79
80 public String getDocCategory() {
81 return docCategory;
82 }
83
84 public void setDocCategory(String docCategory) {
85 this.docCategory = docCategory;
86 }
87
88 public String getDocType() {
89 return docType;
90 }
91
92 public void setDocType(String docType) {
93 this.docType = docType;
94 }
95
96 public String getDocFormat() {
97 return docFormat;
98 }
99
100 public void setDocFormat(String docFormat) {
101 this.docFormat = docFormat;
102 }
103
104 public BulkIngestDataFormat getDataFormat() {
105 return dataFormat;
106 }
107
108 public void setDataFormat(BulkIngestDataFormat dataFormat) {
109 this.dataFormat = dataFormat;
110 }
111
112 public BulkProcessStatus getStatus() {
113 return status;
114 }
115
116 public void setStatus(BulkProcessStatus status) {
117 this.status = status;
118 }
119
120 public int getCommitSize() {
121 return commitSize;
122 }
123
124 public void setCommitSize(int commitSize) {
125 this.commitSize = commitSize;
126 }
127
128 public boolean isDoIndex() {
129 return doIndex;
130 }
131
132 public void setDoIndex(boolean doIndex) {
133 this.doIndex = doIndex;
134 }
135
136 public BulkIngestStatistics getBulkIngestStatistics() {
137 return bulkIngestStatistics;
138 }
139
140 public void setBulkIngestStatistics(BulkIngestStatistics bulkIngestStatistics) {
141 this.bulkIngestStatistics = bulkIngestStatistics;
142 }
143
144 public String getDataFolder() {
145 return dataFolder;
146 }
147
148 public void setDataFolder(String dataFolder) {
149 this.dataFolder = dataFolder;
150 }
151
152 public Session getSession() {
153 return session;
154 }
155
156 public void setSession(Session session) {
157 this.session = session;
158 }
159
160 public List<RequestDocument> getPreviousBatchDocuments() {
161 return previousBatchDocuments;
162 }
163
164 public void setPreviousBatchDocuments(List<RequestDocument> previousBatchDocuments) {
165 this.previousBatchDocuments = previousBatchDocuments;
166 }
167
168 public TransactionManager getTransactionManager() {
169 return transactionManager;
170 }
171
172 public void setTransactionManager(TransactionManager transactionManager) {
173 this.transactionManager = transactionManager;
174 }
175
176 public String getBulkIngestFolder() {
177 return bulkIngestFolder;
178 }
179
180 public void setBulkIngestFolder(String bulkIngestFolder) {
181 this.bulkIngestFolder = bulkIngestFolder;
182 }
183
184 private static Set<String> getValidOperationSet() {
185 validOperationSet = new HashSet<String>();
186 validOperationSet.add(BulkProcessOperation.INGEST.toString());
187 validOperationSet.add(BulkProcessOperation.REINDEX.toString());
188 validOperationSet.add(BulkProcessOperation.LINK.toString());
189 return validOperationSet;
190 }
191 }