Class DefaultCancellationPolicyService<CP extends CancellationPolicy>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<CP>
com.broadleafcommerce.subscription.service.DefaultCancellationPolicyService<CP>
Type Parameters:
CP - an instance of CancellationPolicy
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<CP>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<CP>, CancellationPolicyService<CP>

public class DefaultCancellationPolicyService<CP extends CancellationPolicy> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<CP> implements CancellationPolicyService<CP>
Default implementation of CancellationPolicyService
Author:
karanjariwala
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultCancellationPolicyService(CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repo, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>
     
    protected CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    org.springframework.data.domain.Page<CP>
    readAllByName(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads a Page of CancellationPolicy for the given name and filters.
    readCancellationPolicyByName(@NonNull String name, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads a CancellationPolicy by its name.

    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, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getRepository, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, 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

    create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

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

    readAll, readAll, readAll, readAll
  • Constructor Details

    • DefaultCancellationPolicyService

      public DefaultCancellationPolicyService(CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repo, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
  • Method Details

    • readAllByName

      public org.springframework.data.domain.Page<CP> readAllByName(@Nullable String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CancellationPolicyService
      Reads a Page of CancellationPolicy for the given name and filters.
      Specified by:
      readAllByName in interface CancellationPolicyService<CP extends CancellationPolicy>
      Parameters:
      name - the name by which the CancellationPolicy is to be searched for.
      filters - additional filters to be applied for fetching the CancellationPolicies
      pageable - the requested page of results from the database
      contextInfo - context information around sandboxing and multitenant state
      Returns:
      A Page of CancellationPolicy
    • readCancellationPolicyByName

      public CP readCancellationPolicyByName(@NonNull @NonNull String name, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CancellationPolicyService
      Reads a CancellationPolicy by its name.
      Specified by:
      readCancellationPolicyByName in interface CancellationPolicyService<CP extends CancellationPolicy>
      Parameters:
      name - the name of the CancellationPolicy
      contextInfo - context information around sandboxing and multitenant state
      Returns:
      A CancellationPolicy that matches the name
    • getRepo

      protected CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepo()
    • getParser

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