Java Doc for AbstractMessageFolder.java in  » Mail-Clients » columba-1.4 » org » columba » mail » folder » 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 » Mail Clients » columba 1.4 » org.columba.mail.folder 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.columba.mail.folder.AbstractFolder
   org.columba.mail.folder.AbstractMessageFolder

All known Subclasses:   org.columba.mail.folder.AbstractRemoteFolder,  org.columba.mail.folder.virtual.VirtualFolder,  org.columba.mail.folder.AbstractLocalFolder,  org.columba.mail.folder.temp.TempFolder,
AbstractMessageFolder
abstract public class AbstractMessageFolder extends AbstractFolder implements IMailbox(Code)
Abstract Basic AbstractMessageFolder class. It is subclassed by every folder class containing messages and therefore offering methods to alter the mailbox.

Folders are plugins and therefore dynamically created. This should make it easy to write new folders in the future.

To make it very easy to add new local mailbox formats, we added a slightly more complex class hierachy in org.columba.mail.folder, org.columba.mail.folder.headercache. An implementation example can be found in org.columba.mail.folder.mh.

Please note, that you only need to implement DataStorageInstance which should be trivial in most cases. Then create a class extending AbstractLocalFolder and plug your datastorage in this folder in overwriting getDataStorageInstance() method.

Last, don't forget to register your folder plugin:

Add your folder to org.columba.mail.plugin.folder.xml. This way you create an association of the folder name and the class which gets loaded.

Edit your tree.xml file and replace the MH mailbox implementation with yours.
author:
   freddy



Field Summary
protected  booleanchanged
     set changed to true if the folder data changes.
protected  FiledirectoryFile
    
protected  FilterListfilterList
    
protected  ObjectlastSelection
     The last selected uid for the current folder.
protected  IMailboxInfomessageFolderInfo
    
protected  IStatusObservableobservable
     Status information updates are handled in using IStatusObservable.
protected  DefaultSearchEnginesearchEngine
    

Constructor Summary
public  AbstractMessageFolder(FolderItem item, String path)
     Standard constructor.
public  AbstractMessageFolder(FolderItem item)
    
protected  AbstractMessageFolder()
    
public  AbstractMessageFolder(String name, String type, String path)
    
public  AbstractMessageFolder(String name, String type)
    

Method Summary
protected  InputStreamdecodeStream(MimeHeader header, InputStream bodyStream)
    
public  booleanexists(Object uid)
    
public  voidexpungeFolder()
    
public  voidfireMessageAdded(Object uid, Flags flags)
     Propagates an event to all registered listeners notifying them of a message addition.
public  voidfireMessageFlagChanged(Object uid, Flags oldFlags, int variant)
     Propagates an event to all registered listeners notifying them of a message removal.
public  voidfireMessageRemoved(Object uid, Flags flags)
     Propagates an event to all registered listeners notifying them of a message removal.
public  ObjectgetAttribute(Object uid, String key)
    
public  AttributesgetAttributes(Object uid)
    
public  FilegetDirectoryFile()
    
public  IFilterListgetFilterList()
     Method getFilterList.
public  FlagsgetFlags(Object uid)
    
abstract public  IHeaderListgetHeaderList()
    
public  ObjectgetLastSelection()
     Returns the last selected Message for the current folder.
public  IMailboxInfogetMessageFolderInfo()
     Method getMessageFolderInfo.
public  IStatusObservablegetObservable()
    
public  DefaultSearchEnginegetSearchEngine()
    
public  Object[]getUids()
    
protected  booleanhasChanged()
     Check if folder was modified. boolean True, if folder data changed.
public  booleanisInboxFolder()
     Returns true if this folder is an Inbox folder.
public  booleanisReadOnly()
    
public  booleanisTrashFolder()
     Returns true if this folder is the Trash folder.
protected  voidloadMessageFolderInfo()
    
protected  voidmarkMessage(Object uid, int variant)
    
public  voidmarkMessage(Object[] uids, int variant)
    
protected  voidrecreateMessageFolderInfo()
    
public  voidremoveMessage(Object uid)
     Remove message from folder.


author:
   : fdietz This method was intentionally changed to public also it
author:
   isn't accessed from outside.

public  voidsave()
    
protected  voidsaveMessageFolderInfo()
    
public  Object[]searchMessages(IFilter filter, Object[] uids)
    
public  Object[]searchMessages(IFilter filter)
    
public  voidsetAttribute(Object uid, String key, Object value)
    
public  voidsetChanged(boolean b)
     Call this method if folder data changed, so that we know if we have to save the header cache.
public  voidsetLastSelection(Object lastSel)
     Sets the last selection for the current folder.
public  voidsetMessageFolderInfo(MailboxInfo i)
    
