CategoryReaderGetCategoryList Method (ConnectionId, SessionId, CategoryId, FolderReaderFolderSortOrder) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Returns a list of categories within another category. Subcontainers below the first level are excluded.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string GetCategoryList(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	FolderReaderFolderSortOrder sortOrder
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
categoryId
Type: ContentStudio.DocumentCategoryId
An identifier to a category whose child categories should be listed.
sortOrder
Type: ContentStudio.DocumentFolderReaderFolderSortOrder
One of the FolderReaderFolderSortOrder enumeration values that specifies how the list is sorted.

Return Value

Type: String
XML containing a list of categories.
<root>
    <status>Integer value</status>
    <statustext>String value</statustext>
    <recordcount>Integer value</recordcount>
    <parentid>Integer value</parentid>
    <module>String value</module>
    <location>String value</location>
    <customviewurl>String value</customviewurl>
    <documenttype>Integer value</documenttype>
    <documentfilenamingconvention>Integer value</documentfilenamingconvention>
    <categories>
        <category>
            <id>Integer value</id>
            <name>String value</name>
            <type>String value</type>
            <module>String value</module>
            <description>String value</description>
            <hasdirectace>Bit value</hasdirectace>
            <documenttype>String value</documenttype>
            <documentfilenamingconvention>Integer value</documentfilenamingconvention>
            <filepath>Integer value</filepath>
        </category> 
        <!-- more category element can follow -->
    </categories>
</root>

The elements have the following meaning

Xml description
ElementDescription
root/statusInteger: Indicates the outcome of the call, always 0 which indicates success
root/statustextString: The textual representation of the status, always OK
root/recordcountInteger: The number of records returned.
root/parentidInteger: The identifier of the parent of the container specified in categoryId.
root/moduleString: A value that indicates the type of category. This value cannot fully be used to determine the type of a category instead use the GetDocumentType(ConnectionId, SessionId, CategoryId) method or when possible the root/documenttype element value to determine the type of document a category can contain.
root/location The relative path name to the category referenced by categoryId (e.g. MyUnit/TheCategory).

This relative path is the path in the underlying file system which means that some of the special system folders are different from the path shown in Content Studio.

These are i version 5.1: Special category mappings
IdFolderMaps to
99System/AssembliesBin
98System/App_CodeApp_Code
97System/App_Code/CSCodeApp_Code/CSCode
96System/App_Code/VBCodeApp_Code/VBCode
95System/App_ThemesApp_Themes
94System/App_GlobalResourcesApp_GlobalResources
root/customviewurlString: The custom view url for the category represented by categoryId
root/documenttype The type of document that the category referenced by categoryId can contain. The value of this element is the numeric value of a member of the DocumentTypes enumeration.
root/documentfilenamingconventionA value that indicates how Content Studio determines the name of documents created in the category referenced by the categoryId parameter. The value of this element is the numeric value of a member of the FolderBaseDocumentFileNamingConvention enumeration.
root/categoriesRoot element for the list of categories
root/categories/categoryRoot element for a single found category. This element occurs once per found category.
root/categories/category/idInteger: The identifier of the category.
root/categories/category/nameString: The name of the category.
root/categories/category/typeThe type of container. This value is always 'C'
root/categories/category/moduleString: A value that indicates the type of category. This value cannot fully be used to determine the type of a category. Use the GetDocumentType(ConnectionId, SessionId, CategoryId) method or the root/categories/documenttype element value to determine the type of document a category can contain.
root/categories/category/descriptionString: A description of the category.
root/categories/category/hasdirectaceBit: A value that indicates whether the category has any direct ACE (Access control entry)
root/categories/documenttype The type of document that the category listed can contain. The value of this element is the numeric value of a member of the DocumentTypes enumeration.
root/categories/documentfilenamingconventionA value that indicates how Content Studio determines the name of documents created in the category listed. The value of this element is the numeric value of a member of the FolderBaseDocumentFileNamingConvention enumeration.
root/categories/category/filepath The relative path name to the category. See the root/location element comment for more information about this value.
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

READ permission on the category is required. CS 5.6 and later; Anonymous access supported
See Also

Reference