public interface MultiTenantService
| 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
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
|
SiteProvider |
getSiteProvider() |
String |
getValidDomainRegex() |
CatalogDerivedCatalogXref |
saveDerivedCatalogXref(CatalogDerivedCatalogXref xref)
Persists the given
CatalogDerivedCatalogXref entity to the database. |
void |
setSiteProvider(SiteProvider siteProvider)
Sets the siteProvider
|
void |
setValidDomainRegex(String validDomainRegex)
Sets the regex expression used to check if a domain is valid
|
SiteResponse createSite(SiteDto siteDto)
SiteProvider for the actual creation of the site.siteDto - String getValidDomainRegex()
void setValidDomainRegex(String validDomainRegex)
validDomainRegex - SiteProvider getSiteProvider()
void setSiteProvider(SiteProvider siteProvider)
siteProvider - List<org.broadleafcommerce.common.site.domain.Site> findDerivedSitesFromCatalogs(List<Long> parentCatalogs)
Site instances whose catalogs have this catalog
as a parent.parentCatalogs - the catalog on which a derived site's catalog is basedList<org.broadleafcommerce.common.site.domain.Site> findDerivedSitesFromProfiles(List<Long> parentProfiles)
Site instances whose profile have this profile
as a parent.parentProfiles - the profile on which a derived site's profile is basedList<MultiTenantSite> findStandardSitesForAssignedCatalog(Long assignedCatalogId)
assignedCatalogId - List<MultiTenantSite> findAllStandardSites() throws org.broadleafcommerce.common.exception.ServiceException
org.broadleafcommerce.common.exception.ServiceExceptionList<org.broadleafcommerce.common.site.domain.Site> findAllManagedSites(Long parentSiteId)
parentSiteId - findAllManagedSites(Long, Integer, Integer)List<org.broadleafcommerce.common.site.domain.Site> findAllManagedSites(Long parentSiteId, Integer limit, Integer offset)
findAllManagedSites(Long)parentSiteId - limit - how many results to getoffset - where to start the result setfindAllManagedSites(Long)List<org.broadleafcommerce.common.site.domain.Site> findAllManagedProfiles(Long profileId)
profileId - CatalogDerivedCatalogXref findDerivedCatalogXrefById(Long id)
CatalogDerivedCatalogXref entity by its idid - CatalogDerivedCatalogXreforg.broadleafcommerce.common.site.domain.SiteCatalogXref findSiteCatalogXref(Long id)
id - CatalogDerivedCatalogXref saveDerivedCatalogXref(CatalogDerivedCatalogXref xref)
CatalogDerivedCatalogXref entity to the database.xref - CatalogDerivedCatalogXrefList<org.broadleafcommerce.common.site.domain.Catalog> findAllStandardSiteCatalogs()
List<org.broadleafcommerce.common.site.domain.Catalog> findAllCatalogs()
List<org.broadleafcommerce.common.site.domain.Catalog> findAllCatalogs(boolean excludeArchived)
List<MultiTenantSite> findManagedProfileSites(Long parentSiteId)
parentSiteId - Set<org.broadleafcommerce.common.site.domain.Site> findVisibleProfileSites(MultiTenantSite currentSite)
currentSite - List<org.broadleafcommerce.common.sandbox.domain.SandBox> findAllSandBoxes(org.broadleafcommerce.common.site.domain.Catalog catalog) throws org.broadleafcommerce.common.exception.ServiceException
This 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.catalog - the catalog to find sandboxes fororg.broadleafcommerce.common.exception.ServiceExceptionList<org.broadleafcommerce.common.sandbox.domain.SandBox> findAllSandBoxes(org.broadleafcommerce.common.site.domain.Site site) throws org.broadleafcommerce.common.exception.ServiceException
This 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.site - the site to find sandboxes fororg.broadleafcommerce.common.exception.ServiceExceptionCopyright © 2020. All rights reserved.