public  voidsetSearchEngine(DefaultSearchEngine engine)
    
public  booleansupportsAddMessage()
    
public  StringtoString()
    
protected  voidupdateMailFolderInfo(Flags flags, int variant)
    

Field Detail
changed
protected boolean changed(Code)
set changed to true if the folder data changes.



directoryFile
protected File directoryFile(Code)
directory where this folders files are stored



filterList
protected FilterList filterList(Code)
list of filters



lastSelection
protected Object lastSelection(Code)
The last selected uid for the current folder. This information is used to show the last selected message, if you switch to the current folder and the lastSelection field is set. If the lastSelection field is null, the first message in the table for this folder is shown. Have a look to org.columba.mail.gui.table.TableController#showHeaderList



messageFolderInfo
protected IMailboxInfo messageFolderInfo(Code)
total/unread/recent count of messages in this folder



observable
protected IStatusObservable observable(Code)
Status information updates are handled in using IStatusObservable.

Every command has to register its interest to this events before accessing the folder.




searchEngine
protected DefaultSearchEngine searchEngine(Code)




Constructor Detail
AbstractMessageFolder
public AbstractMessageFolder(FolderItem item, String path)(Code)
Standard constructor.
Parameters:
  item - FolderItem contains information about thefolder



AbstractMessageFolder
public AbstractMessageFolder(FolderItem item)(Code)



AbstractMessageFolder
protected AbstractMessageFolder()(Code)



AbstractMessageFolder
public AbstractMessageFolder(String name, String type, String path)(Code)

Parameters:
  type -



AbstractMessageFolder
public AbstractMessageFolder(String name, String type)(Code)




Method Detail
decodeStream
protected InputStream decodeStream(MimeHeader header, InputStream bodyStream)(Code)
TODO (@author fdietz): move this out-of-folder!
Parameters:
  header -
Parameters:
  bodyStream -



exists
public boolean exists(Object uid) throws Exception(Code)

See Also:   org.columba.mail.folder.IMailbox.exists(java.lang.Object)



expungeFolder
public void expungeFolder() throws Exception(Code)



fireMessageAdded
public void fireMessageAdded(Object uid, Flags flags)(Code)
Propagates an event to all registered listeners notifying them of a message addition.
Parameters:
  flags -



fireMessageFlagChanged
public void fireMessageFlagChanged(Object uid, Flags oldFlags, int variant)(Code)
Propagates an event to all registered listeners notifying them of a message removal.



fireMessageRemoved
public void fireMessageRemoved(Object uid, Flags flags)(Code)
Propagates an event to all registered listeners notifying them of a message removal.



getAttribute
public Object getAttribute(Object uid, String key) throws Exception(Code)

See Also:   org.columba.mail.folder.IMailbox.getAttribute(java.lang.Objectjava.lang.String)



getAttributes
public Attributes getAttributes(Object uid) throws Exception(Code)

See Also:   org.columba.mail.folder.IMailbox.getAttributes(java.lang.Object)



getDirectoryFile
public File getDirectoryFile()(Code)
Returns the directory where the messages are saved File the file representing the mailbox directory



getFilterList
public IFilterList getFilterList()(Code)
Method getFilterList. FilterList



getFlags
public Flags getFlags(Object uid) throws Exception(Code)

See Also:   org.columba.mail.folder.IMailbox.getFlags(java.lang.Object)



getHeaderList
abstract public IHeaderList getHeaderList() throws Exception(Code)
Returns the headerList.



getLastSelection
public Object getLastSelection()(Code)
Returns the last selected Message for the current folder. If no message was selected, it returns null. The return-value is the uid of the last selected message.



getMessageFolderInfo
public IMailboxInfo getMessageFolderInfo()(Code)
Method getMessageFolderInfo. MessageFolderInfo



getObservable
public IStatusObservable getObservable()(Code)
observable containing status information



getSearchEngine
public DefaultSearchEngine getSearchEngine()(Code)



getUids
public Object[] getUids() throws Exception(Code)

See Also:   org.columba.mail.folder.IMailbox.getUids



hasChanged
protected boolean hasChanged()(Code)
Check if folder was modified. boolean True, if folder data changed. False, otherwise.



isInboxFolder
public boolean isInboxFolder()(Code)
Returns true if this folder is an Inbox folder. true if this folder is an Inbox folder.



isReadOnly
public boolean isReadOnly()(Code)

See Also:   org.columba.mail.folder.IMailbox.isReadOnly



isTrashFolder
public boolean isTrashFolder()(Code)
Returns true if this folder is the Trash folder. true if this folder is the Trash folder.



loadMessageFolderInfo
protected void loadMessageFolderInfo()(Code)
get messagefolderinfo from xml-configuration



