001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.kfs.sys.web.struts;
017
018 import java.util.HashMap;
019 import java.util.List;
020 import java.util.Map;
021
022 import org.apache.struts.upload.FormFile;
023 import org.kuali.kfs.sys.batch.BatchInputFileSetType;
024 import org.kuali.kfs.sys.businessobject.BatchUpload;
025 import org.kuali.rice.kns.web.struts.form.KualiForm;
026 import org.kuali.rice.core.util.KeyLabelPair;
027
028 /**
029 * This class is the form used for the batch upload for file sets
030 */
031 public class KualiBatchInputFileSetForm extends KualiForm {
032 private Map<String, FormFile> uploadedFiles;
033
034 private BatchUpload batchUpload;
035 private List<KeyLabelPair> fileUserIdentifiers;
036
037 private String titleKey;
038 private BatchInputFileSetType batchInputFileSetType;
039
040 private String downloadFileType;
041 private List<KeyLabelPair> fileTypes;
042
043 /**
044 * Constructs a KualiBatchInputFileForm.java.
045 */
046 public KualiBatchInputFileSetForm() {
047 super();
048 this.batchUpload = new BatchUpload();
049 this.uploadedFiles = new HashMap<String, FormFile>();
050 }
051
052 /**
053 * Gets the batchUpload attribute.
054 */
055 public BatchUpload getBatchUpload() {
056 return batchUpload;
057 }
058
059 /**
060 * Sets the batchUpload attribute value.
061 */
062 public void setBatchUpload(BatchUpload batchUpload) {
063 this.batchUpload = batchUpload;
064 }
065
066 /**
067 * Gets the userFiles attribute.
068 */
069 public List<KeyLabelPair> getFileUserIdentifiers() {
070 return fileUserIdentifiers;
071 }
072
073 /**
074 * Sets the userFiles attribute value.
075 */
076 public void setFileUserIdentifiers(List<KeyLabelPair> fileUserIdentifiers) {
077 this.fileUserIdentifiers = fileUserIdentifiers;
078 }
079
080 /**
081 * Gets the titleKey attribute.
082 */
083 public String getTitleKey() {
084 return titleKey;
085 }
086
087 /**
088 * Sets the titleKey attribute value.
089 */
090 public void setTitleKey(String titleKey) {
091 this.titleKey = titleKey;
092 }
093
094 /**
095 * Gets the batchInputFileSetType attribute.
096 *
097 * @return Returns the batchInputFileSetType.
098 */
099 public BatchInputFileSetType getBatchInputFileSetType() {
100 return batchInputFileSetType;
101 }
102
103 /**
104 * Sets the batchInputFileSetType attribute value.
105 *
106 * @param batchInputFileSetType The batchInputFileSetType to set.
107 */
108 public void setBatchInputFileSetType(BatchInputFileSetType batchInputFileSetType) {
109 this.batchInputFileSetType = batchInputFileSetType;
110 }
111
112 /**
113 * Gets the uploadedFiles attribute.
114 *
115 * @return Returns the uploadedFiles.
116 */
117 public Map<String, FormFile> getUploadedFiles() {
118 return uploadedFiles;
119 }
120
121 /**
122 * Sets the uploadedFiles attribute value.
123 *
124 * @param uploadedFiles The uploadedFiles to set.
125 */
126 public void setUploadedFiles(Map<String, FormFile> uploadedFiles) {
127 this.uploadedFiles = uploadedFiles;
128 }
129
130 /**
131 * Gets the fileAliases attribute.
132 *
133 * @return Returns the fileAliases.
134 */
135 public List<KeyLabelPair> getFileTypes() {
136 return fileTypes;
137 }
138
139 /**
140 * Sets the fileAliases attribute value.
141 *
142 * @param fileAliases The fileAliases to set.
143 */
144 public void setFileTypes(List<KeyLabelPair> fileAliases) {
145 this.fileTypes = fileAliases;
146 }
147
148 /**
149 * Gets the downloadFileAlias attribute.
150 *
151 * @return Returns the downloadFileAlias.
152 */
153 public String getDownloadFileType() {
154 return downloadFileType;
155 }
156
157 /**
158 * Sets the downloadFileAlias attribute value.
159 *
160 * @param downloadFileAlias The downloadFileAlias to set.
161 */
162 public void setDownloadFileType(String downloadFileAlias) {
163 this.downloadFileType = downloadFileAlias;
164 }
165 }