Package org.restlet.ext.velocity
Class TemplateRepresentation.ResolverContext
- java.lang.Object
-
- org.restlet.ext.velocity.TemplateRepresentation.ResolverContext
-
- All Implemented Interfaces:
org.apache.velocity.context.Context
- Enclosing class:
- TemplateRepresentation
private class TemplateRepresentation.ResolverContext extends java.lang.Object implements org.apache.velocity.context.ContextVelocity context based on a Resolver.- See Also:
Resolver
-
-
Constructor Summary
Constructors Constructor Description ResolverContext(Resolver<? extends java.lang.Object> resolver)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(java.lang.String key)java.lang.Objectget(java.lang.String key)Gets the value corresponding to the provided key from the context.java.lang.String[]getKeys()Returns null since a resolver does not know by advance the whole values.java.lang.Objectput(java.lang.String key, java.lang.Object value)Returns null since a resolver as a data model cannot be updated.java.lang.Objectremove(java.lang.String key)Does nothing since resolver as a data model cannot be updated.
-
-
-
Field Detail
-
resolver
private final Resolver<? extends java.lang.Object> resolver
The inner resolver instance.
-
-
Constructor Detail
-
ResolverContext
public ResolverContext(Resolver<? extends java.lang.Object> resolver)
Constructor.- Parameters:
resolver- The resolver.
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.String key)
- Specified by:
containsKeyin interfaceorg.apache.velocity.context.Context
-
get
public java.lang.Object get(java.lang.String key)
Gets the value corresponding to the provided key from the context.- Specified by:
getin interfaceorg.apache.velocity.context.Context
-
getKeys
public java.lang.String[] getKeys()
Returns null since a resolver does not know by advance the whole values.- Specified by:
getKeysin interfaceorg.apache.velocity.context.Context
-
put
public java.lang.Object put(java.lang.String key, java.lang.Object value)Returns null since a resolver as a data model cannot be updated.- Specified by:
putin interfaceorg.apache.velocity.context.Context- Parameters:
key- The name to key the provided value with.value- The corresponding value.- Returns:
- null.
-
remove
public java.lang.Object remove(java.lang.String key)
Does nothing since resolver as a data model cannot be updated.- Specified by:
removein interfaceorg.apache.velocity.context.Context- Parameters:
value- The name of the value to remove.- Returns:
- null.
-
-