CSDocumentInformation Class Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Defines a Content Studio document and its properties. This class provides an object oriented way of reading Content Studio document properties.
Inheritance Hierarchy

SystemObject
  ContentStudio.DocumentCSDocument
    ContentStudio.DocumentCSDocumentInformation
      ContentStudio.DocumentCSSyncronizedDocument

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

public class CSDocumentInformation : CSDocument

The CSDocumentInformation type exposes the following members.

Constructors

  NameDescription
Protected methodCSDocumentInformation(ConnectionId, SessionId, DocumentId)
Creates a new instance of the Document class, prepares for content to be loaded, but does not load any content.
Protected methodCSDocumentInformation(ConnectionId, SessionId, CategoryId, String)
Creates a new instance of the CSDocumentInformation object that represents an empty document.
Public methodCSDocumentInformation(ConnectionId, SessionId, DocumentId, CSDocumentInformationContentToLoad)
Creates a new instance of the Document class and loads the content of a Content Studio document.
Top
Properties

  NameDescription
Public propertyAllowedFiletypes
Gets the file extensions allowed for this document.
(Overrides CSDocumentAllowedFiletypes.)
Public propertyApprovedDate
Gets a value that indicates when the most recent published version document published.
Public propertyApprover
Gets the name of the person that published the most recent version of the document.
Public propertyArchiveDate
Gets a value that specifies the archive date of the document.
(Overrides CSDocumentArchiveDate.)
Public propertyBodyProperties
Gets a value that specifies the content of the document's BODY tag.
(Overrides CSDocumentBodyProperties.)
Protected propertyCanSetInitialPropertyValue
Sets or gets a value that indicates whether initial document properties can be written or not.
Protected propertyCanSetPropertyValue
Sets or gets a value that indicates whether updatable properties can be written or not.
Public propertyCategoryID
Gets that specifies the category of a document. Default value is zero.
(Overrides CSDocumentCategoryID.)
Public propertyCheckOutBy
Gets a value that indicates the name of the person that has the document checked out.
Public propertyCheckOutById
Gets a value that indicates the internal id of the caller that has checked out the document.
Public propertyConnectionID
Gets a value that identifies the web site.
Public propertyContent
Gets a value that specifies the content to save.
(Overrides CSDocumentContent.)
Public propertyContentLoaded
Gets a value that indicates what Content has been loaded.
Public propertyContentType
Gets the content type (Mime type) of a document.
(Overrides CSDocumentContentType.)
Public propertyCreatedDate
Gets a value that indicates when a document was created.
Public propertyCreatorName
Gets the name of the person that created the document
Public propertyDocumentFileNamingConvention
Gets the document filenaming convention.
(Overrides CSDocumentDocumentFileNamingConvention.)
Public propertyDocumentID
Gets a value that specifies the id of a document. Default value is zero.
(Overrides CSDocumentDocumentID.)
Public propertyDocumentName
Gets a value that specifies the name of the document.
(Overrides CSDocumentDocumentName.)
Public propertyDocumentType
Gets a value that indicates the type of document loaded.
Public propertyEditTemplateId
Gets a value that defines the Edit template in use by a Presentation template.
Public propertyEncoding
Gets the document encoding.
(Overrides CSDocumentEncoding.)
Public propertyExistsDraft
Gets a value indicating whether there is a draft content for this document.
Public propertyFileExtension
Gets a value that specifies the file extension of the document.
(Overrides CSDocumentFileExtension.)
Public propertyFileName
Gets or sets a value that specifies the file name of a document.
(Overrides CSDocumentFileName.)
Public propertyFileSize
Gets a value that indicates the size (in bytes) of the document stored on disc.
Public propertyGuoid
Gets a value that specifies a unique identifier from a copied document.
(Overrides CSDocumentGuoid.)
Public propertyHeaderData
Gets a value that indicates the header data.
(Overrides CSDocumentHeaderData.)
Public propertyIntroduction
Gets a value that indicates the introduction content.
(Overrides CSDocumentIntroduction.)
Public propertyIsApproved
Gets a value that indicates whether the loaded content is approved (published) or not.
Public propertyIsCheckedOut
Gets a value that indicates whether the document is checked out or not.
Public propertyIsCheckedOutByCaller
Gets a value that indicates whether the document is checked out by the caller or not
Public propertyIsDataLoaded
Gets a value that indicates whether data has been loaded from database or not.
Public propertyIsDeleted
Gets a value that indicates whether the document is deleted (thrown in the recycling bin) or not.
Public propertyIsDirty
Gets a value that specifies whether any updatable properties of the document has been changed.
(Inherited from CSDocument.)
Public propertyIsLive
Gets a value that indicates whether the document is published and exists in a "live" version.
Public propertyIsOnVersioning
Gets a value that indicates whether the document is sent for versioning or not.
Public propertyIsRejected
Gets a value that indicates whether the document has been sent for versioning and later rejected or not.
Public propertyKeywords
Gets a value that indicates a list of keywords for the document.
(Overrides CSDocumentKeywords.)
Public propertyLastCheckedOut
Returns when the document was last checked out.
Public propertyMarking
Gets a value that specifies a short description of the document.
(Overrides CSDocumentMarking.)
Public propertyMaxContentSize
Gets the maximum size of the content allowed.
(Overrides CSDocumentMaxContentSize.)
Public propertyMenuData
Gets a value that specifies a user defined data for menu items.
(Overrides CSDocumentMenuData.)
Public propertyMenuTarget
Gets a value that specifies the user defined target for menu items. Only applicable if the document acts as a menu node.
(Overrides CSDocumentMenuTarget.)
Public propertyMenuURL
Gets a value that specifies a user defined url data for menu items. Only applicable if the document acts as a menu node.
(Overrides CSDocumentMenuURL.)
Public propertyMLCProperties
Gets MLC information about the current document.
Public propertyModifiedBy
Gets the name of the person that made the last saved change of the document.
Public propertyModifiedDate
Gets a value that indicates when a document was modified.
Public propertyOrderInHierarchy
Gets a value that specifies the order in a document hierarchy.
(Overrides CSDocumentOrderInHierarchy.)
Public propertyParentDocumentID
Gets a value that specifies the parent document for a document
(Overrides CSDocumentParentDocumentID.)
Public propertyPublishDate
Gets a value that specifies the publish date of the document.
(Overrides CSDocumentPublishDate.)
Public propertyPublished
Gets a value that specifies whether the document should be published or not.
(Overrides CSDocumentPublished.)
Public propertySessionID
Gets a value that identifies the caller's session. This value typically is retrieved from a call to the OpenSession method of the AuthenticationBase class
Public propertyVersionNumber
Gets a value that indicates the versioning number of the most recent published version of the document
Public propertyVersoningStatus
Gets a value that indicates the versioning status of the document
Public propertyVirtualPath
Gets the virtual path of this document.
(Overrides CSDocumentVirtualPath.)
Top
Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodStatic memberGetImageSiblingFilenameFromOriginalFilename
Gets the image sibling filename from original filename.
Public methodGetType (Inherited from Object.)
Protected methodLoad
Loads data from the underlying database.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodSetDefault
Resets all values to their default values.
(Overrides CSDocumentSetDefault.)
Protected methodSetDirty
Sets the IsDirty property to a new value.
(Inherited from CSDocument.)
Protected methodSetDocumentId
Sets the DocumentID property if un-assigned.
Public methodToString (Inherited from Object.)
Top
Content Studio permissions

