Class ImageAttachmentAltAttributeService

java.lang.Object
com.atlassian.jira.mail.attachment.ImageAttachmentAltAttributeService

public class ImageAttachmentAltAttributeService extends Object
  • Constructor Details

    • ImageAttachmentAltAttributeService

      public ImageAttachmentAltAttributeService()
  • Method Details

    • addDefaultAltAttributeIfNeeded

      public String addDefaultAltAttributeIfNeeded(String imgHtmlTag, String imgSrcUrlBeforeAnyTransformation)
      Parameters:
      imgHtmlTag - the whole <img ..> string
      imgSrcUrlBeforeAnyTransformation - passed not to extract it from the same html source again
    • getFileNameFromUrlOrWholeUrl

      protected String getFileNameFromUrlOrWholeUrl(String imgSrcUrlBeforeAnyTransformation)
      Tries to extract file name with '.' extension, eg http://some-domain.com/1/2/3/someimage.png -> someimage.png http://some-domain.com/1/2/3 -> http://some-domain.com/1/2/3