简体   繁体   English

使用GroupWise API对消息进行排序

[英]Sorting Messages with GroupWise API

Is it possible to sort GroupWise messages with the object API? 是否可以使用对象API对GroupWise消息进行排序?

I know about filters and queries, however I couldn't find any sorting operators for filter and query expressions. 我了解过滤器和查询,但是找不到过滤器和查询表达式的任何排序运算符。

You would have to use a cursor from what I can tell (short of loading everything). 您将不得不根据我的判断使用一个光标(没有加载所有内容)。

<?php

/* $this is a class that extends SoapClient using the groupwise.wsdl */
$q = (object)[
    'folderType' => 'Mailbox',
    'view' => 'count unreadCount'
];

$folder = $this->getFolderRequest($q);

$q = (object)[
    'container' => $folder->folder->id,
    'view' => 'subject peek noDownload'
];

$cursor = $this->createCursorRequest($q);

$q = (object)[
    'container' => $data->folder->id,
    'cursor' => $cursor->cursor,
    'position' => 'end',
    'count' => 20,
    'forward' => TRUE
];

$msgs = $this->readCursorRequest($q);

var_dump($msgs);

/* You could also throw readCursorRequest() in a loop and track offset + position for more intensive purposes */
?>

More reading: https://www.novell.com/documentation/developer/groupwise_sdk/gwsdk_gwwebservices/data/b7m3i3x.html 更多阅读: https : //www.novell.com/documentation/developer/groupwise_sdk/gwsdk_gwwebservices/data/b7m3i3x.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM