Java Doc for JwmaStoreImpl.java in  » Web-Mail » Jwma » dtw » webmail » model » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Mail » Jwma » dtw.webmail.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   dtw.webmail.model.JwmaStoreImpl

JwmaStoreImpl
public class JwmaStoreImpl implements JwmaStoreInfo(Code)
Class implementing a wrapper for the mail store. Offers methods and utilities to manage the store.
author:
   Dieter Wimberger
version:
   0.9.7 07/02/2003


Field Summary
final public static  booleanc_SubscribedOnly
    


Method Summary
public  voidarchiveSentMail(Message message)
     Put's a message into the read-mail archive, if archivation is enabled.
public  booleancheckFolderExistence(String path)
     Tests if a folder with the given path exists on the store.

Note that the method checks against the cached folder list.
Parameters:
  path - the path of the folder as String.

public  booleancleanup()
     Cleans up the store.
public  voidclose()
     Closes the associated mail store.
public  voidcreateFolder(String fullname, int type)
     Creates a new folder on the store.
public static  JwmaStoreImplcreateJwmaStoreImpl(JwmaSession session, Store mstore)
     Creates a new JwmaStoreImpl instance.

The method will also prepare the store for use.
Parameters:
  session - the actual JwmaSession.
Parameters:
  mstore - the mail store that should be wrapped.

public  voiddeleteFolder(String fullname)
     Deletes a given folders from the store.
public  voiddeleteFolders(String[] folders)
     Deletes the given folders from the store.

Note that this method will not remove any special folder from the store.

public  JwmaFolderImplgetActualFolder()
     Returns the actual folder.
public  FoldergetDraftFolder()
     Returns the draft folder.
public  FoldergetFolder(String fullname)
     Returns a Folder with a given path from the mail store.
public  chargetFolderSeparator()
    
public  JwmaInboxInfogetInboxInfo()
     Returns the JwmaInboxInfo instance that can be used to retrieve information about the store's INBOX folder (i.e.
public  JwmaPreferencesgetPreferences()
     Returns a reference to the associated preferences.
public  FoldergetReadMailFolder()
     Returns the read mail archive folder.
public  FoldergetSentMailFolder()
     Returns the sent mail archive folder.
public  FoldergetTrashFolder()
     Returns the trash folder.
public  JwmaTrashInfogetTrashInfo()
     Returns the JwmaTrashInfo instance that can be used to retrieve information about the store's trash folder (i.e.
public  booleanisMixedMode()
     Tests if the store is mixed mode, which means it can hold folders that hold messages and subfolders at once.
public  JwmaFolder[]listFolderMoveTargets()
    
public  JwmaFolder[]listFolders(int type)
    
public  JwmaFolder[]listFolders(int type, boolean subscribed)
    
public  JwmaFolder[]listMessageMoveTargets()
    
public  voidmoveFolder(String foldername, String destfolder)
     Moves the given folder on the store.
public  voidmoveFolders(String[] foldernames, String destfolder)
     Moves the given folders to the given destination folder.
Parameters:
  foldernames - an array of strings; each Stringrepresenting the full path of a valid folder of theactual store.
Parameters:
  destfolder - the full path of a valid folder of theactual store.
public  voidprepare()
     Prepares all special folders.
public  JwmaFolderresetToRootFolder()
     Resets the actual folder to the root folder.
public  JwmaFoldersetActualFolder(String path)
     Sets a new actual folder from a given path.
protected  voidsetDraftFolder(Folder f)
     Sets the draft folder.
public  voidsetDraftFolder(String name)
     Sets the draft folder from a name or path given as String.
protected  voidsetFolderSeparator(char c)
     Sets the folder separator character.
protected  voidsetReadMailFolder(Folder f)
     Sets the read mail archive folder.
public  voidsetReadMailFolder(String name)
     Sets the read mail archive folder from a name or path given as String.

This method will first check if the automatic archivation of read messages is activated.

protected  voidsetSentMailFolder(Folder f)
     Sets the sent mail archive folder.
public  voidsetSentMailFolder(String name)
     Sets the sent mail archive folder from a name or path given as String.

This method will first check if the automatic archivation of sent messages is activated.

public  voidsetTrashFolder(String name)
     Sets the trash folder from a name or path given as String.
public  voidunsubscribeFolders()
    
public  voidupdateFolderSubscription(String[] foldernames, boolean subscribe)
    
public  voidupdateRootFolder(String path)
     Updates the root folder, if the path differs from the actual root folder path.

Field Detail
c_SubscribedOnly
final public static boolean c_SubscribedOnly(Code)





Method Detail
archiveSentMail
public void archiveSentMail(Message message) throws JwmaException(Code)
Put's a message into the read-mail archive, if archivation is enabled.
Parameters:
  message - the Message to be archived.
throws:
  JwmaException - if it fails to archive the message.
See Also:   javax.mail.Message



checkFolderExistence
public boolean checkFolderExistence(String path) throws JwmaException(Code)
Tests if a folder with the given path exists on the store.

Note that the method checks against the cached folder list.
Parameters:
  path - the path of the folder as String. true if a folder with this path exists on the store,false otherwise.
