Returns an array of IDiscussionMessage
containing zero or more discussion messages in a given project, satisfying the discussion message filter criteria.
null
. null
. an array of IDiscussionMessage
containing zero or more discussion messages in a given discussion, satisfying the discussion message filter criteria.
IDiscussionMessageFilter messageFilter = discussionManager.CreateDiscussionMessageFilter();
//search for ALL messages; other options include searching for APPROVED, or UNAPPROVED messages
messageFilter.MessageStatusType = DiscussionMessageStatusFilterTypes.All;
//limit the return results to be 10; setting this to 0 will return all results
messageFilter.MaximumResults = 10;
//disable security checking on the returned objects against the user who performs this query,
//so that all objects will be returned
messageFilter.RestoreSecurity = false;
//user DiscussionMessageQueryOrder to sort the query result; below DiscussionMessageQueryOrder
//shows sorting the returned messages by CREATED date in descending order
DiscussionMessageQueryOrder messageQueryOrder = new DiscussionMessageQueryOrder(DiscussionMessageAttributes.Created, false);
messageFilter.setQueryOrders(new DiscussionMessageQueryOrder[] { messageQueryOrder });
//an array of IDiscussionMessage objects are returned from queryDiscussionMessages(); if no result is retrieved, a zero-length array will be returned
IDiscussionMessage[] retrievedMessages = discussionManager.QueryDiscussionMessages(project, messageFilter);
Exception Type | Condition |
---|---|
InvalidOperationException | The project has not yet been stored or has already been removed. |
CollaborationException | The method call resulted in an error. |
SoapException | There is a communication problem during the execution of the remote method call. |
IDiscussionManager Interface | Plumtree.Remote.PRC.Collaboration.Discussion Namespace | IDiscussionManager.QueryDiscussionMessages Overload List