Class AccountPermissionHydrationService


  • public class AccountPermissionHydrationService
    extends Object
    A simple service that hydrates AccountPermissionRef with values from the data store.
    Author:
    Samarth Dhruva (samarthd), Chris Kittrell (ckittrell)
    • Constructor Detail

      • AccountPermissionHydrationService

        public AccountPermissionHydrationService​(AccountPermissionService<AccountPermission> accountPermissionService,
                                                 com.broadleafcommerce.common.extension.TypeFactory typeFactory)
    • Method Detail

      • hydratePermissionReferences

        public Set<AccountPermissionRef> hydratePermissionReferences​(Set<AccountPermissionRef> toHydrate,
                                                                     @Nullable
                                                                     com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Queries for each element in toHydrate in the data store. Returns a new set of elements that are either the hydrated permissions (for each element that was found), or the given permissions as-is (for each element that was not found).
        Parameters:
        toHydrate - the set of elements to hydrate
        contextInfo - the current request context
        Returns:
        a new set of hydrated elements
      • getTypeFactory

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