001/**
002 * Copyright 2005-2016 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 */
016package org.kuali.rice.kns.web.struts.form;
017
018import org.apache.struts.upload.FormFile;
019
020import java.io.FileNotFoundException;
021import java.io.IOException;
022import java.io.InputStream;
023import java.io.Serializable;
024
025/**
026 * Empty FormFile instance, used to clear out FormFile attributes of Struts forms.
027 * 
028 * @deprecated KNS Struts deprecated, use KRAD and the Spring MVC framework.
029 */
030@Deprecated
031public class BlankFormFile implements FormFile, Serializable {
032    public void destroy() {
033    }
034
035    public String getContentType() {
036        throw new UnsupportedOperationException();
037    }
038
039    public byte[] getFileData() throws FileNotFoundException, IOException {
040        throw new UnsupportedOperationException();
041    }
042
043    public String getFileName() {
044        return "";
045    }
046
047    public int getFileSize() {
048        return 0;
049    }
050
051    public InputStream getInputStream() throws FileNotFoundException, IOException {
052        throw new UnsupportedOperationException();
053    }
054
055    public void setContentType(String contentType) {
056        throw new UnsupportedOperationException();
057    }
058
059    public void setFileName(String fileName) {
060        throw new UnsupportedOperationException();
061    }
062
063    public void setFileSize(int fileSize) {
064        throw new UnsupportedOperationException();
065    }
066}