railo.runtime
Class ComponentScopeShadow

java.lang.Object
  extended by railo.runtime.type.util.StructSupport
      extended by railo.runtime.ComponentScopeShadow
All Implemented Interfaces:
Serializable, Cloneable, Map, ComponentScope, Dumpable, Castable, Collection, Iteratorable, Objects, Scope, Variables, Sizeable, Struct

public class ComponentScopeShadow
extends StructSupport
implements ComponentScope

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
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
ComponentScopeShadow(ComponentImpl component, ComponentScopeShadow scope, boolean cloneShadow)
          Constructor of the class
ComponentScopeShadow(ComponentImpl component, Map<Collection.Key,Object> shadow)
          Constructor of the class
 
Method Summary
 Object call(PageContext pc, Collection.Key key, Object[] arguments)
          calls a method of the object
 Object call(PageContext pc, String key, Object[] arguments)
          calls a method of the object
 Object callWithNamedValues(PageContext pc, Collection.Key key, Struct args)
          call a method of the Object with named arguments
 Object callWithNamedValues(PageContext pc, String key, Struct args)
          call a method of the Object with named arguments
 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
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(String str)
           
 boolean containsKey(Collection.Key key)
          contains this key
 Collection duplicate(boolean deepCopy)
           
 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(PageContext pc, Collection.Key key)
          return property or getter of the ContextCollection
 Object get(PageContext pc, Collection.Key key, Object defaultValue)
          return property
 Object get(PageContext pc, String key)
          return property or getter of the ContextCollection
 Object get(PageContext pc, String key, Object defaultValue)
          return property
 ComponentPro getComponent()
          Returns the value of component.
 Map<Collection.Key,Object> getShadow()
           
 int getType()
           
 String getTypeAsString()
           
 void initialize(PageContext pc)
          Initalize Scope
 boolean isInitalized()
          return if the scope is Initialiesd
 Iterator keyIterator()
           
 Collection.Key[] keys()
           
 String[] keysAsString()
           
 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 removeEL(Collection.Key key)
          removes value from collection and return it when it exists, otherwise returns null
 Object set(Collection.Key key, Object value)
          sets a value to the collection
 Object set(PageContext pc, Collection.Key propertyName, Object value)
          sets a property (Data Member) value of the object
 Object set(PageContext pc, String propertyName, Object value)
          sets a property (Data Member) value of the object
 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(PageContext pc, Collection.Key propertyName, Object value)
          sets a property (Data Member) value of the object
 Object setEL(PageContext pc, String propertyName, Object value)
          sets a property (Data Member) value of the object
 int size()
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 
Methods inherited from class railo.runtime.type.util.StructSupport
clone, containsKey, containsKey, containsValue, entrySet, equals, get, get, get, invalidKey, isEmpty, iterator, keySet, put, putAll, remove, set, setEL, sizeOf, toString, valueIterator, values
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface railo.runtime.type.Collection
clone, containsKey, get, get, set, setEL
 
Methods inherited from interface railo.runtime.type.Iteratorable
iterator, valueIterator
 
Methods inherited from interface java.util.Map
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, values
 

Constructor Detail

ComponentScopeShadow

public ComponentScopeShadow(ComponentImpl component,
                            Map<Collection.Key,Object> shadow)
Constructor of the class

Parameters:
component -
shadow -

ComponentScopeShadow

public ComponentScopeShadow(ComponentImpl component,
                            ComponentScopeShadow scope,
                            boolean cloneShadow)
Constructor of the class

Parameters:
component -
shadow -
Method Detail

getComponent

public ComponentPro getComponent()
Description copied from interface: ComponentScope
Returns the value of component.

Specified by:
getComponent in interface ComponentScope
Returns:
value component
See Also:
ComponentScope.getComponent()

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 Objects
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(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)

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(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)

keyIterator

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

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()

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()

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

set

