001 package railo.runtime; 002 003 import java.io.Serializable; 004 import java.lang.ref.SoftReference; 005 006 import railo.runtime.component.ImportDefintion; 007 import railo.runtime.type.Struct; 008 import railo.runtime.type.UDF; 009 import railo.runtime.type.UDFProperties; 010 011 /** 012 * abstract Method for all generated Page Object 013 */ 014 public abstract class Page implements Serializable{ 015 016 private static final ImportDefintion[] ZERO=new ImportDefintion[0]; 017 /** 018 * Field <code>FALSE</code> 019 */ 020 public static boolean FALSE=false; 021 022 /** 023 * Field <code>TRUE</code> 024 */ 025 public static boolean TRUE=true; 026 private PageSource pageSource; 027 private byte loadType; 028 029 030 031 032 /** 033 * return version definition of the page 034 * @return version 035 */ 036 public int getVersion() {return -1;} 037 038 /** 039 * method to invoke a page 040 * @param pc PageContext 041 * @throws Throwable 042 */ 043 public void call(PageContext pc) throws Throwable{ 044 045 } 046 047 048 /** 049 * return when the source file last time was modified 050 * @return last modification of source file 051 */ 052 public long getSourceLastModified() {return 0;} 053 054 /** 055 * return the time when the file was compiled 056 */ 057 public long getCompileTime() {return 0;} 058 059 /** 060 * @param pageSource 061 */ 062 public void setPageSource(PageSource pageSource) { 063 this.pageSource=pageSource; 064 } 065 /** 066 * @return Returns the pageResource. 067 */ 068 public PageSource getPageSource() { 069 return pageSource; 070 } 071 072 /** 073 * @return gets the load type 074 */ 075 public byte getLoadType() { 076 return loadType; 077 } 078 079 /** 080 * @param loadType sets the load type 081 */ 082 public void setLoadType(byte loadType) { 083 this.loadType = loadType; 084 } 085 086 public Object udfCall(PageContext pageContext, UDF udf,int functionIndex) throws Throwable { 087 return null; 088 } 089 090 public void threadCall(PageContext pageContext, int threadIndex) throws Throwable { 091 } 092 093 // FUTURE @deprecated use instead <code>udfDefaultValue(PageContext pc, int functionIndex, int argumentIndex, Object defaultValue)</code> 094 public Object udfDefaultValue(PageContext pc, int functionIndex, int argumentIndex) { 095 return null; 096 } 097 098 /*FUTURE public Object udfDefaultValue(PageContext pc, int functionIndex, int argumentIndex, Object defaultValue) { 099 return null; 100 }*/ 101 102 103 104 public ImportDefintion[] getImportDefintions() { 105 return ZERO; 106 } 107 108 109 public SoftReference<Struct> metaData; 110 111 public UDFProperties[] udfs; 112 }