[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public string GetDocumentsInCategory( ConnectionId connectionId, SessionId sessionId, DocumentReaderDocumentsInCategoryReturnLevel returnLevel, CategoryId categoryId, DocumentId currentId, DocumentReaderDocumentListFilters filterCriteria, DocumentReaderDocumentListSortOrder sortOrder, int pageSize, string[] fileTypes, ref int pageNumber, out int pageCount, out int recordCount )
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 usually originates from a call to OpenSession(ConnectionId). - returnLevel
- Type: ContentStudio.DocumentDocumentReaderDocumentsInCategoryReturnLevel
Determines how detailed return data to return. - categoryId
- Type: ContentStudio.DocumentCategoryId
An identifier to the category to list from. When currentId is specified and the document exists and for documents in the recycling bin, this parameter is ignored. - currentId
- Type: ContentStudio.DocumentDocumentId
An identifier to a document that should be included in the returned page. This parameter can be zero to ignore this functionality. Specifying this value to an existing document, will cause the pageNumber and categoryId parameters to be ignored on input. Instead the call searches the category where currentId belongs, applies the filter on that category and returns the data page where currentId fits in. - filterCriteria
- Type: ContentStudio.DocumentDocumentReaderDocumentListFilters
A member of the DocumentReaderDocumentListFilters enumeration that specifies which documents to return. - sortOrder
- Type: ContentStudio.DocumentDocumentReaderDocumentListSortOrder
A member in the DocumentListSortOrder enumeration that specifies the sort order of the list. - pageSize
- Type: SystemInt32
The size of the pageing to use. If this value is zero or negative 1 is used. - fileTypes
- Type: SystemString
Defines an array of file extensions that can be used for filter documents in this category. The file extension must start with a period (.). Use the value *. to allow any file extension. If any of the entries contains .* all other items will be discarded. This parameter can be an empty array. This parameter can be null (Nothing in Visual Basic) to use the default value (.*). Internally this array is joined to a comma delimited string of file extensions and the size of this inter value cannot exceed MAX_ALLOWED_FILETYPES_SIZE number of characters, thus always keep in mind the extra comma added to each file extension when checking the text length of all elements in the array. - pageNumber
- Type: SystemInt32
The page to return. If currentId is specified the input of this value is ignored but after the call the parameter is filled with the number of the page actually returned. - pageCount
- Type: SystemInt32
Returns the number of pages found - recordCount
- Type: SystemInt32
Returns the number of records found.
Return Value
Type: StringXml with the following syntax when full return level is specified.
<root> <status>0</status> <statustext>Success</statustext> <pageno>1</pageno> <pagecount>1</pagecount> <recordcount>1</recordcount> <unitid>40</unitid> <parentid>561</parentid> <module>Dokument</module> <location>MyUnit/HTML/</location> <categoryid>561</categoryid> <isenabledforpdf>0</isenabledforpdf> <documents> <document publishstatus="2" id="4420" name="HelloCS5" type="text/html" modified="2007-02-28T15:27:57.323" filename="MyUnit/HTML/BCC7232E-BD9F-4112-9929-275EE7121204.aspx" checkoutstatus="1" publishdate="2007-02-28T15:25:00" filesize="996" revisionstatus="0" deleteddate="1900-01-01T00:00:00" wfstatustext="" description="" contentsize="0" imagesavailable="0" virtualpath=""> <user createdby="John Oscar" /> </document> <!-- more documents follow --> </documents> </root>
Element/Attribute | Description |
---|---|
root/status | Integer: Indicates the outcome of the call, always 0 which indicates success |
root/statustext | String: The textual representation of the status, always OK |
root/pageno | Integer: |
root/pagecount | Integer: the number of data pages found. |
root/recordcount | Integer: the total number of records found. |
root/unitid | Integer: an identifier of the unit of the category represented by categoryId. |
root/parentid | Integer: an identifier of the parent of the category represented by categoryId. |
root/module | Description |
root/location | String: The relative path name to the category referenced by categoryId (e.g. MyUnit/TheCategory). |
root/categoryid | Integer: The category identifier. This is the categoryId parameter. |
root/isenabledforpdf | Bit: 1 if the category represented by categoryId uses a PDF-server; otherwise, 0. |
root/documents | Document list container element. |
root/documents/document | Element that contains attributes that represents properties of a document returned. |
root/documents/document/@publishstatus | Integer: for more information see below |
root/documents/document/@id | Integer: The numeric identifier of the document |
root/documents/document/@name | String: the document name |
root/documents/document/@type | String: the mime type of the document e.g. text/html |
root/documents/document/@modified | Sortable DateTime value: indicates when the document was last modified e.g. 2007-02-28T15:27:57.323. |
root/documents/document/@filename | String: the name of the file in the file system that represents this document. |
root/documents/document/@checkoutstatus | Integer: for more information about this attribute: see section below. |
root/documents/document/@publishdate | Sortable DateTime value: indicates when the document can be published e.g. 2007-02-28T15:27:57.323. |
root/documents/document/@filesize | Integer: the size (in bytes) of the file in the file system that represents this document. |
root/documents/document/@revisionstatus | Integer: for more information see below |
root/documents/document/@deleteddate | Sortable DateTime value: indicates when the document was deleted e.g. 2007-02-28T15:27:57.323. Empty or missing if not deleted. |
root/documents/document/@wfstatustext | String: the workflow status text. Empty unless workflow is used. |
root/documents/document/@description | >String: the description of the document. |
root/documents/document/@contentsize | >Integer: the size (in bytes) of the raw content of the document when stored in the database. |
root/documents/document/@imagesavailable | Integer: indicates how the image processor scales images uploaded. Value is one of the numeric values of the ImagesAvailable enumeration. |
root/documents/document/@virtualpath | String: the virtual path of the document or empty. |
root/documents/document/user | Element that contains attributes with information about the user that created the document. |
root/documents/document/user/@createdby | >String: the name of the user that created the document |
The checkoutstatus attribute, specifies whether the document is checked out and if so, whether the document is checked out by the caller or someone else.
Value | Meaning |
---|---|
0 | Not checked out. |
1 | Checked out by the caller. |
2 | Checked out by someone else. |
The publishstatus attribute, which is defined in the PublishStatuses enumeration, can have one of the following values and meaning
Value | Name | Description |
---|---|---|
0 | DraftOnly | The document exists only as a draft (utkast). |
5 | Expired | The document has expired. |
3 | InRecyclingBin | The document is in the Recycling bin. |
2 | Published | The document is published. |
1 | Queued | The document is waiting to be published. |
6 | Withdrawn | The document is withdrawn. |
The revisionstatus attribute, can have one of the following values and meaning
Value | Name | Description |
---|---|---|
0 | None | The document has only a draft and is not deleted and has not been subject to versioning. |
1 | Rejected | The document was on versioning but was rejected. |
2 | Versioning | The document is on versioning |
3 | Deleted | The document is deleted |
4 | Approved | The document is approved. |
When limited level is requested the following syntax is expected
<root> <status>0</status> <statustext>Success</statustext> <pageno>1</pageno> <pagecount>1</pagecount> <recordcount>1</recordcount> <unitid>40</unitid> <parentid>561</parentid> <module>Dokument</module> <location>MyUnit/HTML/</location> <categoryid>561</categoryid> <isenabledforpdf>0</isenabledforpdf> <documents> <document id="4420" name="HelloCS5" type="text/html" modified="2007-02-28T15:27:57.323" filename="MyUnit/HTML/BCC7232E-BD9F-4112-9929-275EE7121204.aspx" deleteddate="1900-01-01T00:00:00" description=""/> <!-- more document elements follow --> </documents> </root>
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database |
SqlException | An error occurred when executing the command against the Content Studio database |
Note |
---|
In version 5.3 support for reading only the document deleted by the caller has been introduced as a new filter option. |
Starting with version 5.3, programmers that write their own code to list documents in the recycling bin might like to use the alternative method GetDocumentsInRecyclingBin instead which is easier and more friendly to use.