Content Studio Web Content Management System
SystemObject
ContentStudio.DocumentCSDocument
ContentStudio.DocumentCSDocumentInformation
ContentStudio.DocumentCSSyncronizedDocument
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Top
Top
Top
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.
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.
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.
[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
ContentStudio.DocumentCSDocument
ContentStudio.DocumentCSDocumentInformation
ContentStudio.DocumentCSSyncronizedDocument
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
The CSDocumentInformation type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CSDocumentInformation(ConnectionId, SessionId, DocumentId) |
Creates a new instance of the Document class, prepares for content to be loaded, but does not load any content.
| |
CSDocumentInformation(ConnectionId, SessionId, CategoryId, String) |
Creates a new instance of the CSDocumentInformation object that represents an empty document.
| |
CSDocumentInformation(ConnectionId, SessionId, DocumentId, CSDocumentInformationContentToLoad) |
Creates a new instance of the Document class and loads the content of a Content Studio document.
|
Properties
Name | Description | |
---|---|---|
AllowedFiletypes |
Gets the file extensions allowed for this document.
(Overrides CSDocumentAllowedFiletypes.) | |
ApprovedDate |
Gets a value that indicates when the most recent published version document published.
| |
Approver |
Gets the name of the person that published the most recent version of the document.
| |
ArchiveDate |
Gets a value that specifies the archive date of the document.
(Overrides CSDocumentArchiveDate.) | |
BodyProperties |
Gets a value that specifies the content of the document's BODY tag.
(Overrides CSDocumentBodyProperties.) | |
CanSetInitialPropertyValue |
Sets or gets a value that indicates whether initial document properties can be written or not.
| |
CanSetPropertyValue |
Sets or gets a value that indicates whether updatable properties can be written or not.
| |
CategoryID |
Gets that specifies the category of a document.
Default value is zero.
(Overrides CSDocumentCategoryID.) | |
CheckOutBy |
Gets a value that indicates the name of the person that has the document checked out.
| |
CheckOutById |
Gets a value that indicates the internal id of the caller that has checked out the document.
| |
ConnectionID |
Gets a value that identifies the web site.
| |
Content |
Gets a value that specifies the content to save.
(Overrides CSDocumentContent.) | |
ContentLoaded |
Gets a value that indicates what Content has been loaded.
| |
ContentType |
Gets the content type (Mime type) of a document.
(Overrides CSDocumentContentType.) | |
CreatedDate |
Gets a value that indicates when a document was created.
| |
CreatorName |
Gets the name of the person that created the document
| |
DocumentFileNamingConvention |
Gets the document filenaming convention.
(Overrides CSDocumentDocumentFileNamingConvention.) | |
DocumentID |
Gets a value that specifies the id of a document.
Default value is zero.
(Overrides CSDocumentDocumentID.) | |
DocumentName |
Gets a value that specifies the name of the document.
(Overrides CSDocumentDocumentName.) | |
DocumentType |
Gets a value that indicates the type of document loaded.
| |
EditTemplateId |
Gets a value that defines the Edit template in use by a Presentation template.
| |
Encoding |
Gets the document encoding.
(Overrides CSDocumentEncoding.) | |
ExistsDraft |
Gets a value indicating whether there is a draft content for this document.
| |
FileExtension |
Gets a value that specifies the file extension of the document.
(Overrides CSDocumentFileExtension.) | |
FileName |
Gets or sets a value that specifies the file name of a document.
(Overrides CSDocumentFileName.) | |
FileSize |
Gets a value that indicates the size (in bytes) of the document stored on disc.
| |
Guoid |
Gets a value that specifies a unique identifier from a copied document.
(Overrides CSDocumentGuoid.) | |
HeaderData |
Gets a value that indicates the header data.
(Overrides CSDocumentHeaderData.) | |
Introduction |
Gets a value that indicates the introduction content.
(Overrides CSDocumentIntroduction.) | |
IsApproved |
Gets a value that indicates whether the loaded content is approved (published) or not.
| |
IsCheckedOut |
Gets a value that indicates whether the document is checked out or not.
| |
IsCheckedOutByCaller |
Gets a value that indicates whether the document is checked out by the caller or not
| |
IsDataLoaded |
Gets a value that indicates whether data has been loaded from database or not.
| |
IsDeleted |
Gets a value that indicates whether the document is deleted (thrown in the recycling bin) or not.
| |
IsDirty |
Gets a value that specifies whether any updatable properties of the document has been changed.
(Inherited from CSDocument.) | |
IsLive |
Gets a value that indicates whether the document is published and exists in a "live" version.
| |
IsOnVersioning |
Gets a value that indicates whether the document is sent for versioning or not.
| |
IsRejected |
Gets a value that indicates whether the document has been sent for versioning and later rejected or not.
| |
Keywords |
Gets a value that indicates a list of keywords for the document.
(Overrides CSDocumentKeywords.) | |
LastCheckedOut |
Returns when the document was last checked out.
| |
Marking |
Gets a value that specifies a short description of the document.
(Overrides CSDocumentMarking.) | |
MaxContentSize |
Gets the maximum size of the content allowed.
(Overrides CSDocumentMaxContentSize.) | |
MenuData |
Gets a value that specifies a user defined data for menu items.
(Overrides CSDocumentMenuData.) | |
MenuTarget |
Gets a value that specifies the user defined target for menu items. Only applicable if the document acts as a menu node.
(Overrides CSDocumentMenuTarget.) | |
MenuURL |
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.) | |
MLCProperties |
Gets MLC information about the current document.
| |
ModifiedBy |
Gets the name of the person that made the last saved change of the document.
| |
ModifiedDate |
Gets a value that indicates when a document was modified.
| |
OrderInHierarchy |
Gets a value that specifies the order in a document hierarchy.
(Overrides CSDocumentOrderInHierarchy.) | |
ParentDocumentID |
Gets a value that specifies the parent document for a document
(Overrides CSDocumentParentDocumentID.) | |
PublishDate |
Gets a value that specifies the publish date of the document.
(Overrides CSDocumentPublishDate.) | |
Published |
Gets a value that specifies whether the document should be published or not.
(Overrides CSDocumentPublished.) | |
SessionID |
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
| |
VersionNumber |
Gets a value that indicates the versioning number of the most recent published version of the document
| |
VersoningStatus |
Gets a value that indicates the versioning status of the document
| |
VirtualPath |
Gets the virtual path of this document.
(Overrides CSDocumentVirtualPath.) |
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetImageSiblingFilenameFromOriginalFilename |
Gets the image sibling filename from original filename.
| |
GetType | (Inherited from Object.) | |
Load |
Loads data from the underlying database.
| |
MemberwiseClone | (Inherited from Object.) | |
SetDefault |
Resets all values to their default values.
(Overrides CSDocumentSetDefault.) | |
SetDirty |
Sets the IsDirty property to a new value.
(Inherited from CSDocument.) | |
SetDocumentId |
Sets the DocumentID property if un-assigned.
| |
ToString | (Inherited from Object.) |
Content Studio permissions
Remarks
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
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