Class EmailTemplatesResource
java.lang.Object
com.atlassian.jira.rest.v2.admin.mail.EmailTemplatesResource
- Since:
- v8.14
-
Constructor Summary
ConstructorsConstructorDescriptionEmailTemplatesResource
(MailTemplatesService importer, EmailTypesService emailTypesService, CustomTemplatesFeatureAvailabilityCheck customTemplatesFeatureAvailabilityCheck, XsrfInvocationChecker xsrfChecker) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
Replaces the current email templates pack with previously uploaded one, if exists.jakarta.ws.rs.core.Response
Creates a zip file containing email templates at local home and returns the file.jakarta.ws.rs.core.Response
Returns a list of root templates mapped with Event Types.jakarta.ws.rs.core.Response
Replaces the current email templates pack with default templates, which are copied over from Jira binaries.jakarta.ws.rs.core.Response
uploadEmailTemplates
(InputStream fileInputStream) Extracts given zip file to temporary templates folder.
-
Constructor Details
-
EmailTemplatesResource
@Inject public EmailTemplatesResource(MailTemplatesService importer, EmailTypesService emailTypesService, CustomTemplatesFeatureAvailabilityCheck customTemplatesFeatureAvailabilityCheck, XsrfInvocationChecker xsrfChecker)
-
-
Method Details
-
uploadEmailTemplates
@POST @Consumes("application/zip") @Produces("application/json") public jakarta.ws.rs.core.Response uploadEmailTemplates(InputStream fileInputStream) Extracts given zip file to temporary templates folder. If the folder already exists it will replace it's content- Returns:
Response
-
applyEmailTemplates
@POST @Path("/apply") @Produces("application/json") public jakarta.ws.rs.core.Response applyEmailTemplates()Replaces the current email templates pack with previously uploaded one, if exists.- Returns:
- @
Response
-
revertEmailTemplatesToDefault
@POST @Path("/revert") @Consumes("*/*") @Produces("application/json") public jakarta.ws.rs.core.Response revertEmailTemplatesToDefault()Replaces the current email templates pack with default templates, which are copied over from Jira binaries.- Returns:
- @
Response
-
downloadEmailTemplates
@GET @Produces("application/zip") public jakarta.ws.rs.core.Response downloadEmailTemplates()Creates a zip file containing email templates at local home and returns the file.- Returns:
Response
-
getEmailTypes
@GET @Path("types") @Produces("application/json") public jakarta.ws.rs.core.Response getEmailTypes()Returns a list of root templates mapped with Event Types. The list can be used to decide which test emails to send.- Returns:
Response
OK when reading email types was successful, FORBIDDEN when user is not a system admin, SERVER_ERROR when any unexpected exception is thrown
-