Interface CodeGenerationService

  • All Known Implementing Classes:
    DefaultCodeGenerationService

    public interface CodeGenerationService
    Performs operations on a CodeGenerator, such as validation and code generation.
    Author:
    Chad Harchar (charchar)
    • Method Detail

      • markInProgressAndGenerateCodes

        default void markInProgressAndGenerateCodes​(CodeGenerator info,
                                                    com.broadleafcommerce.data.tracking.core.context.ContextRequest contextRequest)
        Updates the CodeGenerator to have a status of CodeGenerationStatusType.IN_PROCESS, then performs the code generation.
        Parameters:
        info - The CodeGenerator that holds the information needed in order to generate the expected number of codes with the expected format
        contextRequest - The context of the request with which to generate codes
      • markInProgressAndGenerateAndGetCodes

        CodeGenerationResult markInProgressAndGenerateAndGetCodes​(CodeGenerator info,
                                                                  com.broadleafcommerce.data.tracking.core.context.ContextRequest contextRequest)
        Updates the CodeGenerator to have a status of CodeGenerationStatusType.IN_PROCESS, then performs the code generation.
        Parameters:
        info - The CodeGenerator that holds the information needed in order to generate the expected number of codes with the expected format
        contextRequest - The context of the request with which to generate codes
        Returns:
        the CodeGenerationResult containing the generated CampaignCodes and error message based on the given CodeGenerator