View Javadoc
1   /*
2    * Copyright 2007 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.sys.web.struts;
17  
18  import java.util.List;
19  
20  import org.apache.struts.upload.FormFile;
21  import org.kuali.ole.sys.OLEConstants;
22  import org.kuali.ole.sys.businessobject.BatchUpload;
23  import org.kuali.rice.core.api.util.KeyValue;
24  import org.kuali.rice.coreservice.framework.CoreFrameworkServiceLocator;
25  import org.kuali.rice.kns.web.struts.form.KualiForm;
26  
27  /**
28   * Struts action form for the batch upload screen.
29   */
30  public class KualiBatchInputFileForm extends KualiForm {
31      private FormFile uploadFile;
32      private BatchUpload batchUpload;
33      private List<KeyValue> userFiles;
34      private String url;
35  
36      //getterURL pull system parameter used method get  parameter.evaluator
37  
38  
39      private String titleKey;
40  
41      /**
42       * Constructs a KualiBatchInputFileForm.java.
43       */
44      public KualiBatchInputFileForm() {
45          super();
46          this.batchUpload = new BatchUpload();
47      }
48  
49      /**
50       * Gets the batchUpload attribute.
51       */
52      public BatchUpload getBatchUpload() {
53          return batchUpload;
54      }
55  
56      /**
57       * Sets the batchUpload attribute value.
58       */
59      public void setBatchUpload(BatchUpload batchUpload) {
60          this.batchUpload = batchUpload;
61      }
62  
63      /**
64       * Gets the uploadFile attribute.
65       */
66      public FormFile getUploadFile() {
67          return uploadFile;
68      }
69  
70      /**
71       * Sets the uploadFile attribute value.
72       */
73      public void setUploadFile(FormFile uploadFile) {
74          this.uploadFile = uploadFile;
75      }
76  
77      /**
78       * Gets the userFiles attribute.
79       */
80      public List<KeyValue> getUserFiles() {
81          return userFiles;
82      }
83  
84      /**
85       * Sets the userFiles attribute value.
86       */
87      public void setUserFiles(List<KeyValue> userFiles) {
88          this.userFiles = userFiles;
89      }
90  
91      /**
92       * Gets the titleKey attribute.
93       */
94      public String getTitleKey() {
95          return titleKey;
96      }
97  
98      /**
99       * Sets the titleKey attribute value.
100      */
101     public void setTitleKey(String titleKey) {
102         this.titleKey = titleKey;
103     }
104 
105     /**
106      * Gets the url attribute.
107      * @return Returns the url.
108      */
109     public String getUrl() {
110         return url;
111     }
112 
113     /**
114      * Sets the url attribute value.
115      * @param url The url to set.
116      */
117     public void setUrl(String url) {
118         this.url = url;
119     }
120 
121     @Override
122     protected void customInitMaxUploadSizes() {
123         addMaxUploadSize (CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(OLEConstants.CoreModuleNamespaces.OLE, "Batch", "MAX_FILE_SIZE_UPLOAD"));
124     }
125 
126 }