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.ContextInfobuildContextInfo(String applicationId, String tenantId) protected SandboxbuildSandboxFromRequest(CreateSandboxRequest createSandboxRequest) protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionServiceprotected SandboxService<Sandbox>protected com.broadleafcommerce.common.extension.TypeFactoryprotected voidhandleMessage(org.springframework.messaging.Message<CreateSandboxRequest> message) protected booleanisValidHexColor(String hexColor) voidlisten(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()
-