public class SpincastVariablesRequestContextAddon<R extends IRequestContext<?>> extends Object implements IVariablesRequestContextAddon<R>
| Constructor and Description |
|---|
SpincastVariablesRequestContextAddon() |
| 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.
|
public SpincastVariablesRequestContextAddon()
public void add(String key, Object obj)
IVariablesRequestContextAddonkey with the name of your class
(for example : this.getClass().getName()),
so it doesn't clash with other keys!add in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public void add(Map<String,Object> variables)
IVariablesRequestContextAddonkeys with the name of your class
(for example : this.getClass().getName()),
so they don't clash with other keys!add in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public Map<String,Object> getAll()
IVariablesRequestContextAddongetAll in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public Object get(String key)
IVariablesRequestContextAddonget in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public <T> T get(String key, Class<T> clazz)
IVariablesRequestContextAddonget in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public <T> T get(String key, com.google.inject.Key<T> typeKey)
IVariablesRequestContextAddonKey.get in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public IJsonObject getAsJsonObject(String key)
IVariablesRequestContextAddonJsonObject.getAsJsonObject in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public String getAsString(String key)
IVariablesRequestContextAddontoString will be called on the Object.getAsString in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>public void remove(String key)
IVariablesRequestContextAddonremove in interface IVariablesRequestContextAddon<R extends IRequestContext<?>>Copyright © 2016. All rights reserved.