Class ContentPublication

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    @StableMinor(version="17.0",
                 sinceVersion="4.2")
    public class ContentPublication
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    A content publication definition entity class.
    Since:
    4.2.0
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected ContentPublication clone()  
      void delete()
      Deletes this publication.
      ContentVersion getContentVersion()
      Returns the content version this publication belongs to.
      java.util.Date getHighlightEndDateTime()
      Returns the date-time when this publication should no longer be highlighted.
      java.lang.String getId()
      Return the unique identifier for this publication object.
      java.util.Collection<java.lang.String> getPrincipalIds()
      Returns the identifiers of the principals this publication is done to.
      java.util.Date getPublishEndDateTime()
      Returns the maximum date-time limit for this publication.
      java.util.Date getPublishStartDateTime()
      Returns the initial date-time from which the publication is to be done.
      java.util.Collection<java.lang.String> getServiceInstanceIds()
      Returns the identifiers of the service instances this publication is done to.
      boolean isHighlight()
      Indicates if this publication is currently highlighted.
      boolean isPublished()
      Indicates if this publication is currently published.
      void setHighlight​(boolean highlight)
      Sets the highlight property for this publication.
      void setHighlightEndDateTime​(java.util.Date highlightEndDateTime)
      Sets the date-time when this publication should no longer be highlighted.
      void setPublishEndDateTime​(java.util.Date publishEndDateTime)
      Sets the maximum time limit for this publication.
      void setPublishStartDateTime​(java.util.Date publishStartDateTime)
      Sets the initial date-time from which the publication is to be done.
      void updateCalculatedFields()
      Updates this publication's calculated fields.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContentPublication

        public ContentPublication()
    • Method Detail

      • getId

        public java.lang.String getId()
        Return the unique identifier for this publication object.
        Returns:
        the unique identifier for this publication object.
        Since:
        4.2.0
      • isHighlight

        public boolean isHighlight()
        Indicates if this publication is currently highlighted.
        Returns:
        true if it is currently highlighted, false otherwise.
        Since:
        4.2.0
      • setHighlight

        public void setHighlight​(boolean highlight)
        Sets the highlight property for this publication.
        Parameters:
        highlight - true to enable the highlight, false to disable it.
        Since:
        4.2.0
        See Also:
        getHighlightEndDateTime()
      • getHighlightEndDateTime

        public java.util.Date getHighlightEndDateTime()
        Returns the date-time when this publication should no longer be highlighted.
        Returns:
        the date-time, or null if no maximum limit for highlight exists.
        Since:
        4.2.0
      • setHighlightEndDateTime

        public void setHighlightEndDateTime​(java.util.Date highlightEndDateTime)
        Sets the date-time when this publication should no longer be highlighted. If set to null, there will be no maximum time limit for the highlight.
        Parameters:
        highlightEnd - the date-time value to set.
        Since:
        4.2.0
      • getPublishEndDateTime

        public java.util.Date getPublishEndDateTime()
        Returns the maximum date-time limit for this publication.
        Returns:
        the date-time, or null if no maximum limit for this publication exists.
        Since:
        4.2.0
      • setPublishEndDateTime

        public void setPublishEndDateTime​(java.util.Date publishEndDateTime)
        Sets the maximum time limit for this publication. If set to null, there will be no maximum time limit for the publication.
        Parameters:
        publishEndDateTime - the date-time value to set.
        Since:
        4.2.0
      • getPublishStartDateTime

        public java.util.Date getPublishStartDateTime()
        Returns the initial date-time from which the publication is to be done.
        Returns:
        the date-time, or null if no minimum limit for this publication exists.
        Since:
        4.2.0
      • setPublishStartDateTime

        public void setPublishStartDateTime​(java.util.Date publishStartDateTime)
        Sets the initial date-time from which the publication is to be done. If set to null, there will be no minimum time limit for the publication.
        Parameters:
        publishStartDateTime - the date-time value to set.
        Since:
        4.2.0
      • isPublished

        public boolean isPublished()
        Indicates if this publication is currently published. The value for this property is automatically set by the content framework accordingly to other content properties.
        Returns:
        true if it is currently published, false otherwise.
        Since:
        4.2.0
      • getServiceInstanceIds

        public java.util.Collection<java.lang.String> getServiceInstanceIds()
        Returns the identifiers of the service instances this publication is done to. The returned collection may be changed to edit the service instances associated with this publication.
        Returns:
        collection containing the associated service instance identifiers.
        Since:
        4.2.0
      • getPrincipalIds

        public java.util.Collection<java.lang.String> getPrincipalIds()
        Returns the identifiers of the principals this publication is done to. The returned collection may be changed to edit the principals associated with this publication.
        Returns:
        collection containing the associated principal identifiers.
        Since:
        4.2.0
      • getContentVersion

        public ContentVersion getContentVersion()
        Returns the content version this publication belongs to.
        Returns:
        the content version.
        Since:
        4.2.0
      • updateCalculatedFields

        public void updateCalculatedFields()
                                    throws PortalException
        Updates this publication's calculated fields. This calculation occurs automatically before adding or updating the publication in the persistence.

        This method may be called directly to force immediate fields calculations, or when no other change is done but it is desired to update the calculated fields.

        Throws:
        PortalException
        Since:
        4.2.0
      • clone

        protected ContentPublication clone()
        Overrides:
        clone in class java.lang.Object