View Javadoc

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