Interface Attachment

    • Method Detail

      • getTitle

        String getTitle()
        Gets the title of the document. The title is either the name set explicitly by the user to the attachment or the title fetched from the document metadata itself or the filename whether the previous data weren't provided.
        Specified by:
        getTitle in interface Contribution
        Returns:
        the title of the document.
      • getContentType

        String getContentType()
        Gets the content type of this attached document file as a predefined MIME type.
        Returns:
        the MIME type of the document.
      • getDisplayIcon

        String getDisplayIcon()
        Gets the path of the icon representing either the attachment itself or its content type.
        Returns:
        the path of the icon representing this attachment.
      • getFilename

        String getFilename()
        Gets the name of the document file as stored in the filesystem. The filename can differ from the contribution name that is the title of the document.
        Returns:
        the name of the document file in the filesystem.
      • getSize

        long getSize()
        Gets the size of the document file in the filesystem.
        Returns:
        the size in bytes.
      • getAttachmentPath

        String getAttachmentPath()
        Gets the absolute path of the document file in the filesystem.
        Returns:
        the path of the attachment in the filesystem.
      • isVersioned

        boolean isVersioned()
        Is this attachment versioned? A document is versioned if each change is historized and comes to a new minor or major version.
        Returns:
        true if this attachment is versioned, false otherwise.
      • getMinorVersion

        int getMinorVersion()
        Gets the minor part of the document version. If the attachment isn't versioned, then zero value is returned.
        Returns:
        the minor version part of the document.
      • getMajorVersion

        int getMajorVersion()
        Gets the major part of the document version. If the attachment isn't versioned, then zero value is returned.
        Returns:
        the major version part of the document.
      • getVersion

        default String getVersion()
        Gets the version of the document. It is a concatenation of the major and of the minor version with a dot as separator.
        Returns:
        the version of the attachment or "0.0" if the document isn't versioned.