READ permission on the document is required regardless of the content loaded. In addition to this, BROWSE permission is required when the approved content is loaded.
Remarks

Programmers that want to be able to create or update documents can use the CSSyncronizedDocument class that directly inherits from CSDocumentInformation and adds editing capabilities.
On a web site, where the caller normally has only the BROWSE permission you can use the CSApprovedDocumentInformation class that is similar to the CSDocumentInformation class but requires less permissions and can only work with the approved version of the document.
Since the CSDocumentInformation class reads a lot of data if performance is important the DocumentReader.GetProperties method can be a good alternative since only the properties you really need will be loaded. However, DocumentReader.GetProperties cannot return any data that is connected to the content of the document.
Examples

The following sample code shows how you can use the CSDocumentInformation class to read an display some properties of the current document on a Content Studio page. The code writes a small table with some property names and their values.

try
{
   CSDocumentInformation docInfo = new CSDocumentInformation(CS_ConnectionId, 
                                                             CS_UserSessionId, 
                                                             CS_InsertedDocumentId, 
                                                             CSDocumentInformation.ContentToLoad.Approved);
   Response.Write("<table>");
   Response.Write("<tr><th>Property</th><th>Value</th></tr>");
   Response.Write("<tr><td>DocumentName:</td></tr><td>" + docInfo.DocumentName + "</td></tr>") ;
   Response.Write("<tr><td>Approved by:</td></tr><td>" + docInfo.Approver + "</td></tr>") ;
   Response.Write("<tr><td>Approved date:</td></tr><td>" + docInfo.ApprovedDate.ToString() + "</td></tr>") ;
   if(docInfo.IsCheckedOut)
      Response.Write("<tr><td>Checked out by:</td></tr><td>" + docInfo.CheckOutBy + "</td></tr>") ;
   else
      Response.Write("<tr><td>Checked out by:</td></tr><td>Not checked out</td></tr>") ;
   Response.Write("</table>");
}
catch(Exception ex)
{
    Response.Write("<b>Error reading document data: " + ex.Message + "</b>");
}
See Also

Reference