CategoryManagerSave Method (ConnectionId, SessionId, CategoryId, DocumentTypes, Boolean, Boolean, DocumentId, DocumentId, String, String, CategoryManagerUseMetaSecurity, DocumentId, String, NullableInt32, String, FolderBaseDocumentFileNamingConvention) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Saves a category

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

public void Save(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	DocumentTypes documentType,
	bool searchable,
	bool useServersideValidation,
	DocumentId startDocumentId,
	DocumentId defaultTemplateId,
	string bodyProperties,
	string description,
	CategoryManagerUseMetaSecurity useMetaSecurity,
	DocumentId editTemplateId,
	string customViewUrl,
	Nullable<int> maxContentSize,
	string[] allowedFileTypes,
	FolderBaseDocumentFileNamingConvention namingConvention
)

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
The category to save
documentType
Type: ContentStudio.DocumentDocumentTypes
The document type of the category. Document types can be saved but this is generally not recommended. If you set the document type to None the document type will not be changed.
searchable
Type: SystemBoolean
Indicates that the category can be used in unit-wide full-text search operations.
useServersideValidation
Type: SystemBoolean
Set this parameter to true to use the built in server side validation of EPT-data.
startDocumentId
Type: ContentStudio.DocumentDocumentId
The document that is used as start document of the Category. This parameter can be zero to remove the start document or -1 to ignore updates of this value.
defaultTemplateId
Type: ContentStudio.DocumentDocumentId
This is the template document that acts as the default template of the category. This must be an existing document template document. This parameter can be zero to remove the default template or -1 to ignore updates of this value.
bodyProperties
Type: SystemString
Data that will be placed in the body tag of the containing documents. The parameter cannot exceed MAX_BODYPROPERTIES_SIZE characters in length but can be null to ignore updates of this data.
description
Type: SystemString
A short string description of the category. This parameter cannot exceed MAX_DESCRIPTION_SIZE characters in length.
useMetaSecurity
Type: ContentStudio.DocumentCategoryManagerUseMetaSecurity
Set to true to use meta data security with this category. False turns off this functionality
editTemplateId
Type: ContentStudio.DocumentDocumentId
If the document is an ept-document then you can set this to an edit template document id. Otherwise set to 0.
customViewUrl
Type: SystemString
Defines a custom view to use in cs-admin
maxContentSize
Type: SystemNullableInt32
Defines (in bytes) the maximum allowed content size of a document, zero indicates no limit. Pass null to keep the current value. This parameter cannot be negative.
allowedFileTypes
Type: SystemString
Defines an array of file extensions that can be used for documents in this category. The file extension must start with a period (.). Use the value *. to allow any file extension. If any of the entries contains .* all other items will be discarded. This parameter can be null (Nothing in Visual Basic) to keep the current value. This parameter cannot be an empty array and at least one array member must contain a valid file extension or be empty. Internally this array is joined to a comma delimited string of file extensions and the size of this internal value cannot exceed MAX_ALLOWED_FILETYPES_SIZE number of characters, thus always keep in mind the extra comma added to each file extension when checking the text length of all elements in the array.
For categories that stores EPT documents, this value is always set to a hard coded value since only the .xml and .ept extensions are allowed.
namingConvention
Type: ContentStudio.DocumentFolderBaseDocumentFileNamingConvention
Tells how CS should name the file name for documents in the category.
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
ArgumentOutOfRangeExceptionA value was passed in that lies outside of the acceptable data range.
Content Studio permissions

Write container permission on the category is required to update a category.
Remarks

This method was introduced in Content Studio version 5.1
See Also

Reference