@Scriptable public class ExchangeMailboxUtil extends java.lang.Object implements IExchangeMailboxUtil
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createFolder(java.lang.String p_strParentHref,
java.lang.String p_strFolderName,
java.lang.String p_strContentClass)
Creates a new folder.
|
boolean |
deleteFolder(java.lang.String p_strId,
boolean p_bPurgeFolder)
Deletes a folder identified by ID.
|
java.lang.String |
getCalendarFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getCalendarFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
java.lang.String |
getCanonicalPath(java.lang.String p_strFolderId)
Returns the canonical path of the folder with the given folder ID.
|
java.lang.String |
getContactsFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getContactsFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
java.lang.String |
getDeletedItemsFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getDeletedItemsFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
java.lang.String |
getDraftsFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getDraftsFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
IFolderInfo |
getFolderInfoByHref(java.lang.String p_strFolderHref)
Returns an ExchangeFolderInfo instance with the folder properties.
|
IFolderInfo |
getFolderInfoById(java.lang.String p_strFolderId)
Returns an ExchangeFolderInfo instance with the folder properties.
|
java.util.List<IFolderInfo> |
getFolders()
Returns a list of
IFolderInfo instances for all folders. |
ExchangeAccount |
getImpersonateUserAccount(java.lang.String p_strUserGuid)
Returns Exchange account properties for the given impersonate user.
|
ExchangeAccount |
getImpersonateUserAccount(java.lang.String p_strUserGuid,
java.lang.String p_strPortalGuid)
Returns Exchange account properties for the given impersonate user.
|
java.lang.String |
getInboxFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getInboxFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
static IExchangeMailboxUtil |
getInstance()
Returns an instance initialized with a Exchange connection for the currently logged in user.
|
static IExchangeMailboxUtil |
getInstance(java.sql.Connection p_conn)
Returns an instance initialized with the given Exchange connection.
|
java.lang.String |
getJournalFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getJournalFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
java.lang.String |
getOutboxFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getOutboxFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
java.lang.String |
getOutOfOfficeMessage()
Returns the out of office message.
|
java.lang.String |
getRootFolderID(java.lang.String p_strUserMailbox)
Returns the ID (formerly ParentName) of the Exchange 2010 store root folder.
|
java.lang.String |
getSentItemsFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getSentItemsFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
java.util.List<java.lang.String> |
getSharedUsers()
Returns a list of currently shared users mailbox names.
|
java.lang.String |
getTasksFolderHref(java.lang.String p_strUserMailbox)
Returns the folder HREF value.
|
java.lang.String |
getTasksFolderName(java.lang.String p_strUserMailbox)
Returns the language dependent folder name.
|
ExchangeAccount |
getUserAccount(java.lang.String p_strUserGuid)
Returns Exchange account properties for the given user.
|
ExchangeAccount |
getUserAccount(java.lang.String p_strUserGuid,
java.lang.String p_strPortalGuid)
Returns Exchange account properties for the given user.
|
boolean |
isOutOfOfficeEnabled()
Returns the out of office status.
|
void |
purgeDeletedItemsFolder()
Deletes all items in the deleted items folder.
|
void |
refreshSharedUsers()
Refresh shared users table (only applicable for MS Exchange Server 2010).
|
void |
releaseSharedUsers()
Release shared users table.
|
void |
resetUserAccount(java.lang.String p_strUserGuid)
Resets (deletes) the MediaGateway/Exchange user account for the given user guid in order to enforce
the user to authenticate with Exchange again (helpful if Windows password has changed).
|
void |
setOutOfOffice(boolean p_bOutOfOffice)
Sets the out of office status.
|
void |
setOutOfOfficeMessage(java.lang.String p_strMessage)
Sets both the internal and the external out of office message.
|
void |
setOutOfOfficeMessage(java.lang.String p_strMessage,
java.util.Date p_dateStart,
java.util.Date p_dateEnd)
Sets both the internal and the external out of office message.
|
java.lang.String |
updateFolderName(java.lang.String p_strFolderId,
java.lang.String p_strFolderName)
Updates the name of a folder identified by the given folder ID.
|
public static IExchangeMailboxUtil getInstance()
public static IExchangeMailboxUtil getInstance(java.sql.Connection p_conn)
p_conn
- the MS Exchange connectionpublic ExchangeAccount getUserAccount(java.lang.String p_strUserGuid) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getUserAccount
in interface IExchangeMailboxUtil
p_strUserGuid
- The GUID of the user.ExchangeUtilException
- If operation failed.public ExchangeAccount getUserAccount(java.lang.String p_strUserGuid, java.lang.String p_strPortalGuid) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getUserAccount
in interface IExchangeMailboxUtil
p_strUserGuid
- The GUID of the user.p_strPortalGuid
- The portal GUID.ExchangeUtilException
- If operation failed.public ExchangeAccount getImpersonateUserAccount(java.lang.String p_strUserGuid) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getImpersonateUserAccount
in interface IExchangeMailboxUtil
p_strUserGuid
- The GUID of the user.ExchangeUtilException
- If operation failed.public ExchangeAccount getImpersonateUserAccount(java.lang.String p_strUserGuid, java.lang.String p_strPortalGuid) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getImpersonateUserAccount
in interface IExchangeMailboxUtil
p_strUserGuid
- The GUID of the user.p_strPortalGuid
- The portal GUID.ExchangeUtilException
- If operation failed.public void resetUserAccount(java.lang.String p_strUserGuid) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
resetUserAccount
in interface IExchangeMailboxUtil
p_strUserGuid
- The user GUID.ExchangeUtilException
public java.util.List<java.lang.String> getSharedUsers() throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getSharedUsers
in interface IExchangeMailboxUtil
ExchangeUtilException
- If operation failed.public java.lang.String getCalendarFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getCalendarFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getCalendarFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getCalendarFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getContactsFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getContactsFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getContactsFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getContactsFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getDeletedItemsFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getDeletedItemsFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getDeletedItemsFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getDeletedItemsFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getDraftsFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getDraftsFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getDraftsFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getDraftsFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getInboxFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getInboxFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getInboxFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getInboxFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getJournalFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getJournalFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getJournalFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getJournalFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getOutboxFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getOutboxFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getOutboxFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getOutboxFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getSentItemsFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getSentItemsFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getSentItemsFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getSentItemsFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getTasksFolderName(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getTasksFolderName
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getTasksFolderHref(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getTasksFolderHref
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
- If operation failed.public java.lang.String getRootFolderID(java.lang.String p_strUserMailbox) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getRootFolderID
in interface IExchangeMailboxUtil
p_strUserMailbox
- The name of the user mailbox or null for the current user.ExchangeUtilException
public boolean isOutOfOfficeEnabled() throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
isOutOfOfficeEnabled
in interface IExchangeMailboxUtil
ExchangeUtilException
- If operation failed.public java.lang.String getOutOfOfficeMessage() throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getOutOfOfficeMessage
in interface IExchangeMailboxUtil
ExchangeUtilException
- If operation failed.public void setOutOfOffice(boolean p_bOutOfOffice) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
setOutOfOffice
in interface IExchangeMailboxUtil
p_bOutOfOffice
- True to enable out of office message.ExchangeUtilException
- If operation failed.public void setOutOfOfficeMessage(java.lang.String p_strMessage) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
setOutOfOfficeMessage
in interface IExchangeMailboxUtil
p_strMessage
- The out of office message.ExchangeUtilException
- If operation failed.public void setOutOfOfficeMessage(java.lang.String p_strMessage, java.util.Date p_dateStart, java.util.Date p_dateEnd) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
setOutOfOfficeMessage
in interface IExchangeMailboxUtil
p_strMessage
- The out of office message.p_dateStart
- Defines the start of the Out Of Office period.p_dateEnd
- Defines the end of the Out Of Office period.ExchangeUtilException
public java.util.List<IFolderInfo> getFolders() throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
IFolderInfo
instances for all folders.getFolders
in interface IExchangeMailboxUtil
IFolderInfo
instances for all folders.ExchangeUtilException
- If operation failed.public IFolderInfo getFolderInfoById(java.lang.String p_strFolderId) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getFolderInfoById
in interface IExchangeMailboxUtil
p_strFolderId
- The ID to identify the folder.IFolderInfo
instance with the folder properties or null if
no folder exists for the given ID.ExchangeUtilException
- If operation failed.public IFolderInfo getFolderInfoByHref(java.lang.String p_strFolderHref) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getFolderInfoByHref
in interface IExchangeMailboxUtil
p_strFolderHref
- The HREF of the folder.IFolderInfo
instance with the folder properties or null if
no folder exists for the given HREF.ExchangeUtilException
- If operation failed.public java.lang.String getCanonicalPath(java.lang.String p_strFolderId) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
getCanonicalPath
in interface IExchangeMailboxUtil
p_strFolderId
- The folder ID.ExchangeUtilException
- If operation failed.public java.lang.String updateFolderName(java.lang.String p_strFolderId, java.lang.String p_strFolderName) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
updateFolderName
in interface IExchangeMailboxUtil
p_strFolderId
- The folder ID.p_strFolderName
- The new folder name.ExchangeUtilException
- If operation failed.public java.lang.String createFolder(java.lang.String p_strParentHref, java.lang.String p_strFolderName, java.lang.String p_strContentClass) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
MyNewFolder
/Folder1/Folder2/
createFolder
in interface IExchangeMailboxUtil
p_strParentHref
- The HREF of the parent folder (required).p_strFolderName
- The name of the folder (required).p_strContentClass
- The content class of the folder (default is urn:content-classes:mailfolder).ExchangeUtilException
- If operation failed.public boolean deleteFolder(java.lang.String p_strId, boolean p_bPurgeFolder) throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
deleteFolder
in interface IExchangeMailboxUtil
p_strId
- The ID of the folder.p_bPurgeFolder
- If true, the folder will be removed from deleted items folder as well.ExchangeUtilException
- If operation failed.public void purgeDeletedItemsFolder() throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
purgeDeletedItemsFolder
in interface IExchangeMailboxUtil
ExchangeUtilException
- If operation failed.public void releaseSharedUsers() throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
releaseSharedUsers
in interface IExchangeMailboxUtil
ExchangeUtilException
- If operation failed.public void refreshSharedUsers() throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
IExchangeMailboxUtil
refreshSharedUsers
in interface IExchangeMailboxUtil
ExchangeUtilException
- If operation failed.