[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public string GetProperties( ConnectionId connectionId, SessionId sessionId, CategoryId categoryId, string[] properties )
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 read properties for - properties
- Type: SystemString
An array of names of the properties to be read. These names are not case-sensitive.
Return Value
Type: StringXML with the returned properties as attributes.
<root> <status>0</status> <statustext>Success</statustext> <category PROPERTY="VALUE" /> </root>
The PROPERTY is the name of the property to read and the VALUE is the found value. You will find one attribute for each property you requested. The casing of these attribute names are identical to the casing of the passed in names and the attributes will be ordered in the same order as the order in the passed in list.
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database |
CSPermissionDeniedException | The caller has no permission to perform the requested action |
CSInvalidSessionException | The session is invalid |
CSInvalidParameterException | A parameter has an invalid value |
CSDocumentNotFoundException | The category could not be found |
SqlException | An error occurred when executing the command against the Content Studio database |
ArgumentNullException | properties parameter is null - or - one of the property names is null |
ArgumentOutOfRangeException | The properties parameter is an empty array |
This method was introduced in Content Studio version 5.2
Note |
---|
Internally, the properties are fetched by the use of a dynamically, parameterized sql query where all passed in property names are checked individually against the database. For this reason asking for a large number of properties can be time consuming and will result in many small database calls. For this reason you should try to limit the number of properties as much as possible. If you need to read a lot of properties consider using the GetItem(ConnectionId, SessionId, CategoryId) method instead. However, for a very limited number of properties this method can be very efficient. |
The following property names are available:
Name | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CategoryID | Integer: The numeric internal identifier of the category | ||||||||||||||||||
ModuleName | String: Indicates the type of document can be stored in the category For more information about this property, see the ModuleName property. | ||||||||||||||||||
CategoryName | String: the name of the category | ||||||||||||||||||
BodyProperties |
String: value that indicates the attribute content of the document's BODY tag. This value is applied to every document in the category unless there is a definition of BodyProperties for the document itself. This property is meaningful for categories with meta data only. | ||||||||||||||||||
StatusInt | Integer: A bit-masked value that indicates the status of the category. These flags can be a limited combination of the following hexadecimal values and meaning:
| ||||||||||||||||||
StatusText | String: The textual representation of the statusInt property. | ||||||||||||||||||
UnitID | Integer: The numerical identifier of the unit that stores this category | ||||||||||||||||||
EditTemplateID | Integer: An identifier to the documents that acts as EditTemplate of the category. For EPT documents categories only. | ||||||||||||||||||
StartID | Integer: Identifies the document that acts as default start document of the category. | ||||||||||||||||||
OwnerID | Integer: The identifier of a registered user that created the document. | ||||||||||||||||||
DefaultCacheDuration | Integer: Not used in Content Studio 5 | ||||||||||||||||||
DefaultFormID | Integer: A identifier to the document that acts as the template for documents in this category. | ||||||||||||||||||
ISPresentationTemplate | Boolean: Indicates that the category only can contain presentation templates. | ||||||||||||||||||
ISEditTemplate | Boolean: Indicates that the category only can contain editing templates. | ||||||||||||||||||
Encoding | String: The encoding used for documents in this category. | ||||||||||||||||||
ParentCategoryID | Integer: An identifier that defines the parent category of this category. For root categories this value points to the category itself. | ||||||||||||||||||
ImageProcessLevel | Integer: Used internally by the image processing module. | ||||||||||||||||||
ImageProcessData | String: Used internally by the image processing module. | ||||||||||||||||||
LanguageClass | Integer: Indicates that the category's MLC type.
| ||||||||||||||||||
MLCLanguageID | Integer: Indicates the MLC language of this category. | ||||||||||||||||||
MLCLanguageShortName |
String: Indicates the MLC language of this category. This value is empty for non MLC members. | ||||||||||||||||||
MLCLanguageName |
String: Indicates short form of the MLC language of this category. This value is empty for non MLC members. | ||||||||||||||||||
DocumentQuota | Integer: Defines the maximal number of documents that can be created in the category. The default value is zero (0) which indicates that no limit exists. Currently (version 5.2), Content Studio API has no write support for this column, however Content Studio honors this property if specified. | ||||||||||||||||||
Description | String: A brief description of this category. | ||||||||||||||||||
DocumentCounter | Integer: A value that increments with one for every new document created in the category | ||||||||||||||||||
UsePublishDate | Boolean: A value that indicates whether to use publish date information when listing documents. | ||||||||||||||||||
GUOID | String: An internal global unique object identifier of the category | ||||||||||||||||||
DocTypeID | Integer: For internal use only | ||||||||||||||||||
ServerSideValidation | Boolean: True (1) to use server side validation in EPT. For EPT document categories only. | ||||||||||||||||||
Hidden | Boolean: Not used | ||||||||||||||||||
UseMetaSecurity | Boolean: True (1) to indicate that EPT meta data security is enabled for this category | ||||||||||||||||||
CustomViewURL | String: A URL that defines the source code for a alternate view in the GUI of this category. | ||||||||||||||||||
AllowedFileTypes | String: A comma-separated list of file extensions that are allowed with this. | ||||||||||||||||||
MaxContentSize | Integer: defines the maximum content size of any document in the category. Zero (0) is no limit. Currently (version 5.2), Content Studio API has no write support for this column, however Content Studio honors this property if specified. | ||||||||||||||||||
DocumentFileNamingConvention |
Integer: A value that defines how Content Studio specifies file names for documents in this category. For more information on this value see the FolderBaseDocumentFileNamingConvention enumeration. | ||||||||||||||||||
FilePath |
String: The path of this category. The path is relative to the root. e.g. System/AS_Date |
Note |
---|
If you need to determine the type of documents that can be stored in the category you must analyze a combination of both the ModuleName and StatusInt properties. However, you should use the GetDocumentType(ConnectionId, SessionId, CategoryId) method instead which is much easier and safer to use. |
The following code snippet shows how to get some document properties for the category with id=4500
CategoryId catId = 4500; CategoryReader catReader = new DocumentReader(); string xml = catReader.GetProperties(CS_ConnectionId, CS_UserSessionId, catId, new string[2] {"CategoryName", "ParentCategoryID"}); //The following Xml is returned //<root> // <status>0</status> // <statustext>Success</statustext> // <category CategoryName="The category" // ParentCategoryID="3644" /> //</root> int ParentID = 0; string Name = String.Empty; //use an XmlReader to the the individual properties returned using (StringReader sr = new StringReader(xml)) { XmlReader XReader = XmlReader.Create(sr); if (XReader.ReadToFollowing("category")) { ParentID = Int32.Parse(XReader.GetAttribute("ParentCategoryID")); Name = XReader.GetAttribute("CategoryName"); } } //Write out the data to the web page Response.Write(String.Format("The category {0} has a parent with id {1}.", Name, ParentID));