mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
EWS: Exchange 2010 folder handling
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1297 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
8947927c01
commit
37d795d027
@ -490,6 +490,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
FOLDER_PROPERTIES.add(Field.get("urlcompname"));
|
FOLDER_PROPERTIES.add(Field.get("urlcompname"));
|
||||||
|
FOLDER_PROPERTIES.add(Field.get("folderDisplayName"));
|
||||||
FOLDER_PROPERTIES.add(Field.get("lastmodified"));
|
FOLDER_PROPERTIES.add(Field.get("lastmodified"));
|
||||||
FOLDER_PROPERTIES.add(Field.get("folderclass"));
|
FOLDER_PROPERTIES.add(Field.get("folderclass"));
|
||||||
FOLDER_PROPERTIES.add(Field.get("ctag"));
|
FOLDER_PROPERTIES.add(Field.get("ctag"));
|
||||||
@ -502,7 +503,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
protected Folder buildFolder(EWSMethod.Item item) {
|
protected Folder buildFolder(EWSMethod.Item item) {
|
||||||
Folder folder = new Folder();
|
Folder folder = new Folder();
|
||||||
folder.folderId = new FolderId(item);
|
folder.folderId = new FolderId(item);
|
||||||
folder.displayName = StringUtil.urlDecodeAmpersand(item.get(Field.get("urlcompname").getResponseName()));
|
folder.displayName = item.get(Field.get("folderDisplayName").getResponseName());
|
||||||
folder.folderClass = item.get(Field.get("folderclass").getResponseName());
|
folder.folderClass = item.get(Field.get("folderclass").getResponseName());
|
||||||
folder.etag = item.get(Field.get("lastmodified").getResponseName());
|
folder.etag = item.get(Field.get("lastmodified").getResponseName());
|
||||||
folder.ctag = item.get(Field.get("ctag").getResponseName());
|
folder.ctag = item.get(Field.get("ctag").getResponseName());
|
||||||
@ -1118,7 +1119,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
parentFolderId,
|
parentFolderId,
|
||||||
FOLDER_PROPERTIES,
|
FOLDER_PROPERTIES,
|
||||||
new TwoOperandExpression(TwoOperandExpression.Operator.IsEqualTo,
|
new TwoOperandExpression(TwoOperandExpression.Operator.IsEqualTo,
|
||||||
Field.get("urlcompname"), folderName)
|
Field.get("folderDisplayName"), folderName)
|
||||||
);
|
);
|
||||||
executeMethod(findFolderMethod);
|
executeMethod(findFolderMethod);
|
||||||
EWSMethod.Item item = findFolderMethod.getResponseItem();
|
EWSMethod.Item item = findFolderMethod.getResponseItem();
|
||||||
|
@ -69,6 +69,7 @@ public class TestExchangeSessionFolder extends AbstractExchangeSessionTestCase {
|
|||||||
|
|
||||||
public void testCalendarFolder() throws IOException {
|
public void testCalendarFolder() throws IOException {
|
||||||
String folderName = "testcalendar";
|
String folderName = "testcalendar";
|
||||||
|
session.deleteFolder(folderName);
|
||||||
session.createCalendarFolder(folderName, null);
|
session.createCalendarFolder(folderName, null);
|
||||||
ExchangeSession.Folder folder = session.getFolder(folderName);
|
ExchangeSession.Folder folder = session.getFolder(folderName);
|
||||||
assertNotNull(folder);
|
assertNotNull(folder);
|
||||||
@ -78,6 +79,7 @@ public class TestExchangeSessionFolder extends AbstractExchangeSessionTestCase {
|
|||||||
|
|
||||||
public void testContactFolder() throws IOException {
|
public void testContactFolder() throws IOException {
|
||||||
String folderName = "testcontact";
|
String folderName = "testcontact";
|
||||||
|
session.deleteFolder(folderName);
|
||||||
session.createContactFolder(folderName, null);
|
session.createContactFolder(folderName, null);
|
||||||
ExchangeSession.Folder folder = session.getFolder(folderName);
|
ExchangeSession.Folder folder = session.getFolder(folderName);
|
||||||
assertNotNull(folder);
|
assertNotNull(folder);
|
||||||
@ -88,6 +90,7 @@ public class TestExchangeSessionFolder extends AbstractExchangeSessionTestCase {
|
|||||||
|
|
||||||
public void testFolderAccent() throws IOException {
|
public void testFolderAccent() throws IOException {
|
||||||
String folderName = "testé";
|
String folderName = "testé";
|
||||||
|
session.deleteFolder(folderName);
|
||||||
session.createMessageFolder(folderName);
|
session.createMessageFolder(folderName);
|
||||||
ExchangeSession.Folder folder = session.getFolder(folderName);
|
ExchangeSession.Folder folder = session.getFolder(folderName);
|
||||||
assertNotNull(folder);
|
assertNotNull(folder);
|
||||||
@ -98,6 +101,7 @@ public class TestExchangeSessionFolder extends AbstractExchangeSessionTestCase {
|
|||||||
|
|
||||||
public void testFolderSpace() throws IOException {
|
public void testFolderSpace() throws IOException {
|
||||||
String folderName = "test space";
|
String folderName = "test space";
|
||||||
|
session.deleteFolder(folderName);
|
||||||
session.createMessageFolder(folderName);
|
session.createMessageFolder(folderName);
|
||||||
ExchangeSession.Folder folder = session.getFolder(folderName);
|
ExchangeSession.Folder folder = session.getFolder(folderName);
|
||||||
assertNotNull(folder);
|
assertNotNull(folder);
|
||||||
|
Loading…
Reference in New Issue
Block a user