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.listener;
020
021import java.nio.charset.Charset;
022import java.util.Locale;
023import java.util.Map;
024import java.util.TimeZone;
025
026import lucee.runtime.db.DataSource;
027import lucee.runtime.exp.PageException;
028import lucee.runtime.type.Collection;
029import lucee.runtime.type.CustomType;
030import lucee.runtime.type.Struct;
031import lucee.runtime.type.dt.TimeSpan;
032
033// FUTURE move to ApplicationContext
034
035public interface ApplicationContextPro extends ApplicationContext {
036
037        public static final short WS_TYPE_AXIS1=1;
038        public static final short WS_TYPE_JAX_WS=2;
039        public static final short WS_TYPE_CXF=4;
040        
041    public DataSource[] getDataSources();
042    public DataSource getDataSource(String dataSourceName) throws PageException;
043    public DataSource getDataSource(String dataSourceName, DataSource defaultValue);
044
045    public void setDataSources(DataSource[] dataSources);
046    
047    /**
048     * default datasource name (String) or datasource (DataSource Object)
049     * @return
050     */
051        public Object getDefDataSource();
052        /**
053     * orm datasource name (String) or datasource (DataSource Object)
054     * @return
055     */
056        public Object getORMDataSource();
057        
058
059        public void setDefDataSource(Object datasource);
060        public void setORMDataSource(Object string);
061        
062
063
064        public abstract boolean getBufferOutput();
065        public abstract void setBufferOutput(boolean bufferOutput);
066
067        public Locale getLocale();
068        public void setLocale(Locale locale);
069        
070        public short getScopeCascading();
071        public void  setScopeCascading(short scopeCascading);
072
073        public TimeZone getTimeZone();
074        public void setTimeZone(TimeZone timeZone);
075
076        public Charset getWebCharset();
077        public void setWebCharset(Charset charset);
078
079        public Charset getResourceCharset();
080        public void setResourceCharset(Charset charset);
081
082        public boolean getTypeChecking();
083        public void setTypeChecking(boolean typeChecking);
084        
085        Map<Collection.Key, Map<Collection.Key, Object>> getTagAttributeDefaultValues();
086        public Map<Collection.Key, Object> getTagAttributeDefaultValues(String fullName);
087        public void setTagAttributeDefaultValues(Struct sct);
088
089        public TimeSpan getRequestTimeout();
090        public void setRequestTimeout(TimeSpan timeout);
091
092        public CustomType getCustomType(String strType);
093
094        public boolean getAllowCompression();
095        public void setAllowCompression(boolean allowCompression);
096
097        public boolean getSuppressContent();
098        public void setSuppressContent(boolean suppressContent);
099        
100
101
102        public short getWSType();
103        public void setWSType(short wstype);
104
105
106        public abstract boolean getCGIScopeReadonly();
107        public void setCGIScopeReadonly(boolean cgiScopeReadonly);
108        
109}