Package org.glassfish.jersey.server.mvc
Annotation Type Template
-
@Inherited @Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface Template
Used to annotate JAX-RS resources and resource methods to provide reference to a template for MVC support. In case a resource class is annotated withTemplateannotation then an instance of this class is considered to be the model. Produciblemedia typesare determined from the resource classesProducesannotation. In case a resource method is annotated withTemplateannotation then the return value of the method is the model. Otherwise the processing of such a method is the same as if the return type of the method wasViewableclass. Produciblemedia typesare determined from the method'sProducesannotation. To see how templates are being resolved, seeviewable.- Author:
- Michal Gajdos
- See Also:
Viewable
-
-
Element Detail
-
name
String name
The template name that should be used to output the entity. The template name may be declared as absolute template name if the name begins with a '/', otherwise the template name is declared as a relative template name.- Default:
- ""
-
-