|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.messaging.DefaultMessagingFolder
public class DefaultMessagingFolder
DefaultMessagingFolder - The default messaging folder providing setter methods.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.openexchange.messaging.MessagingFolder |
|---|
MessagingFolder.DefaultFolderType |
| Field Summary |
|---|
| Fields inherited from interface com.openexchange.messaging.MessagingFolder |
|---|
CAPABILITY_PERMISSIONS, CAPABILITY_QUOTA, CAPABILITY_SORT, CAPABILITY_SUBSCRIPTION, CAPABILITY_USER_FLAGS, ROOT_FULLNAME |
| Constructor Summary | |
|---|---|
DefaultMessagingFolder()
Initializes a new DefaultMessagingFolder. |
|
| Method Summary | |
|---|---|
void |
addPermission(MessagingPermission permission)
Adds given permission. |
boolean |
containsDefaultFolder()
Indicates whether this folder has the default-folder flag set |
boolean |
containsDefaultFolderType()
Checks if default folder type was applied to this messaging folder. |
boolean |
containsHoldsFolders()
Indicates whether this folder has the holds-folders flag set |
boolean |
containsHoldsMessages()
Indicates whether this folder has the holds-messages flag set |
boolean |
containsRootFolder()
Indicates whether this folder has the root-folder flag set |
boolean |
containsSeparator()
Checks if separator character was set through setSeparator(char). |
boolean |
containsSubfolders()
Indicates whether this folder has the has-subfolders flag set |
boolean |
containsSubscribed()
Indicates whether this folder has the subscribed flag set |
boolean |
containsSubscribedSubfolders()
Indicates whether this folder has the has-subscribed-subfolders flag set |
boolean |
exists()
Indicates whether this folder exists in folder storage. |
java.util.Set<java.lang.String> |
getCapabilities()
Gets the capabilities of this folder; e.g "QUOTA", "PERMISSIONS", etc. |
MessagingFolder.DefaultFolderType |
getDefaultFolderType()
Gets the default folder type. |
int |
getDeletedMessageCount()
Gets the number of messages marked for deletion in this folder |
java.lang.String |
getId()
Gets the identifier. |
int |
getMessageCount()
Gets the number of messages. |
java.lang.String |
getName()
Gets the name. |
int |
getNewMessageCount()
Gets the number of new messages (since last time this folder was accessed). |
MessagingPermission |
getOwnPermission()
Gets the permission for currently logged-in user accessing this folder The returned permission should reflect user's permission regardless if messaging system supports permissions or not. |
java.lang.String |
getParentId()
Gets the parent identifier or null if this messaging folder denotes the root folder. |
java.util.List<MessagingPermission> |
getPermissions()
Gets the permissions associated with this messaging folder. |
char |
getSeparator()
Gets the separator character. |
int |
getUnreadMessageCount()
Gets the number of unread messages. |
boolean |
hasSubfolders()
Checks if this messaging folder has subfolders. |
boolean |
hasSubscribedSubfolders()
Checks if this messaging folder has subscribed subfolders. |
boolean |
isDefaultFolder()
Checks if this folder denotes a default folder (Drafts, Sent, Trash, etc.) |
boolean |
isHoldsFolders()
Checks if this folder is able to hold folders. |
boolean |
isHoldsMessages()
Checks if this folder is able to hold messages. |
boolean |
isRootFolder()
Checks if this folder denotes the root folder |
boolean |
isSubscribed()
Checks whether the denoted messaging folder is subscribed or not. |
void |
removeDefaultFolder()
Removes whether this folder is a default folder. |
void |
removeDefaultFolderType()
Removes the default folder type. |
void |
removeHoldsFolders()
Removes whether this folder holds folders. |
void |
removeHoldsMessages()
Removes whether this folder holds messages. |
void |
removeRootFolder()
Removes whether this folder is the root folder. |
void |
removeSeparator()
Removes the separator character. |
void |
removeSubfolders()
Removes whether this folder has subfolders. |
void |
removeSubscribed()
Removes whether this folder is subscribed. |
void |
removeSubscribedSubfolders()
Removes whether this folder has subscribed subfolders. |
void |
setCapabilities(java.util.Set<java.lang.String> capabilities)
Sets the capabilities. |
void |
setDefaultFolder(boolean defaultFolder)
Sets whether this folder is a default folder. |
void |
setDefaultFolderType(MessagingFolder.DefaultFolderType defaultFolderType)
Sets the default folder type. |
void |
setDeletedMessageCount(int deletedMessageCount)
Sets the deleted message count. |
void |
setExists(boolean exists)
Sets whether this folder exists in folder storage. |
void |
setHoldsFolders(boolean holdsFolders)
Sets whether this folder has the capability to hold subfolders. |
void |
setHoldsMessages(boolean holdsMessages)
Sets whether this folder has the capability to hold messages. |
void |
setId(java.lang.String id)
Sets the folder identifier. |
void |
setMessageCount(int messageCount)
Sets the message count. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setNewMessageCount(int newMessageCount)
Sets the new message count. |
void |
setOwnPermission(MessagingPermission ownPermission)
Sets the own permission. |
void |
setParentId(java.lang.String parentId)
Sets the parent identifier. |
void |
setPermissions(java.util.List<MessagingPermission> permissions)
Sets the permissions |
void |
setRootFolder(boolean rootFolder)
Sets if this folder is the root folder. |
void |
setSeparator(char separator)
Sets the separator character. |
void |
setSubfolders(boolean subfolders)
Sets whether this folder has subfolders. |
void |
setSubscribed(boolean subscribed)
Sets if this folder is subscribed. |
void |
setSubscribedSubfolders(boolean subscribedSubfolders)
Sets whether this folder has subscribed subfolders. |
void |
setUnreadMessageCount(int unreadMessageCount)
Sets the unread message count. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMessagingFolder()
DefaultMessagingFolder.
| Method Detail |
|---|
public boolean containsDefaultFolderType()
MessagingFolder
containsDefaultFolderType in interface MessagingFoldertrue if default folder type is applied; otherwise falsepublic MessagingFolder.DefaultFolderType getDefaultFolderType()
MessagingFolder
getDefaultFolderType in interface MessagingFolderMessagingFolder.DefaultFolderType.NONE if not availablepublic void setDefaultFolderType(MessagingFolder.DefaultFolderType defaultFolderType)
defaultFolderType - The default folder typepublic void removeDefaultFolderType()
public java.util.Set<java.lang.String> getCapabilities()
"QUOTA", "PERMISSIONS", etc.
getCapabilities in interface MessagingFoldernull if not setpublic void setCapabilities(java.util.Set<java.lang.String> capabilities)
capabilities - The capabilitiespublic int getDeletedMessageCount()
MessagingFolder
getDeletedMessageCount in interface MessagingFolder-1 if this messaging folder does not hold messagesMessagingFolder.isHoldsMessages()public void setDeletedMessageCount(int deletedMessageCount)
deletedMessageCount - The deleted message countpublic java.lang.String getId()
MessagingFolder
getId in interface MessagingFolderpublic void setId(java.lang.String id)
id - The folder identifierpublic int getMessageCount()
MessagingFolder
getMessageCount in interface MessagingFolder-1 if this messaging folder does not hold messagesMessagingFolder.isHoldsMessages()public void setMessageCount(int messageCount)
messageCount - The message countpublic java.lang.String getName()
MessagingFolder
getName in interface MessagingFolderpublic void setName(java.lang.String name)
name - The name to setpublic int getNewMessageCount()
MessagingFolder
getNewMessageCount in interface MessagingFolder-1 if this messaging folder does not hold messages.MessagingFolder.isHoldsMessages()public void setNewMessageCount(int newMessageCount)
newMessageCount - The new message countpublic MessagingPermission getOwnPermission()
MessagingFolder
The returned permission should reflect user's permission regardless if messaging system supports permissions or not. An instance of
DefaultMessagingPermission is supposed to be returned on missing permissions support except for the root folder. The root
folder should indicate no object permissions in any case, but the folder permission varies if messaging system allows subfolder
creation below root folder or not. The returned permission must reflect the allowed behavior.
getOwnPermission in interface MessagingFolderpublic void setOwnPermission(MessagingPermission ownPermission)
ownPermission - The own permissionpublic java.lang.String getParentId()
MessagingFoldernull if this messaging folder denotes the root folder.
getParentId in interface MessagingFoldernull if this messaging folder denotes the root folderpublic void setParentId(java.lang.String parentId)
parentId - The parent identifierpublic java.util.List<MessagingPermission> getPermissions()
MessagingFolder
getPermissions in interface MessagingFolderMessagingPermissionpublic void setPermissions(java.util.List<MessagingPermission> permissions)
permissions - The permissionspublic void addPermission(MessagingPermission permission)
permission - The permissionpublic int getUnreadMessageCount()
MessagingFolder
getUnreadMessageCount in interface MessagingFolder-1 if this messaging folder does not hold messagesMessagingFolder.isHoldsMessages()public void setUnreadMessageCount(int unreadMessageCount)
unreadMessageCount - The unread message countpublic boolean hasSubfolders()
MessagingFolder
hasSubfolders in interface MessagingFoldertrue if this messaging folder has subfolders; otherwise falsepublic void setSubfolders(boolean subfolders)
subfolders - true if this folder has subfolders; otherwise falsepublic boolean containsSubfolders()
true if this folder has the has-subfolders flag set; otherwise falsepublic void removeSubfolders()
public boolean hasSubscribedSubfolders()
MessagingFolder
hasSubscribedSubfolders in interface MessagingFoldertrue if this messaging folder has subscribed subfolders; otherwise falsepublic void setSubscribedSubfolders(boolean subscribedSubfolders)
subscribedSubfolders - true if this folder has subscribed subfolders; otherwise falsepublic boolean containsSubscribedSubfolders()
true if this folder has the has-subscribed-subfolders flag set; otherwise falsepublic void removeSubscribedSubfolders()
public boolean isDefaultFolder()
MessagingFolder
isDefaultFolder in interface MessagingFoldertrue if this folder denotes a default folder; otherwise falsepublic void setDefaultFolder(boolean defaultFolder)
defaultFolder - true if this folder is a default folder; otherwise falsepublic boolean containsDefaultFolder()
true if this folder has the default-folder flag set; otherwise falsepublic void removeDefaultFolder()
public boolean isHoldsFolders()
MessagingFolder
isHoldsFolders in interface MessagingFoldertrue if this folder is able to hold folders; otherwise falsepublic void setHoldsFolders(boolean holdsFolders)
holdsFolders - true if this folder has the capability to hold subfolders; otherwise falsepublic boolean containsHoldsFolders()
true if this folder has the holds-folders flag set; otherwise falsepublic void removeHoldsFolders()
public boolean isHoldsMessages()
MessagingFolder
isHoldsMessages in interface MessagingFoldertrue if this folder is able to hold messages; otherwise falsepublic boolean containsHoldsMessages()
true if this folder has the holds-messages flag set; otherwise falsepublic void removeHoldsMessages()
public void setHoldsMessages(boolean holdsMessages)
holdsMessages - true if this folder has the capability to hold messages; otherwise falsepublic boolean isRootFolder()
MessagingFolder
isRootFolder in interface MessagingFoldertrue if this folder denotes the root folder; otherwise falsepublic void setRootFolder(boolean rootFolder)
rootFolder - true if this folder is the root folder; otherwise falsepublic boolean containsRootFolder()
true if this folder has the root-folder flag set; otherwise falsepublic void removeRootFolder()
public boolean isSubscribed()
MessagingFolder
If messaging system does not support subscription, true is supposed to be returned.
isSubscribed in interface MessagingFolderpublic void setSubscribed(boolean subscribed)
subscribed - true if this folder is subscribed; otherwise falsepublic boolean containsSubscribed()
true if this folder has the subscribed flag set; otherwise falsepublic void removeSubscribed()
public boolean exists()
true if this folder exists in folder storage; otherwise falsepublic void setExists(boolean exists)
exists - true if this folder exists in folder storage; otherwise falsepublic char getSeparator()
MessagingFolder
getSeparator in interface MessagingFolderpublic boolean containsSeparator()
setSeparator(char).
true if separator is set; otherwise falsepublic void removeSeparator()
public void setSeparator(char separator)
If mailing system does not support a separator character, MailConfig#getDefaultSeparator() should to be used.
separator - the separator to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||