public Object set(Collection.Key key,
                  Object value)
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
See Also:
Collection.set(railo.runtime.type.Collection.Key, 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 dp)
Description copied from interface: Dumpable
method to print out information to a object as HTML

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

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
Overrides:
castToBooleanValue in class StructSupport
Returns:
boolean Value representation of the Object
Throws:
PageException
See Also:
Castable.castToBooleanValue()

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
Overrides:
castToBoolean in class StructSupport
Returns:
boolean Value representation of the Object
See Also:
Castable.castToBoolean(java.lang.Boolean)

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
Overrides:
castToDateTime in class StructSupport
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
Overrides:
castToDateTime in class StructSupport
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
Overrides:
castToDoubleValue in class StructSupport
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
Overrides:
castToDoubleValue in class StructSupport
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
Overrides:
castToString in class StructSupport
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
Overrides:
castToString in class StructSupport
Returns:
String representation of the Object
See Also:
StructSupport.castToString(java.lang.String)

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class StructSupport
Throws:
PageException
See Also:
railo.runtime.op.Castable#compare(boolean)

compareTo

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

compareTo

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

compareTo

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

call

public Object call(PageContext pc,
                   String key,
                   Object[] arguments)
            throws PageException
Description copied from interface: Objects
calls a method of the object

Specified by:
call in interface Objects
key - name of the method to call
arguments - arguments to call method with
Returns:
return value of the method
Throws:
PageException
See Also:
Objects.call(railo.runtime.PageContext, java.lang.String, java.lang.Object[])

call

public Object call(PageContext pc,
                   Collection.Key key,
                   Object[] arguments)
            throws PageException
Description copied from interface: Objects
calls a method of the object

Specified by:
call in interface Objects
key - name of the method to call
arguments - arguments to call method with
Returns:
return value of the method
Throws:
PageException

callWithNamedValues

public Object callWithNamedValues(PageContext pc,
                                  String key,
                                  Struct args)
                           throws PageException
Description copied from interface: Objects
call a method of the Object with named arguments

Specified by:
callWithNamedValues in interface Objects
Parameters:
pc - PageContext
key - name of the method
args - Named Arguments for the method
Returns:
return result of the method
Throws:
PageException
See Also:
Objects.callWithNamedValues(railo.runtime.PageContext, java.lang.String, railo.runtime.type.Struct)

callWithNamedValues

public Object callWithNamedValues(PageContext pc,
                                  Collection.Key key,
                                  Struct args)
                           throws PageException
Description copied from interface: Objects
call a method of the Object with named arguments

Specified by:
callWithNamedValues in interface Objects
Parameters:
pc - PageContext
key - name of the method
args - Named Arguments for the method
Returns:
return result of the method
Throws:
PageException

duplicate

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

get

public Object get(PageContext pc,
                  String key,
                  Object defaultValue)
Description copied from interface: Objects
return property

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property
See Also:
Objects.get(railo.runtime.PageContext, java.lang.String, java.lang.Object)

get

public Object get(PageContext pc,
                  Collection.Key key,
                  Object defaultValue)
Description copied from interface: Objects
return property

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property
See Also:
Objects.get(railo.runtime.PageContext, railo.runtime.type.Collection.Key, java.lang.Object)

set

public Object set(PageContext pc,
                  String propertyName,
                  Object value)
           throws PageException
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
set in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
Throws:
PageException
See Also:
Objects.set(railo.runtime.PageContext, java.lang.String, java.lang.Object)

set

public Object set(PageContext pc,
                  Collection.Key propertyName,
                  Object value)
           throws PageException
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
set in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
Throws:
PageException
See Also:
Objects.set(railo.runtime.PageContext, railo.runtime.type.Collection.Key, java.lang.Object)

setEL

public Object setEL(PageContext pc,
                    String propertyName,
                    Object value)
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
setEL in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
See Also:
Objects.setEL(railo.runtime.PageContext, java.lang.String, java.lang.Object)

setEL

public Object setEL(PageContext pc,
                    Collection.Key propertyName,
                    Object value)
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
setEL in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
See Also:
Objects.setEL(railo.runtime.PageContext, railo.runtime.type.Collection.Key, java.lang.Object)

get

public Object get(PageContext pc,
                  String key)
           throws PageException
Description copied from interface: Objects
return property or getter of the ContextCollection

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property
Throws:
PageException
See Also:
Objects.get(railo.runtime.PageContext, java.lang.String)

get

public Object get(PageContext pc,
                  Collection.Key key)
           throws PageException
Description copied from interface: Objects
return property or getter of the ContextCollection

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property
Throws:
PageException
See Also:
Objects.get(railo.runtime.PageContext, railo.runtime.type.Collection.Key)

getShadow

public Map<Collection.Key,Object> getShadow()


Copyright © 2012 Railo