Interface StoreElementAgent


public interface StoreElementAgent
Definition for an agent offering direct access to store elements by referencing information.

Example:
SpecialistsBroker.requireSpecialist(StoreElementAgent.TYPE)

Since:
4.2.405
  • Field Details

  • Method Details

    • loadStoreElement

      @Nullable @Nullable IDProvider loadStoreElement(@NotNull @NotNull String uid, @NotNull IDProvider.UidType uidType, boolean release) throws AccessDeniedException
      Load a store object with the given uid and uidType.
      Parameters:
      uid - The uid of the requested object.
      uidType - The type of the requested object.
      release - Indicator for loading objects being released, true, or current, false.
      Returns:
      The loaded object or null, if the object is not available.
      Throws:
      AccessDeniedException - If access to the requested element has been denied.
      Since:
      4.2.405
    • loadReference

      @Nullable @Nullable Referenceable loadReference(@NotNull @NotNull String reference, boolean release)
      Load a reference with the given reference descriptor.
      Parameters:
      reference - The reference descriptor of the requested object.
      release - Indicator for loading objects being released, true, or current, false.
      Returns:
      The loaded reference or null, if the object is not available.
      Since:
      4.2.405
    • requestStoreElement

      <T extends IDProvider> Optional<T> requestStoreElement(@NotNull @NotNull String uid, @NotNull @NotNull Class<T> type, boolean release)
      Locates a store element by its uid.
      Type Parameters:
      T - The element type to search for. This has to be a (sub-)class of a type containing a UID_TYPE field. Examples are Page and Media but neither Dataset nor Section.
      Parameters:
      uid - The uid of the store element, must not be null.
      type - The expected type of the element, used for determining the correct Store.
      release - Indicates if released (true) or current (false) elements should be returned.
      Returns:
      An Optional containing the store element or an empty Optional if no element could be found.
      Throws:
      AccessDeniedException - If access to the requested element has been denied.
      Since:
      5.2.260400
    • requestStoreElement

      <T extends IDProvider> Optional<T> requestStoreElement(@NotNull @NotNull String uid, @NotNull @NotNull Class<T> type)
      Locates a store element by its uid in the current store.
      Type Parameters:
      T - The element type to search for. This has to be a (sub-)class of a type containing a UID_TYPE field. Examples are Page and Media but neither Dataset nor Section.
      Parameters:
      uid - The uid of the store element, must not be null.
      type - The expected type of the element, used for determining the correct Store.
      Returns:
      An Optional containing the store element or an empty Optional if no element could be found.
      Throws:
      AccessDeniedException - If access to the requested element has been denied.
      Since:
      5.2.260400
    • requireStoreElement

      @NotNull <T extends IDProvider> T requireStoreElement(@NotNull @NotNull String uid, @NotNull @NotNull Class<T> type, boolean release)
      Locates a store element by its uid.
      Type Parameters:
      T - The element type to search for. This has to be a (sub-)class of a type containing a UID_TYPE field. Examples are Page and Media but neither Dataset nor Section.
      Parameters:
      uid - The uid of the store element, must not be null.
      type - The expected type of the element, used for determining the correct Store.
      release - Indicates if released (true) or current (false) elements should be returned.
      Returns:
      The store element, never null.
      Throws:
      AccessDeniedException - If access to the requested element has been denied.
      NoSuchElementException - If no element could be found.
      Since:
      5.2.260400
    • requireStoreElement

      @NotNull <T extends IDProvider> T requireStoreElement(@NotNull @NotNull String uid, @NotNull @NotNull Class<T> type)
      Locates a store element by its uid in the current store.
      Type Parameters:
      T - The element type to search for. This has to be a (sub-)class of a type containing a UID_TYPE field. Examples are Page and Media but neither Dataset nor Section.
      Parameters:
      uid - The uid of the store element, must not be null.
      type - The expected type of the element, used for determining the correct Store.
      Returns:
      The store element, never null.
      Throws:
      AccessDeniedException - If access to the requested element has been denied.
      NoSuchElementException - If no element could be found.
      Since:
      5.2.260400