throws:
  JwmaException - if the folder already exists, or if it failsto create the folder.




cleanup
public boolean cleanup() throws JwmaException(Code)
Cleans up the store.

This method performs some of the do-automatic functions within jwma:

  1. Move read messages from the inbox to the read messages folder, if the feature is enabled.
  2. Empty the trashbin.

throws:
  JwmaException - if cleanup routines fail to perform error free.



close
public void close()(Code)
Closes the associated mail store.



createFolder
public void createFolder(String fullname, int type) throws JwmaException(Code)
Creates a new folder on the store.
throws:
  JwmaException - if the folder already exists, or if it failsto create the folder.



createJwmaStoreImpl
public static JwmaStoreImpl createJwmaStoreImpl(JwmaSession session, Store mstore) throws JwmaException(Code)
Creates a new JwmaStoreImpl instance.

The method will also prepare the store for use.
Parameters:
  session - the actual JwmaSession.
Parameters:
  mstore - the mail store that should be wrapped. the newly created JwmaStoreImpl instance.
throws:
  JwmaException - if preparing the store for use fails.
See Also:   JwmaStoreImpl.prepare()
See Also:   dtw.webmail.JwmaSession
See Also:   javax.mail.Store




deleteFolder
public void deleteFolder(String fullname) throws JwmaException(Code)
Deletes a given folders from the store.

Note that this method will not remove the folder if it is a special folder.
Parameters:
  fullname - the folder's path as String.
throws:
  JwmaException - if a folder does not exist,or if an error occurs when deleting.




deleteFolders
public void deleteFolders(String[] folders) throws JwmaException(Code)
Deletes the given folders from the store.

Note that this method will not remove any special folder from the store. Despite that, it is a convenience method, looping over the array and calling deleteFolder()
Parameters:
  folders - an array of strings; each Stringrepresenting the full path of a valid folder of theactual store.
throws:
  JwmaException - if a folder does not exist,or if an error occurs when deleting.
See Also:   JwmaStoreImpl.deleteFolder(String)




getActualFolder
public JwmaFolderImpl getActualFolder()(Code)
Returns the actual folder. the actual folder as JwmaFolderImpl.
See Also:   dtw.webmail.model.JwmaFolderImpl



getDraftFolder
public Folder getDraftFolder()(Code)
Returns the draft folder.

The type of this folder will be JwmaFolderImpl.TYPE_MESSAGE_CONTAINER. the draft folder as Folder.
See Also:   javax.mail.Folder




getFolder
public Folder getFolder(String fullname) throws JwmaException(Code)
Returns a Folder with a given path from the mail store. the folder as Folder.
throws:
  JwmaException - if a folder with the given path does not existon the store or a MessagingException occurs.



getFolderSeparator
public char getFolderSeparator()(Code)



getInboxInfo
public JwmaInboxInfo getInboxInfo()(Code)
Returns the JwmaInboxInfo instance that can be used to retrieve information about the store's INBOX folder (i.e. where new messages should be arriving). the store's INBOX folder as JwmaInboxInfo.
See Also:   dtw.webmail.model.JwmaInboxInfo



getPreferences
public JwmaPreferences getPreferences()(Code)
Returns a reference to the associated preferences. the associated preferences JwmaPreferences.
See Also:   dtw.webmail.model.JwmaPreferences



getReadMailFolder
public Folder getReadMailFolder()(Code)
Returns the read mail archive folder.

The type of this folder will be JwmaFolderImpl.TYPE_MESSAGE_CONTAINER. the read mail archive folder as JwmaFolderImpl.
See Also:   dtw.webmail.model.JwmaFolderImpl




getSentMailFolder
public Folder getSentMailFolder()(Code)
Returns the sent mail archive folder.

The type of this folder will be JwmaFolderImpl.TYPE_MESSAGE_CONTAINER. the sent mail archive folder as Folder.
See Also:   javax.mail.Folder




getTrashFolder
public Folder getTrashFolder()(Code)
Returns the trash folder.

The type of this folder will be JwmaFolderImpl.TYPE_MESSAGE_CONTAINER. the trash folder as Folder.
See Also:   javax.mail.Folder




getTrashInfo
public JwmaTrashInfo getTrashInfo() throws JwmaException(Code)
Returns the JwmaTrashInfo instance that can be used to retrieve information about the store's trash folder (i.e. where deleted messages end up first). the store's trash folder as JwmaTrashInfo.
See Also:   dtw.webmail.model.JwmaTrashInfo



isMixedMode
public boolean isMixedMode()(Code)
Tests if the store is mixed mode, which means it can hold folders that hold messages and subfolders at once. true if store is supporting mixed mode, falseotherwise.



listFolderMoveTargets
public JwmaFolder[] listFolderMoveTargets()(Code)



listFolders
public JwmaFolder[] listFolders(int type)(Code)
Storeinfo implementation *********************************



listFolders
public JwmaFolder[] listFolders(int type, boolean subscribed)(Code)



listMessageMoveTargets
public JwmaFolder[] listMessageMoveTargets()(Code)



