railo.runtime.type.scope
Class ArgumentThreadImpl

java.lang.Object
  extended by railo.runtime.type.scope.ArgumentThreadImpl
All Implemented Interfaces:
Serializable, Cloneable, Map, Dumpable, Castable, Array, Collection, Iteratorable, Scope, Argument, ArgumentPro, BindScope, Sizeable, Struct

public final class ArgumentThreadImpl
extends Object
implements ArgumentPro, Sizeable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface railo.runtime.type.scope.ArgumentPro
NULL
 
Fields inherited from interface railo.runtime.type.Scope
SCOPE_APPLICATION, SCOPE_ARGUMENTS, SCOPE_CALLER, SCOPE_CGI, SCOPE_CLIENT, SCOPE_CLUSTER, SCOPE_COOKIE, SCOPE_COUNT, SCOPE_FORM, SCOPE_LOCAL, SCOPE_REQUEST, SCOPE_SERVER, SCOPE_SESSION, SCOPE_UNDEFINED, SCOPE_URL, SCOPE_VARIABLES
 
Fields inherited from interface railo.runtime.type.Struct
TYPE_LINKED, TYPE_REGULAR, TYPE_SYNC, TYPE_WEAKED
 
Constructor Summary
ArgumentThreadImpl(Struct sct)
           
 
Method Summary
 Object append(Object o)
          append a new value to the end of the array
 Object appendEL(Object o)
           
 Boolean castToBoolean(Boolean defaultValue)
          cast the castable value to a boolean value
 boolean castToBooleanValue()
          cast the castable value to a boolean value
 DateTime castToDateTime()
          cast the castable value to a date time object
 DateTime castToDateTime(DateTime defaultValue)
          cast the castable value to a date time object
 double castToDoubleValue()
          cast the castable value to a double value
 double castToDoubleValue(double defaultValue)
          cast the castable value to a double value
 String castToString()
          cast the castable value to a string, other than the Method toString, this Method can throw a Exception
 String castToString(String defaultValue)
          cast the castable value to a string, return the default value, when the method is not castable
 void clear()
          clears the collection
 Object clone()
           
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(String str)
           
 boolean containsFunctionArgumentKey(Collection.Key key)
           
 boolean containsKey(Collection.Key key)
          contains this key
 boolean containsKey(int key)
          contains this key
 boolean containsKey(Object key)
           
 boolean containsKey(String key)
          contains this key
 boolean containsValue(Object value)
           
 Collection duplicate(boolean deepCopy)
           
 Set entrySet()
           
 Object get(Collection.Key key)
          return a value from the collection
 Object get(Collection.Key key, Object defaultValue)
          return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
 Object get(int key, Object defaultValue)
          return object a given position, key can only be a integer from 1 to array len
 Object get(Object key)
           
 Object get(String key)
          return a value from the collection
 Object get(String key, Object defaultValue)
          return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
 int getDimension()
          return dimension of the array
 Object getE(int key)
          return object a given position, key can only be a integer from 1 to array len
 Object getFunctionArgument(Collection.Key key, Object defaultValue)
           
 Object getFunctionArgument(String key, Object defaultValue)
           
 int getType()
           
 String getTypeAsString()
           
 void initialize(PageContext pc)
          Initalize Scope
 boolean insert(int key, Object value)
          insert a value add defined position
 boolean insert(int index, String key, Object value)
          insert a key in argument scope at defined position
 int[] intKeys()
           
 boolean isBind()
           
 boolean isEmpty()
           
 boolean isInitalized()
          return if the scope is Initialiesd
 Iterator iterator()
           
 Iterator keyIterator()
           
 Collection.Key[] keys()
           
 String[] keysAsString()
           
 Set keySet()
           
 Object prepend(Object o)
          add a new value to the begin of the array
 Object put(Object key, Object value)
           
 void putAll(Map m)
           
 void release()
          release scope for reuse
 Object remove(Collection.Key key)
          removes value from collection and return it when it exists, otherwise throws a exception
 Object remove(Object key)
           
 Object removeE(int key)
          removes a value ad defined key
 Object removeEL(Collection.Key key)
          removes value from collection and return it when it exists, otherwise returns null
 Object removeEL(int key)
          removes a value ad defined key
 void resize(int to)
          resize array to defined size
 Object set(Collection.Key key, Object value)
          sets a value to the collection
 Object set(String key, Object value)
          sets a value to the collection
 Object setArgument(Object obj)
           
 void setBind(boolean bind)
          sets if scope is binded to a other variable for using outside of a udf
 Object setE(int key, Object value)
          set value at defined position
 Object setEL(Collection.Key key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 Object setEL(int key, Object value)
          set value at defined position, on error return null
 Object setEL(String key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 void setFunctionArgumentNames(Set functionArgumentNames)
           
 int size()
           
 long sizeOf()
          return the size of the object
 void sort(String sortType, String sortOrder)
          sort values of a array
 Object[] toArray()
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties)
          method to print out information to a object as HTML
 List toList()
           
 Iterator valueIterator()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ArgumentThreadImpl

public ArgumentThreadImpl(Struct sct)
Method Detail

getFunctionArgument

public Object getFunctionArgument(String key,
                                  Object defaultValue)
Specified by:
getFunctionArgument in interface ArgumentPro
See Also:
ArgumentPro.getFunctionArgument(java.lang.String, java.lang.Object)

getFunctionArgument

public Object getFunctionArgument(Collection.Key key,
                                  Object defaultValue)
Specified by:
getFunctionArgument in interface ArgumentPro
See Also:
ArgumentPro.getFunctionArgument(railo.runtime.type.Collection.Key, java.lang.Object)

containsFunctionArgumentKey

public boolean containsFunctionArgumentKey(Collection.Key key)
Specified by:
containsFunctionArgumentKey in interface ArgumentPro
See Also:
ArgumentPro.containsFunctionArgumentKey(railo.runtime.type.Collection.Key)

setArgument

public Object setArgument(Object obj)
                   throws PageException
Specified by:
setArgument in interface ArgumentPro
Throws:
PageException

setFunctionArgumentNames

public void setFunctionArgumentNames(Set functionArgumentNames)
Specified by:
setFunctionArgumentNames in interface ArgumentPro
See Also:
ArgumentPro.setFunctionArgumentNames(java.util.Set)

insert

public boolean insert(int index,
                      String key,
                      Object value)
               throws PageException
Description copied from interface: Argument
insert a key in argument scope at defined position

Specified by:
insert in interface Argument
Returns:
boolean
Throws:
PageException

isBind

public boolean isBind()
Specified by:
isBind in interface Argument
Specified by:
isBind in interface BindScope
Returns:
returns if scope is binded to a other variable for using outside of a udf
See Also:
Argument.isBind()

setBind

public void setBind(boolean bind)
Description copied from interface: Argument
sets if scope is binded to a other variable for using outside of a udf

Specified by:
setBind in interface Argument
Specified by:
setBind in interface BindScope
See Also:
Argument.setBind(boolean)

getType

public int getType()
Specified by:
getType in interface Scope
Returns:
return the scope type (SCOPE_SERVER, SCOPE_SESSION usw.)
See Also:
Scope.getType()

getTypeAsString

public String getTypeAsString()
Specified by:
getTypeAsString in interface Scope
Returns:
return the scope type as a String (server,session usw.)
See Also:
Scope.getTypeAsString()

initialize

public void initialize(PageContext pc)
Description copied from interface: Scope
Initalize Scope

Specified by:
initialize in interface Scope
Parameters:
pc - Page Context
See Also:
Scope.initialize(railo.runtime.PageContext)

isInitalized

public boolean isInitalized()
Description copied from interface: Scope
return if the scope is Initialiesd

Specified by:
isInitalized in interface Scope
Returns:
scope is init
See Also:
Scope.isInitalized()

release

public void release()
Description copied from interface: Scope
release scope for reuse

Specified by:
release in interface Scope
See Also:
Scope.release()

clear

public void clear()
Description copied from interface: Collection
clears the collection

Specified by:
clear in interface Map
Specified by:
clear in interface Collection
See Also:
Collection.clear()

containsKey

public boolean containsKey(String key)
Description copied from interface: Collection
contains this key

Specified by:
containsKey in interface Collection
Returns:
returns if collection has a key with given name
See Also:
Collection.containsKey(java.lang.String)

containsKey

public boolean containsKey(Collection.Key key)
Description copied from interface: Collection
contains this key

Specified by:
containsKey in interface Collection
Returns:
returns if collection has a key with given name
See Also:
Collection.containsKey(railo.runtime.type.Collection.Key)

duplicate

public Collection duplicate(boolean deepCopy)
Specified by:
duplicate in interface Collection
See Also:
Collection.duplicate(boolean)

get

public Object get(String key)
           throws PageException
Description copied from interface: Collection
return a value from the collection

Specified by:
get in interface Collection
Parameters:
key - key of the value to get
Returns:
value on key position
Throws:
PageException
See Also:
Collection.get(java.lang.String)

get

public Object get(Collection.Key key)
           throws PageException
Description copied from interface: Collection
return a value from the collection

Specified by:
get in interface Collection
Parameters:
key - key of the value to get must be lower case
Returns:
value on key position
Throws:
PageException
See Also:
Collection.get(railo.runtime.type.Collection.Key)

get

public Object get(String key,
                  Object defaultValue)
Description copied from interface: Collection
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null

Specified by:
get in interface Collection
Parameters:
key - key of the value to get
Returns:
value on key position or null
See Also:
Collection.get(java.lang.String, java.lang.Object)

get

public Object get(Collection.Key key,
                  Object defaultValue)
Description copied from interface: Collection
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null

Specified by:
get in interface Collection
Parameters:
key - key of the value to get
Returns:
value on key position or null
See Also:
Collection.get(railo.runtime.type.Collection.Key, java.lang.Object)

keys

public Collection.Key[] keys()
Specified by:
keys in interface Collection
Returns:
returns a string array of all keys in the collection
See Also:
Collection.keys()

keysAsString

public String[] keysAsString()
Specified by:
keysAsString in interface Collection
Returns:
returns a string array of all keys in the collection
See Also:
Collection.keysAsString()

remove

public Object remove(Collection.Key key)
              throws PageException
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise throws a exception

Specified by:
remove in interface Collection
Parameters:
key - key of the collection
Returns:
removed Object
Throws:
PageException
See Also:
Collection.remove(railo.runtime.type.Collection.Key)

removeEL

public Object removeEL(Collection.Key key)
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise returns null

Specified by:
removeEL in interface Collection
Parameters:
key - key of the collection
Returns:
removed Object
See Also:
Collection.removeEL(railo.runtime.type.Collection.Key)

set

public Object set(String key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Specified by:
set in interface Collection
Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException
See Also:
Collection.set(java.lang.String, java.lang.Object)

set

public Object set(Collection.Key key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Specified by:
set in interface Collection
Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException
See Also:
Collection.set(railo.runtime.type.Collection.Key, java.lang.Object)

setEL

public Object setEL(String key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Specified by:
setEL in interface Collection
Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null
See Also:
Collection.setEL(java.lang.String, java.lang.Object)

setEL

public Object setEL(Collection.Key key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Specified by:
setEL in interface Collection
Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null
See Also:
Collection.setEL(railo.runtime.type.Collection.Key, java.lang.Object)

size

public int size()
Specified by:
size in interface Map
Specified by:
size in interface Collection
Returns:
the size of the collection
See Also:
Collection.size()

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties properties)
Description copied from interface: Dumpable
method to print out information to a object as HTML

Specified by:
toDumpData in interface Dumpable
Returns:
HTML print out
See Also:
Dumpable.toDumpData(railo.runtime.PageContext, int, railo.runtime.dump.DumpProperties)

iterator

public Iterator iterator()
Specified by:
iterator in interface Iteratorable
Returns:
return a Iterator for keys
See Also:
Iteratorable.iterator()

keyIterator

public Iterator keyIterator()
Specified by:
keyIterator in interface Iteratorable
Returns:
return a Iterator for Keys as String
See Also:
Iteratorable.keyIterator()

valueIterator

public Iterator valueIterator()
Specified by:
valueIterator in interface Iteratorable
Returns:
return a Iterator for Values
See Also:
Iteratorable.valueIterator()

castToBoolean

public Boolean castToBoolean(Boolean defaultValue)
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBoolean in interface Castable
Returns:
boolean Value representation of the Object

castToBooleanValue

public boolean castToBooleanValue()
                           throws PageException
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBooleanValue in interface Castable
Returns:
boolean Value representation of the Object
Throws:
PageException
See Also:
Castable.castToBooleanValue()

castToDateTime

public DateTime castToDateTime()
                        throws PageException
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Returns:
date time representation of the Object
Throws:
PageException
See Also:
Castable.castToDateTime()

castToDateTime

public DateTime castToDateTime(DateTime defaultValue)
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Parameters:
defaultValue - returned when it is not possible to cast to a dateTime object
Returns:
date time representation of the Object
See Also:
Castable.castToDateTime(railo.runtime.type.dt.DateTime)

castToDoubleValue

public double castToDoubleValue()
                         throws PageException
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Returns:
double Value representation of the Object
Throws:
PageException
See Also:
Castable.castToDoubleValue()

castToDoubleValue

public double castToDoubleValue(double defaultValue)
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Returns:
double Value representation of the Object
See Also:
Castable.castToDoubleValue(double)

castToString

public String castToString()
                    throws PageException
Description copied from interface: Castable
cast the castable value to a string, other than the Method toString, this Method can throw a Exception

Specified by:
castToString in interface Castable
Returns:
String representation of the Object
Throws:
PageException
See Also:
Castable.castToString()

castToString

public String castToString(String defaultValue)
Description copied from interface: Castable
cast the castable value to a string, return the default value, when the method is not castable

Specified by:
castToString in interface Castable
Returns:
String representation of the Object
See Also:
Castable.castToString(java.lang.String)

compareTo

public int compareTo(String str)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(java.lang.String)

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(boolean)

compareTo

public int compareTo(double d)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(double)

compareTo

public int compareTo(DateTime dt)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(railo.runtime.type.dt.DateTime)

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map
See Also:
Map.containsValue(java.lang.Object)

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
See Also:
Map.entrySet()

get

public Object get(Object key)
Specified by:
get in interface Map
See Also:
Map.get(java.lang.Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
See Also:
Map.isEmpty()

keySet

public Set keySet()
Specified by:
keySet in interface Map
See Also:
Map.keySet()

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map
See Also:
Map.put(java.lang.Object, java.lang.Object)

putAll

public void putAll(Map m)
Specified by:
putAll in interface Map
See Also:
Map.putAll(java.util.Map)

remove

public Object remove(Object key)
Specified by:
remove in interface Map
See Also:
Map.remove(java.lang.Object)

values

public Collection values()
Specified by:
values in interface Map
See Also:
Map.values()

append

public Object append(Object o)
              throws PageException
Description copied from interface: Array
append a new value to the end of the array

Specified by:
append in interface Array
Parameters:
o - value to insert
Returns:
inserted value
Throws:
PageException
See Also:
Array.append(java.lang.Object)

appendEL

public Object appendEL(Object o)
Specified by:
appendEL in interface Array
See Also:
Array.appendEL(java.lang.Object)

containsKey

public boolean containsKey(int key)
Description copied from interface: Array
contains this key

Specified by:
containsKey in interface Array
Returns:
returns if collection has a key with given name
See Also:
Array.containsKey(int)

get

public Object get(int key,
                  Object defaultValue)
Description copied from interface: Array
return object a given position, key can only be a integer from 1 to array len

Specified by:
get in interface Array
Parameters:
key - key as integer
Returns:
value at key position
See Also:
Array.get(int, java.lang.Object)

getDimension

public int getDimension()
Description copied from interface: Array
return dimension of the array

Specified by:
getDimension in interface Array
Returns:
dimension of the array
See Also:
Array.getDimension()

getE

public Object getE(int key)
            throws PageException
Description copied from interface: Array
return object a given position, key can only be a integer from 1 to array len

Specified by:
getE in interface Array
Parameters:
key - key as integer
Returns:
value at key position
Throws:
PageException
See Also:
Array.getE(int)

insert

public boolean insert(int key,
                      Object value)
               throws PageException
Description copied from interface: Array
insert a value add defined position

Specified by:
insert in interface Array
Parameters:
key - position to insert
value - value to insert
Returns:
has done or not
Throws:
PageException
See Also:
Array.insert(int, java.lang.Object)

intKeys

public int[] intKeys()
Specified by:
intKeys in interface Array
Returns:
return all array keys as int
See Also:
Array.intKeys()

prepend

public Object prepend(Object o)
               throws PageException
Description copied from interface: Array
add a new value to the begin of the array

Specified by:
prepend in interface Array
Parameters:
o - value to insert
Returns:
inserted value
Throws:
PageException
See Also:
Array.prepend(java.lang.Object)

removeE

public Object removeE(int key)
               throws PageException
Description copied from interface: Array
removes a value ad defined key

Specified by:
removeE in interface Array
Parameters:
key - key to remove
Returns:
retuns if value is removed or not
Throws:
PageException
See Also:
Array.removeE(int)

removeEL

public Object removeEL(int key)
Description copied from interface: Array
removes a value ad defined key

Specified by:
removeEL in interface Array
Parameters:
key - key to remove
Returns:
retuns if value is removed or not
See Also:
Array.removeEL(int)

resize

public void resize(int to)
            throws PageException
Description copied from interface: Array
resize array to defined size

Specified by:
resize in interface Array
Parameters:
to - new minimum size of the array
Throws:
PageException
See Also:
Array.resize(int)

setE

public Object setE(int key,
                   Object value)
            throws PageException
Description copied from interface: Array
set value at defined position

Specified by:
setE in interface Array
Parameters:
key -
value -
Returns:
Throws:
PageException

setEL

public Object setEL(int key,
                    Object value)
Description copied from interface: Array
set value at defined position, on error return null

Specified by:
setEL in interface Array
Parameters:
key - key of the new value
value - value to set
Returns:
setted value
See Also:
Array.setEL(int, java.lang.Object)

sort

public void sort(String sortType,
                 String sortOrder)
          throws PageException
Description copied from interface: Array
sort values of a array

Specified by:
sort in interface Array
Parameters:
sortType - search type (text,textnocase,numeric)
sortOrder - (asc,desc)
Throws:
PageException
See Also:
Array.sort(java.lang.String, java.lang.String)

toArray

public Object[] toArray()
Specified by:
toArray in interface Array
Returns:
return arra as native (Java) Object Array
See Also:
Array.toArray()

toList

public List toList()
Specified by:
toList in interface Array
Returns:
return array as ArrayList
See Also:
Array.toList()

clone

public Object clone()
Specified by:
clone in interface Collection
Overrides:
clone in class Object
Returns:
this object cloned
See Also:
Object.clone()

sizeOf

public long sizeOf()
Description copied from interface: Sizeable
return the size of the object

Specified by:
sizeOf in interface Sizeable
Returns:
size of the object
See Also:
Sizeable.sizeOf()


Copyright © 2012 Railo