Table of Contents

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

x SmartSearchRuleField
The first object to compare
y SmartSearchRuleField
The second object to compare

Returns

int

DeleteSmartSearch(Guid)

Deletes the smart search.
public static void DeleteSmartSearch(Guid id)

Parameters

id Guid
The ID.

GetAllDataProvidersInfo(bool)

Gets all data providers info.
public static Dictionary<string, string> GetAllDataProvidersInfo(bool isAutoTranslate = true)

Parameters

isAutoTranslate bool
if set to true is auto translate.

Returns

Dictionary<string, string>

GetAllSmartSearches(bool, int)

Gets all smart searches.
public static SmartSearchCollection GetAllSmartSearches(bool hidden = false, int userId = -1)

Parameters

hidden bool
if set to true returns hidden smart searches.
userId int
The user ID.

Returns

SmartSearchCollection

GetDataProviderDescription(string)

Gets the data provider description.
public static string GetDataProviderDescription(string providerTypeName)

Parameters

providerTypeName string
Name of the provider type.

Returns

string

GetDataProviderInstance<T>(string)

Gets the data provider instance.
public static SmartSearchDataProvider<T> GetDataProviderInstance<T>(string providerTypeName) where T : class

Parameters

providerTypeName string
Name of the provider type.

Returns

SmartSearchDataProvider<T>

Type Parameters

T

GetDataProviderInstanceObject(string)

Gets the data provider instance object.
public static object GetDataProviderInstanceObject(string providerTypeName)

Parameters

providerTypeName string
Name of the provider type.

Returns

object

GetRulesConditionOptions(string)

Get the conditions for the provider
public static List<SmartSearchOperator> GetRulesConditionOptions(string dataProviderTypeName)

Parameters

dataProviderTypeName string
Data provider type name

Returns

List<SmartSearchOperator>

GetSmartSearchById(Guid)

Gets the smart search by id.
public static SmartSearch GetSmartSearchById(Guid id)

Parameters

id Guid
The smart search ID.

Returns

SmartSearch

GetSmartSearchesByDataProvider(string, bool, int)

Gets the smart searches by data provider.
public static SmartSearchCollection GetSmartSearchesByDataProvider(string dataProviderName, bool hidden = false, int userId = -1)

Parameters

dataProviderName string
Name of the data provider.
hidden bool
if set to true returns hidden smart searches.
userId int
The user ID.

Returns

SmartSearchCollection

GetSmartSearchFileName(SmartSearch)

Gets the name of the smart search file.
public static string GetSmartSearchFileName(SmartSearch smartSearch)

Parameters

smartSearch SmartSearch
The smart search.

Returns

string

GetSmartSearchFileName(string)

Gets the name of the smart search file.
public static string GetSmartSearchFileName(string smartSearchName)

Parameters

smartSearchName string
Name of the smart search.

Returns

string

GetSortingDataFields(string)

Get data fields for sorting
public static List<SmartSearchRuleField> GetSortingDataFields(string dataProviderTypeName)

Parameters

dataProviderTypeName string
Data provider type name

Returns

List<SmartSearchRuleField>

GetUserProviderType()

Gets the type of the user provider.
public static Type GetUserProviderType()

Returns

Type

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

smartSearch SmartSearch
The smart search.

Returns

bool
true is 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

smartSearch SmartSearch
The smart search.
folderPath string
The path to the folder to look, relative to the provider folder

Returns

bool
true is unique smart search file otherwise, false.

RemoveIllegalCharacters(string)

Removes illegal characters.
public static string RemoveIllegalCharacters(string fileName)

Parameters

fileName string
Name of the file.

Returns

string

SaveSmartSearch(SmartSearch)

Saves the smart search.
public static void SaveSmartSearch(SmartSearch smartSearch)

Parameters

smartSearch SmartSearch
The smart search instance.

SaveSmartSearch(SmartSearch, string)

Saves the smart search.
public static void SaveSmartSearch(SmartSearch smartSearch, string path)

Parameters

smartSearch SmartSearch
The smart search instance.
path string
The path
To top