Class BatchRequest.BatchContext

java.lang.Object
com.broadleafcommerce.common.dataimport.messaging.BatchRequest.BatchContext
Enclosing class:
BatchRequest

public static final class BatchRequest.BatchContext extends Object
  • Constructor Details

    • BatchContext

      public BatchContext(String sandboxId, String author, String applicationId, String catalogId, String tenantId)
    • BatchContext

      public BatchContext(String sandboxId, String author, String applicationId, String catalogId, String tenantId, @Nullable Map<String,Object> parameters, @Nullable String parentEntityId)
    • BatchContext

      public BatchContext(@Nullable String sandboxId, @Nullable String author, @Nullable String applicationId, @Nullable String catalogId, String tenantId, @Nullable Map<String,Object> parameters, @Nullable com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer changeContainer, @Nullable String parentEntityId, @Nullable String customerContextId, @Nullable String vendorRef)
  • Method Details

    • empty

      public static BatchRequest.BatchContext empty()
    • getSandboxId

      @Nullable public String getSandboxId()
      The sandbox that the import items should go into.
    • getAuthor

      public String getAuthor()
      The user that initiated the import
    • getApplicationId

      @Nullable public String getApplicationId()
      The application that the import items should go into.
    • getCatalogId

      @Nullable public String getCatalogId()
      The catalog that the import items should go into.
    • getTenantId

      @Nullable public String getTenantId()
      The tenant that the import items should go into.
    • getVendorRef

      @Nullable public String getVendorRef()
      The reference to the vendor associated with this import. This value can be null, in which case, no vendor is associated.
      Returns:
      the reference to the vendor associated with this import
    • getParameters

      public Map<String,Object> getParameters()
    • getChangeContainer

      @Nullable public com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer getChangeContainer()
    • getParentEntityId

      @Nullable public String getParentEntityId()
      In some import scenarios, the imported entities cannot exist without a parent entity. This field is intended to hold the id of the parent entity common to all of the imported entities. For example: campaign id for campaign codes
    • getCustomerContextId

      @Nullable public String getCustomerContextId()
      The ID of the customer context that the import items should go into.
      Returns:
      the customer context that the import items should go into
    • getAdditionalContextMap

      public Map<String,Object> getAdditionalContextMap()
      This field is not intended to be serialized/transferred between the import service and resource tier services. It only serves as a convenient mechanism for resource-tier import-handling processes to store and pass any additional useful data between components. Usage of this field is entirely optional and implementation-dependent.
    • getBaseContextInfo

      public com.broadleafcommerce.data.tracking.core.context.ContextInfo getBaseContextInfo()
      Represents the ContextInfo that has all the basic info hydrated such as the ContextRequest. By default this is set up for OperationType.READ operations.

      This is typically initialized once in AbstractImportBatchHandler.initializeContextForBatch(BatchRequest) and then reused for subsequent operations. This can be re-used by non-read persistence operations using ContextInfo.withOperationType(ContextInfo, OperationType).

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setBaseContextInfo

      public void setBaseContextInfo(com.broadleafcommerce.data.tracking.core.context.ContextInfo baseContextInfo)
      Represents the ContextInfo that has all the basic info hydrated such as the ContextRequest. By default this is set up for OperationType.READ operations.

      This is typically initialized once in AbstractImportBatchHandler.initializeContextForBatch(BatchRequest) and then reused for subsequent operations. This can be re-used by non-read persistence operations using ContextInfo.withOperationType(ContextInfo, OperationType).