DocTypeManagerGetForObject Method (ConnectionId, SessionId, Int32, CSFileObjectTypes) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Returns the doctype in use by a either a document a category, unit or the site root.

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

public string GetForObject(
	ConnectionId connectionId,
	SessionId sessionId,
	int objectId,
	CSFileObjectTypes objectType


Type: ContentStudioConnectionId
A value that identifies the web site
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
Type: SystemInt32
An identifier to the object to return.
Type: ContentStudio.DocumentCSFileObjectTypes
The type of object indicated by the parameter.

Return Value

Type: String

   <status>0 </status>
      <doctype id="integer value" 
               inherited="bit value" 
               inheritedfrom="string value" 
               name="string value" 
               declaration="string value" />
/root/statusinteger valueindicates the outcome of the call, always 0 (meaning success)
/root/statustextstring valuethe textual representation of the outcome, always Success
/root/data/doctypeRoot element for the returned document type declaration
/root/data/doctype@idintegerthe id of the document type declaration
/root/data/doctype@inheritedbit (0 / 1)Indicates whether the document type declaration has been inherited from a parent object.
/root/data/doctype@inheritedfromstringWhen inherited; the name of the object that defines the doctype; otherwise, empty
/root/data/doctype@namestringthe name of the doc type e.g. XHTML 1.0 Transitional
/root/data/doctype@declarationstringThe actual document type declaration in use, e.g. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

Content Studio permissions

Read permission is required on the objects in question.

When objectId represents a document, the returned value is the doctype used by this document. For containers (categories, units and the site root) the returned value represents the doctype that containing documents will have.

A docType will be returned even if the document or category in question is of the binary type or any other type that does not generate metadata.
See Also