View Javadoc
1   /**
2    * Copyright 2005-2014 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.kns.web.struts.form;
17  
18  import org.apache.struts.upload.FormFile;
19  
20  import java.io.FileNotFoundException;
21  import java.io.IOException;
22  import java.io.InputStream;
23  import java.io.Serializable;
24  
25  /**
26   * Empty FormFile instance, used to clear out FormFile attributes of Struts forms.
27   * 
28   * @deprecated KNS Struts deprecated, use KRAD and the Spring MVC framework.
29   */
30  @Deprecated
31  public class BlankFormFile implements FormFile, Serializable {
32      public void destroy() {
33      }
34  
35      public String getContentType() {
36          throw new UnsupportedOperationException();
37      }
38  
39      public byte[] getFileData() throws FileNotFoundException, IOException {
40          throw new UnsupportedOperationException();
41      }
42  
43      public String getFileName() {
44          return "";
45      }
46  
47      public int getFileSize() {
48          return 0;
49      }
50  
51      public InputStream getInputStream() throws FileNotFoundException, IOException {
52          throw new UnsupportedOperationException();
53      }
54  
55      public void setContentType(String contentType) {
56          throw new UnsupportedOperationException();
57      }
58  
59      public void setFileName(String fileName) {
60          throw new UnsupportedOperationException();
61      }
62  
63      public void setFileSize(int fileSize) {
64          throw new UnsupportedOperationException();
65      }
66  }