Coverage Report - org.kuali.rice.core.web.impex.IngesterForm
 
Classes in this File Line Coverage Branch Coverage Complexity
IngesterForm
0%
0/8
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-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.rice.core.web.impex;
 17  
 
 18  
 import org.apache.struts.upload.FormFile;
 19  
 import org.kuali.rice.kns.web.struts.form.KualiForm;
 20  
 
 21  
 import java.util.Collection;
 22  
 import java.util.HashMap;
 23  
 import java.util.Map;
 24  
 
 25  
 /**
 26  
  * Struts form that accepts uploaded files (in the form of <code>FormFile</code>s)
 27  
  * @see org.kuali.rice.core.web.impex.IngesterAction
 28  
  * @see org.apache.struts.upload.FormFile
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  */
 31  0
 public class IngesterForm extends KualiForm {
 32  
 
 33  
         private static final long serialVersionUID = -2847217233600977960L;
 34  
         // this is sort of weak but the alternative is to linearly
 35  
     // pad a standard List will null items to make the accessors/mutators happy
 36  
     // on get(index)/set(index, value) so they don't throw IndexOutOfBoundsException
 37  0
     private Map<Integer, FormFile> files = new HashMap<Integer, FormFile>();
 38  
 
 39  
     public Collection<FormFile> getFiles() {
 40  0
         return files.values();
 41  
     }
 42  
 
 43  
     public void setFile(int index, FormFile value) {
 44  0
         files.put(index, value);
 45  0
     }
 46  
 
 47  
     public FormFile getFile(int index) {
 48  0
         return files.get(index);
 49  
     }
 50  
 
 51  
     public void reset() {
 52  0
         files.clear();
 53  0
     }
 54  
 }