Interface MailTemplateService
- All Superinterfaces:
JAXRSService
- All Known Implementing Classes:
MailTemplateServiceImpl
REST operations for mail templates.
-
Field Summary
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(@NotNull MailTemplateTO mailTemplateTO) Creates a new mail template.void
Deletes the mail template matching the given key.getFormat
(@NotNull String key, @NotNull MailTemplateFormat format) Gets the template for the given key and format, if available.list()
Returns a list of all mail templates.Returns mail template with matching key.void
removeFormat
(@NotNull String key, @NotNull MailTemplateFormat format) Removes the template for the given key and format, if available.void
setFormat
(@NotNull String key, @NotNull MailTemplateFormat format, InputStream templateIn) Sets the template for the given key and format, if available.
-
Method Details
-
list
@GET @Produces({"application/json","application/yaml","application/xml"}) List<MailTemplateTO> list()Returns a list of all mail templates.- Returns:
- list of all mail templates.
-
create
@POST @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) Response create(@NotNull @NotNull MailTemplateTO mailTemplateTO) Creates a new mail template.- Parameters:
mailTemplateTO
- Creates a new mail template.- Returns:
- Response object featuring Location header of created mail template
-
read
@GET @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) MailTemplateTO read(@NotNull @PathParam("key") @NotNull String key) Returns mail template with matching key.- Parameters:
key
- key of mail template to be read- Returns:
- mail template with matching key
-
delete
@DELETE @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) void delete(@NotNull @PathParam("key") @NotNull String key) Deletes the mail template matching the given key.- Parameters:
key
- key for mail template to be deleted
-
getFormat
@GET @Path("{key}/{format}") Response getFormat(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("format") @NotNull MailTemplateFormat format) Gets the template for the given key and format, if available.- Parameters:
key
- mail templateformat
- template format- Returns:
- mail template with matching key and format, if available
-
setFormat
@PUT @Path("{key}/{format}") @Produces({"application/json","application/yaml","application/xml"}) void setFormat(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("format") @NotNull MailTemplateFormat format, InputStream templateIn) Sets the template for the given key and format, if available.- Parameters:
key
- mail templateformat
- template formattemplateIn
- template to be set
-
removeFormat
@DELETE @Path("{key}/{format}") @Produces({"application/json","application/yaml","application/xml"}) void removeFormat(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("format") @NotNull MailTemplateFormat format) Removes the template for the given key and format, if available.- Parameters:
key
- mail templateformat
- template format
-