Package com.atlassian.jira.mail
Interface MailImageInliner
- All Known Implementing Classes:
MailImageInlinerImpl
@ExperimentalApi
@InjectableComponent
@ParametersAreNonnullByDefault
public interface MailImageInliner
A component to use when required to construct an email body from HTML that may contain inlined images.
- Since:
- v7.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA small wrapper that contains the HTML string after it has had images inlined, as well as theBodyPart's that represent the inlined image attachments, to use when constructing an email body. -
Method Summary
Modifier and TypeMethodDescriptioninlineImages(String html) Tries to inline all the images specified by an IMG tag.inlineImages(String html, Issue issue) Tries to inline all the images specified by an IMG tag.
-
Method Details
-
inlineImages
Tries to inline all the images specified by an IMG tag. Replaces the image url with the cid link or unchanged path if specified path cannot be added as attachment. Will then build the related body parts for the attachments. NB: This method will be able to inline system images contained within provided HTML, however will not inline user attachments. SeeinlineImages(String, Issue)in order to inline attachments related to an issue.- Parameters:
html- HTML to change.- Returns:
- The
MailImageInliner.InlinedEmailBodyto represent the new email body, fully inlined
-
inlineImages
Tries to inline all the images specified by an IMG tag. Replaces the image url with the cid link or unchanged path if specified path cannot be added as attachment. Will then build the related body parts for the attachments. NB: This method will inline system images as well as attachments related to issueIssue.getAttachments()that are contained within the provided html.- Parameters:
html- HTML to change.issue- Issue that is related to HTML that contains required attachments- Returns:
- The
MailImageInliner.InlinedEmailBodyto represent the new email body, fully inlined - Since:
- v7.0.5
-