Interface EntityInformationServiceExtensionHandler
- All Superinterfaces:
ExtensionHandler
- All Known Implementing Classes:
AbstractEntityInformationServiceExtensionHandler,EntityInformationServiceExtensionManager
ExtensionHandler for methods within EntityInformationService
Rather than implementing this interface directly you should extend your implementation from
AbstractEntityInformationServiceExtensionHandler.
Intended to be used by enterprise and multi-tenant modules to populate a dto so that other modules can have easy access to this information w/out a formal dependency on the multi-tenant or enterprise modules.
- Author:
- bpolster
-
Method Summary
Modifier and TypeMethodDescriptionHandler implementations will set the value ofExtensionResultHolderto a list of all catalogs, specifically when running in a Multi-Tenant Broadleaf implementation.getBaseProfileIdForSite(Site site, ExtensionResultHolder<Long> erh) Handler implementations will populate theExtensionResultHolderwith a valid base profile id if one exists for the sitegetChildSiteIdsForProfile(Site profile, ExtensionResultHolder<Set<Long>> erh) Handler implementations will populate theExtensionResultHolderwith a valid child site ids whose base profile is the given profilegetDefaultCatalogIdForSite(Site site, ExtensionResultHolder<Long> erh) Handler implementations will populate theExtensionResultHolderwith a valid default catalog id for the siteHandler implementations will set the value ofExtensionResultHolderto true if the passed in object supports site discriminator usage.getParentSiteForProfile(Site profile, ExtensionResultHolder<Site> erh) Handler implementations will popoulate theExtensionResultHolderwith a valid parent site if one exists for the profilegetTypeForSite(Site site, ExtensionResultHolder<String> erh) updateBasicEntityInformationDto(EntityInformationDto dto, Object entityInstance) updateEntityInformationDto(EntityInformationDto dto, Object entityInstance) Handler implementations will override or populate the values on the passed in dto.Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Method Details
-
updateEntityInformationDto
ExtensionResultStatusType updateEntityInformationDto(EntityInformationDto dto, Object entityInstance) Handler implementations will override or populate the values on the passed in dto.- Parameters:
dto-EntityInformationDtothe dto to add values toentityInstance- the object to be examined
-
updateBasicEntityInformationDto
ExtensionResultStatusType updateBasicEntityInformationDto(EntityInformationDto dto, Object entityInstance) -
getBaseProfileIdForSite
Handler implementations will populate theExtensionResultHolderwith a valid base profile id if one exists for the site- Parameters:
site-Sitethe Site to check for a base profileerh-ExtensionResultHoldera container for the result
-
getTypeForSite
-
getChildSiteIdsForProfile
ExtensionResultStatusType getChildSiteIdsForProfile(Site profile, ExtensionResultHolder<Set<Long>> erh) Handler implementations will populate theExtensionResultHolderwith a valid child site ids whose base profile is the given profile- Parameters:
profile-Sitethe profile to check for the child siteserh- a container for the result
-
getParentSiteForProfile
Handler implementations will popoulate theExtensionResultHolderwith a valid parent site if one exists for the profile- Parameters:
profile-Sitethe profile to check for the parent siteerh-ExtensionResultHoldera container for the result
-
getOkayToUseSiteDiscriminator
ExtensionResultStatusType getOkayToUseSiteDiscriminator(Object o, ExtensionResultHolder<Boolean> erh) Handler implementations will set the value ofExtensionResultHolderto true if the passed in object supports site discriminator usage. For example, when running in a Multi-Tenant Broadleaf implementation.- Parameters:
o-- Returns:
-
findAllCatalogs
Handler implementations will set the value ofExtensionResultHolderto a list of all catalogs, specifically when running in a Multi-Tenant Broadleaf implementation.- Parameters:
erh-- Returns:
-
getDefaultCatalogIdForSite
Handler implementations will populate theExtensionResultHolderwith a valid default catalog id for the site- Parameters:
site-Sitethe Site to get the catalog id fromerh-ExtensionResultHoldera container for the result
-