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

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

This class defines a collection of information/statistics properties for a document
Inheritance Hierarchy

SystemObject
  ContentStudio.DocumentDocumentStatistics

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

public sealed class DocumentStatistics : IEnumerable<KeyValuePair<string, string>>, 
	IEnumerable, IEqualityComparer<string>

The DocumentStatistics type exposes the following members.

Constructors

  NameDescription
Public methodDocumentStatistics
Constructs a new instance of the DocumentStatistics class that loads information about a document.
Top
Properties

  NameDescription
Public propertyApproveDate
Gets a date that indicates the when the document was approved.
Public propertyArchiveDate
Gets a date that indicates the when the document was archived.
Public propertyCategoryName
Gets category name of the document.
Public propertyCount
Returns the number of items in the collection of statistics data
Public propertyCreatedBy
Gets the name of the user that created the document
Public propertyCreatedByEmail
Gets the email address of the user created the document.
Public propertyCreatedById
Gets the internal id of the user that created the document.
Public propertyCreatedByUserdata Obsolete.
Gets xml containing information about the user that created the document.
Public propertyCreatedDate
Gets a DateTime that indicates when the document was created.
Public propertyDocumentId
Returns the identifier of the document
Public propertyDocumentName
Gets name of the document.
Public propertyDocumentUsage Obsolete.
Gets the number of document requests.
Public propertyItem
Gets the value of an named property.
Public propertyModuleName
Gets the type of document (module).
Public propertyPublishDate
Gets publish date of the document.
Public propertyRevision
Gets revision number of the current version of the document.
Public propertyRevisionCreatedDate
Gets a DateTime that indicates when the revisionwas created.
Public propertyUnitName
Gets unit name of the document.
Public propertyUpdatedBy
Gets the name of the user that most recently modified the document.
Public propertyUpdatedByEmail
Gets the email address of the user that most recently updated the document.
Public propertyUpdatedByUserdata Obsolete.
Gets xml containing information about the user that most recently updated the document
Public propertyUpdatedDate
Gets a DateTime that indicates when the document was updated.
Public propertyUsageDate Obsolete.
Gets the last usage date of the document
Top
Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Public methodExistsProperty
Gets a value that indicates whether a named property exists or not.
Public methodGetAttributeAsString
Checks if the given property exists and returns it as a String or returns null if non-existing
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Content Studio permissions

BROWSE permission on the object is required and anonymous callers are supported.
Remarks

  • In older versions of Content Studio it was possible to get document usage data using the document statics API. However, this functionality has been removed for performance reasons.
  • This class can only display information for the most recent published version of a document. If no published version of the document exists a ApplicationException is thrown.
Examples

The following examples demonstrates how to use the DocumentStatistics class from an ordinary document in Content Studio.

int DocumentId = 1;
DocumentStatistics docinf = new DocumentStatistics(CS_ConnectionId, CS_UserSessionId, DocumentId);
Response.Write("The document was last updated: " + docinf.UpdatedDate.ToString("g") + "<br/>");
//A second way of getting the same value
Response.Write("The document was last updated: " + DateTime.Parse(docinf["UpdatedDate"]).ToString("g") + "<br/>");
//Iterate through all of the properties and write out their names and values
//Note that all property names are returned in lower case when iterating through the collection
foreach(System.Collections.Generic.KeyValuePair<string, string> kvp in docinf)
{
   Response.Write("Property: " + kvp.Key + "\tValue: " + kvp.Value + "<br/>");
}
The code above writes out something like this on the Html page
The document was last updated: 2003-05-21 14:29:21
The document was last updated: 2003-05-21 14:29:21
Property: documentid Value: 1
Property: createddate Value: 2006-11-27T13:16:22
Property: updateddate Value: 2003-05-21T14:29:21
Property: createdby Value: <Content Studio runtime>
Property: createdbyid Value: 1
Property: updatedbyid Value: 1
Property: updatedby Value: <Content Studio runtime>
Property: updatedbyemail Value: 
Property: createdbyemail Value: 
Property: categoryname Value: AS_Date
Property: publishdate Value: 2003-05-21T14:29:00
Property: revision Value: 0
Property: unitname Value: System
Property: modulename Value: ActiveScripting
Property: documentname Value: Show date
Property: elementname Value: Show date
Property: revisiondate Value: 2003-05-21T14:29:21
See Also

Reference