moveFolder
public void moveFolder(String foldername, String destfolder) throws JwmaException(Code)
Moves the given folder on the store.

Note that this method is a convenience method it creates a single entry array and calls moveFolders().
Parameters:
  foldername - the full path of the folder as String.
Parameters:
  destfolder - the full path of a valid folder on theactual store.
throws:
  JwmaException - if a folder does not exist,or if an error occurs when deleting.
See Also:   JwmaStoreImpl.moveFolders(String[],String)




moveFolders
public void moveFolders(String[] foldernames, String destfolder) throws JwmaException(Code)
Moves the given folders to the given destination folder.
Parameters:
  foldernames - an array of strings; each Stringrepresenting the full path of a valid folder of theactual store.
Parameters:
  destfolder - the full path of a valid folder of theactual store. the new actual folder as JwmaFolder.
throws:
  JwmaException - if the source folders or the destination folderdo not exist, the destination is a subfolder of a source folder,the destination cannot contain any subfolders,or if an error occurs when moving.



prepare
public void prepare() throws JwmaException(Code)
Prepares all special folders.



resetToRootFolder
public JwmaFolder resetToRootFolder() throws JwmaException(Code)
Resets the actual folder to the root folder. the prepared root folder as JwmaFolder.



setActualFolder
public JwmaFolder setActualFolder(String path) throws JwmaException(Code)
Sets a new actual folder from a given path. the new actual folder as JwmaFolder.
throws:
  JwmaException - if it fails to set the new folder andcreate a JwmaFolder instance with it.



setDraftFolder
protected void setDraftFolder(Folder f)(Code)
Sets the draft folder.

The type of this folder should be JwmaFolderImpl.TYPE_MESSAGE_CONTAINER.
Parameters:
  f - the draft folder as Folder.
See Also:   javax.mail.Folder




setDraftFolder
public void setDraftFolder(String name) throws JwmaException(Code)
Sets the draft folder from a name or path given as String.

This method will check and modify the name as follows:

  1. name is null or an empty string:
    ++ "draft"
  2. name does not start with :
    ++name
The method will finally set the newly created folder name in the associated preferences.
Parameters:
  name - the name or full name of the draft folderas String.
throws:
  JwmaException - if it fails to set the draft folder andcreate a JwmaFolder instance with it.



setFolderSeparator
protected void setFolderSeparator(char c)(Code)
Sets the folder separator character.
Parameters:
  the - folder separator as char.



setReadMailFolder
protected void setReadMailFolder(Folder f)(Code)
Sets the read mail archive folder.

The type of this folder will be JwmaFolderImpl.TYPE_MESSAGE_CONTAINER.
Parameters:
  f - the read mail archive folder as Folder.
See Also:   javax.mail.Folder




setReadMailFolder
public void setReadMailFolder(String name) throws JwmaException(Code)
Sets the read mail archive folder from a name or path given as String.

This method will first check if the automatic archivation of read messages is activated. If, then it checks and modifies the name as follows:

  1. name is null or an empty string:
    ++ "sent-mail"
  2. name does not start with :
    ++name
The method will finally set the newly created folder name in the associated preferences.
Parameters:
  name - the name or full name of the sent-mail archive folderas String.
throws:
  JwmaException - if it fails to set the read-mail folder andcreate a JwmaFolder instance with it.



setSentMailFolder
protected void setSentMailFolder(Folder f)(Code)
Sets the sent mail archive folder.

The type of this folder will be JwmaFolderImpl.TYPE_MESSAGE_CONTAINER.
Parameters:
  f - the sent mail archive folder as Folder.
See Also:   javax.mail.Folder




setSentMailFolder
public void setSentMailFolder(String name) throws JwmaException(Code)
Sets the sent mail archive folder from a name or path given as String.

This method will first check if the automatic archivation of sent messages is activated. If, then it checks and modifies the name as follows:

  1. name is null or an empty string:
    ++ "sent-mail"
  2. name does not start with :
    ++name
The method will finally set the newly created folder name in the associated preferences.
Parameters:
  name - the name or full name of the sent-mail archive folderas String.
throws:
  JwmaException - if it fails to set the sent-mail folder andcreate a JwmaFolder instance with it.



setTrashFolder
public void setTrashFolder(String name) throws JwmaException(Code)
Sets the trash folder from a name or path given as String.

This method will check and modify the name as follows:

  1. name is null or an empty string:
    ++ "trash"
  2. name does not start with :
    ++name
The method will finally set the newly created folder name in the associated preferences.
Parameters:
  name - the name or full name of the draft folderas String.
throws:
  JwmaException - if it fails to set the draft folder andcreate a JwmaFolder instance with it.



unsubscribeFolders
public void unsubscribeFolders()(Code)



updateFolderSubscription
public void updateFolderSubscription(String[] foldernames, boolean subscribe) throws JwmaException(Code)



updateRootFolder
public void updateRootFolder(String path) throws JwmaException(Code)
Updates the root folder, if the path differs from the actual root folder path.
Parameters:
  path - the path of the new root folder as String.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.