Class SearchManagerServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.SearchManagerServiceImpl
-
- All Implemented Interfaces:
SearchManagerService
@Service public class SearchManagerServiceImpl extends java.lang.Object implements SearchManagerService
-
-
Field Summary
Fields Modifier and Type Field Description private AccessManagementService
accessManagementService
private static com.fasterxml.jackson.databind.ObjectMapper
mapper
private org.springframework.data.mongodb.core.MongoTemplate
mongoTemplate
-
Constructor Summary
Constructors Constructor Description SearchManagerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<GroupFilter>
listFilters()
This method collects all the list filters from the vendor's listing IDjava.util.List<GroupFilter>
listFilterValues(java.lang.String filterId)
This method collects all values from filterGroupFilter
listingFeatureFromAttribute(java.lang.String filterId, java.lang.String sellerSkuId)
This method retrieves a feature for specific listingjava.util.List<GroupFilter>
logicalFilters()
This method collects all the boolean filters from the vendor's listing IDjava.util.List<GroupFilter>
numericFilters()
This method collects all the simple filters from the vendor's listing IDjava.util.List<GroupFilter>
numericFilterValues(java.lang.String filterId)
This method collects all values from filterjava.util.List<GroupFilter>
rangeFilters()
This method collects all the range filters from the vendor's listing IDjava.util.List<GroupFilter>
rangeFilterValues(java.lang.String filterId)
This method collects all values from filterco.mastermindcms.modules.beans.SearchResponse
search(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestAsMap)
This method does search requests and returns data as pages.private co.mastermindcms.modules.beans.SearchResponse
searchFull(co.mastermindcms.modules.beans.SearchRequest request)
private co.mastermindcms.modules.beans.SearchResponse
searchLimited(co.mastermindcms.modules.beans.SearchRequest request)
java.util.List<GroupFilter>
simpleFilters()
This method collects all the simple filters from the vendor's listing IDjava.util.List<GroupFilter>
simpleFilterValues(java.lang.String filterId)
This method collects all values from filterprivate java.lang.String
wrapQueryToMatchOperation(java.util.Map<java.lang.String,java.lang.Object> queryMap)
-
-
-
Field Detail
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
-
accessManagementService
@Autowired private AccessManagementService accessManagementService
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
search
public co.mastermindcms.modules.beans.SearchResponse search(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestAsMap)
Description copied from interface:SearchManagerService
This method does search requests and returns data as pages.- Specified by:
search
in interfaceSearchManagerService
- Parameters:
requestAsMap
- search request as map- Returns:
- database entities separated to pages
-
logicalFilters
public java.util.List<GroupFilter> logicalFilters()
Description copied from interface:SearchManagerService
This method collects all the boolean filters from the vendor's listing ID- Specified by:
logicalFilters
in interfaceSearchManagerService
- Returns:
- the collection of all logical filters
-
rangeFilters
public java.util.List<GroupFilter> rangeFilters()
Description copied from interface:SearchManagerService
This method collects all the range filters from the vendor's listing ID- Specified by:
rangeFilters
in interfaceSearchManagerService
- Returns:
- the collection of all range filters
-
simpleFilters
public java.util.List<GroupFilter> simpleFilters()
Description copied from interface:SearchManagerService
This method collects all the simple filters from the vendor's listing ID- Specified by:
simpleFilters
in interfaceSearchManagerService
- Returns:
- the collection of all simple filters
-
numericFilters
public java.util.List<GroupFilter> numericFilters()
Description copied from interface:SearchManagerService
This method collects all the simple filters from the vendor's listing ID- Specified by:
numericFilters
in interfaceSearchManagerService
- Returns:
- the collection of all simple filters
-
listFilters
public java.util.List<GroupFilter> listFilters()
Description copied from interface:SearchManagerService
This method collects all the list filters from the vendor's listing ID- Specified by:
listFilters
in interfaceSearchManagerService
- Returns:
- the collection of all list filters
-
rangeFilterValues
public java.util.List<GroupFilter> rangeFilterValues(java.lang.String filterId)
Description copied from interface:SearchManagerService
This method collects all values from filter- Specified by:
rangeFilterValues
in interfaceSearchManagerService
- Parameters:
filterId
- filter object identifier- Returns:
- the list of all filter values
-
listFilterValues
public java.util.List<GroupFilter> listFilterValues(java.lang.String filterId)
Description copied from interface:SearchManagerService
This method collects all values from filter- Specified by:
listFilterValues
in interfaceSearchManagerService
- Parameters:
filterId
- filter object identifier- Returns:
- the list of all filter values
-
simpleFilterValues
public java.util.List<GroupFilter> simpleFilterValues(java.lang.String filterId)
Description copied from interface:SearchManagerService
This method collects all values from filter- Specified by:
simpleFilterValues
in interfaceSearchManagerService
- Parameters:
filterId
- filter object identifier- Returns:
- the list of all filter values
-
numericFilterValues
public java.util.List<GroupFilter> numericFilterValues(java.lang.String filterId)
Description copied from interface:SearchManagerService
This method collects all values from filter- Specified by:
numericFilterValues
in interfaceSearchManagerService
- Parameters:
filterId
- filter object identifier- Returns:
- the list of all filter values
-
listingFeatureFromAttribute
public GroupFilter listingFeatureFromAttribute(java.lang.String filterId, java.lang.String sellerSkuId)
Description copied from interface:SearchManagerService
This method retrieves a feature for specific listing- Specified by:
listingFeatureFromAttribute
in interfaceSearchManagerService
- Parameters:
filterId
- filter identifiersellerSkuId
- listing identifier- Returns:
- the value of listing feature
-
searchFull
private co.mastermindcms.modules.beans.SearchResponse searchFull(co.mastermindcms.modules.beans.SearchRequest request)
-
searchLimited
private co.mastermindcms.modules.beans.SearchResponse searchLimited(co.mastermindcms.modules.beans.SearchRequest request)
-
wrapQueryToMatchOperation
private java.lang.String wrapQueryToMatchOperation(java.util.Map<java.lang.String,java.lang.Object> queryMap)
-
-