Class SmartSearchManager
- Namespace
- Dynamicweb.SmartSearch
- Assembly
- Dynamicweb.SmartSearch.dll
Represents smart search manager
public class SmartSearchManager
- Inheritance
-
SmartSearchManager
- Inherited Members
Methods
CompareDataFields(SmartSearchRuleField, SmartSearchRuleField)
Compare data fields for sorting
public static int CompareDataFields(SmartSearchRuleField x, SmartSearchRuleField y)
Parameters
xSmartSearchRuleField- The first object to compare
ySmartSearchRuleField- The second object to compare
Returns
DeleteSmartSearch(Guid)
Deletes the smart search.
public static void DeleteSmartSearch(Guid id)
Parameters
idGuid- The ID.
GetAllDataProvidersInfo(bool)
Gets all data providers info.
public static Dictionary<string, string> GetAllDataProvidersInfo(bool isAutoTranslate = true)
Parameters
isAutoTranslatebool- if set to
trueis auto translate.
Returns
GetAllSmartSearches(bool, int)
Gets all smart searches.
public static SmartSearchCollection GetAllSmartSearches(bool hidden = false, int userId = -1)
Parameters
Returns
GetDataProviderDescription(string)
Gets the data provider description.
public static string GetDataProviderDescription(string providerTypeName)
Parameters
providerTypeNamestring- Name of the provider type.
Returns
GetDataProviderInstance<T>(string)
Gets the data provider instance.
public static SmartSearchDataProvider<T> GetDataProviderInstance<T>(string providerTypeName) where T : class
Parameters
providerTypeNamestring- Name of the provider type.
Returns
Type Parameters
T
GetDataProviderInstanceObject(string)
Gets the data provider instance object.
public static object GetDataProviderInstanceObject(string providerTypeName)
Parameters
providerTypeNamestring- Name of the provider type.
Returns
GetRulesConditionOptions(string)
Get the conditions for the provider
public static List<SmartSearchOperator> GetRulesConditionOptions(string dataProviderTypeName)
Parameters
dataProviderTypeNamestring- Data provider type name
Returns
GetSmartSearchById(Guid)
Gets the smart search by id.
public static SmartSearch GetSmartSearchById(Guid id)
Parameters
idGuid- The smart search ID.
Returns
GetSmartSearchesByDataProvider(string, bool, int)
Gets the smart searches by data provider.
public static SmartSearchCollection GetSmartSearchesByDataProvider(string dataProviderName, bool hidden = false, int userId = -1)
Parameters
dataProviderNamestring- Name of the data provider.
hiddenbool- if set to
truereturns hidden smart searches. userIdint- The user ID.
Returns
GetSmartSearchFileName(SmartSearch)
Gets the name of the smart search file.
public static string GetSmartSearchFileName(SmartSearch smartSearch)
Parameters
smartSearchSmartSearch- The smart search.
Returns
GetSmartSearchFileName(string)
Gets the name of the smart search file.
public static string GetSmartSearchFileName(string smartSearchName)
Parameters
smartSearchNamestring- Name of the smart search.
Returns
GetSortingDataFields(string)
Get data fields for sorting
public static List<SmartSearchRuleField> GetSortingDataFields(string dataProviderTypeName)
Parameters
dataProviderTypeNamestring- Data provider type name
Returns
GetUserProviderType()
Gets the type of the user provider.
public static Type GetUserProviderType()
Returns
InitCaches()
Initialize the caches for smart searches and data providers
public static void InitCaches()
IsUniqueSmartSearchFile(SmartSearch)
Determines whether is unique smart search file.
public static bool IsUniqueSmartSearchFile(SmartSearch smartSearch)
Parameters
smartSearchSmartSearch- The smart search.
Returns
- bool
trueis unique smart search file otherwise,false.
IsUniqueSmartSearchFile(SmartSearch, string)
Determines whether is unique smart search file.
public static bool IsUniqueSmartSearchFile(SmartSearch smartSearch, string folderPath)
Parameters
smartSearchSmartSearch- The smart search.
folderPathstring- The path to the folder to look, relative to the provider folder
Returns
- bool
trueis unique smart search file otherwise,false.
RemoveIllegalCharacters(string)
Removes illegal characters.
public static string RemoveIllegalCharacters(string fileName)
Parameters
fileNamestring- Name of the file.
Returns
SaveSmartSearch(SmartSearch)
Saves the smart search.
public static void SaveSmartSearch(SmartSearch smartSearch)
Parameters
smartSearchSmartSearch- The smart search instance.
SaveSmartSearch(SmartSearch, string)
Saves the smart search.
public static void SaveSmartSearch(SmartSearch smartSearch, string path)
Parameters
smartSearchSmartSearch- The smart search instance.
pathstring- The path