Interface MailTemplateService
-
- All Superinterfaces:
JAXRSService
- All Known Implementing Classes:
MailTemplateServiceImpl
@Path("mailTemplates") public interface MailTemplateService extends JAXRSService
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.ws.rs.core.Response
create(@NotNull MailTemplateTO mailTemplateTO)
Creates a new mail template.void
delete(@NotNull String key)
Deletes the mail template matching the given key.javax.ws.rs.core.Response
getFormat(@NotNull String key, @NotNull MailTemplateFormat format)
Gets the template for the given key and format, if available.List<MailTemplateTO>
list()
Returns a list of all mail templates.MailTemplateTO
read(@NotNull String key)
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 Detail
-
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"}) javax.ws.rs.core.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}") javax.ws.rs.core.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
-
-