Class CreateSandboxRequestListener

java.lang.Object
com.broadleafcommerce.sandbox.messaging.bulk.CreateSandboxRequestListener

@DataRouteByKey("sandbox") public class CreateSandboxRequestListener extends Object
A handler that accepts a CreateSandboxRequest and creates the requested sandbox.
Author:
Samarth Dhruva (samarthd)
  • Field Details

    • HEX_COLOR_PATTERN

      protected final Pattern HEX_COLOR_PATTERN
  • Constructor Details

    • CreateSandboxRequestListener

      public CreateSandboxRequestListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, SandboxService<Sandbox> sandboxService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • listen

      @StreamListener("createSandboxRequestInput") public void listen(org.springframework.messaging.Message<CreateSandboxRequest> message)
      Creates the sandbox as described in the request.
      Parameters:
      message - a message containing the request containing information about the sandbox to create
    • handleMessage

      protected void handleMessage(org.springframework.messaging.Message<CreateSandboxRequest> message)
    • buildSandboxFromRequest

      protected Sandbox buildSandboxFromRequest(CreateSandboxRequest createSandboxRequest)
    • isValidHexColor

      protected boolean isValidHexColor(String hexColor)
    • buildContextInfo

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo(String applicationId, String tenantId)
    • getIdempotentConsumptionService

      protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentConsumptionService()
    • getSandboxService

      protected SandboxService<Sandbox> getSandboxService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()