001 package railo.runtime.type; 002 003 import railo.runtime.PageContext; 004 import railo.runtime.dump.Dumpable; 005 import railo.runtime.exp.PageException; 006 import railo.runtime.op.Castable; 007 008 /** 009 * Hold a native or wild object, to use id inside railo runtime 010 */ 011 public interface Objects extends Dumpable,Castable { 012 013 /** 014 * return property 015 * @param pc PageContext 016 * @param key Name of the Property 017 * @return return value of the Property 018 * @deprecated use instead <code>{@link #get(PageContext, railo.runtime.type.Collection.Key, Object)}</code> 019 */ 020 public Object get(PageContext pc, String key, Object defaultValue); 021 022 /** 023 * return property 024 * @param pc PageContext 025 * @param key Name of the Property 026 * @return return value of the Property 027 */ 028 public Object get(PageContext pc, Collection.Key key, Object defaultValue); 029 030 /** 031 * return property or getter of the ContextCollection 032 * @param pc PageContext 033 * @param key Name of the Property 034 * @return return value of the Property 035 * @throws PageException 036 * @deprecated use instead <code>{@link #get(PageContext, railo.runtime.type.Collection.Key)}</code> 037 */ 038 public Object get(PageContext pc, String key) throws PageException; 039 040 /** 041 * return property or getter of the ContextCollection 042 * @param pc PageContext 043 * @param key Name of the Property 044 * @return return value of the Property 045 * @throws PageException 046 */ 047 public Object get(PageContext pc, Collection.Key key) throws PageException; 048 049 050 /** 051 * sets a property (Data Member) value of the object 052 * @param pc 053 * @param propertyName property name to set 054 * @param value value to insert 055 * @return value set to property 056 * @throws PageException 057 * @deprecated use instead <code>{@link #set(PageContext, railo.runtime.type.Collection.Key, Object)}</code> 058 */ 059 public Object set(PageContext pc, String propertyName, Object value) throws PageException; 060 061 062 /** 063 * sets a property (Data Member) value of the object 064 * @param pc 065 * @param propertyName property name to set 066 * @param value value to insert 067 * @return value set to property 068 * @throws PageException 069 */ 070 public Object set(PageContext pc, Collection.Key propertyName, Object value) throws PageException; 071 072 /** 073 * sets a property (Data Member) value of the object 074 * @param pc 075 * @param propertyName property name to set 076 * @param value value to insert 077 * @return value set to property 078 * @deprecated use instead <code>{@link #setEL(PageContext, railo.runtime.type.Collection.Key, Object)}</code> 079 */ 080 public Object setEL(PageContext pc, String propertyName, Object value); 081 082 /** 083 * sets a property (Data Member) value of the object 084 * @param pc 085 * @param propertyName property name to set 086 * @param value value to insert 087 * @return value set to property 088 */ 089 public Object setEL(PageContext pc, Collection.Key propertyName, Object value); 090 091 /** 092 * calls a method of the object 093 * @param pc 094 * @param methodName name of the method to call 095 * @param arguments arguments to call method with 096 * @return return value of the method 097 * @throws PageException 098 * @deprecated use instead <code>{@link #call(PageContext, railo.runtime.type.Collection.Key, Object[])}</code> 099 */ 100 public Object call(PageContext pc, String methodName, Object[] arguments) throws PageException; 101 /** 102 * calls a method of the object 103 * @param pc 104 * @param methodName name of the method to call 105 * @param arguments arguments to call method with 106 * @return return value of the method 107 * @throws PageException 108 */ 109 public Object call(PageContext pc, Collection.Key methodName, Object[] arguments) throws PageException; 110 111 /** 112 * call a method of the Object with named arguments 113 * @param pc PageContext 114 * @param methodName name of the method 115 * @param args Named Arguments for the method 116 * @return return result of the method 117 * @throws PageException 118 * @deprecated use instead <code>{@link #callWithNamedValues(PageContext, railo.runtime.type.Collection.Key, Struct)}</code> 119 */ 120 public abstract Object callWithNamedValues(PageContext pc, String methodName, Struct args) throws PageException; 121 122 /** 123 * call a method of the Object with named arguments 124 * @param pc PageContext 125 * @param methodName name of the method 126 * @param args Named Arguments for the method 127 * @return return result of the method 128 * @throws PageException 129 */ 130 public abstract Object callWithNamedValues(PageContext pc, Collection.Key methodName, Struct args) throws PageException; 131 132 /** 133 * @return returns if embeded Object is init 134 */ 135 public boolean isInitalized(); 136 }