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

    Constructors
    Constructor
    Description
    DefaultTenantService(TenantRepository<R> repository, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityHelper helper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <D, R extends org.springframework.data.repository.CrudRepository<D, String> & com.broadleafcommerce.common.extension.DomainTypeAware>
    P
    create(P businessInstance)
     
    protected TenantRepository<?>
     
    readByIdentifierAndIdentifierType(String identifier, String identifierType)
    Read the tenant by its Tenant.getIdentifierValue() and, optionally, by Tenant.getIdentifierType().
    replace(String id, P businessInstance)
     
    update(String id, P businessInstance)
     

    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, delete, 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, delete, 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 its Tenant.getIdentifierValue() and, optionally, by Tenant.getIdentifierType(). If not provided, identifier will default to ResolutionIdentifierType.DOMAIN.
      Specified by:
      readByIdentifierAndIdentifierType in interface TenantService<P extends Tenant>
      Parameters:
      identifier - the Tenant.getIdentifierValue()
      identifierType - the Tenant.getIdentifierType()
      Returns:
      the Tenant with the matching Tenant.getIdentifierValue()
    • create

      public <D, R extends org.springframework.data.repository.CrudRepository<D, String> & com.broadleafcommerce.common.extension.DomainTypeAware> P create(P businessInstance)
      Specified by:
      create in interface com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService<P extends Tenant>
      Overrides:
      create in class com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P extends Tenant>
    • update

      public P update(String id, @NonNull P businessInstance)
      Specified by:
      update in interface com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService<P extends Tenant>
      Overrides:
      update in class com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P extends Tenant>
    • replace

      public P replace(String id, @NonNull P businessInstance)
      Specified by:
      replace in interface com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService<P extends Tenant>
      Overrides:
      replace in class com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P extends Tenant>
    • getRepository

      protected TenantRepository<?> getRepository()
      Overrides:
      getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P extends Tenant>