001 package railo.runtime.type.ref; 002 003 import railo.runtime.PageContext; 004 import railo.runtime.exp.PageException; 005 import railo.runtime.type.Collection; 006 /** 007 * 008 */ 009 public interface Reference { 010 011 /** 012 * @return returns the value of the Variable 013 * @throws PageException 014 * @deprecated use instead <code>{@link #getKey()}</code> 015 */ 016 public abstract String getKeyAsString() throws PageException; 017 018 /** 019 * @return returns the value of the Variable 020 * @throws PageException 021 */ 022 public abstract Collection.Key getKey() throws PageException; 023 024 /** 025 * @param pc PageContext of the actuell Request 026 * @return returns the value of the Variable 027 * @throws PageException 028 */ 029 public abstract Object get(PageContext pc) throws PageException; 030 031 /** 032 * @param pc PageContext of the actuell Request 033 * @return returns the value of the Variable 034 * @throws PageException 035 */ 036 public abstract Object get(PageContext pc, Object defaultValue); 037 038 /** 039 * @param pc PageContext of the actuell Request 040 * @param value resets the value of the variable 041 * @return new Value setted 042 * @throws PageException 043 */ 044 public abstract Object set(PageContext pc,Object value) throws PageException; 045 046 /** 047 * @param pc PageContext of the actuell Request 048 * @param value resets the value of the variable 049 * @return new Value setted 050 * @throws PageException 051 */ 052 public abstract Object setEL(PageContext pc,Object value); 053 054 /** 055 * clears the variable from collection 056 * @param pc 057 * @return removed Object 058 * @throws PageException 059 */ 060 public abstract Object remove(PageContext pc) throws PageException; 061 062 /** 063 * clears the variable from collection 064 * @param pc 065 * @return removed Object 066 * @throws PageException 067 */ 068 public abstract Object removeEL(PageContext pc); 069 070 /** 071 * create it when not exists 072 * @param pc 073 * @return removed Object 074 * @throws PageException 075 */ 076 public abstract Object touch(PageContext pc) throws PageException; 077 078 /** 079 * create it when not exists 080 * @param pc 081 * @return removed Object 082 * @throws PageException 083 */ 084 public abstract Object touchEL(PageContext pc); 085 086 /** 087 * @return returns the collection 088 */ 089 public abstract Object getParent(); 090 }