Package org.spincast.plugins.variables
Class SpincastVariablesRequestContextAddon<R extends RequestContext<?>>
java.lang.Object
org.spincast.plugins.variables.SpincastVariablesRequestContextAddon<R>
- All Implemented Interfaces:
VariablesRequestContextAddon<R>
public class SpincastVariablesRequestContextAddon<R extends RequestContext<?>>
extends Object
implements VariablesRequestContextAddon<R>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the specified request scoped variable.<T> TGets the specified request scoped variable as the specifiedKey.<T> TGets the specified request scoped variable as the specified class.getAll()Gets all the request scoped variables.getAsJsonObject(String key) Gets the specified request scoped variable asJsonObject.getAsString(String key) Gets the specified request scoped variable as a String.voidRemoves a request scoped variable.voidAdds a request scoped variable.voidAdds request scoped variables.
-
Constructor Details
-
SpincastVariablesRequestContextAddon
public SpincastVariablesRequestContextAddon()
-
-
Method Details
-
set
Description copied from interface:VariablesRequestContextAddonAdds a request scoped variable.It is recommended that you prefixe the name of the
keywith the name of your class (for example :this.getClass().getName()), so it doesn't clash with other keys!If the variable already exists, it is overwritten.
- Specified by:
setin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
set
Description copied from interface:VariablesRequestContextAddonAdds request scoped variables.It is recommended that you prefixe the name of the
keyswith the name of your class (for example :this.getClass().getName()), so they don't clash with other keys!If some variables already exist, they are overwritten.
- Specified by:
setin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
getAll
Description copied from interface:VariablesRequestContextAddonGets all the request scoped variables. The map is immutable.- Specified by:
getAllin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
getRequestScopedVariables
-
get
Description copied from interface:VariablesRequestContextAddonGets the specified request scoped variable.- Specified by:
getin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
get
Description copied from interface:VariablesRequestContextAddonGets the specified request scoped variable as the specified class.- Specified by:
getin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
get
Description copied from interface:VariablesRequestContextAddonGets the specified request scoped variable as the specifiedKey.- Specified by:
getin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
getAsJsonObject
Description copied from interface:VariablesRequestContextAddonGets the specified request scoped variable asJsonObject.- Specified by:
getAsJsonObjectin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
getAsString
Description copied from interface:VariablesRequestContextAddonGets the specified request scoped variable as a String.toStringwill be called on the Object.- Specified by:
getAsStringin interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-
remove
Description copied from interface:VariablesRequestContextAddonRemoves a request scoped variable. Note: Spincast uses some request scoped variables for internal purposes. Do not try to remove all variables!- Specified by:
removein interfaceVariablesRequestContextAddon<R extends RequestContext<?>>
-