public.javadoc.org.spincast.plugins.variables.SpincastVariablesRequestContextAddon.html Maven / Gradle / Ivy
                 Go to download
                
        
                    Show more of this group  Show more artifacts with this name
Show all versions of spincast-website Show documentation
                Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
                
            
SpincastVariablesRequestContextAddon (org.spincast:spincast-framework 0.9.21 API) 
org.spincast.plugins.variables
Class SpincastVariablesRequestContextAddon<R extends IRequestContext<?>>
- java.lang.Object
 
- 
- org.spincast.plugins.variables.SpincastVariablesRequestContextAddon<R>
 
 
- 
- All Implemented Interfaces:
 
- IVariablesRequestContextAddon<R>
 
public class SpincastVariablesRequestContextAddon<R extends IRequestContext<?>>
extends Object
implements IVariablesRequestContextAddon<R>
 
- 
- 
Constructor Summary
Constructors  
Constructor and Description 
 
SpincastVariablesRequestContextAddon()  
 
 
- 
Method Summary
All Methods Instance Methods Concrete Methods  
Modifier and Type 
Method and Description 
 
void 
add(Map<String,Object> variables)
Adds request scoped variables.
 
 
void 
add(String key,
   Object obj)
Adds a request scoped variable.
 
 
Object 
get(String key)
Gets the specified request scoped variable.
 
 
<T> T 
get(String key,
   Class<T> clazz)
Gets the specified request scoped variable as the
 specified class.
 
 
<T> T 
get(String key,
   com.google.inject.Key<T> typeKey)
Gets the specified request scoped variable as the
 specified Key.
 
 
Map<String,Object> 
getAll()
Gets all the request scoped variables.
 
 
IJsonObject 
getAsJsonObject(String key)
Gets the specified request scoped variable as JsonObject.
 
 
String 
getAsString(String key)
Gets the specified request scoped variable as a String.
 
 
protected Map<String,Object> 
getRequestScopedVariables()  
 
void 
remove(String key)
Removes a request scoped variable.
 
 
 
 
- 
- 
Constructor Detail
- 
SpincastVariablesRequestContextAddon
public SpincastVariablesRequestContextAddon()
 
 
- 
Method Detail
- 
add
public void add(String key,
                Object obj)
Description copied from interface: IVariablesRequestContextAddon
Adds a request scoped variable. 
 
 It is recommended that you prefixe the name of the
 key with the name of your class
 (for example : this.getClass().getName()),
 so it doesn't clash with other keys!
- Specified by:
 
add in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
add
public void add(Map<String,Object> variables)
Description copied from interface: IVariablesRequestContextAddon
Adds request scoped variables.
 
 It is recommended that you prefixe the name of the
 keys with the name of your class
 (for example : this.getClass().getName()),
 so they don't clash with other keys!
- Specified by:
 
add in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
getAll
public Map<String,Object> getAll()
Description copied from interface: IVariablesRequestContextAddon
Gets all the request scoped variables.
 The map is immutable.
- Specified by:
 
getAll in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
get
public Object get(String key)
Description copied from interface: IVariablesRequestContextAddon
Gets the specified request scoped variable.
- Specified by:
 
get in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
get
public <T> T get(String key,
                 Class<T> clazz)
Description copied from interface: IVariablesRequestContextAddon
Gets the specified request scoped variable as the
 specified class.
- Specified by:
 
get in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
get
public <T> T get(String key,
                 com.google.inject.Key<T> typeKey)
Description copied from interface: IVariablesRequestContextAddon
Gets the specified request scoped variable as the
 specified Key.
- Specified by:
 
get in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
getAsJsonObject
public IJsonObject getAsJsonObject(String key)
Description copied from interface: IVariablesRequestContextAddon
Gets the specified request scoped variable as JsonObject.
- Specified by:
 
getAsJsonObject in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
getAsString
public String getAsString(String key)
Description copied from interface: IVariablesRequestContextAddon
Gets the specified request scoped variable as a String.
 toString will be called on the Object.
- Specified by:
 
getAsString in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
- 
remove
public void remove(String key)
Description copied from interface: IVariablesRequestContextAddon
Removes a request scoped variable.
 
 Note: Spincast uses some request scoped variables for
 internal purposes. Do not try to remove all
 variables!
- Specified by:
 
remove in interface IVariablesRequestContextAddon<R extends IRequestContext<?>> 
 
 
 
Copyright © 2016. All rights reserved.
    © 2015 - 2025 Weber Informatics LLC | Privacy Policy