1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 11:42:23 -05:00

New create folder method

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@794 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-10-27 23:32:00 +00:00
parent ec97ae1bf4
commit 8b3d246f45

View File

@ -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<DavProperty> list = new ArrayList<DavProperty>();
list.add(new DefaultDavProperty(DavPropertyName.create("outlookfolderclass", Namespace.getNamespace("http://schemas.microsoft.com/exchange/")), folderClass));