From 8b3d246f459cea00b310e4d1aab4e203e977f052 Mon Sep 17 00:00:00 2001 From: mguessan Date: Tue, 27 Oct 2009 23:32:00 +0000 Subject: [PATCH] New create folder method git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@794 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- .../davmail/exchange/ExchangeSession.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index bbe9f951..7cc6d65d 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -1075,12 +1075,33 @@ public class ExchangeSession { } /** - * Create Exchange folder. + * Create Exchange message folder. * * @param folderName logical folder name * @throws IOException on error */ - public void createFolder(String folderName) throws IOException { + public void createMessageFolder(String folderName) throws IOException { + createFolder(folderName, "IPF.Note"); + } + + /** + * Create Exchange calendar folder. + * + * @param folderName logical folder name + * @throws IOException on error + */ + public void createCalendarFolder(String folderName) throws IOException { + createFolder(folderName, "IPF.Appointment"); + } + + /** + * Create Exchange folder with given folder class. + * + * @param folderName logical folder name + * @param folderClass folder class + * @throws IOException on error + */ + public void createFolder(String folderName, String folderClass) throws IOException { String folderPath = getFolderPath(folderName); ArrayList list = new ArrayList(); list.add(new DefaultDavProperty(DavPropertyName.create("outlookfolderclass", Namespace.getNamespace("http://schemas.microsoft.com/exchange/")), folderClass));