Oracle® WebCenter Interaction Development Kit 10.3.3.0.0

IDocumentManager.QueryDocuments Method (IProject, IDocumentFilter)

Queries for documents contained in the specified project, and returns an array of IDocuments that satisfies the query filter.

IDocument[] QueryDocuments(
   IProject project,
   IDocumentFilter documentFilter
);

Parameters

project
The query will be restricted to documents contained in the given project; cannot be null.
documentFilter
A IDocumentFilter instance specifying which query to perform, the desired sort order of the query result, and the maximum number of results to return; cannot be null.

Return Value

An array of IDocuments satisfying the filter, in the specified project.

Remarks

The following sample code demonstrates how to query a project for documents checked out by the current user.
//Create the new query filter
IDocumentFilter filter = documentManager.CreateDocumentFilter();
//Set it to only search for checked-out documents
filter.FilterType = DocumentFilterTypes.CheckedOutByCurrentUser;
//Set to order by size, then last modified date
DocumentQueryOrder sizeOrder = new DocumentQueryOrder(DocumentAttributes.NumBytes, true);
DocumentQueryOrder lastModifiedOrder = new DocumentQueryOrder(DocumentAttributes.LastModified, true);
DocumentQueryOrder[] orders = new DocumentQueryOrder[]}sizeOrder, lastModifiedOrder};
filter.QueryOrders = orders;
//Perform query
IDocument[] foundDocuments = documentManager.QueryDocuments(project, filter);

Exceptions

Exception TypeCondition
CollaborationException The method call resulted in an error.
SoapException There was a communication problem during the execution of the remote method call.
InvalidOperationException The project has not yet been stored or has already been removed.

See Also

IDocumentManager Interface | Plumtree.Remote.PRC.Collaboration.Document Namespace | IDocumentManager.QueryDocuments Overload List