Interface MailTemplateService

    • 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 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 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 MailTemplateFormat format)
        Removes the template for the given key and format, if available.
        Parameters:
        key - mail template
        format - template format