Class DefaultAdvancedTagService<P extends AdvancedTag>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.catalog.service.tag.DefaultAdvancedTagService<P>
All Implemented Interfaces:
AdvancedTagService<P>, com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>

public class DefaultAdvancedTagService<P extends AdvancedTag> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements AdvancedTagService<P>
Author:
Nathan Moore (nathandmoore)
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultAdvancedTagService(AdvancedTagRepository<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)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>
     
    protected AdvancedTagRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    Returns the name of the repository domain corresponding to the projection domain.
    readAllByIdIn(@NonNull Iterable<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the tags with matching ids.
    org.springframework.data.domain.Page<P>
    readAllByNameLike(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Read all tags filtered by name.
    readAllByPosition(String position, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the tags with matching position.
    readAllByType(String type, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the tags with matching type.
    readAllByTypeAndPosition(String type, String position, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the tags with matching type and position.
    readByNameExact(String name, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the tag by name, which should be unique.

    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, 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

    • DefaultAdvancedTagService

      public DefaultAdvancedTagService(AdvancedTagRepository<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)
  • Method Details

    • readByNameExact

      public Optional<P> readByNameExact(String name, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AdvancedTagService
      Finds the tag by name, which should be unique.
      Specified by:
      readByNameExact in interface AdvancedTagService<P extends AdvancedTag>
      Parameters:
      name - The name of the tag
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      The tag matching the name if any.
    • readAllByNameLike

      public org.springframework.data.domain.Page<P> readAllByNameLike(@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 contextInfo)
      Description copied from interface: AdvancedTagService
      Read all tags filtered by name.
      Specified by:
      readAllByNameLike in interface AdvancedTagService<P extends AdvancedTag>
      Parameters:
      name - The name to filter by
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      all tags filtered by name.
    • readAllByIdIn

      public List<P> readAllByIdIn(@NonNull @NonNull Iterable<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AdvancedTagService
      Reads all of the tags with matching ids.
      Specified by:
      readAllByIdIn in interface AdvancedTagService<P extends AdvancedTag>
      Parameters:
      ids - The ids to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the tags with matching ids.
    • readAllByPosition

      public List<P> readAllByPosition(String position, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AdvancedTagService
      Reads all of the tags with matching position.
      Specified by:
      readAllByPosition in interface AdvancedTagService<P extends AdvancedTag>
      Parameters:
      position - The position to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the tags with matching position.
    • readAllByType

      public List<P> readAllByType(String type, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AdvancedTagService
      Reads all of the tags with matching type.
      Specified by:
      readAllByType in interface AdvancedTagService<P extends AdvancedTag>
      Parameters:
      type - The position to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the tags with matching type.
    • readAllByTypeAndPosition

      public List<P> readAllByTypeAndPosition(String type, String position, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AdvancedTagService
      Reads all of the tags with matching type and position.
      Specified by:
      readAllByTypeAndPosition in interface AdvancedTagService<P extends AdvancedTag>
      Parameters:
      type - The position to match
      position - The position to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the tags with matching type and position.
    • getRepositoryDomain

      public String getRepositoryDomain()
      Description copied from interface: AdvancedTagService
      Returns the name of the repository domain corresponding to the projection domain.
      Specified by:
      getRepositoryDomain in interface AdvancedTagService<P extends AdvancedTag>
      Returns:
      The name of the repository domain corresponding to the projection domain.
    • getRepository

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

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