ITaxonomyManager Interface Ingeniux CMS Content Store API

Represents the manager object that provides a means to query and manage Category Nodes collections. ITaxonomyManager also manages the associations between pages and categories.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 9.0.565.0 (9.0.565)
Syntax

public interface ITaxonomyManager : ITransactionalEntity, 
	IDisposable, ITaxonomyEvents

The ITaxonomyManager type exposes the following members.

Properties

  NameDescription
Public propertyContentStore
Gets the Content Store.
(Inherited from ITransactionalEntity.)
Public propertyCurrentLocale
Gets and sets the current operating locale. Category node instances created within the session use this locale as a CreationLocale. The [!:Ingeniux.CMS.ICategoryNode.Name], Description, TypeName updates depend on the current locale value to determine whether to update original values create translations under this locale.
Public propertyCurrentUser
Gets the Operating User for the Session .
(Inherited from ITransactionalEntity.)
Public propertySession
Gets the User Session that this manager instance was initiated from.
(Inherited from ITransactionalEntity.)
Top
Methods

  NameDescription
Public methodAssociate
Associates a Page with a given collection of Category Nodes.
Public methodCategories(String)
Gets Category Nodes by their unique IDs.
Public methodCategories(Int32, ILocale, String, Boolean, Int32, Int32)

Gets Category Nodes by initial characters in name, filtered by locale, in a paginated fashion.

This is the main way of searching for categories. By default, it returns all categories with all input parameters missing.

Public methodCategoriesByName
Gets Category Nodes by name, filtered by locale, in a paginated fashion.
Public methodCategoriesByNameCount
Gets the count of Category Nodes by name, filtered by locale.
Public methodCategoriesCount
Gets the count of all Category Nodes.
Public methodCategoriesCount(String, ILocale, Boolean)
Gets the count of Category Nodes by initial characters in name, filtered by locale.
Public methodCategoriesCreatedInLocaleCount
Gets the count of Category Nodes created under a specified locale.
Public methodCategoriesOnPage
Retrieves a paginated list of all the Category Nodes that are associated with a given Page.
Public methodCategoriesOnPageCount
Gets the count of Category Nodes that are asssociated with the specified Page.
Public methodCategory
Retrieves a Category Node by its unique ID.
Public methodCopyCategory
Copies a Category Node and its descendants, and places the copy as child or sibling of another Category Node.
Public methodCreateCategory
Creates a new Category Node under another Category Node.
Public methodCreateRootCategory
Creates a new Root Category Node.
Public methodDeepCloneT, TManager
Duplicates an object instance, not including its unique ID.
(Inherited from ITransactionalEntity.)
Public methodMoveCategory
Makes a Category Node a child or sibling of another Category Nodee, or turns it into a Root Node.
Public methodQuickWrite
Creates a temporary Write Session to quickly write something outside the current Session and transaction. This is a way to bypass the transaction and quickly put something into the content store.
(Inherited from ITransactionalEntity.)
Public methodRemoveCategory
Removes a Category Node from the content store. This also removes any associations this Category has with any Pages.
Public methodRootCategories
Returns a paginated list of root Category Node, which are nodes without parent.
Public methodRootCategoriesCount
Gets the count of all Root Categories.
Public methodSerialize
Returns the XML presentation of the Taxonomy Tree
Public methodCode exampleSerializeAssociations
Returns the XML presentation of taxonomy associations.
Public methodTranslatedCategoriesCount
Gets the count of Category Nodes that have a translation under any locale.
Public methodUnassociatePage
Clears all categorization from a Page .
Top
Events

  NameDescription
Public eventAfterCategoryDelete
This event is fired after a Category Node is deleted.
(Inherited from ITaxonomyEvents.)
Public eventBeforeCategoryDelete
This event is fired before a Category Node is deleted.
(Inherited from ITaxonomyEvents.)
Public eventCategoryCreated
This event is fired when a Category Node is created.
(Inherited from ITaxonomyEvents.)
Top
Remarks

Like all manager objects, instances of this manager are retrieved from an IUserSession object, and it only works within that session.

C#
using (IUserSession session = store.OpenReadSession(currentUser))
{
       ITaxonomyManage TaxonomyManager = session.TaxonomyManager;
       ...
}
Examples

Below is a serialization example that, except for the modification information in the root element, matches the TaxonomyTree.xml file from previous-generation CMS Sites:
<?xml version="1.0" encoding="UTF-8"?>
<Taxonomy>
  <Definitions>
    <Definition Description="The CategoryNode element tag" FullName="Category" TagName="C" />
    <Definition Description="The internal ID of the Category" FullName="ID" TagName="ID" />
    <Definition Description="The ID for the category that is imported form another source (Optional)" FullName="External ID" TagName="EID" />
    <Definition Description="The name of the Category" FullName="Name" TagName="N" />
    <Definition Description="The description of the category" FullName="Description" TagName="D" />
    <Definition Description="The name of classification type for this level of category node (Optional)" FullName="Classification Type" TagName="T" />
    <Definition Description="Last updated date" FullName="LastUpdatedDate" TagName="LUD" />
    <Definition Description="Last update user" FullName="LastUpdateUser" TagName="LUU" />
  </Definitions>
  <Tree>
    <C ID="Categories/128" N="News" D="News" EID="" T="" LUU="ingeniux\ashley" LUD="20081201T17:59:13">
      <C ID="Categories/142" N="Admissions" D="Admissions" EID="" T="" LUU="ingeniux\awang" LUD="20120330T09:53:41">
      </C>
      <C ID="Categories/187" N="Alumni" D="Alumni" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:53:58" />
    </C>
    <C ID="Categories/127" N="Departments" D="Departments" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:50:01">
      <C ID="Categories/137" N="Math" D="Math" EID="" T="" LUU="ingeniux\ashley" LUD="20091102T11:05:31" />
      <C ID="Categories/138" N="Biology" D="Biology" EID="" T="" LUU="ingeniux\neggen" LUD="20091203T07:11:40" />
      <C ID="Categories/151" N="Physics" D="Physics" EID="" T="" LUU="ingeniux\neggen" LUD="20091203T06:58:29" />
      <C ID="Categories/179" N="Business" D="Business" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:50:27" />
      <C ID="Categories/180" N="Chemistry" D="Chemistry" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:50:42" />
      <C ID="Categories/181" N="English" D="English" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:51:02" />
      <C ID="Categories/182" N="French" D="French" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:51:37" />
      <C ID="Categories/183" N="German" D="German" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:52:10" />
      <C ID="Categories/184" N="History" D="History" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:52:26" />
      <C ID="Categories/185" N="Medicine" D="Medicine" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:52:47" />
      <C ID="Categories/186" N="Spanish" D="Spanish" EID="" T="" LUU="ingeniux\awang" LUD="20100427T11:53:04" />
    </C>
  </Tree>
  <L10N>
    <C ID="Categories/128">
      <TR locale="es-mx" LUU="ingeniux\awang" LUD="20101025T14:23:34" N="Noticias" D="Noticias" T="" />
      <TR locale="zh-cn" LUU="ingeniux\awang" LUD="20130408T15:41:13" N="新闻" D="新闻" T="" />
    </C>
  </L10N>
  <Security />
  <SYN>
    <L loc="EN-US">
      <C ID="Categories/187">
        <S>Collegian</S>
      </C>
      <C ID="Categories/128">
        <S>Story</S>
        <S>Message</S>
        <S>Report</S>
      </C>
    </L>
    <L loc="ZH-CN">
      <C ID="128">
        <S>新消息</S>
        <S>新事件</S>
      </C>
    </L>
  </SYN>
</Taxonomy>
See Also

Reference