001    package railo.runtime;
002    
003    import java.io.IOException;
004    
005    import railo.commons.io.res.Resource;
006    import railo.runtime.config.Config;
007    import railo.runtime.dump.Dumpable;
008    
009    
010    /**
011     * interface of the mapping definition
012     */
013    public interface Mapping  extends Dumpable{
014    
015        /**
016         * @return returns the archiveClassLoader
017         */
018        public abstract ClassLoader getClassLoaderForArchive();
019    
020        /**
021         * return the ClassLoader that match on the physical directory
022         * @param reload reload the ClassLoader
023         * @return ClassLoader
024         * @throws IOException
025         */
026        public abstract ClassLoader getClassLoaderForPhysical(boolean reload)
027                throws IOException;
028    
029        /**
030         * @return Returns the physical.
031         */
032        public abstract Resource getPhysical();
033    
034        /**
035         * @return Returns the virtual lower case.
036         */
037        public abstract String getVirtualLowerCase();
038    
039        /**
040         * @return Returns the virtual lower case with slash at the end.
041         */
042        public abstract String getVirtualLowerCaseWithSlash();
043    
044        /**
045         * @return return the archive file
046         */
047        public abstract Resource getArchive();
048    
049        /**
050         * @return returns if mapping has a archive
051         */
052        public abstract boolean hasArchive();
053    
054        /**
055         * @return return if mapping has a physical path
056         */
057        public abstract boolean hasPhysical();
058    
059        /**
060         * @return class root directory
061         */
062        public abstract Resource getClassRootDirectory();
063    
064        /**
065         * pagesoucre matching given realpath
066         * @param realPath
067         * @return matching pagesource
068         */
069        public abstract PageSource getPageSource(String realPath);
070        
071        
072        /**
073         * @param path
074         * @param isOut
075         * @return matching pagesoucre
076         */
077        public abstract PageSource getPageSource(String path, boolean isOut);
078    
079        /**
080         * checks the mapping
081         */
082        public abstract void check();
083    
084        /**
085         * @return Returns the hidden.
086         */
087        public abstract boolean isHidden();
088    
089        /**
090         * @return Returns the physicalFirst.
091         */
092        public abstract boolean isPhysicalFirst();
093    
094        /**
095         * @return Returns the readonly.
096         */
097        public abstract boolean isReadonly();
098    
099        /**
100         * @return Returns the strArchive.
101         */
102        public abstract String getStrArchive();
103    
104        /**
105         * @return Returns the strPhysical.
106         */
107        public abstract String getStrPhysical();
108    
109        /**
110         * @return Returns the trusted.
111         */
112        public abstract boolean isTrusted();
113    
114        public abstract boolean isTopLevel();
115    
116        /**
117         * @return Returns the virtual.
118         */
119        public abstract String getVirtual();
120        
121    
122        /**
123         * returns config of the mapping
124         * @return config
125         */
126        public Config getConfig();
127    }