C# Класс SenseNet.Portal.Portlets.TagManager

TagManager class is for managing tags on contents with Lucene.Net accelleration. Implements back end for tag-related user controls and portlets.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddToRepository ( string tag, string path ) : void

Stores the given tag into the content repository as Tag node type.

GetAllTags ( string filter, List pathList ) : List

Returns all tags currently in use and containing the given string fragment.

GetNodeIds ( string tag ) : List

Returns the ID-s of Nodes, that contains the tag given as parameter.

GetNodeIds ( string tag, string searchPathArray, string contentTypeArray, string queryFilter = "" ) : List

Returns the ID-s of Nodes, that contains the tag given as parameter.

GetTagClasses ( ) : int>>.List

Gets the tag classes.

GetTagClasses ( int top ) : int>>.List

Gets the tag classes.

GetTagClasses ( string searchPaths, string contentTypes ) : int>>.List

Works like GetAllTags, but gives tag class (1-10) to tags, based on overall occurrencies. Used for TagCloud.

GetTagClasses ( string searchPaths, string contentTypes, int top ) : int>>.List

Gets the tag classes.

GetTagOccurrencies ( ) : int>.Dictionary

Returns the occurrencies of every used tag.

GetTagOccurrencies ( string paths, string types ) : int>.Dictionary

Gets the tag occurrencies.

IsBlacklisted ( string tag, List blacklistPaths ) : bool

Determines if the given tag is blacklisted or not.

IsInRepository ( string tag, string tagPath ) : bool

Determines if the tag given as parameter is presented in content repository or not.

ManageBlacklist ( bool add, int tagId, List pathList ) : void

Manages the blacklist.

ReplaceTag ( string tag, string newtag, List pathList ) : void

Replaces the given tag to the given new tag on every content in reppository. Also used for deleting tags, by calling with newtag = String.Empty parameter.

SynchronizeTags ( string tagPath, List searchPaths ) : void

Implements syncing between Lucene Index and Content Repository. - Cleans up not referenced tag Nodes (not used on any content) - Imports new tags which are not stored as Tag node in repository. - Optimizes Lucene Index for accurate search results.

Описание методов

AddToRepository() публичный статический Метод

Stores the given tag into the content repository as Tag node type.
public static AddToRepository ( string tag, string path ) : void
tag string Tag to store.
path string The folder path in repository, where you want to save the stored Tag node.
Результат void

GetAllTags() публичный статический Метод

Returns all tags currently in use and containing the given string fragment.
public static GetAllTags ( string filter, List pathList ) : List
filter string Filter string.
pathList List The path list.
Результат List

GetNodeIds() публичный статический Метод

Returns the ID-s of Nodes, that contains the tag given as parameter.
public static GetNodeIds ( string tag ) : List
tag string Searched tag as String.
Результат List

GetNodeIds() публичный статический Метод

Returns the ID-s of Nodes, that contains the tag given as parameter.
public static GetNodeIds ( string tag, string searchPathArray, string contentTypeArray, string queryFilter = "" ) : List
tag string Searched tag as String.
searchPathArray string Paths to search in.
contentTypeArray string Types to search.
queryFilter string
Результат List

GetTagClasses() публичный статический Метод

Gets the tag classes.
public static GetTagClasses ( ) : int>>.List
Результат int>>.List

GetTagClasses() публичный статический Метод

Gets the tag classes.
public static GetTagClasses ( int top ) : int>>.List
top int Count of requested tags.
Результат int>>.List

GetTagClasses() публичный статический Метод

Works like GetAllTags, but gives tag class (1-10) to tags, based on overall occurrencies. Used for TagCloud.
public static GetTagClasses ( string searchPaths, string contentTypes ) : int>>.List
searchPaths string
contentTypes string
Результат int>>.List

GetTagClasses() публичный статический Метод

Gets the tag classes.
public static GetTagClasses ( string searchPaths, string contentTypes, int top ) : int>>.List
searchPaths string The search paths.
contentTypes string The content types.
top int Count of requested tags.
Результат int>>.List

GetTagOccurrencies() публичный статический Метод

Returns the occurrencies of every used tag.
public static GetTagOccurrencies ( ) : int>.Dictionary
Результат int>.Dictionary

GetTagOccurrencies() публичный статический Метод

Gets the tag occurrencies.
public static GetTagOccurrencies ( string paths, string types ) : int>.Dictionary
paths string The paths.
types string The types.
Результат int>.Dictionary

IsBlacklisted() публичный статический Метод

Determines if the given tag is blacklisted or not.
public static IsBlacklisted ( string tag, List blacklistPaths ) : bool
tag string Tag to search on blacklist.
blacklistPaths List The blacklist paths.
Результат bool

IsInRepository() публичный статический Метод

Determines if the tag given as parameter is presented in content repository or not.
public static IsInRepository ( string tag, string tagPath ) : bool
tag string Tag to search.
tagPath string The tag path.
Результат bool

ManageBlacklist() публичный статический Метод

Manages the blacklist.
public static ManageBlacklist ( bool add, int tagId, List pathList ) : void
add bool if set to true [add to blacklist] else remove from it.
tagId int The tag id.
pathList List The blacklist path list.
Результат void

ReplaceTag() публичный статический Метод

Replaces the given tag to the given new tag on every content in reppository. Also used for deleting tags, by calling with newtag = String.Empty parameter.
public static ReplaceTag ( string tag, string newtag, List pathList ) : void
tag string Tag to replace.
newtag string Tag to replace with.
pathList List The path list.
Результат void

SynchronizeTags() публичный статический Метод

Implements syncing between Lucene Index and Content Repository. - Cleans up not referenced tag Nodes (not used on any content) - Imports new tags which are not stored as Tag node in repository. - Optimizes Lucene Index for accurate search results.
public static SynchronizeTags ( string tagPath, List searchPaths ) : void
tagPath string Repository path where to import new tags.
searchPaths List The search paths.
Результат void