Class SpaceContentEntityObject

All Implemented Interfaces:
Searchable, Content, Addressable, ContentTypeAware, Versioned, RelatableEntity, EditableLabelable, Labelable, Spaced, Serializable, Cloneable, Comparable<ContentEntityObject>
Direct Known Subclasses:
AbstractPage, Attachment, CustomContentEntityObject, SpaceDescription

public abstract class SpaceContentEntityObject extends ContentEntityObject implements Spaced
A ContentEntityObject that is a first-class member of a Space (i.e. pages, mail, news, but not comments or attachments)
See Also:
  • Constructor Details

    • SpaceContentEntityObject

      public SpaceContentEntityObject()
  • Method Details

    • getSpace

      public Space getSpace()
      Specified by:
      getSpace in interface Spaced
    • setSpace

      public void setSpace(Space space)
    • convertToHistoricalVersion

      public void convertToHistoricalVersion()
      Description copied from interface: Versioned
      Remove all data from the object that does not need to be saved by historical versions. For versioned objects that are persisted, this includes removing associations with other persisted objects that may otherwise cause us to break the expected arity of the database relations.

      When using Hibernate to persist versioned objects, take special care to null any field that might contain a Hibernate-persisted collection, as Hibernate does not allow two different persistent objects to refer to the same persisted collection at the same time.

      Specified by:
      convertToHistoricalVersion in interface Versioned
      Overrides:
      convertToHistoricalVersion in class ContentEntityObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ContentEntityObject
    • getNameForComparison

      public String getNameForComparison()
      Description copied from class: ContentEntityObject
      Subclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities.
      Specified by:
      getNameForComparison in class ContentEntityObject
    • getSpaceKey

      public String getSpaceKey()
    • isIndexable

      public boolean isIndexable()
      pages, blogs etc that aren't not associated with a space (either because they are historical or corrupt) should not be indexed if they are indexed, and returned in search results, they are broken and are therefore useless
      Specified by:
      isIndexable in interface Searchable
      Overrides:
      isIndexable in class ContentEntityObject
    • isInSpace

      public boolean isInSpace(Space space)