Interface Store

All Superinterfaces:
Comparable<StoreElement>, HistoryProvider, IDProvider, StoreElement, StoreElementFolder, Workflowable
All Known Subinterfaces:
ContentStoreRoot, GlobalStoreRoot, MediaStoreRoot, PageStoreRoot, SiteStoreRoot, TemplateStoreRoot

public interface Store extends IDProvider, StoreElementFolder
Since:
2.3
  • Method Details

    • getType

      Store.Type getType()
      Since:
      4.0.17
    • addStoreListener

      void addStoreListener(StoreListener listener)
      Adds a StoreListener for client-local changes of this store.
      Parameters:
      listener - will be receive store changes.
      Since:
      3.0
    • removeStoreListener

      void removeStoreListener(StoreListener listener)
      Removes the given listener.
      Parameters:
      listener - has received store changes.
      Since:
      2.3
    • isRelease

      boolean isRelease()
      Returns true if this store is a release store, false for current stores.
      Since:
      2.3.10
    • getDeletedChilds

      @NotNull @Deprecated @NotNull List<DeletedElementsInfo> getDeletedChilds()
      Deprecated.
      since 5.0.100 - use getDeletedChildren() instead
      Since:
      4.0.17
    • getDeletedChildren

      @NotNull @NotNull List<DeletedElementsInfo> getDeletedChildren()
      Returns a list of deleted children described by the containing ElementInfo objects.
      Returns:
      list of ElementInfo objects describing the deleted children of this store
      Since:
      5.0.100
      See Also:
    • getDeletedChilds

      @Deprecated @NotNull @NotNull List<DeletedElementsInfo> getDeletedChilds(long startRevisionId, int resultCount)
      Deprecated.
      since 5.0.100 - use getDeletedChildren(long, int) instead
      Since:
      4.0.17
    • getDeletedChildren

      @NotNull @NotNull List<DeletedElementsInfo> getDeletedChildren(long startRevisionId, int resultCount)
      Returns a list of deleted children described by the containing ElementInfo objects. The list will be sorted in descending order, starting with the youngest deleted element nearest to given startRevisionId descending to older deleted elements.
      Parameters:
      startRevisionId - the revision id of the starting bound of the result list, use -1 to start with the latest revision
      resultCount - limits the size of the result list, use 0 to get unlimited result list
      Returns:
      list of ElementInfo objects describing the deleted children of this store
      Since:
      5.0.100
      See Also:
    • restore

      StoreElement restore(ElementInfo elementInfo, @Nullable @Nullable IDProvider parent) throws LockException
      Restore the element defined by the given information. If parent is defined, the element will be restored as child of that element, otherwise, it will be restored based on information known about the element's original parent chain.
      Parameters:
      elementInfo - The element's information.
      parent - The parent to restore to or null to restore beneath old parent
      Returns:
      The restored StoreElement
      Throws:
      LockException
      Since:
      4.0
    • isFolder

      boolean isFolder()
      A store is always a folder, so implementations must always return true.
      Specified by:
      isFolder in interface StoreElement
      Returns:
      true
      Since:
      2.3.49
    • getStoreElement

      @Nullable @Nullable IDProvider getStoreElement(long id)
      Since:
      3.1.158
      See Also:
    • getStoreElement

      @Nullable @Nullable IDProvider getStoreElement(Long id)
      Get a child by it's node id.
      Parameters:
      id - node id
      Returns:
      the child with the specified node id or null when there is no such child
      Throws:
      NullPointerException - if longId == null
      Since:
      3.1.158
    • getElements

      List<? extends IDProvider> getElements(Collection<Long> ids)
      Get a list of IDProvider identified by given ids.
      Attention: List could contain null entries for ids no element could be found for (e.g. deleted).
      Since:
      5.0.602, 5.1.207
    • getStoreElement

      @Nullable @Nullable IDProvider getStoreElement(@NotNull @NotNull String uid, @NotNull @NotNull IDProvider.UidType uidType)
      Get an element of this store by it's unique identifier and unique type or null if no child exists with the given parameter.
      Keep in mind, that some IDProvider doesn't support uids (e.g. Section). See enum constant definitions of IDProvider.UidType for node to uid type mapping.
      Parameters:
      uid - the unique identifier of the searched child
      uidType - the unique type of the searched child
      Returns:
      the child with the specified unique identifier and unique type or null
      Since:
      4.0.17
      See Also:
    • getStoreElement

      @Nullable @Nullable IDProvider getStoreElement(@NotNull @NotNull String attributeName, @NotNull @NotNull String attributeValue)
      Get a child of this store by the value of a attribute or null if no child exists with the given parameter
      Parameters:
      attributeName - attribute name
      attributeValue - attribute value
      Returns:
      the child with the specified unique identifier and unique type or null
      Since:
      4.0.17
    • getProject

      Project getProject()
      Description copied from interface: StoreElement
      Returns the belonging project of this storeelement.
      Specified by:
      getProject in interface StoreElement
      Returns:
      the appropriate project.
      Since:
      4.0.17
    • getUserService

      UserService getUserService()
      Returns:
      appropriate user service.
      Since:
      4.0.17
    • isReadOnly

      boolean isReadOnly()
      If the store is in read only mode, which means it is frozen to some point in time.
      Any StoreElement.save() call in read only mode will throw an IllegalStateException.
      Synonym for getMaxRevision() != null
      Since:
      4.0.17
      See Also:
    • getMaxRevision

      Revision getMaxRevision()
      If the store is not based on current version: the revision on which the store is based.
      Since:
      4.0.17
      See Also: