Interface PublicationStatusEnabled

    • Method Detail

      • getPublicationStatus

        @Document
        PublicationStatus getPublicationStatus()
        Returns the publication status describing the current state of this object in the language of this object. This is a combined action of the public state and publication/expiration date, with that of all other versions of this object's parent, scoped within this version's language where relevant. The result is independent of the current edit side context (set using the context widget), s.a. in-context time and show mode.
        Returns:
        the publication status of this publication status enabled object.
      • getPublicationStatus

        @Document
        PublicationStatus getPublicationStatus​(Language language)
        Returns the publication status describing the current state of this object in the specified language. This is a combined action of the public state and publication/expiration date, with that of all other versions of this object's parent, scoped within this version's language where relevant. The result is independent of the current edit side context (set using the context widget), s.a. in-context time and show mode.
        Parameters:
        language - The language to show the current state for
        Returns:
        the publication status of this publication status enabled object i the specified language.
      • getPublicationDate

        @Field(facet=true)
        Date getPublicationDate()
        Returns the publication date of this publication status enabled object. The publication date is the time, on the clock of the database server, on which the object will be published.
        Returns:
        publication date, never null.
      • setPublicationDate

        void setPublicationDate​(Date publicationDate)
        Sets the publication date for this publication status enabled object. The publication date is the time, on the clock of the database server, on which the object will be published.

        Note, the publication date has only minute granularity and server clocks may be out of sync. So, rounding may take place. However, a publication date within a few seconds of new Date(), is guaranteed to publish the object immediately.

        Publish an object:
         myItem.setPublicationDate(new Date()); // item is now published
         myItem.getPublicationDate(); // +- 1 minute from system time
         
        Parameters:
        publicationDate - publication date, may not be null.
      • getExpirationDate

        @Field(facet=true)
        Date getExpirationDate()
        Returns the expiration date of this publication status enabled object.
        Returns:
        expiration date, can be null.
      • setExpirationDate

        void setExpirationDate​(Date expirationDate)
        Sets the expiration date for this publication status enabled object.
        Parameters:
        expirationDate - expiration date, can be null.