Interface ContentItemVersion<T extends ContentItem<?>>

    • Method Detail

      • getIdentifier

        ContentItemVersionId getIdentifier()
        Returns the content item version identifier of this content item version.
        Returns:
        The content item version identifier of this content item version
        Since:
        10.34.0
        See Also:
        ContentItemVersionId
      • getCreationDate

        @Field(facet=true)
        Date getCreationDate()
        Returns creation date of the content item version.
        Returns:
        creation date of the content item version
      • getCreationUser

        @Document
        User getCreationUser()
        Returns creation user of the content item version.
        Returns:
        creation user of the page version
      • getLastModifiedDate

        @Field(facet=true)
        Date getLastModifiedDate()
        Returns last modified date of the content item version.
        Returns:
        last modified date of the content item version
      • getLastModifiedUser

        @Document
        User getLastModifiedUser()
        Returns the last modified user of this content item version.
        Returns:
        user who modified this content item last
      • getLanguage

        Language getLanguage()
        Returns the language of this page version.
        Returns:
        language of this page version.
      • getRemark

        @Field
        String getRemark()
        Returns the remark text. This text is not meant to be shown on the website but can be used by an editor to leave a comment for other editors about the content item.
        Returns:
        remark text.
        Since:
        10.32.0
      • setRemark

        void setRemark​(String remark)
        Sets the remark text. This text is not meant to be shown on the website but can be used by an editor to leave a comment for other editors about the content item.
        Parameters:
        remark - the remark text
        Since:
        10.32.0
      • getRevisionCount

        int getRevisionCount()
        Returns the number of revisions that have been created for this item, including the current version. Revisions can be deleted to free up disk space, so this may be a lot larger than the getPreviousRevisions() size.
        Returns:
        number of revisions that have been created
      • getPreviousRevisions

        List<ContentItemRevision> getPreviousRevisions()
        Loads all revisions for this version. Revisions can be deleted to free up space.
        Returns:
        the revisions for this version.
      • createNewRevision

        void createNewRevision()
        Creates a new copy of this content item version and saves it as a new revision.
        See Also:
        getPreviousRevisions()
      • setEditable

        void setEditable​(boolean isEditable)
        Enable or disable editing this content item version.
        Parameters:
        isEditable - true to enable editing
        See Also:
        isEditable()
      • isEditable

        boolean isEditable()
        Only editable content can be modified in the rich text editor. If this content item version is not editable the rich text editor will be read only (in the canvas for this item).

        For example, a preview of a ContentItemRevision is not editable.

        Returns:
        if this content item should be editable by users
        See Also:
        ContentItemRevision, EditableTag
      • getLead

        @Field(boost=0.6)
        String getLead()
        Returns the lead text. The getLead in PageVersion was deprecated since 10.13.0, but has been re-introduced in 10.32.0. As of 10.32.0 both page versions and media items versions have both a meta description field and a lead field.
        Returns:
        lead text.
        Since:
        10.32.0
      • setLead

        void setLead​(String leadText)
        Sets the lead text. The setLead in PageVersion was deprecated since 10.13.0, but has been re-introduced in 10.32.0. As of 10.32.0 both page versions and media items versions have both a meta description field and a lead field.
        Parameters:
        leadText - the lead text to set
        Since:
        10.32.0
      • getHasLead

        boolean getHasLead()
        Returns if this content item version has a lead.
        Returns:
        true if the content item version has a lead, false otherwise
        Since:
        10.32.0
      • getLeadImage

        Image getLeadImage()
        Returns the lead image. This may be either an attached image or a referenced lead image media item. In case both are assigned the latter takes precedence. If an image media item is attached, the image assigned to the current version of that image media item is returned. If an image media item is attached but the media item has no current (the current is null), null is returned instead.
        Returns:
        lead image, or null if no lead image is assigned or referenced, or the referenced image media item has no current version.
        Since:
        10.32.0
      • getLeadImageThumbnail

        @Document
        Image getLeadImageThumbnail()
        Returns the lead image's thumbnail. This may be either the thumbnail of an attached image or of a referenced lead image media item. In case both are assigned the latter takes precedence.
        Returns:
        lead image thumbnail, or null if no lead image is assigned or referenced.
        Since:
        10.32.0
      • getAttachedLeadImage

        Image getAttachedLeadImage()
        Returns the file upload lead image associated with this content item version. If no lead image is assigned or the lead image is stored as reference to an image media item in the content repository this method returns null. See getLeadImageMediaItem() to load a lead image that refers to an image media item in the content repository.
        Returns:
        the file upload lead image associated with this content item version or null of no file upload lead image is assigned
        Since:
        10.32.0
      • setAttachedLeadImage

        void setAttachedLeadImage​(FileResource leadImage)
        Sets the lead image of this content item version as an upload file associated with this particular content item version. The image cannot be reused by other content item versions. To reuse lead images, assign it from the content repository and use setLeadImageMediaItem(nl.gx.webmanager.cms.mediarepository.MediaItem) instead. If null is passed, any existing upload lead image will be removed.
        Parameters:
        leadImage - The multipart file holding the image to assign as lead image to this content item version
        Since:
        10.32.0
      • removeAttachedLeadImage

        void removeAttachedLeadImage()
        Removes the lead image attached to this content item version as an upload file.
        Since:
        10.32.0
      • setAttachedLeadImageFocusPoint

        void setAttachedLeadImageFocusPoint​(int x,
                                            int y)
        Sets the (x, y) focus point for the attached lead image.
        Parameters:
        x - The x coordinate of the focus point
        y - The y coordinate of the focus point
        Since:
        10.32.0
      • setLeadImageMediaItem

        void setLeadImageMediaItem​(MediaItem mediaItem)
        Sets the lead image of this content item version as reference to an image media item stored in the content repository. If null is passed, any assigned media item lead image will be removed.
        Parameters:
        mediaItem - the image media item to assign as lead image of this content item version
        Since:
        10.32.0