Class PublishableObject<T extends PublishableObject<T>>

java.lang.Object
nl.vpro.domain.DomainObject
nl.vpro.domain.AbstractPublishableObject<T>
nl.vpro.domain.media.support.PublishableObject<T>
All Implemented Interfaces:
Serializable, Accountable, Changeable, Embargo, Identifiable<Long>, TrackableObject, MutableEmbargo<T>, MutableEmbargoDeprecated<T>, Publishable<T>, Trackable
Direct Known Subclasses:
Image, Location, MediaObject

@MappedSuperclass @EmbargoValidation(groups=nl.vpro.validation.PomsValidatorGroup.class) public abstract class PublishableObject<T extends PublishableObject<T>> extends AbstractPublishableObject<T> implements MutableEmbargoDeprecated<T>, TrackableObject
A publishable object implements Accountable and MutableEmbargo, but furthermore also has workflow.
Author:
arne, roekoe
See Also:
  • Field Details

  • Constructor Details

    • PublishableObject

      protected PublishableObject(PublishableObject<T> source)
    • PublishableObject

      public PublishableObject()
    • PublishableObject

      public PublishableObject(long id)
  • Method Details

    • hasChanges

      public boolean hasChanges()
      Checks if this object is changed compared to the persistent version by calculating the runtime CRC32 and compare it to the stored CRC
      Specified by:
      hasChanges in interface Changeable
    • acceptChanges

      public void acceptChanges()
      Accept the mutations on this object by recalculating crc32. If hasChanges() is called after this, it always returns false
    • getHash

      public Long getHash()
    • serializeForCalcCRC32

      protected byte[] serializeForCalcCRC32()
    • calcCRC32

      protected CRC32 calcCRC32()
      We keep track of a CRC32 hash to determin if an object is 'changed', in the sense that it would need republication.
    • isActivation

      public boolean isActivation(Instant now)
    • isDeactivation

      public boolean isDeactivation(Instant now)
    • getWorkflow

      public Workflow getWorkflow()
      Specified by:
      getWorkflow in interface TrackableObject
    • setWorkflow

      protected void setWorkflow(Workflow workflow)
    • isDeleted

      public boolean isDeleted()
    • toString

      public String toString()
      Overrides:
      toString in class AbstractPublishableObject<T extends PublishableObject<T>>
    • beforeUnmarshal

      protected void beforeUnmarshal(javax.xml.bind.Unmarshaller u, Object parent)
      Overrides:
      beforeUnmarshal in class AbstractPublishableObject<T extends PublishableObject<T>>