|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.mvc.internal.TemplateHelper
public final class TemplateHelper
Helper class to provide some common functionality related to MVC.
| Method Summary | |
|---|---|
static java.lang.String |
getAbsolutePath(java.lang.Class<?> resourceClass,
java.lang.String path,
char delim)
Return an absolute path to the given class where segments are separated using delim character and path
is appended to this path. |
static java.util.List<MediaType> |
getProducibleMediaTypes(ContainerRequest containerRequest,
ExtendedUriInfo extendedUriInfo,
Ref<java.lang.String> varyHeaderValue)
Get media types for which the resolved viewable could be
produced. |
static Template |
getTemplateAnnotation(java.lang.annotation.Annotation[] annotations)
Extract template annotation from given list. |
static java.lang.String |
getTemplateName(Viewable viewable)
Get template name from given viewable or return index if the given
viewable doesn't contain a valid template name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String getAbsolutePath(java.lang.Class<?> resourceClass,
java.lang.String path,
char delim)
delim character and path
is appended to this path.
resourceClass - class for which an absolute path should be obtained.path - segment to be appended to the resulting path.delim - character used for separating path segments.
public static java.util.List<MediaType> getProducibleMediaTypes(ContainerRequest containerRequest,
ExtendedUriInfo extendedUriInfo,
Ref<java.lang.String> varyHeaderValue)
resolved viewable could be
produced.
containerRequest - request to obtain acceptable media types.extendedUriInfo - uri info to obtain resource method from and its producible media types.varyHeaderValue - Vary header reference.
public static java.lang.String getTemplateName(Viewable viewable)
viewable or return index if the given
viewable doesn't contain a valid template name.
viewable - viewable to obtain template name from.
non-null, non-empty template name.public static Template getTemplateAnnotation(java.lang.annotation.Annotation[] annotations)
template annotation from given list.
annotations - list of annotations.
template annotation or null if this annotation is not present.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||