Package com.levigo.jadice.server.rest
Class TemplateService
- java.lang.Object
-
- com.levigo.jadice.server.rest.TemplateService
-
@Path("/templates/") public class TemplateService extends Object
This bean provides the REST service to retrieve a list of all available job templates and to retrieve a single job template. It handles the REST specific part but delegates the retrieval of job templates to a backingTemplateRepository
.Please consult the swagger documentation for further details about the methods exposed via REST.
- Since:
- jadice server 5.6.0.0
-
-
Constructor Summary
Constructors Constructor Description TemplateService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getTemplate(String templateId, javax.servlet.http.HttpServletRequest request)
Download a specific job template from the REST serviceTemplateRepository
getTemplateRepository()
TemplateListDTO
listTemplates()
Get a list of all available job templatesvoid
setTemplateRepository(TemplateRepository templateRepo)
Set the backingTemplateRepository
implementation
-
-
-
Method Detail
-
listTemplates
@GET @Produces({"application/xml","application/json"}) public TemplateListDTO listTemplates()
Get a list of all available job templates
-
getTemplate
@GET @Path("{templateId}") @Produces("application/xml") public String getTemplate(@PathParam("templateId") String templateId, @Context javax.servlet.http.HttpServletRequest request)
Download a specific job template from the REST service
-
getTemplateRepository
public TemplateRepository getTemplateRepository()
- Returns:
- the backing
TemplateRepository
implementation
-
setTemplateRepository
public void setTemplateRepository(TemplateRepository templateRepo)
Set the backingTemplateRepository
implementation
-
-