001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.type.scope; 020 021import java.util.Set; 022 023import lucee.runtime.exp.PageException; 024import lucee.runtime.type.Array; 025import lucee.runtime.type.Collection; 026 027/** 028 * interface for Argument scope 029 */ 030public interface Argument extends Scope,Array,BindScope { 031 032 /** 033 * sets if scope is binded to a other variable for using outside of a udf 034 * @param bind 035 */ 036 public abstract void setBind(boolean bind); 037 038 /** 039 * @return returns if scope is binded to a other variable for using outside of a udf 040 */ 041 public abstract boolean isBind(); 042 043 /** 044 * insert a key in argument scope at defined position 045 * @param index 046 * @param key 047 * @param value 048 * @return boolean 049 * @throws PageException 050 */ 051 public abstract boolean insert(int index, String key, Object value) 052 throws PageException; 053 054 055 056 public Object setArgument(Object obj) throws PageException; 057 058 public static final Object NULL = null; 059 060 public Object getFunctionArgument(String key, Object defaultValue); 061 062 public Object getFunctionArgument(Collection.Key key, Object defaultValue); 063 064 public void setFunctionArgumentNames(Set functionArgumentNames); 065 066 public boolean containsFunctionArgumentKey(Key key); 067 068}