Interface SandboxTrackable

All Superinterfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware

public interface SandboxTrackable extends com.broadleafcommerce.data.tracking.core.ContextStateAware
Interface for objects which are sandbox trackable.
  • Method Details

    • getSandboxOwner

      @Nullable String getSandboxOwner()
      Get the owner of this object in the sandbox context.
      Returns:
      The owner of this sandbox object, or null if not in a user sandbox context
    • getSandboxOverrides

      Set<String> getSandboxOverrides()

      Information about sandboxes in which this context version of the entity has been overridden.

      e.g. if this entity is at a promoted state is in sandbox A, and there is also a user-level change for the same entity in sandbox A, then the promoted record will contain a value in this field to indicate the existence of the user-level record.

      • If there is an override of this record at a higher-than-user (ex: promoted) sandbox level, it will follow the format: sandboxId, where sandboxId is the ID of the sandbox containing the override
      • If there is an override of this record at a user sandbox level, it will follow the format: sandboxId,sandboxOwner, where sandboxId is the ID of the sandbox containing the override, and sandboxOwner is the author of the user-level change

      Returns:
      the specially encoded values indicating any sandboxes in which this entity has been overridden
    • setSandboxOverrides

      void setSandboxOverrides(Set<String> sandboxOverrides)
      Set any sandbox contexts where this trackable has been overridden. See getSandboxOverrides().
      Parameters:
      sandboxOverrides - specially encoded values indicating any sandboxes in which this entity has been overridden
    • getCatalogAwareSandboxOverrides

      default Set<String> getCatalogAwareSandboxOverrides()

      This is similar to getSandboxOverrides(), except the values within are encoded with additional information about the catalog state of the override.

      This is only useful for entities that are both TrackableBehavior.CATALOG and TrackableBehavior.SANDBOX discriminated.

      • If there is an override of this record at a higher-than-user (ex: promoted) sandbox level, it will follow the format: sandboxId;catalogId, where sandboxId is the ID of the sandbox containing the override, and catalogId is the ID of the catalog containing the override
      • If there is an override of this record at a user sandbox level, it will follow the format: sandboxId,sandboxOwner;catalogId, where sandboxId is the ID of the sandbox containing the override, and catalogId is the ID of the catalog containing the override, and sandboxOwner is the author of the user-level change

      This special encoding makes it possible for consumers to more clearly distinguish the contexts in which the current record has been overridden.

      Returns:
      encoded values representing the sandboxes in which this trackable has been overridden, with additional catalog information
      Since:
      SearchServices 2.2.1, Release Train 2.2.1, SearchServices 2.1.5, Release Train 2.1.5
    • setCatalogAwareSandboxOverrides

      default void setCatalogAwareSandboxOverrides(Set<String> catalogAwareSandboxOverrides)
      Parameters:
      catalogAwareSandboxOverrides - encoded values representing the sandboxes in which this trackable has been overridden, with additional catalog information
      Since:
      SearchServices 2.2.1, Release Train 2.2.1, SearchServices 2.1.5, Release Train 2.1.5