@Service(value="blEntityInformationService") public class EntityInformationServiceImpl extends Object implements EntityInformationService
Modifier and Type | Field and Description |
---|---|
protected EntityInformationServiceExtensionManager |
extensionManager |
Constructor and Description |
---|
EntityInformationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
EntityInformationDto |
buildBasicEntityInformationForObject(Object o) |
EntityInformationDto |
buildEntityInformationForObject(Object o)
Given an object, populates
EntityInformationDto with the associated site, profile, and catalog ids. |
protected EntityInformationDto |
createEntityInformationDto(Object o)
Factory method for instantiating the
EntityInformationDto |
List<Catalog> |
findAllCatalogs()
Returns all of the catalogs, using multi-tenant mode
|
Long |
getBaseProfileIdForSite(Site site)
Given a Site object, returns the Base Profile Id if one exists.
|
Set<Long> |
getChildSiteIdsForProfile(Site profile) |
Long |
getDefaultCatalogIdForSite(Site site)
Given a Site object, returns the default catalog id.
|
boolean |
getOkayToUseSiteDiscriminator(Object o)
Given an entity instance, returns true if the object has access to a Site Discriminator.
|
Site |
getParentSiteForProfile(Site profile)
Given a profile
Site object, returns the parent site, if one exists. |
String |
getTypeForSite(Site site) |
protected EntityInformationServiceExtensionManager extensionManager
public EntityInformationDto buildEntityInformationForObject(Object o)
EntityInformationService
EntityInformationDto
with the associated site, profile, and catalog ids.
This method does nothing by default and instead relies on the EntityInformationServiceExtensionManager
to
populate the correct values. Designed for use with the commercial "workflow" and "multi-tenant" modules.buildEntityInformationForObject
in interface EntityInformationService
public EntityInformationDto buildBasicEntityInformationForObject(Object o)
buildBasicEntityInformationForObject
in interface EntityInformationService
public Long getBaseProfileIdForSite(Site site)
EntityInformationService
getBaseProfileIdForSite
in interface EntityInformationService
public String getTypeForSite(Site site)
getTypeForSite
in interface EntityInformationService
public Set<Long> getChildSiteIdsForProfile(Site profile)
getChildSiteIdsForProfile
in interface EntityInformationService
public Site getParentSiteForProfile(Site profile)
EntityInformationService
Site
object, returns the parent site, if one exists. This method provides a hook
for Broadleaf MultiTenant functionality.getParentSiteForProfile
in interface EntityInformationService
public boolean getOkayToUseSiteDiscriminator(Object o)
EntityInformationService
getOkayToUseSiteDiscriminator
in interface EntityInformationService
public Long getDefaultCatalogIdForSite(Site site)
EntityInformationService
getDefaultCatalogIdForSite
in interface EntityInformationService
public List<Catalog> findAllCatalogs()
EntityInformationService
findAllCatalogs
in interface EntityInformationService
protected EntityInformationDto createEntityInformationDto(Object o)
EntityInformationDto
Copyright © 2022. All rights reserved.