Class CreateSandboxRequestListener
java.lang.Object
com.broadleafcommerce.sandbox.messaging.bulk.CreateSandboxRequestListener
A handler that accepts a
CreateSandboxRequest
and creates the requested sandbox.- Author:
- Samarth Dhruva (samarthd)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreateSandboxRequestListener
(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, SandboxService<Sandbox> sandboxService, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.data.tracking.core.context.ContextInfo
buildContextInfo
(String applicationId, String tenantId) protected Sandbox
buildSandboxFromRequest
(CreateSandboxRequest createSandboxRequest) protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService
protected SandboxService<Sandbox>
protected com.broadleafcommerce.common.extension.TypeFactory
protected void
handleMessage
(org.springframework.messaging.Message<CreateSandboxRequest> message) protected boolean
isValidHexColor
(String hexColor) void
listen
(org.springframework.messaging.Message<CreateSandboxRequest> message) Creates the sandbox as described in the request.
-
Field Details
-
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
-
buildSandboxFromRequest
-
isValidHexColor
-
buildContextInfo
-
getIdempotentConsumptionService
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentConsumptionService() -
getSandboxService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-