Content Studio Web Content Management System
SystemObject
ContentStudio.DocumentDocumentStatistics
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Top
Top
Top
BROWSE permission on the object is required and anonymous callers are supported.
The following examples demonstrates how to use the DocumentStatistics class from an ordinary document in Content Studio.
[This is preliminary documentation and is subject to change.]
This class defines a collection of information/statistics properties for a document
Inheritance Hierarchy
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
Name | Description | |
---|---|---|
DocumentStatistics |
Constructs a new instance of the DocumentStatistics class that loads information about a document.
|
Properties
Name | Description | |
---|---|---|
ApproveDate |
Gets a date that indicates the when the document was approved.
| |
ArchiveDate |
Gets a date that indicates the when the document was archived.
| |
CategoryName |
Gets category name of the document.
| |
Count |
Returns the number of items in the collection of statistics data
| |
CreatedBy |
Gets the name of the user that created the document
| |
CreatedByEmail |
Gets the email address of the user created the document.
| |
CreatedById |
Gets the internal id of the user that created the document.
| |
CreatedByUserdata | Obsolete.
Gets xml containing information about the user that created the document.
| |
CreatedDate |
Gets a DateTime that indicates when the document was created.
| |
DocumentId |
Returns the identifier of the document
| |
DocumentName |
Gets name of the document.
| |
DocumentUsage | Obsolete.
Gets the number of document requests.
| |
Item |
Gets the value of an named property.
| |
ModuleName |
Gets the type of document (module).
| |
PublishDate |
Gets publish date of the document.
| |
Revision |
Gets revision number of the current version of the document.
| |
RevisionCreatedDate |
Gets a DateTime that indicates when the revisionwas created.
| |
UnitName |
Gets unit name of the document.
| |
UpdatedBy |
Gets the name of the user that most recently modified the document.
| |
UpdatedByEmail |
Gets the email address of the user that most recently updated the document.
| |
UpdatedByUserdata | Obsolete.
Gets xml containing information about the user that most recently updated the document
| |
UpdatedDate |
Gets a DateTime that indicates when the document was updated.
| |
UsageDate | Obsolete.
Gets the last usage date of the document
|
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
ExistsProperty |
Gets a value that indicates whether a named property exists or not.
| |
GetAttributeAsString |
Checks if the given property exists and returns it as a String or returns null if non-existing
| |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Content Studio permissions
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
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