|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TemplateContext
The context for resolving an instance of Viewable
to
an instance of ResolvedViewable
.
Method Summary | |
---|---|
ResolvedViewable |
resolveViewable(Viewable v)
Resolve a Viewable . |
ResolvedViewable |
resolveViewable(Viewable v,
java.lang.Class<?> resolvingClass)
Resolve a Viewable given a resolving class. |
ResolvedViewable |
resolveViewable(Viewable v,
UriInfo ui)
Resolve a Viewable . |
Method Detail |
---|
ResolvedViewable resolveViewable(Viewable v) throws TemplateContextException
Viewable
.
If the template name of the viewable is not absolute then the resolving
class of the viewable is utilized to resolve the relative template name
into an absolute template name.
If the resolving class is not set (a null value) then the class of the
model is utilized as the resolving class.
If the model is not set (a null value) then a TemplateContextException
is thrown.
v
- the viewable
TemplateContextException
- if the viewable cannot be resolved.ResolvedViewable resolveViewable(Viewable v, UriInfo ui) throws TemplateContextException
Viewable
.
If the template name of the viewable is not absolute then the resolving
class of the viewable is utilized to resolve the relative template name
into an absolute template name.
If the resolving class is not set (a null value) then the class of the
last matching resource obtained from
UriInfo.getMatchedResources()
, namely
the class obtained from the expression
uriInfo.getMatchedResources().get(0).getClass()
, is utilized
as the resolving class.
If there are no matching resoruces then a TemplateContextException
is thrown.
v
- the viewableui
-
TemplateContextException
- if the viewable cannot be resolved.ResolvedViewable resolveViewable(Viewable v, java.lang.Class<?> resolvingClass) throws TemplateContextException
Viewable
given a resolving class.
If the template name of the viewable is not absolute then the resolving
class of the viewable is utilized to resolve the relative template name
into an absolute template name.
If the resolving class is not set (a null value) then the class of the
resolvingClass
parameter is utilized as the resolving class.
If the resolvingClass
parameter is null then a
TemplateContextException
is thrown.
v
- the viewable.resolvingClass
- the resolving class to use if the resolving
class of the viewable is not set.
TemplateContextException
- if the viewable cannot be resolved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |