Class DefaultFieldDefinitionService<P extends com.broadleafcommerce.search.api.domain.FieldDefinition>

  • All Implemented Interfaces:
    com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>, FieldDefinitionService<P>

    public class DefaultFieldDefinitionService<P extends com.broadleafcommerce.search.api.domain.FieldDefinition>
    extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
    implements FieldDefinitionService<P>
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultFieldDefinitionService​(FieldDefinitionRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected FieldDefinitionRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()  
      String getRepositoryDomain()  
      org.springframework.data.domain.Page<P> readAllByLabel​(String label, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)  
      List<P> readAllFieldsById​(List<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)  
      List<P> readFieldsForIndexableType​(com.broadleafcommerce.search.api.type.IndexableType indexableType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Return all of the fields with the given type.
      • 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 interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

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

      • DefaultFieldDefinitionService

        public DefaultFieldDefinitionService​(FieldDefinitionRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository,
                                             com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper,
                                             com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
    • Method Detail

      • readAllByLabel

        public org.springframework.data.domain.Page<P> readAllByLabel​(@Nullable
                                                                      String label,
                                                                      @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:
        readAllByLabel in interface FieldDefinitionService<P extends com.broadleafcommerce.search.api.domain.FieldDefinition>
      • readFieldsForIndexableType

        public List<P> readFieldsForIndexableType​(com.broadleafcommerce.search.api.type.IndexableType indexableType,
                                                  @Nullable
                                                  com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Description copied from interface: FieldDefinitionService
        Return all of the fields with the given type.
        Specified by:
        readFieldsForIndexableType in interface FieldDefinitionService<P extends com.broadleafcommerce.search.api.domain.FieldDefinition>
        Parameters:
        indexableType - the type to search for
        contextInfo - The context information surrounding sandboxing/multitenant state
        Returns:
        the fields matching the given type
      • readAllFieldsById

        public List<P> readAllFieldsById​(List<String> ids,
                                         @Nullable
                                         com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Specified by:
        readAllFieldsById in interface FieldDefinitionService<P extends com.broadleafcommerce.search.api.domain.FieldDefinition>
      • getRepository

        protected FieldDefinitionRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
        Overrides:
        getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends com.broadleafcommerce.search.api.domain.FieldDefinition>