View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.docstore.model.xmlpojo.ingest;
17  
18  import java.util.ArrayList;
19  import java.util.HashSet;
20  import java.util.List;
21  import java.util.Set;
22  
23  /**
24   * Created by IntelliJ IDEA.
25   * User: pvsubrah
26   * Date: 9/7/11
27   * Time: 1:18 PM
28   * To change this template use File | Settings | File Templates.
29   */
30  public class Request {
31  
32      public static Set<String> validOperationSet = getValidOperationSet();
33  
34      public enum Operation {
35          ingest, bulkIngest, checkIn, checkOut, delete, deleteVerify, deleteWithLinkedDocs, bind, unbind, transfer,
36          transferInstances, transferItems
37      }
38  
39      private List<RequestDocument> requestDocuments = new ArrayList<RequestDocument>();
40      private String user;
41      private String operation;
42  
43      public String getUser() {
44          return user;
45      }
46  
47      public void setUser(String user) {
48          this.user = user;
49      }
50  
51      public String getOperation() {
52          return operation;
53      }
54  
55      public void setOperation(String operation) {
56          this.operation = operation;
57      }
58  
59      public List<RequestDocument> getRequestDocuments() {
60          return requestDocuments;
61      }
62  
63      public void setRequestDocuments(List<RequestDocument> requestDocuments) {
64          this.requestDocuments = requestDocuments;
65      }
66  
67      private static Set<String> getValidOperationSet() {
68          validOperationSet = new HashSet<String>();
69          validOperationSet.add(Request.Operation.ingest.toString());
70          validOperationSet.add(Request.Operation.bulkIngest.toString());
71          validOperationSet.add(Request.Operation.checkIn.toString());
72          validOperationSet.add(Request.Operation.checkOut.toString());
73          validOperationSet.add(Request.Operation.delete.toString());
74          validOperationSet.add(Operation.deleteVerify.toString());
75          validOperationSet.add(Request.Operation.deleteWithLinkedDocs.toString());
76          validOperationSet.add(Request.Operation.bind.toString());
77          validOperationSet.add(Request.Operation.unbind.toString());
78          validOperationSet.add(Request.Operation.transfer.toString());
79          validOperationSet.add(Request.Operation.transferInstances.toString());
80          validOperationSet.add(Request.Operation.transferItems.toString());
81          return validOperationSet;
82      }
83  }