markMessage
protected void markMessage(Object uid, int variant) throws Exception(Code)

Parameters:
  uid -
Parameters:
  variant -
Parameters:
  worker -
throws:
  Exception -



markMessage
public void markMessage(Object[] uids, int variant) throws Exception(Code)

See Also:   org.columba.mail.folder.IMailbox.markMessage(java.lang.Object[]int)



recreateMessageFolderInfo
protected void recreateMessageFolderInfo()(Code)



removeMessage
public void removeMessage(Object uid) throws Exception(Code)
Remove message from folder.


author:
   : fdietz This method was intentionally changed to public also it
author:
   isn't accessed from outside. This is why it isn't found in
author:
   IMailbox. Only the VirtualFolder uses this public call.
Parameters:
  uid - UID identifying the message to remove
throws:
  Exception -




save
public void save() throws Exception(Code)
use this method to save folder meta-data when closing Columba



saveMessageFolderInfo
protected void saveMessageFolderInfo()(Code)
save messagefolderinfo to xml-configuration



searchMessages
public Object[] searchMessages(IFilter filter, Object[] uids) throws Exception(Code)

Parameters:
  filter -
Parameters:
  uids -
throws:
  Exception -



searchMessages
public Object[] searchMessages(IFilter filter) throws Exception(Code)

Parameters:
  filter -
throws:
  Exception -



setAttribute
public void setAttribute(Object uid, String key, Object value) throws Exception(Code)

See Also:   org.columba.mail.folder.IMailbox.setAttribute(java.lang.Objectjava.lang.Stringjava.lang.Object)



setChanged
public void setChanged(boolean b)(Code)
Call this method if folder data changed, so that we know if we have to save the header cache.
Parameters:
  b -



setLastSelection
public void setLastSelection(Object lastSel)(Code)
Sets the last selection for the current folder. This should be the uid of the last selected Message for the current folder.



setMessageFolderInfo
public void setMessageFolderInfo(MailboxInfo i)(Code)
Change the MessageFolderInfo
Parameters:
  i - the new messagefolderinfo



setSearchEngine
public void setSearchEngine(DefaultSearchEngine engine)(Code)
Set new search engine
See Also:   org.columba.mail.folder.search
Parameters:
  engine - new search engine



supportsAddMessage
public boolean supportsAddMessage()(Code)

See Also:   org.columba.mail.folder.FolderTreeNode.supportsAddMessage



toString
public String toString()(Code)

See Also:   java.lang.Object.toString



updateMailFolderInfo
protected void updateMailFolderInfo(Flags flags, int variant) throws Exception(Code)



Fields inherited from org.columba.mail.folder.AbstractFolder
protected EventListenerList listenerList(Code)(Java Doc)
protected Lock myLock(Code)(Java Doc)
protected IFolderItem node(Code)(Java Doc)

Methods inherited from org.columba.mail.folder.AbstractFolder
public void add(IMailFolder treeNode)(Code)(Java Doc)
public void addFolderListener(IFolderListener l)(Code)(Java Doc)
public void addSubfolder(IMailFolder child) throws Exception(Code)(Java Doc)
public AbstractFolder findChildWithName(String str, boolean recurse)(Code)(Java Doc)
public AbstractFolder findChildWithName(String str, boolean recurse, Class type)(Code)(Java Doc)
public AbstractFolder findChildWithUID(String uid, boolean recurse)(Code)(Java Doc)
public void fireFolderAdded(IMailFolder folder)(Code)(Java Doc)
public void fireFolderPropertyChanged()(Code)(Java Doc)
public void fireFolderRemoved()(Code)(Java Doc)
public IFolderItem getConfiguration()(Code)(Java Doc)
public String getId()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
protected TreeNode[] getPathToRoot(TreeNode aNode, int depth)(Code)(Java Doc)
public IMailFolder getRootFolder()(Code)(Java Doc)
public TreePath getSelectionTreePath()(Code)(Java Doc)
public String getTreePath()(Code)(Java Doc)
public String getType()(Code)(Java Doc)
public void insert(IMailFolder newFolder, int newIndex)(Code)(Java Doc)
public void moveTo(IMailFolder newParent)(Code)(Java Doc)
public void releaseLock(Object locker)(Code)(Java Doc)
public void removeFolder() throws Exception(Code)(Java Doc)
public void removeFolderListener(IFolderListener l)(Code)(Java Doc)
public void setConfiguration(IFolderItem node)(Code)(Java Doc)
public void setName(String newName) throws Exception(Code)(Java Doc)
public boolean supportsAddFolder(String newFolderType)(Code)(Java Doc)
public boolean supportsAddMessage()(Code)(Java Doc)
public boolean supportsMove()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public boolean tryToGetLock(Object locker)(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.