@Service(value="blMultiTenantService") public class MultiTenantServiceImpl extends Object implements MultiTenantService
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
initDisabled |
protected MultiTenantDao |
multiTenantDao |
protected org.broadleafcommerce.common.sandbox.service.SandBoxService |
sandBoxService |
protected List<org.broadleafcommerce.common.site.service.provider.SiteConfigProvider> |
siteConfigProviders |
protected SiteProvider |
siteProvider |
protected org.broadleafcommerce.common.site.service.SiteService |
siteService |
protected org.broadleafcommerce.common.site.service.SiteServiceExtensionManager |
siteServiceExtensionManager |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil |
transUtil |
protected String |
validDomainPrefixRegex |
protected String |
validDomainRegex |
| Constructor and Description |
|---|
MultiTenantServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
SiteResponse |
createSite(SiteDto siteDto)
Creates a site matching the requested siteDto.
|
List<org.broadleafcommerce.common.site.domain.Catalog> |
findAllCatalogs() |
List<org.broadleafcommerce.common.site.domain.Catalog> |
findAllCatalogs(boolean excludeArchived) |
List<org.broadleafcommerce.common.site.domain.Site> |
findAllManagedProfiles(Long profileId)
Find all standard sites whose base profile matches the passed in id
|
List<org.broadleafcommerce.common.site.domain.Site> |
findAllManagedSites(Long parentSiteId)
Find any standard sites whose parent matches the passed in id
|
List<org.broadleafcommerce.common.site.domain.Site> |
findAllManagedSites(Long parentSiteId,
Integer limit,
Integer offset)
Paged version of
MultiTenantService.findAllManagedSites(Long) |
List<org.broadleafcommerce.common.sandbox.domain.SandBox> |
findAllSandBoxes(org.broadleafcommerce.common.site.domain.Catalog catalog)
Retrieves the sandboxes for the given catalog and its owning site.
|
List<org.broadleafcommerce.common.sandbox.domain.SandBox> |
findAllSandBoxes(org.broadleafcommerce.common.site.domain.Site site)
Retrieves the sandboxes for the given catalog and its owning site.
|
List<org.broadleafcommerce.common.site.domain.Catalog> |
findAllStandardSiteCatalogs() |
List<MultiTenantSite> |
findAllStandardSites()
Find all standard sites
|
List<org.broadleafcommerce.common.site.domain.Site> |
findChildrenSitesByParentSiteId(Long id)
Returns a list of children sites for the site id passed in
|
CatalogDerivedCatalogXref |
findDerivedCatalogXrefById(Long id)
Finds a given
CatalogDerivedCatalogXref entity by its id |
List<org.broadleafcommerce.common.site.domain.Site> |
findDerivedSitesFromCatalogs(List<Long> parentCatalogs)
Find
Site instances whose catalogs have this catalog
as a parent. |
List<org.broadleafcommerce.common.site.domain.Site> |
findDerivedSitesFromProfiles(List<Long> parentProfiles)
Find
Site instances whose profile have this profile
as a parent. |
List<MultiTenantSite> |
findManagedProfileSites(Long parentSiteId)
Find any profile sites whose parent matches the passed in id
|
org.broadleafcommerce.common.site.domain.SiteCatalogXref |
findSiteCatalogXref(Long id)
Find the xref, if exists, for the given site and catalog
|
List<MultiTenantSite> |
findStandardSitesForAssignedCatalog(Long assignedCatalogId)
Find any standard sites who have the designated catalog assigned
|
Set<org.broadleafcommerce.common.site.domain.Site> |
findVisibleProfileSites(MultiTenantSite currentSite)
Find any profile sites whose parent matches the passed in id
|
protected MultiTenantSite |
getNonPersistentSite(MultiTenantSite mts) |
SiteProvider |
getSiteProvider() |
String |
getValidDomainRegex() |
boolean |
isInitDisabled() |
CatalogDerivedCatalogXref |
saveDerivedCatalogXref(CatalogDerivedCatalogXref xref)
Persists the given
CatalogDerivedCatalogXref entity to the database. |
void |
setInitDisabled(boolean initDisabled) |
void |
setSiteProvider(SiteProvider siteProvider)
Sets the siteProvider
|
void |
setValidDomainRegex(String validDomainRegex)
Sets the regex expression used to check if a domain is valid
|
protected String validDomainRegex
protected String validDomainPrefixRegex
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil
protected SiteProvider siteProvider
protected MultiTenantDao multiTenantDao
protected List<org.broadleafcommerce.common.site.service.provider.SiteConfigProvider> siteConfigProviders
protected org.broadleafcommerce.common.site.service.SiteService siteService
protected org.broadleafcommerce.common.sandbox.service.SandBoxService sandBoxService
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected org.broadleafcommerce.common.site.service.SiteServiceExtensionManager siteServiceExtensionManager
protected boolean initDisabled
@Transactional(value="blTransactionManager") public SiteResponse createSite(SiteDto siteDto)
MultiTenantServiceSiteProvider for the actual creation of the site.createSite in interface MultiTenantServicepublic String getValidDomainRegex()
getValidDomainRegex in interface MultiTenantServicepublic void setValidDomainRegex(String validDomainRegex)
MultiTenantServicesetValidDomainRegex in interface MultiTenantServicepublic SiteProvider getSiteProvider()
getSiteProvider in interface MultiTenantServicepublic void setSiteProvider(SiteProvider siteProvider)
MultiTenantServicesetSiteProvider in interface MultiTenantServicepublic boolean isInitDisabled()
public void setInitDisabled(boolean initDisabled)
public List<org.broadleafcommerce.common.site.domain.Site> findDerivedSitesFromCatalogs(List<Long> parentCatalogs)
MultiTenantServiceSite instances whose catalogs have this catalog
as a parent.findDerivedSitesFromCatalogs in interface MultiTenantServiceparentCatalogs - the catalog on which a derived site's catalog is basedpublic List<org.broadleafcommerce.common.site.domain.Site> findDerivedSitesFromProfiles(List<Long> parentProfiles)
MultiTenantServiceSite instances whose profile have this profile
as a parent.findDerivedSitesFromProfiles in interface MultiTenantServiceparentProfiles - the profile on which a derived site's profile is basedpublic List<MultiTenantSite> findStandardSitesForAssignedCatalog(Long assignedCatalogId)
MultiTenantServicefindStandardSitesForAssignedCatalog in interface MultiTenantServicepublic List<MultiTenantSite> findAllStandardSites() throws org.broadleafcommerce.common.exception.ServiceException
MultiTenantServicefindAllStandardSites in interface MultiTenantServiceorg.broadleafcommerce.common.exception.ServiceExceptionprotected MultiTenantSite getNonPersistentSite(MultiTenantSite mts)
public List<MultiTenantSite> findManagedProfileSites(Long parentSiteId)
MultiTenantServicefindManagedProfileSites in interface MultiTenantServicepublic List<org.broadleafcommerce.common.site.domain.Site> findAllManagedSites(Long parentSiteId)
MultiTenantServicefindAllManagedSites in interface MultiTenantServiceMultiTenantService.findAllManagedSites(Long, Integer, Integer)public List<org.broadleafcommerce.common.site.domain.Site> findAllManagedSites(Long parentSiteId, Integer limit, Integer offset)
MultiTenantServiceMultiTenantService.findAllManagedSites(Long)findAllManagedSites in interface MultiTenantServicelimit - how many results to getoffset - where to start the result setMultiTenantService.findAllManagedSites(Long)public List<org.broadleafcommerce.common.site.domain.Site> findAllManagedProfiles(Long profileId)
MultiTenantServicefindAllManagedProfiles in interface MultiTenantServicepublic CatalogDerivedCatalogXref findDerivedCatalogXrefById(Long id)
MultiTenantServiceCatalogDerivedCatalogXref entity by its idfindDerivedCatalogXrefById in interface MultiTenantServiceCatalogDerivedCatalogXrefpublic org.broadleafcommerce.common.site.domain.SiteCatalogXref findSiteCatalogXref(Long id)
MultiTenantServicefindSiteCatalogXref in interface MultiTenantServicepublic CatalogDerivedCatalogXref saveDerivedCatalogXref(CatalogDerivedCatalogXref xref)
MultiTenantServiceCatalogDerivedCatalogXref entity to the database.saveDerivedCatalogXref in interface MultiTenantServiceCatalogDerivedCatalogXrefpublic List<org.broadleafcommerce.common.site.domain.Catalog> findAllStandardSiteCatalogs()
findAllStandardSiteCatalogs in interface MultiTenantServicepublic List<org.broadleafcommerce.common.site.domain.Catalog> findAllCatalogs()
findAllCatalogs in interface MultiTenantServicepublic List<org.broadleafcommerce.common.site.domain.Catalog> findAllCatalogs(boolean excludeArchived)
findAllCatalogs in interface MultiTenantServicepublic Set<org.broadleafcommerce.common.site.domain.Site> findVisibleProfileSites(MultiTenantSite currentSite)
MultiTenantServicefindVisibleProfileSites in interface MultiTenantService@Transactional(value="blTransactionManager") public List<org.broadleafcommerce.common.sandbox.domain.SandBox> findAllSandBoxes(org.broadleafcommerce.common.site.domain.Catalog catalog) throws org.broadleafcommerce.common.exception.ServiceException
MultiTenantServiceThis will give all sandboxes that exist within the catalog and its owning site and no others. So if there are three sandboxes for catalog -2 on site -3, this will return exactly 3 sandboxes. If there is one sandbox for catalog -1 on site -1 (global), this will return that sandbox.
Any implementation of this method should be wrapped with @Transactional to avoid lazy initialization exceptions on startup.findAllSandBoxes in interface MultiTenantServicecatalog - the catalog to find sandboxes fororg.broadleafcommerce.common.exception.ServiceException@Transactional(value="blTransactionManager") public List<org.broadleafcommerce.common.sandbox.domain.SandBox> findAllSandBoxes(org.broadleafcommerce.common.site.domain.Site site) throws org.broadleafcommerce.common.exception.ServiceException
MultiTenantServiceThis will give all sandboxes that exist within the catalog and its owning site and no others. So if there are three sandboxes for catalog -2 on site -3, this will return exactly 3 sandboxes. If there is one sandbox for catalog -1 on site -1 (global), this will return that sandbox.
Any implementation of this method should be wrapped with @Transactional to avoid lazy initialization exceptions on startup.findAllSandBoxes in interface MultiTenantServicesite - the site to find sandboxes fororg.broadleafcommerce.common.exception.ServiceExceptionpublic List<org.broadleafcommerce.common.site.domain.Site> findChildrenSitesByParentSiteId(Long id)
MultiTenantServicefindChildrenSitesByParentSiteId in interface MultiTenantServiceCopyright © 2020. All rights reserved.