Interface ReferenceEntry

All Superinterfaces:
Comparable<ReferenceEntry>, Serializable

public interface ReferenceEntry extends Serializable, Comparable<ReferenceEntry>
Base definition for an entry to the references system.
Since:
3.1.172
  • Field Details

    • PAGE_STORE_REFERENCE

      static final int PAGE_STORE_REFERENCE
      Reference from/to a page-store element.
      Since:
      3.1.324
      See Also:
    • SITE_STORE_REFERENCE

      static final int SITE_STORE_REFERENCE
      Reference from/to a site-store element.
      Since:
      3.1.324
      See Also:
    • MEDIA_STORE_REFERENCE

      static final int MEDIA_STORE_REFERENCE
      Reference from/to a media-store element.
      Since:
      3.1.324
      See Also:
    • TEMPLATE_STORE_REFERENCE

      static final int TEMPLATE_STORE_REFERENCE
      Reference from/to a template-store element.
      Since:
      3.1.324
      See Also:
    • GLOBAL_STORE_REFERENCE

      static final int GLOBAL_STORE_REFERENCE
      Reference from/to a global-store element.
      Since:
      3.1.324
      See Also:
    • CONTENT_STORE_REFERENCE

      static final int CONTENT_STORE_REFERENCE
      Reference from/to a content-store element.
      Since:
      3.1.324
      See Also:
    • CONTENT_REFERENCE

      static final int CONTENT_REFERENCE
      Reference from/to an Entity.
      Since:
      4.0
      See Also:
    • RENDER_TEMPLATE_REFERENCE

      static final int RENDER_TEMPLATE_REFERENCE
      template:"name", e.g. in $CMS_RENDER(template:"", ..)$
      Since:
      4.0
      See Also:
    • SCRIPT_REFERENCE

      static final int SCRIPT_REFERENCE
      script:"name", e.g. in $CMS_RENDER(script:"", ..)$
      Since:
      4.0
      See Also:
    • SITE_STORE_FOLDER_REFERENCE

      static final int SITE_STORE_FOLDER_REFERENCE
      pagefolder:"name", e.g. in $CMS_RENDER(pagefolder:"name", ..)$
      Since:
      4.0.43
      See Also:
    • EXTERNAL_REFERENCE

      static final int EXTERNAL_REFERENCE
      External reference.
      Since:
      3.1.324
      See Also:
    • STORE_ELEMENT_REFERENCE

      static final int STORE_ELEMENT_REFERENCE
      Reference from/to a store element.
      Since:
      3.1.324
      See Also:
  • Method Details

    • isType

      boolean isType(int type)
      Returns true if this element is of the given type. If type contains the related project flag this reference has to be external to return true.
      • isType(MEDIA_STORE_ELEMENT|CONTENT_STORE_REFERENCE)
        returns true iff this reference is a reference to a media- or a content-store element (media or content).
      • isType(MEDIA_STORE_ELEMENT) && isType(RELATED_PROJECT_REFERENCE)
        returns true iff this reference is an external reference to a media-store element (external and media).
      Parameters:
      type - A single type flag (e.g. SITE_STORE_REFERENCE) or a binary combination of multiple type flags (e.g. SITE_STORE_REFERENCE | MEDIA_STORE_REFERENCE).
      Returns:
      true if this element matches any of the given flags encoded in type, otherwise returns false.
      Since:
      3.1.324
      See Also:
    • getType

      int getType()
      Get the type of this reference.
      Returns:
      type of this reference.
      Since:
      3.1.324
    • getId

      long getId()
      Provides the id of the referenced node (store-element).
      Returns:
      The id.
      Since:
      3.1.172
    • getProjectId

      long getProjectId()
      Provides the project id of the referenced element.
      Returns:
      The project id.
      Since:
      3.1.324
    • getRelease

      boolean getRelease()
      Indicates the node coming from the release store.
      Returns:
      true if the node is from the release store
      Since:
      3.1.172
    • getReferencedObject

      @Nullable @Nullable Object getReferencedObject()
      Provides the referenced node. It may be null, if the node is not or no longer visible in the current session or has been deleted or the reference is broken.
      Returns:
      The referenced node or null.
      Since:
      3.1.324
    • getReferencedElement

      @Nullable @Nullable IDProvider getReferencedElement()
      The referenced node. It may be null if the node is not or no longer visible in the current session, or has been deleted, or the reference is broken, or referenced object is not an IDProvider.
      Returns:
      The referenced node or null.
      Since:
      4.0
    • getReferenceString

      @Nullable @Nullable String getReferenceString()
      Provides a textual reference representation, e.g. "media:logo" or null if the referenced object cannot be referenced by name.
      Returns:
      The reference representation or null.
      Since:
      3.1.324
    • getDisplayText

      String getDisplayText()
      Return a type dependent display text.
      Since:
      4.2
    • isBroken

      boolean isBroken()
      A reference may be broken, e.g. if a medium was referenced from a picture input component and the medium was deleted afterwards.
      Since:
      3.1.172
    • isRemote

      boolean isRemote()
      Indicates whether this reference is refering to a remote project.
      Returns:
      true if this reference is a remote reference.
      Since:
      3.1.324
    • getRemote

      @Nullable @Nullable String getRemote()
      Returns symbolic name of remote configuration.
      Returns:
      symbolic name of remote configuration.
      Since:
      4.2.200
      See Also:
    • getUsages

      ReferenceEntry[] getUsages()
      Returns usages of this reference. E.g. in case of a broken reference this method returns references to elements where this broken reference is still in use (and still broken).
      Returns:
      usages of this reference.
      Since:
      4.0
    • getStoreType

      @Nullable Store.Type getStoreType()
      Returns store-type of the referenced element or null, e.g. for external references.
      Returns:
      store-type of the referenced element or null, e.g. for external references.
      Since:
      4.2.200
    • refresh

      void refresh()
      Refreshes this reference entry, e.g. by removing cached objects, recalculating broken status or refreshing referenced elements.
      Since:
      4.2.406
    • getCategory

      @Nullable @Nullable String getCategory()
      Returns the category of an external reference.
      Returns:
      The category of references of type EXTERNAL_REFERENCE and null for all other reference types.
      Since:
      5.2.14