Class DefaultCatalogAccessPolicyService<P extends CatalogAccessPolicy>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.catalog.service.accesspolicy.DefaultCatalogAccessPolicyService<P>
All Implemented Interfaces:
CatalogAccessPolicyService<P>, com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>

public class DefaultCatalogAccessPolicyService<P extends CatalogAccessPolicy> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements CatalogAccessPolicyService<P>
Since:
2.1.0-GA
Author:
Nathan Moore (nathandmoore)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultCatalogAccessPolicyService(CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender sender)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(P businessInstance, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    void
    delete(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    protected com.broadleafcommerce.common.extension.cache.CacheStateManager
     
    protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>
     
    protected CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    protected com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender
     
    protected com.broadleafcommerce.common.extension.TypeFactory
     
    readAllActiveByTargetType(String targetType, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    org.springframework.data.domain.Page<P>
    readPageByName(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    replace(String id, P businessInstance, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    protected void
    sendCatalogAccessPolicyModifiedEvent(P catalogAccessPolicy, @NonNull String operationType, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    update(String id, P businessInstance, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

    getRsqlHelper, readAll, readAll, readAll, readAll

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

    convertFromPersistentDomain, convertToPersistentDomain, createAll, createAllAllowingPartialSuccess, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, updateAll, updateAllAllowingPartialSuccess, updateSort

    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.CrudEntityService

    createAll, createAllAllowingPartialSuccess, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Field Details

  • Constructor Details

    • DefaultCatalogAccessPolicyService

      public DefaultCatalogAccessPolicyService(CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, @Nullable com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager, com.broadleafcommerce.common.extension.TypeFactory typeFactory, @Nullable com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender sender)
  • Method Details

    • readPageByName

      public org.springframework.data.domain.Page<P> readPageByName(@Nullable String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      readPageByName in interface CatalogAccessPolicyService<P extends CatalogAccessPolicy>
    • readAllActiveByTargetType

      public List<P> readAllActiveByTargetType(String targetType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      readAllActiveByTargetType in interface CatalogAccessPolicyService<P extends CatalogAccessPolicy>
    • create

      public P create(@NonNull P businessInstance, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      create in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
      Overrides:
      create in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
    • update

      public P update(@NonNull String id, @NonNull P businessInstance, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      update in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
      Overrides:
      update in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
    • replace

      public P replace(@NonNull String id, @NonNull P businessInstance, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      replace in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
      Overrides:
      replace in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
    • delete

      public void delete(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      delete in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
      Overrides:
      delete in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
    • sendCatalogAccessPolicyModifiedEvent

      protected void sendCatalogAccessPolicyModifiedEvent(@NonNull P catalogAccessPolicy, @NonNull @NonNull String operationType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • getRepository

      protected CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
      Overrides:
      getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
    • getParser

      protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> getParser()
    • getCacheStateManager

      @Nullable protected com.broadleafcommerce.common.extension.cache.CacheStateManager getCacheStateManager()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getSender

      @Nullable protected com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender getSender()