Class DefaultSearchService
- java.lang.Object
-
- de.hybris.platform.cockpit.services.search.impl.DefaultSearchService
-
- All Implemented Interfaces:
SearchService
public class DefaultSearchService extends java.lang.Object implements SearchService
Default implementation ofSearchService
-
-
Constructor Summary
Constructors Constructor Description DefaultSearchService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchParameterDescriptorgetSearchDescriptor(PropertyDescriptor propDescr)Gets the search descriptor for the given property descriptorSearchParameterDescriptorcontains the list ofOperatorobjects.SearchParameterDescriptorgetSearchDescriptor(PropertyDescriptor propDescr, boolean simpleSearch)Gets the search descriptor for the given property descriptorSearchParameterDescriptorcontains the list ofOperatorobjects.SearchProvidergetSearchProvider()Gets the current search provider of the service implementation.SearchTypegetSearchType(ObjectTemplate objectTemplate)Gets the search type for the given object template.SearchTypegetSearchType(ObjectType objectType)Gets the search type for given object type.SearchTypegetSearchType(java.lang.String objectTemplateCode)Gets the search type for the given object template code.booleanisSortable(PropertyDescriptor propDescr)Checks if given property is sortable, so it can later be used to sort by.voidsetCockpitTypeService(TypeService typeService)voidsetSearchProvider(SearchProvider searchProvider)voidsetUiConfigurationService(UIConfigurationService uiConfigurationService)
-
-
-
Method Detail
-
getSearchType
public SearchType getSearchType(ObjectTemplate objectTemplate)
Description copied from interface:SearchServiceGets the search type for the given object template.- Specified by:
getSearchTypein interfaceSearchService- Parameters:
objectTemplate- the object template to look search type for- Returns:
- the search type found for the given object template
-
getSearchType
public SearchType getSearchType(ObjectType objectType)
Description copied from interface:SearchServiceGets the search type for given object type. Argument can also be already aSearchTypeand in this case it should be just returned.- Specified by:
getSearchTypein interfaceSearchService- Parameters:
objectType- the object type to look search type for- Returns:
- the search type found for the given argument
-
getSearchType
public SearchType getSearchType(java.lang.String objectTemplateCode)
Description copied from interface:SearchServiceGets the search type for the given object template code.- Specified by:
getSearchTypein interfaceSearchService- Parameters:
objectTemplateCode- the object template code to look search type for- Returns:
- the search type found for the given argument
-
setCockpitTypeService
public void setCockpitTypeService(TypeService typeService)
-
setUiConfigurationService
public void setUiConfigurationService(UIConfigurationService uiConfigurationService)
-
isSortable
public boolean isSortable(PropertyDescriptor propDescr)
Description copied from interface:SearchServiceChecks if given property is sortable, so it can later be used to sort by.- Specified by:
isSortablein interfaceSearchService- Parameters:
propDescr- the property descriptor to check for beeing sortable- Returns:
- true, if the given property is sortable
-
getSearchDescriptor
public SearchParameterDescriptor getSearchDescriptor(PropertyDescriptor propDescr)
Description copied from interface:SearchServiceGets the search descriptor for the given property descriptorSearchParameterDescriptorcontains the list ofOperatorobjects.- Specified by:
getSearchDescriptorin interfaceSearchService- Parameters:
propDescr- the property descriptor to create search parameter descriptor- Returns:
- the search descriptor created on given property descriptor
-
getSearchDescriptor
public SearchParameterDescriptor getSearchDescriptor(PropertyDescriptor propDescr, boolean simpleSearch)
Description copied from interface:SearchServiceGets the search descriptor for the given property descriptorSearchParameterDescriptorcontains the list ofOperatorobjects.- Specified by:
getSearchDescriptorin interfaceSearchService- Parameters:
propDescr- the property descriptor to create search parameter descriptorsimpleSearch- the simple search attribute that will be set on the result object- Returns:
- the search descriptor created on given arguments
-
setSearchProvider
public void setSearchProvider(SearchProvider searchProvider)
-
getSearchProvider
public SearchProvider getSearchProvider()
Description copied from interface:SearchServiceGets the current search provider of the service implementation. Search provider exposes a functionality we can use to perform required search operations.- Specified by:
getSearchProviderin interfaceSearchService- Returns:
- the current search provider implementation
-
-