Package ortus.boxlang.web.scopes
Class RequestScope
java.lang.Object
ortus.boxlang.runtime.types.Struct
ortus.boxlang.runtime.scopes.BaseScope
ortus.boxlang.web.scopes.RequestScope
- All Implemented Interfaces:
Serializable
,Map<ortus.boxlang.runtime.scopes.Key,
,Object> ortus.boxlang.runtime.dynamic.IReferenceable
,ortus.boxlang.runtime.scopes.IScope
,ortus.boxlang.runtime.types.IStruct
,ortus.boxlang.runtime.types.IType
,ortus.boxlang.runtime.types.meta.IListenable
public class RequestScope
extends ortus.boxlang.runtime.scopes.BaseScope
Web request scope implementation in BoxLang. I look like the request scope from the BL core,
but I also make the request attributes avaialble as if they were in the scope.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ortus.boxlang.runtime.types.IStruct
ortus.boxlang.runtime.types.IStruct.TYPES
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IBoxHTTPExchange
The Linked Exchangestatic final ortus.boxlang.runtime.scopes.Key
-------------------------------------------------------------------------- Public Properties --------------------------------------------------------------------------Fields inherited from class ortus.boxlang.runtime.types.Struct
$bx, EMPTY, INITIAL_CAPACITY, KEY_LENGTH_LONGEST_FIRST_COMPARATOR, wrapped
Fields inherited from interface ortus.boxlang.runtime.types.meta.IListenable
ALL_KEYS
-
Constructor Summary
ConstructorsConstructorDescriptionRequestScope
(IBoxHTTPExchange exchange) -------------------------------------------------------------------------- Constructors -------------------------------------------------------------------------- -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(ortus.boxlang.runtime.scopes.Key key) Returnstrue
if this map contains a mapping for the specifiedKey
boolean
containsValue
(Object value) Returnstrue
if this map maps has the specified valueentrySet()
Returns aSet
view of the mappings contained in this map.getRaw
(ortus.boxlang.runtime.scopes.Key key) Returns the value of the key safely, nulls will be wrapped in a NullValue still.boolean
isEmpty()
Returnstrue
if this map contains no key-value mappings.Set
<ortus.boxlang.runtime.scopes.Key> keySet()
Returns aSet
view of the keys contained in this map.int
size()
Returns the number of key-value mappings in this map.values()
Returns aCollection
view of the values contained in this map.Methods inherited from class ortus.boxlang.runtime.scopes.BaseScope
getLockName, getName
Methods inherited from class ortus.boxlang.runtime.types.Struct
addAll, assign, asString, clear, containsKey, containsKey, dereference, dereferenceAndInvoke, dereferenceAndInvoke, equals, fromMap, fromMap, get, get, getBoxMeta, getFunctionContextThisClassForInvoke, getFunctionContextThisInterfaceForInvoke, getKeys, getKeysAsStrings, getOrDefault, getOrDefault, getType, getWrapped, hashCode, isCaseSensitive, isSoftReferenced, linkedOf, of, put, put, putAll, putIfAbsent, putIfAbsent, registerChangeListener, registerChangeListener, remove, remove, remove, removeChangeListener, sortedOf, sortedOf, toImmutable, toString, toStringWithCase, unWrapNull, wrapAssignment, wrapNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ortus.boxlang.runtime.dynamic.IReferenceable
assign, dereference, dereferenceAndInvoke, dereferenceAndInvoke
Methods inherited from interface ortus.boxlang.runtime.scopes.IScope
initialize
Methods inherited from interface ortus.boxlang.runtime.types.IStruct
addAll, containsKey, get, getAs, getAsArray, getAsAttempt, getAsBoolean, getAsBoxInterface, getAsClassRunnable, getAsDateTime, getAsDouble, getAsFunction, getAsInteger, getAsKey, getAsLong, getAsNumber, getAsOptional, getAsQuery, getAsStream, getAsString, getAsStruct, getAsXML, getKeys, getKeysAsStrings, getOrDefault, getOrDefault, getType, getWrapped, isCaseSensitive, isSoftReferenced, put, put, putIfAbsent, putIfAbsent, remove, remove, toStringWithCase
Methods inherited from interface ortus.boxlang.runtime.types.IType
asString, getBoxMeta
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, equals, forEach, get, getOrDefault, hashCode, merge, putAll, remove, remove, replace, replace, replaceAll
-
Field Details
-
name
public static final ortus.boxlang.runtime.scopes.Key name-------------------------------------------------------------------------- Public Properties -------------------------------------------------------------------------- -
exchange
The Linked Exchange
-
-
Constructor Details
-
RequestScope
-------------------------------------------------------------------------- Constructors --------------------------------------------------------------------------
-
-
Method Details
-
size
public int size()Returns the number of key-value mappings in this map. If the map contains more thanInteger.MAX_VALUE
elements, returnsInteger.MAX_VALUE
. -
isEmpty
public boolean isEmpty()Returnstrue
if this map contains no key-value mappings. -
containsKey
public boolean containsKey(ortus.boxlang.runtime.scopes.Key key) Returnstrue
if this map contains a mapping for the specifiedKey
- Specified by:
containsKey
in interfaceortus.boxlang.runtime.types.IStruct
- Overrides:
containsKey
in classortus.boxlang.runtime.types.Struct
- Parameters:
key
- key whose presence in this map is to be tested- Returns:
true
if this map contains a mapping for the specified
-
containsValue
Returnstrue
if this map maps has the specified value- Specified by:
containsValue
in interfaceMap<ortus.boxlang.runtime.scopes.Key,
Object> - Overrides:
containsValue
in classortus.boxlang.runtime.types.Struct
- Parameters:
value
- value whose presence in this map is to be tested- Returns:
true
if this map contains a mapping for the specified value
-
getRaw
Returns the value of the key safely, nulls will be wrapped in a NullValue still.- Specified by:
getRaw
in interfaceortus.boxlang.runtime.types.IStruct
- Overrides:
getRaw
in classortus.boxlang.runtime.types.Struct
- Parameters:
key
- The key to look for- Returns:
- The value of the key or a NullValue object, null means the key didn't exist *
-
keySet
Returns aSet
view of the keys contained in this map. -
values
Returns aCollection
view of the values contained in this map. -
entrySet
Returns aSet
view of the mappings contained in this map.
-