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         */
019        public Object get(PageContext pc, Collection.Key key, Object defaultValue);
020        
021        
022        /**
023         * return property or getter of the ContextCollection
024         * @param pc PageContext
025         * @param key Name of the Property
026         * @return return value of the Property
027         * @throws PageException
028         */
029        public Object get(PageContext pc, Collection.Key key) throws PageException;
030        
031        
032    
033        /**
034         * sets a property (Data Member) value of the object
035         * @param pc 
036         * @param propertyName property name to set 
037         * @param value value to insert
038         * @return value set to property
039         * @throws PageException
040         */
041        public Object set(PageContext pc, Collection.Key propertyName, Object value) throws PageException;
042    
043    
044        /**
045         * sets a property (Data Member) value of the object
046         * @param pc 
047         * @param propertyName property name to set 
048         * @param value value to insert
049         * @return value set to property
050         */
051        public Object setEL(PageContext pc, Collection.Key propertyName, Object value);
052    
053        /**
054         * calls a method of the object
055         * @param pc 
056         * @param methodName name of the method to call
057         * @param arguments arguments to call method with
058         * @return return value of the method
059         * @throws PageException
060         */
061        public Object call(PageContext pc, Collection.Key methodName, Object[] arguments) throws PageException;
062        
063        
064        /**
065         * call a method of the Object with named arguments
066         * @param pc PageContext
067         * @param methodName name of the method
068         * @param args Named Arguments for the method
069         * @return return result of the method
070         * @throws PageException
071         */
072        public abstract Object callWithNamedValues(PageContext pc, Collection.Key methodName, Struct args) throws PageException;
073    }