Class ContentVersion

  • All Implemented Interfaces:
    Serializable

    @StableMinor(version="14.0",
                 sinceVersion="10.2")
    public class ContentVersion
    extends Object
    implements Serializable
    Represents a specific version of a content. A content version contains publication definition, metadata and a reference to the business data it relates to.

    If a content contains versioning support, it should always create a new content version instead of modifying the existing one. If the content does not contains versioning support, only one version will exist for each ContentLocale and this version should be modified when edited.

    Since:
    4.2.0
    Version:
    $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
    See Also:
    Serialized Form
    • Constructor Detail

      • ContentVersion

        public ContentVersion()
    • Method Detail

      • getId

        public String getId()
        Returns the identifier for this content version.
        Returns:
        the identifier for this content version.
        Since:
        4.2.0
      • getItemId

        public String getItemId()
        Returns the identifier for the business data this content version refers to.
        Returns:
        the identifier for the business data this content version refers to.
        Since:
        4.2.0
      • setItemId

        public void setItemId​(String itemId)
        Specifies the business data this content version refers to.
        Since:
        4.2.0
      • getVersionNumber

        public int getVersionNumber()
        Returns this version's number.
        Returns:
        the version number.
        Since:
        4.2.0
      • getLastModifiedBy

        public String getLastModifiedBy()
        Returns the identifier of the last principal that modified this version.
        Returns:
        the principal identifier.
        Since:
        4.2.0
      • setLastModifiedBy

        public void setLastModifiedBy​(String lastModifiedBy)
        Sets the identifier of the last principal that modified this version.
        Parameters:
        lastModifiedBy - the principal identifier.
        Since:
        4.2.0
      • getLastModifiedDateTime

        public Date getLastModifiedDateTime()
        Returns the last modification date-time for this version.
        Returns:
        the last modification date-time for this version.
        Since:
        4.2.0
      • setLastModifiedDateTime

        public void setLastModifiedDateTime​(Date lastModifiedDateTime)
        Sets the last modification date-time for this version.
        Parameters:
        lastModifiedDateTime - the date-time to set.
        Since:
        4.2.0
      • getPrimaryName

        public String getPrimaryName()
        Returns the primary name for this content version.
        Returns:
        the primary name.
        Since:
        4.2.0
      • setPrimaryName

        public void setPrimaryName​(String primaryName)
        Sets the primary name for this content version.
        Parameters:
        primaryName - the primary name.
        Since:
        4.2.0
      • getIntroduction

        public String getIntroduction()
        Returns the introduction for this content version.
        Returns:
        the introduction
        Since:
        4.2.0
      • setIntroduction

        public void setIntroduction​(String introduction)
        Returns the introduction for this content version.
        Parameters:
        introduction -
        Since:
        4.2.0
      • getContentAssociations

        public Collection<ContentAssociation> getContentAssociations()
        Returns the contents associated with this version. The returned collection may be changed to edit which contents are associated with this content version.
        Returns:
        the contents associated with this version.
        Since:
        4.2.0
      • getContentLocale

        public ContentLocale getContentLocale()
        Returns the content-locale object this version belongs to.
        Returns:
        the content-locale object.
        Since:
        4.2.0
      • getPageSimpleTitle

        public String getPageSimpleTitle()
        Returns the simple title to be used on the detail page that displays this content.
        Returns:
        the simple title or null if no specific page title was specified.
        Since:
        10.2.0
      • setPageSimpleTitle

        public void setPageSimpleTitle​(String pageTitle)
        Sets the simple title to be used on the detail page that displays this content.
        Parameters:
        pageTitle - the simple title or null if there is no specific page simple title.
        Since:
        10.2.0
      • getPageTitlePattern

        public String getPageTitlePattern()
        Returns the page title pattern to be used on the detail page that displays this content.
        Returns:
        the page title pattern or null if no specific page title pattern was specified.
        Since:
        10.2.0
      • setPageTitlePattern

        public void setPageTitlePattern​(String pageTitlePattern)
        Sets the page title pattern to be used on the detail page that displays this content.
        Parameters:
        pageTitlePattern - the page title pattern to be used on the detail page that displays this content or null if no specific page title pattern was specified.
        Since:
        10.2.0
      • getCanonicalUrl

        public URL getCanonicalUrl()
        Returns the canonical URL to be used on the detail page that displays this content.
        Returns:
        the canonical URL or null if no specific canonical URL was specified.
        Since:
        10.1.0
      • setCanonicalUrl

        public void setCanonicalUrl​(URL canonicalUrl)
        Sets the canonical URL to be used on the detail page that displays this content.
        Parameters:
        canonicalUrl - the canonical URL or null if there is no specific canonical URL.
        Since:
        10.1.0
      • getUrlTitle

        public String getUrlTitle()
        Returns the title to be used when generating the URL for the detail page that displays this content.
        Returns:
        the title or null if no specific title for URL was specified.
        Since:
        10.0.0
      • setUrlTitle

        public void setUrlTitle​(String urlTitle)
        Sets the title to be used when generating the URL for the detail page that displays this content.
        Parameters:
        urlTitle - the title or null if there is no specific title for URL.
        Since:
        10.0.0
      • getSeoDescription

        public String getSeoDescription()
        Returns the description specific for SEO.
        Returns:
        the description or null if no description specific for SEO was defined.
        Since:
        10.0.0
      • setSeoDescription

        public void setSeoDescription​(String seoDescription)
        Sets the description specific for SEO.
        Parameters:
        seoDescription - the description to be used for SEO or null if there is no description specific for SEO.
        Since:
        10.0.0
      • getSocialTitle

        public String getSocialTitle()
        Returns the title specific for social usage.
        Returns:
        the title or null if no title specific for social was defined.
        Since:
        10.0.0
      • setSocialTitle

        public void setSocialTitle​(String socialTitle)
        Sets the title specific for social usage.
        Parameters:
        socialTitle - the title to be used for social or null if there is no title specific for social.
        Since:
        10.0.0
      • getSocialDescription

        public String getSocialDescription()
        Returns the description specific for social usage.
        Returns:
        the description or null if no description specific for social was defined.
        Since:
        10.0.0
      • setSocialDescription

        public void setSocialDescription​(String socialDescription)
        Sets the description specific for social usage.
        Parameters:
        socialDescription - the description to be used for social or null if there is no description specific for social.
        Since:
        10.0.0
      • getSocialImageMediaId

        public String getSocialImageMediaId()
        Returns the media identifier for the image specific for social usage.
        Returns:
        the media identifier or null if there is no media specific for social.
        Since:
        10.0.0
      • setSocialImageMediaId

        public void setSocialImageMediaId​(String mediaId)
        Sets the image specific for social usage.
        Parameters:
        mediaId - the media identifier or null if there is no image specific for social.
        Since:
        10.0.0
      • getUrlPath

        public String getUrlPath()
        Returns the content version's URL friendly path customized by the publisher.
        Returns:
        the content version's URL friendly path customized by the publisher.
        Since:
        12.5.0
      • setUrlPath

        public void setUrlPath​(String urlPath)
        Sets the content version's URL friendly path customized by the publisher.
        Parameters:
        urlPath - the content version's URL friendly path customized by the publisher.
        Since:
        12.5.0
      • addPublication

        public ContentPublication addPublication()
        Adds a new publication for this version.
        Returns:
        the new publication added.
        Since:
        4.2.0
        See Also:
        getPublications()