Class Attachment

    • Constructor Detail

      • Attachment

        @Deprecated
        public Attachment​(ContentEntity contentEntity,
                          String filename,
                          String contentType,
                          String comment,
                          byte[] data,
                          boolean minorEdit)
        Deprecated.
        Since 5.7. Use instead
        Creates an Attachment object of an intended file.
         Example:
         Attachment attachment = new Attachment(TEST_PAGE, attachmentName, Attachment.TEXT_TYPE, "your upload comment", "foo".getBytes());
         
        Parameters:
        contentEntity - the page or blog where the attachment will reside
        filename - the attachment file
        contentType - mime type of the attachment
        comment - comment associated with the attachment, which can be null
        data - byte array of the attachment content
        minorEdit - whether the attachment is a minor edit
    • Method Detail

      • getFilename

        public String getFilename()
        Deprecated.
      • getContentType

        public String getContentType()
        Deprecated.
      • getComment

        public String getComment()
        Deprecated.
      • getId

        public long getId()
        Deprecated.
      • setId

        public void setId​(long id)
        Deprecated.
      • setUrl

        public void setUrl​(String url)
        Deprecated.
      • getData

        public byte[] getData()
        Deprecated.
      • getDownloadUrl

        public String getDownloadUrl()
        Deprecated.
      • getDownloadUrl

        public String getDownloadUrl​(String contextPath)
        Deprecated.
        The application context without any slashes at all. Eg "confluence"
      • getThumbnailUrl

        public String getThumbnailUrl()
        Deprecated.
      • getEditUrl

        public String getEditUrl()
        Deprecated.
      • getEditUrl

        public String getEditUrl​(boolean isFromPageView)
        Deprecated.
      • getImageMarkup

        public String getImageMarkup()
        Deprecated.
        Gets the wiki markup to insert this attachment, as an embedded imaged, on the page to which it's attached.
      • getAbsoluteImageMarkup

        public String getAbsoluteImageMarkup()
        Deprecated.
        Retrieves the wiki markup to embed this image from another page in another space.
      • getThumbnailMarkup

        public String getThumbnailMarkup()
        Deprecated.
      • getPlaceholderXpath

        public String getPlaceholderXpath()
        Deprecated.
        Returns xpath that will match the "unidentified attachment" placeholder for this image.
      • getImageXpath

        public String getImageXpath()
        Deprecated.
        Returns xpath that will match the an embedded image.
      • shouldConvertToContent

        public boolean shouldConvertToContent()
        Deprecated.
        Specified by:
        shouldConvertToContent in interface ContentConvertible
        Returns:
        true if the implementer wants to be part of the core API (default value), false otherwise
      • isHidden

        public boolean isHidden()
        Deprecated.
      • getFileId

        public Long getFileId()
        Deprecated.
      • setFileId

        public void setFileId​(Long fileId)
        Deprecated.