Interface OptionTemplateGroupHydrationService

All Known Implementing Classes:
DefaultOptionTemplateGroupHydrationService

public interface OptionTemplateGroupHydrationService
Responsible for performing simple hydration of the references to OptionTemplates made within an OptionTemplateGroup by querying for those references and populating their full values.
Author:
Samarth Dhruva (samarthd)
  • Method Summary

    Modifier and Type
    Method
    Description
    hydrate(OptionTemplateGroup group, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Gets the IDs of OptionTemplates that are referenced by the group, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.
    org.springframework.data.domain.Page<OptionTemplateGroup>
    hydrate(org.springframework.data.domain.Page<OptionTemplateGroup> unhydrated, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Gets the IDs of OptionTemplates that are referenced by each group in unhydrated, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.
  • Method Details

    • hydrate

      OptionTemplateGroup hydrate(OptionTemplateGroup group, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Gets the IDs of OptionTemplates that are referenced by the group, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.
      Parameters:
      group - the unhydrated OptionTemplateGroup whose references should be hydrated
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      the given group after hydrating its references
    • hydrate

      org.springframework.data.domain.Page<OptionTemplateGroup> hydrate(org.springframework.data.domain.Page<OptionTemplateGroup> unhydrated, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Gets the IDs of OptionTemplates that are referenced by each group in unhydrated, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.

      A page of those hydrated option template groups is returned.

      Parameters:
      unhydrated - the page of unhydrated option template groups whose references should be hydrated
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      a page of the option template groups after hydrating their references