Interface MailTemplateService

All Superinterfaces:
JAXRSService

@Path("mailTemplates") public interface MailTemplateService extends JAXRSService
REST operations for mail templates.
  • Method Details

    • list

      @GET @Produces({"application/json","application/yaml","application/xml"}) List<org.apache.syncope.common.lib.to.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"}) jakarta.ws.rs.core.Response create(@NotNull @NotNull org.apache.syncope.common.lib.to.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"}) org.apache.syncope.common.lib.to.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}") jakarta.ws.rs.core.Response getFormat(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("format") @NotNull org.apache.syncope.common.lib.types.MailTemplateFormat format)
      Gets the template for the given key and format, if available.
      Parameters:
      key - mail template
      format - 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 org.apache.syncope.common.lib.types.MailTemplateFormat format, InputStream templateIn)
      Sets the template for the given key and format, if available.
      Parameters:
      key - mail template
      format - template format
      templateIn - 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 org.apache.syncope.common.lib.types.MailTemplateFormat format)
      Removes the template for the given key and format, if available.
      Parameters:
      key - mail template
      format - template format