Class DefaultTenantService<P extends Tenant>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService<P>
com.broadleafcommerce.tenant.service.DefaultTenantService<P>
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService<P>
,TenantService<P>
public class DefaultTenantService<P extends Tenant>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService<P>
implements TenantService<P>
-
Constructor Summary
ConstructorDescriptionDefaultTenantService
(TenantRepository<R> repository, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityHelper helper) -
Method Summary
Modifier and TypeMethodDescription<D,
R extends org.springframework.data.repository.CrudRepository<D, String> & com.broadleafcommerce.common.extension.DomainTypeAware>
Pprotected P
createWithRelatedEntities
(P tenant) Creates related entities along with the tenant.void
protected void
protected void
protected CatalogService<Catalog>
protected TenantRepository<?>
protected TenantDomainProperties
protected com.broadleafcommerce.common.extension.TypeFactory
readByIdentifierAndIdentifierType
(String identifier, String identifierType) Read the tenant by itsTenant.getIdentifierValue()
and, optionally, byTenant.getIdentifierType()
.void
setCatalogService
(CatalogService<Catalog> catalogService) void
setTenantDomainProperties
(TenantDomainProperties tenantDomainProperties) void
setTypeFactory
(com.broadleafcommerce.common.extension.TypeFactory typeFactory) Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAll
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService
convertFromPersistentDomain, createAll, createAllAllowingPartialSuccess, getHelper, readAll, readAll, readAll, readAllByIds, readById, replaceAll, replaceAllAllowingPartialSuccess, updateAll, updateAllAllowingPartialSuccess
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService
createAll, createAllAllowingPartialSuccess, readAll, readAll, readAll, readAllByIds, readById, replaceAll, replaceAllAllowingPartialSuccess, updateAll, updateAllAllowingPartialSuccess
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService
readAll, readAll, readAll, readAll
-
Constructor Details
-
DefaultTenantService
public DefaultTenantService(TenantRepository<R> repository, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityHelper helper)
-
-
Method Details
-
readByIdentifierAndIdentifierType
public Optional<P> readByIdentifierAndIdentifierType(String identifier, @Nullable String identifierType) Description copied from interface:TenantService
Read the tenant by itsTenant.getIdentifierValue()
and, optionally, byTenant.getIdentifierType()
. If not provided, identifier will default toResolutionIdentifierType.DOMAIN
.- Specified by:
readByIdentifierAndIdentifierType
in interfaceTenantService<P extends Tenant>
- Parameters:
identifier
- theTenant.getIdentifierValue()
identifierType
- theTenant.getIdentifierType()
- Returns:
- the
Tenant
with the matchingTenant.getIdentifierValue()
-
create
-
update
-
replace
-
delete
-
ensureDefaultLocaleAddedToAllowedLocales
-
ensureDefaultCurrencyAddedToAllowedCurrencies
-
createWithRelatedEntities
Creates related entities along with the tenant. By default, this creates aDefaultCatalogType.SEARCH_GROUP
typeCatalog
.- Since:
- 2.1.0-GA
-
getRepository
-
getTenantDomainProperties
- Since:
- 2.1.0-GA
-
setTenantDomainProperties
- Since:
- 2.1.0-GA
-
getCatalogService
- Since:
- 2.1.0-GA
-
setCatalogService
- Since:
- 2.1.0-GA
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()- Since:
- 2.1.0-GA
-
setTypeFactory
@Autowired public void setTypeFactory(com.broadleafcommerce.common.extension.TypeFactory typeFactory) - Since:
- 2.1.0-GA
-