Class AbstractEntityInformationServiceExtensionHandler
java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.common.entity.service.AbstractEntityInformationServiceExtensionHandler
- All Implemented Interfaces:
EntityInformationServiceExtensionHandler
,ExtensionHandler
public class AbstractEntityInformationServiceExtensionHandler
extends AbstractExtensionHandler
implements EntityInformationServiceExtensionHandler
-
Field Summary
Fields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionHandler implementations will set the value ofExtensionResultHolder
to a list of all catalogs, specifically when running in a Multi-Tenant Broadleaf implementation.getBaseProfileIdForSite
(Site site, ExtensionResultHolder<Long> erh) Handler implementations will populate theExtensionResultHolder
with a valid base profile id if one exists for the sitegetChildSiteIdsForProfile
(Site profile, ExtensionResultHolder<Set<Long>> erh) Handler implementations will populate theExtensionResultHolder
with a valid child site ids whose base profile is the given profilegetDefaultCatalogIdForSite
(Site site, ExtensionResultHolder<Long> erh) Handler implementations will populate theExtensionResultHolder
with a valid default catalog id for the siteHandler implementations will set the value ofExtensionResultHolder
to true if the passed in object supports site discriminator usage.getParentSiteForProfile
(Site profile, ExtensionResultHolder<Site> erh) Handler implementations will popoulate theExtensionResultHolder
with 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 class org.broadleafcommerce.common.extension.AbstractExtensionHandler
getPriority, isEnabled, setEnabled, setPriority
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Constructor Details
-
AbstractEntityInformationServiceExtensionHandler
public AbstractEntityInformationServiceExtensionHandler()
-
-
Method Details
-
updateEntityInformationDto
public ExtensionResultStatusType updateEntityInformationDto(EntityInformationDto dto, Object entityInstance) Description copied from interface:EntityInformationServiceExtensionHandler
Handler implementations will override or populate the values on the passed in dto.- Specified by:
updateEntityInformationDto
in interfaceEntityInformationServiceExtensionHandler
- Parameters:
dto
-EntityInformationDto
the dto to add values toentityInstance
- the object to be examined
-
updateBasicEntityInformationDto
public ExtensionResultStatusType updateBasicEntityInformationDto(EntityInformationDto dto, Object entityInstance) - Specified by:
updateBasicEntityInformationDto
in interfaceEntityInformationServiceExtensionHandler
-
getBaseProfileIdForSite
public ExtensionResultStatusType getBaseProfileIdForSite(Site site, ExtensionResultHolder<Long> erh) Description copied from interface:EntityInformationServiceExtensionHandler
Handler implementations will populate theExtensionResultHolder
with a valid base profile id if one exists for the site- Specified by:
getBaseProfileIdForSite
in interfaceEntityInformationServiceExtensionHandler
- Parameters:
site
-Site
the Site to check for a base profileerh
-ExtensionResultHolder
a container for the result
-
getTypeForSite
- Specified by:
getTypeForSite
in interfaceEntityInformationServiceExtensionHandler
-
getChildSiteIdsForProfile
public ExtensionResultStatusType getChildSiteIdsForProfile(Site profile, ExtensionResultHolder<Set<Long>> erh) Description copied from interface:EntityInformationServiceExtensionHandler
Handler implementations will populate theExtensionResultHolder
with a valid child site ids whose base profile is the given profile- Specified by:
getChildSiteIdsForProfile
in interfaceEntityInformationServiceExtensionHandler
- Parameters:
profile
-Site
the profile to check for the child siteserh
- a container for the result
-
getParentSiteForProfile
public ExtensionResultStatusType getParentSiteForProfile(Site profile, ExtensionResultHolder<Site> erh) Description copied from interface:EntityInformationServiceExtensionHandler
Handler implementations will popoulate theExtensionResultHolder
with a valid parent site if one exists for the profile- Specified by:
getParentSiteForProfile
in interfaceEntityInformationServiceExtensionHandler
- Parameters:
profile
-Site
the profile to check for the parent siteerh
-ExtensionResultHolder
a container for the result
-
getOkayToUseSiteDiscriminator
public ExtensionResultStatusType getOkayToUseSiteDiscriminator(Object o, ExtensionResultHolder<Boolean> erh) Description copied from interface:EntityInformationServiceExtensionHandler
Handler implementations will set the value ofExtensionResultHolder
to true if the passed in object supports site discriminator usage. For example, when running in a Multi-Tenant Broadleaf implementation.- Specified by:
getOkayToUseSiteDiscriminator
in interfaceEntityInformationServiceExtensionHandler
- Returns:
-
getDefaultCatalogIdForSite
public ExtensionResultStatusType getDefaultCatalogIdForSite(Site site, ExtensionResultHolder<Long> erh) Description copied from interface:EntityInformationServiceExtensionHandler
Handler implementations will populate theExtensionResultHolder
with a valid default catalog id for the site- Specified by:
getDefaultCatalogIdForSite
in interfaceEntityInformationServiceExtensionHandler
- Parameters:
site
-Site
the Site to get the catalog id fromerh
-ExtensionResultHolder
a container for the result
-
findAllCatalogs
Description copied from interface:EntityInformationServiceExtensionHandler
Handler implementations will set the value ofExtensionResultHolder
to a list of all catalogs, specifically when running in a Multi-Tenant Broadleaf implementation.- Specified by:
findAllCatalogs
in interfaceEntityInformationServiceExtensionHandler
- Returns:
-