DocumentReaderGetDetails Method (ConnectionId, SessionId, DocumentId) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Gets detailed data for a Content Studio document including its source code content.

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

public string GetDetails(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId
)

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).
documentId
Type: ContentStudio.DocumentDocumentId
A value that identifies the document whose details should be displayed.

Return Value

Type: String
Xml
<root>
    <status>0</status>
    <statustext>Success</statustext>
    <document>
        <result>Integer value</result>
        <resulttext>String value</resulttext>
        <elementcreateddate></elementcreateddate>
        <publishdate>Date value</publishdate>
        <archivedate>Date value</archivedate>
        <introduction>String value</introduction>
        <elementorder>Integer value</elementorder>
        <elementimage>String value</elementimage>
        <elementtarget>String value</elementtarget>
        <elementurl>String value</elementurl>
        <elementname>String value</elementname>
        <filename>String value</filename>
        <marking>String value</marking>
        <content>String value</content>
        <revision>Integer value</revision>
        <revisiondate>Date value</revisiondate>
        <elementcreatedby>String value</elementcreatedby>
        <contentcreatedby>String value</contentcreatedby>
        <revisedby>String value</revisedby>
        <modifiedby>String value</modifiedby>
        <modifieddate>String value</modifieddate>
        <contentcreateddate></contentcreateddate>
        <categoryid>Integer value</categoryid>
        <revisionstatus>Integer value</revisionstatus>
        <publishstatus>Integer value</publishstatus>
        <ischeckedoutbyid>Integer value</ischeckedoutbyid>
        <ischeckedoutbycaller>Bit value</ischeckedoutbycaller>
        <lastcheckout>Date value</lastcheckout>
        <checkedoutbyname>String value</checkedoutbyname>
        <filesize>String value</filesize>
        <contenttype>String value</contenttype>
        <bodyproperties>String value</bodyproperties>
        <headerproperties>String value</headerproperties>
        <keywords>String value</keywords>
        <isapproved>Bit value</isapproved>
        <isactivated>Bit value</isactivated>
        <isdeleted>Bit value</isdeleted>
        <isrejected>Bit value</isrejected>
        <isonrevision>Bit value</isonrevision>
        <isedittemplate>Bit value</isedittemplate>
        <ispresentationtemplate>Bit value</ispresentationtemplate>
        <sourcecodepreservation>Bit value</sourcecodepreservation>
        <documentusage>Integer value</documentusage>
        <lastused>Date value</lastused>
        <etforptid>Integer value</etforptid>
        <parentelementid>Integer value</parentelementid>
        <modulename>String value</modulename>
        <elementid>Integer value</elementid>
        <imagesavailable>Integer value</imagesavailable>
        <documentnr>Integer value</documentnr>
        <guoid>String value</guoid>
        <allowedfiletypes>String value</allowedfiletypes>
        <maxcontentsize>Integer value</maxcontentsize>
        <virtualpath>String value</virtualpath>
        <encoding>String value</encoding>
        <documentfilenamingconvention>Integer value</documentfilenamingconvention>
        <documentstatus>Integer value</documentstatus>
        <contentstatus>Integer value</contentstatus>
        <undelete_information 
           categoryid="Integer value"
           parentelementid="Integer value"
           filename="String value"
           virtualpath="String value"
        />
    </document>
</root>

Field specifications:

Returned fields
Element path nameValueDescription
root/status0Indicating the outcome of the call. Always 0 (zero)
root/statustextSuccessIndicating the textual outcome of the call. Always "Success"
root/documentThe document root node
root/document/result0Indicating the outcome of the call. Always 0 (zero)
root/document/resulttextSuccessIndicating the textual outcome of the call. Always "Success"
root/document/elementcreateddateDate valueThe date and time when the document was created.
root/document/publishdateDate valueThe date and time value specifying when the document is published.
root/document/archivedateDate valueThe date and time value specifying when the document is archived. Empty or missing indicating that there is no archive date.
root/document/introductionString valueIntroduction data
root/document/elementorderInteger valueThe order of the document within an hierarchy. Default is zero which means that Content Studio determines the sorting order.
root/document/elementimageString valueExtra data used when the document acts as a menu item.
root/document/elementtargetString valueExtra target data used when the document acts as a menu item.
root/document/elementurlString valueExtra url (link) data used when the document acts as a menu item.
root/document/elementnameString valueThe name (title) of the document.
root/document/filenameString valueThe name of the file that represents the document on disc.
root/document/markingString valueShort string data that can be used in the admin interface to categorize the document.
root/document/contentString valueThe content (source code) of the document. This is not the same as the content stored on disc. Not used with binary documents.
root/document/revisionInteger valueThe version number. The draft always has zero (0) as version number.
root/document/revisiondateDate valueA date and time value indicating when the version was approved.
root/document/elementcreatedbyString valueThe name of the user that created the document.
root/document/contentcreatedbyString valueThe name of the user that created the content loaded.
root/document/revisedbyString valueThe name of the user that approved the content.
root/document/modifiedbyString valueThe name of the user that last modified the document.
root/document/modifieddateString valueA date and time value indicating when the document last was modified.
root/document/contentcreateddateDate valueA date and time value indicating when the content loaded was created.
root/document/categoryidInteger valueThe document's category identifier.
root/document/revisionstatusInteger valueSee section below for details.
root/document/publishstatusInteger valueSee section below for details.
root/document/ischeckedoutbyidInteger valueThe internal identifier of the user that has the document checked out, or 0.
root/document/ischeckedoutbycallerBit value1 if the caller has the document checked out; otherwise, 0 (zero).
root/document/lastcheckoutDate valueA date and time value indicating when the document was checked out, or 0 (zero).
root/document/checkedoutbynameString valueThe name of the user that has the document checked out, or empty
root/document/filesizeString valueThe size (in bytes) of the document stored on disc.
root/document/contenttypeString valueThe content type (mime type) of the document.
root/document/bodypropertiesString valueThe content of the document's body tag. For documents with meta data only; otherwise, empty.
root/document/headerpropertiesString valueThe content of the document's header section. For documents with meta data only; otherwise, empty.
root/document/keywordsString valueSearchable keywords associated with the document.
root/document/isapprovedBit value1 if the document is approved; otherwise 0 (zero).
root/document/isactivatedBoolean value1 if the document is activated and can be shown; otherwise 0 (zero). If this value is not set the document is withdrawn.
root/document/isdeletedBoolean value1 if the document is deleted; otherwise 0 (zero).
root/document/isrejectedBoolean value1 if the document is rejected; otherwise 0 (zero).
root/document/isonrevisionBoolean value1 if the document is on versioning; otherwise 0 (zero).
root/document/isedittemplateBoolean value1 if the document is an edit template; otherwise 0 (zero).
root/document/ispresentationtemplateBoolean value1 if the document is an edit template; otherwise 0 (zero).
root/document/sourcecodepreservationBoolean value1 if the document uses source code preservation; otherwise 0 (zero).
root/document/documentusageInteger valueNot used in CS 5.
root/document/lastusedDate valueNot used in CS 5.
root/document/etforptidInteger valueThe identifier of the edit template for the presentation template; otherwise 0.
root/document/parentelementidInteger valueThe document acting as parent document for the document, or the documentid if the document has no parent.
root/document/modulenameString valueA value that is used to determine the type of document.
root/document/elementidInteger valueThe document id.
root/document/imagesavailableInteger valueA value defines types of image processing version that exists for an image file. For more information see the ImagesAvailable enumeration
root/document/documentnrInteger valueA number that defines the creation order of a document within its category.
root/document/guoidString valueThe document's Global unique object identifier, Guoid.
root/document/allowedfiletypesString valueThe file extensions allowed for this document. The value is a comma separated list of file extension e.g. ".aspx,.asmx", or empty. The first file extension is the default file extension.
root/document/maxcontentsizeInteger valueA value that limits the size of the content allowed for the document; 0 (zero) to indicate no limit. When the content limit has been reached an error is thrown when the document is updated.
root/document/virtualpathString valueThe virtual path of the document.
root/document/encodingString valueThe document encoding.
root/document/documentfilenamingconventionIntegerA value that specifies DocumentFileNamingConvention value.
root/document/documentstatusIntegerThe status of the document. This is a bitmasked value. Added in version 5.4
root/document/contentstatusIntegerThe status of the content read. This is a bitmasked value. Added in version 5.4
root/document/undelete_informationAvaliable for deleted documents only. Added in version 5.7
root/document/undelete_information@categoryidIntegerThe id of the original category of the document before it was moved to the recycle bin
root/document/undelete_information@filenameStringThe name of the original pathname of the document before it was moved to the recycle bin
root/document/undelete_information@parentelementidIntegerThe id of the original parent element of the document before it was moved to the recycle bin
root/document/undelete_information@virtualpathStringThe id of the original virtual of the document before it was moved to the recycle bin

The revisionstatus element can have one of the following values and meaning.

Possible values of the revision status element
ValueNameDescription
0NoneThe document has only a draft and is not deleted and has not been subject to version.
1RejectedThe document was on versioning but was rejected.
2VersioningThe document is on versioning
3DeletedThe document is deleted
4ApprovedThe document is approved.

The publishstatus element which is defined in the PublishStatuses enumeration, can have one of the following values and meaning.

ValueNameDescription
0DraftOnlyThe document exists only as a draft.
5ExpiredThe document has expired.
3InRecyclingBinThe document is in the Recycling bin.
2PublishedThe document is published.
1QueuedThe document is waiting to be published.
6WithdrawnThe document is withdrawn.

The documentstatus element can have one of the following bit-values and meaning.

ValueDescription
0x00000001Can be published
0x00000020Is in the recycling bin
0x00000080Workflow: for authoring
0x00000100Workflow: authored
0x00000200Draft exists
0x00000800Is on workflow / versioning
0x00004000Has been rejected
0x00040000Is an edit template
0x00080000Is a presentation template
0x00200000Recently approved (for subscription services only)
0x00400000Workflow: is for review
0x00800000Workflow: has been reviewed
0x01000000Workflow: for approval
0x02000000Workflow: rejected by workflow server

The contentstatus element can have one of the following bit-values and meaning.

ValueDescription
0x00000000Draft
0x00000001Approved
Exceptions

ExceptionCondition
CSDocumentNotFoundException1804 - The document could not be found. In version 5.4 this exception replaces the general CSException
CSInvalidSessionExceptionSession is invalid. In version 5.4 this exception replaces the general CSException
CSPermissionDeniedExceptionPermission denied. In version 5.4 this exception replaces the general CSException
CSException
  • 1001 - Session is invalid
  • 1002 - Permission denied
  • 1804 - The document could not be found.
  • 1828 - The caller requested the editable content but an approved read-only content was returned instead. This is not necessarily an error - it indicates that there is no draft at the moment. When the document later is checked out the draft will be created from the last approved, read-only content.

Starting with version 5.4 the errors 1001, 1002 and 1804 are thrown as their more specific representations.

SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

READ permission is required on the document.
Remarks

This overloaded implementation returns the draft. If no draft exists the currently approved content is returned.
See Also

Reference