001    package railo.runtime.util;
002    
003    import java.io.Serializable;
004    
005    import railo.runtime.Mapping;
006    import railo.runtime.type.dt.TimeSpan;
007    
008    /**
009     * DTO Interface for Application Context data (defined by tag cfapplication)
010     */
011    public interface ApplicationContext extends Serializable {
012    
013        public static final int SCRIPT_PROTECT_NONE = 0;
014        public static final int SCRIPT_PROTECT_FORM = 1;
015        public static final int SCRIPT_PROTECT_URL = 2;
016        public static final int SCRIPT_PROTECT_CGI = 4;
017        public static final int SCRIPT_PROTECT_COOKIE = 8;
018        public static final int SCRIPT_PROTECT_ALL = SCRIPT_PROTECT_CGI+SCRIPT_PROTECT_COOKIE+SCRIPT_PROTECT_FORM+SCRIPT_PROTECT_URL;
019    
020            /**
021         * @return Returns the applicationTimeout.
022         */
023        public abstract TimeSpan getApplicationTimeout();
024    
025        /**
026         * @return Returns the loginStorage.
027         */
028        public abstract int getLoginStorage();
029    
030        /**
031         * @return Returns the name.
032         */
033        public abstract String getName();
034    
035        /**
036         * @return Returns the sessionTimeout.
037         */
038        public abstract TimeSpan getSessionTimeout();
039    
040        /**
041         * @return Returns the setClientCookies.
042         */
043        public abstract boolean isSetClientCookies();
044    
045        /**
046         * @return Returns the setClientManagement.
047         */
048        public abstract boolean isSetClientManagement();
049    
050        /**
051         * @return Returns the setDomainCookies.
052         */
053        public abstract boolean isSetDomainCookies();
054    
055        /**
056         * @return Returns the setSessionManagement.
057         */
058        public abstract boolean isSetSessionManagement();
059    
060        /**
061         * @return Returns the clientstorage.
062         */
063        public abstract String getClientstorage();
064    
065        /**
066         * @return if application context has a name
067         */
068        public abstract boolean hasName();
069        
070        /**
071         * @return return script protect setting
072         */
073        public int getScriptProtect();
074    
075        
076        public Mapping[] getMappings();
077        
078        public Mapping[] getCustomTagMappings();
079        
080    
081            public String getSecureJsonPrefix() ;
082    
083            public boolean getSecureJson();
084    
085    
086            // FUTURE
087            //public abstract String getDefaultDataSource();
088            //public abstract boolean hasOnSessionStart();
089            //public abstract boolean hasOnApplicationStart();
090    
091    }