C# Class 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.
Datei anzeigen Open project: maxpavlov/FlexNet Class Usage Examples

Public Methods

Method Description
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.

Method Details

AddToRepository() public static method

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.
return void

GetAllTags() public static method

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.
return List

GetNodeIds() public static method

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.
return List

GetNodeIds() public static method

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
return List

GetTagClasses() public static method

Gets the tag classes.
public static GetTagClasses ( ) : int>>.List
return int>>.List

GetTagClasses() public static method

Gets the tag classes.
public static GetTagClasses ( int top ) : int>>.List
top int Count of requested tags.
return int>>.List

GetTagClasses() public static method

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
return int>>.List

GetTagClasses() public static method

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.
return int>>.List

GetTagOccurrencies() public static method

Returns the occurrencies of every used tag.
public static GetTagOccurrencies ( ) : int>.Dictionary
return int>.Dictionary

GetTagOccurrencies() public static method

Gets the tag occurrencies.
public static GetTagOccurrencies ( string paths, string types ) : int>.Dictionary
paths string The paths.
types string The types.
return int>.Dictionary

IsBlacklisted() public static method

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.
return bool

IsInRepository() public static method

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.
return bool

ManageBlacklist() public static method

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.
return void

ReplaceTag() public static method

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.
return void

SynchronizeTags() public static method

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.
return void