public final class TemplateHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getAbsolutePath(Class<?> resourceClass,
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 List<MediaType> |
getProducibleMediaTypes(ContainerRequest containerRequest,
ExtendedUriInfo extendedUriInfo,
org.glassfish.jersey.internal.util.collection.Ref<String> varyHeaderValue)
Get media types for which the
resolved viewable could be
produced. |
static Template |
getTemplateAnnotation(Annotation[] annotations)
Extract
template annotation from given list. |
static String |
getTemplateName(Viewable viewable)
Get template name from given
viewable or return index if the given
viewable doesn't contain a valid template name. |
static Charset |
getTemplateOutputEncoding(Configuration configuration,
String suffix)
Get output encoding from configuration.
|
public static String getAbsolutePath(Class<?> resourceClass, 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 List<MediaType> getProducibleMediaTypes(ContainerRequest containerRequest, ExtendedUriInfo extendedUriInfo, org.glassfish.jersey.internal.util.collection.Ref<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 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(Annotation[] annotations)
template annotation from given list.annotations - list of annotations.template annotation or null if this annotation is not present.public static Charset getTemplateOutputEncoding(Configuration configuration, String suffix)
configuration - Configuration.suffix - Template processor suffix of the
to configuration property MvcFeature.ENCODING.Copyright © 2007-2019, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.