001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.type.scope;
020
021import java.io.UnsupportedEncodingException;
022
023import javax.servlet.ServletInputStream;
024
025import lucee.runtime.exp.PageException;
026import lucee.runtime.listener.ApplicationContext;
027
028/**
029 * interface fro scope form
030 */
031public interface Form extends Scope {
032
033    /**
034     * @return Returns the encoding.
035     */
036    public abstract String getEncoding();
037
038    /**
039     * @param encoding The encoding to set.
040     * @throws UnsupportedEncodingException 
041     * @deprecated use instead <code>setEncoding(ApplicationContext ac,String encoding)</code>
042     */
043    //public abstract void setEncoding(String encoding) throws UnsupportedEncodingException;
044
045    
046    /**
047     * @param ac current ApplicationContext 
048     * @param encoding The encoding to set.
049     * @throws UnsupportedEncodingException 
050     */
051    public abstract void setEncoding(ApplicationContext ac,String encoding) throws UnsupportedEncodingException;
052
053
054    /**
055     * @return return the exception when initialised
056     */
057    public abstract PageException getInitException();
058
059        public abstract void setScriptProtecting(ApplicationContext ac,boolean b);
060
061        public FormItem getUploadResource(String key);
062        
063        public FormItem[] getFileItems();
064        
065        public ServletInputStream getInputStream();
066        
067        // FUTURE public void reinitialize(ApplicationContext ac);
068}