* @return The SyncFolderItemsType necessary to request new items from
* the given folder since the given sync state.
*/
public static SyncFolderItemsType getSyncFolderItemsRequest(final Configuration config, final FolderContext folder)
{
SyncFolderItemsType syncFolderItems = SyncFolderItemsType.Factory.newInstance();
syncFolderItems.addNewItemShape().setBaseShape(DefaultShapeNamesType.ID_ONLY);
syncFolderItems.setSyncFolderId(folder.getTargetFolder());
syncFolderItems.setSyncState(folder.getSyncStateToken());
syncFolderItems.setMaxChangesReturned(Math.min(MAX_SYNC_COUNT, config.getIdPageSize()));
return syncFolderItems;
}