DocumentBrowserGetDocumentItem Method Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Reads data about an element/document as a DocumentItemResult. This method is typically used on the website to translate a documentID to the corresponding file-path name.

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

public DocumentItemResult GetDocumentItem(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId,
	DocumentId presentationTemplateId,
	DateTime previewDate
)

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 typically is retrieved from a call to the OpenSession method
documentId
Type: ContentStudio.DocumentDocumentId
The document to read
presentationTemplateId
Type: ContentStudio.DocumentDocumentId
A presentation template used to present the data. If this parameter is zero and the document is an xml document the call will return the default presentation template.
previewDate
Type: SystemDateTime
A date used to look at the web page in time. Not supported with anonymous calls and requires WRITE permission. If you do not need this functionality pass MinValue in that case only limited data is returned.

Return Value

Type: DocumentItemResult
An DocumentItemResult object containing the result.
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
  • 1001 - The Session is invalid.
  • 1002 - Permission denied.
  • 1029 - The supplied Presentation Template could not be found, or is not a presentation template.
  • 1030 - The Presentation template could not be read, permission was denied.
  • 1031 - The Presentation template is not published.
  • 1804 - The document could not be found.
  • 1838 - The document is published.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

BROWSE permission on the document is required.
Remarks

The method takes into consideration the caller's permission and what date to view. If the caller is anonymous only documents that are published and not archived at the time the call is made will be found.

Note Note
To just translate between id, path, guoid or virtual path, Content Studio 5.2 and later can use the DocumentId object which performs these kind of operations more efficiently. However that object does not take any security or publishing data into consideration.

This method was introduced in Content Studio version 5.2

See Also

Reference