001 package railo.runtime; 002 003 004 import railo.commons.lang.types.RefBoolean; 005 import railo.runtime.exp.PageException; 006 import railo.runtime.type.Objects; 007 import railo.runtime.type.Struct; 008 009 /** 010 * interface for a Component 011 */ 012 public interface Component extends Struct,Objects { 013 014 /** 015 * Constant for Access Mode Remote 016 */ 017 public static final int ACCESS_REMOTE = 0; 018 019 /** 020 * Constant for Access Mode Public 021 */ 022 public static final int ACCESS_PUBLIC = 1; 023 024 /** 025 * Constant for Access Mode Package 026 */ 027 public static final int ACCESS_PACKAGE = 2; 028 029 /** 030 * Constant for Access Mode Private 031 */ 032 public static final int ACCESS_PRIVATE = 3; 033 034 /** 035 * Field <code>ACCESS_COUNT</code> 036 */ 037 public static final int ACCESS_COUNT=4; 038 039 /** 040 * returns java class to the component interface (all UDFs), 041 * this class is generated dynamic when used 042 * @param isNew 043 * @throws PageException 044 */ 045 public Class getJavaAccessClass(RefBoolean isNew) throws PageException; 046 047 /** 048 * @return Returns the display name. 049 */ 050 public abstract String getDisplayName(); 051 052 /** 053 * @return Returns the Extends. 054 */ 055 public abstract String getExtends(); 056 057 /** 058 * @return Returns the Hint. 059 */ 060 public abstract String getHint(); 061 062 /** 063 * @return Returns the Name. 064 */ 065 public abstract String getName(); 066 067 // FUTURE alle attribute bis cf8 aufnehmen 068 069 /** 070 * @return Returns the Name. 071 */ 072 public abstract String getCallName(); 073 074 /** 075 * @return Returns the Name. 076 */ 077 public abstract String getAbsName(); 078 079 /** 080 * @return Returns the output. 081 */ 082 public abstract boolean getOutput(); 083 084 /** 085 * check if Component is instance of this type 086 * @param type type to compare as String 087 * @return is instance of this type 088 */ 089 public abstract boolean instanceOf(String type); 090 091 /** 092 * check if value is a valid access modifier constant 093 * @param access 094 * @return is valid access 095 */ 096 public abstract boolean isValidAccess(int access); 097 098 099 /** 100 * returns Meta Data to the Component 101 * @param pc 102 * @return meta data to component 103 * @throws PageException 104 */ 105 public abstract Struct getMetaData(PageContext pc) throws PageException; 106 107 /** 108 * call a method of the component with no named arguments 109 * @param pc PageContext 110 * @param key name of the method 111 * @param args Arguments for the method 112 * @return return result of the method 113 * @throws PageException 114 */ 115 public abstract Object call(PageContext pc, String key, Object[] args) throws PageException; 116 117 /** 118 * call a method of the component with named arguments 119 * @param pc PageContext 120 * @param key name of the method 121 * @param args Named Arguments for the method 122 * @return return result of the method 123 * @throws PageException 124 */ 125 public abstract Object callWithNamedValues(PageContext pc, String key, Struct args) throws PageException; 126 127 public Page getPage();// FUTURE deprecated 128 129 // FUTURE public PageSource getPageSource(); 130 131 132 133 }