Java Doc for JwmaFolderImpl.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.JwmaFolderImpl

JwmaFolderImpl
public class JwmaFolderImpl implements JwmaFolder,JwmaTrashInfo,JwmaInboxInfo(Code)
Class implementing the JwmaFolder model. It also implements the JwmaTrashInfo and the JwmaInboxInfo models, because both are just simplified interfaces to a folder.
author:
   Dieter Wimberger
version:
   0.9.7 07/02/2003


Field Summary
protected  JwmaMessagem_ActualMessage
    
protected  FetchProfilem_DraftProfile
    
protected  Folderm_Folder
    
protected  JwmaMessageInfoListImplm_MessageInfoList
    
protected  Stringm_Name
    
protected  booleanm_OnlineCounting
    
protected  Stringm_Path
    
protected  JwmaStoreImplm_Store
    
protected  JwmaFolderListm_Subfolders
    
protected  intm_Type
    


Method Summary
public  voidaddIfSubfolder(JwmaFolderImpl folder)
     Adds a folder to the cached list of subfolders, if it is a subfolder of this folder.
public  booleancheckMessageExistence(int number)
     Tests if a message with the given number exists in this folder.
public static  JwmaFolderImplcreateJwmaFolderImpl(JwmaStoreImpl store, Folder f)
     Creates a JwmaFolderImpl instance from the given Folder.
Parameters:
  f - mail Folder this instance will "wrap".
public static  JwmaFolderImplcreateJwmaFolderImpl(JwmaStoreImpl store, String fullname)
     Creates a JwmaFolderImpl instance from the given Folder.
Parameters:
  f - mail Folder this instance will "wrap".
public static  JwmaFolderImplcreateLight(Folder folder)
     Creates a JwmaFolderImpl instance from the given Folder.
Parameters:
  folder - mail Folder this instance will "wrap".
public  intdeleteActualMessage()
     Deletes the actual message from this folder.
public  voiddeleteAllMessages()
     Deletes all messages from this folder.
public  voiddeleteMessage(int number)
     Deletes the given message from this folder.
public  voiddeleteMessages(int[] numbers)
     Deletes the messages with the given numbers.
public  booleanequals(Object o)
     Tests if this folder instance equals a given object. Overrides the superclass behaviour to compare the folder's paths in case the given object is a JwmaFolderImpl.
Parameters:
  o - the object to compare this folder with.
public  JwmaMessagegetActualMessage()
     Returns the actual message.
public  JwmaMessagegetDraftMessage(int num)
    
public  FoldergetFolder()
     Returns this folder's wrapped mail folder instance.
public  JwmaMessagegetJwmaMessage(int num)
     Returns a JwmaMessage instance that wraps the mailmessage with the given number.
Parameters:
  num - the number of the message to be retrieved as int.
public  intgetMessageCount()
    
public  JwmaMessageInfoListImplgetMessageInfoList()
     Returns the JwmaMessageInfoListImpl instance that contains a list of stored JwmaMessageInfoImpl references wrapping information about the messages in the wrapped mailfolder.
public  StringgetName()
    
public  intgetNewMessageCount()
    
public  intgetNextMessageNumber()
     Returns the number of the next message (relative to the actual) in this folder, observing the actual sorting.
public  StringgetPath()
    
public  intgetPreviousMessageNumber()
     Returns the number of the previous message (relative to the actual) in this folder, observing the actual sorting.
public  int[]getReadMessages()
     Returns the numbers of all read messages within this instance.
public  intgetType()
    
public  intgetUnreadMessageCount()
    
public  booleanhasMessages()
    
public  booleanhasNewMessages()
    
public  booleanhasSubfolders()
    
public  booleanhasUnreadMessages()
    
public  booleanisEmpty()
    
public  booleanisOnlineCounting()
     Tests if this folder returns an online count of the contained messages.
public  booleanisSubfolder(String folder, String possiblesubfolder)
     Tests if a folder is a subfolder of another folder, by using their respective paths. A folder is a subfolder if the path starts with the path of the folder it is tested against.
Parameters:
  folder - path of a folder as String.
Parameters:
  possiblesubfolder - path of a possible subfolder of the folderas String.
public  booleanisSubscribed()
    
public  booleanisType(int type)
    
public  JwmaMessageInfo[]listMessageInfos()
     Returns an array of JwmaMessageInfo[] listing the info's of all messages in this folder.
public  JwmaFolder[]listSubfolders(int type)
    
public  JwmaFolder[]listSubfolders()
    
public  JwmaFolder[]listSubfolders(int type, boolean subscribed)
    
public  intmoveActualMessage(String destfolder)
     Moves the actual message to the given destination folder.
Parameters:
  destfolder - the path of the destination folder as String.
public  voidmoveMessage(int number, String destfolder)
     Moves the given message to the given destination folder. Note that this is actually a convenience method.
public  voidmoveMessages(int[] numbers, String destfolder)
     Moves the messages with the given numbers to the given destination folder.
public  voidprepare()
     Prepares this folder instance.
public  voidremoveIfSubfolder(String path)
     Removes a folder from the cached list of subfolders, if it is a subfolder of this folder.
public  voidremoveIfSubfolder(String[] folders)
     Removes all folder from the cached list of subfolders, if they are a subfolder of this folder.
public  voidsetOnlineCounting(boolean b)
     Sets the online counting flag.
public  voidsetSubscribed(boolean b)
    
public  voidupdate(JwmaStoreImpl store)
     Updates this JwmaFolderImpl instance by setting the store instance reference and calling update().
public  voidwriteMessagePart(Part part, OutputStream out)
     Writes the given message part from the given message to the given output stream.

Field Detail
m_ActualMessage
protected JwmaMessage m_ActualMessage(Code)



m_DraftProfile
protected FetchProfile m_DraftProfile(Code)



m_Folder
protected Folder m_Folder(Code)



m_MessageInfoList
protected JwmaMessageInfoListImpl m_MessageInfoList(Code)



m_Name
protected String m_Name(Code)



m_OnlineCounting
protected boolean m_OnlineCounting(Code)



m_Path
protected String m_Path(Code)



m_Store
protected JwmaStoreImpl m_Store(Code)



m_Subfolders
protected JwmaFolderList m_Subfolders(Code)



m_Type
protected int m_Type(Code)





Method Detail
addIfSubfolder
public void addIfSubfolder(JwmaFolderImpl folder)(Code)
Adds a folder to the cached list of subfolders, if it is a subfolder of this folder.
Parameters:
  folder - a JwmaFolderImpl instance.



checkMessageExistence
public boolean checkMessageExistence(int number)(Code)
Tests if a message with the given number exists in this folder. true if it exists, false otherwise.



createJwmaFolderImpl
public static JwmaFolderImpl createJwmaFolderImpl(JwmaStoreImpl store, Folder f) throws JwmaException(Code)
Creates a JwmaFolderImpl instance from the given Folder.
Parameters:
  f - mail Folder this instance will "wrap". the newly created instance.
throws:
  JwmaException - if it fails to create the new instance.



createJwmaFolderImpl
public static JwmaFolderImpl createJwmaFolderImpl(JwmaStoreImpl store, String fullname) throws JwmaException(Code)
Creates a JwmaFolderImpl instance from the given Folder.
Parameters:
  f - mail Folder this instance will "wrap". the newly created instance.
throws:
  JwmaException - if it fails to create the new instance.



createLight
public static JwmaFolderImpl createLight(Folder folder) throws JwmaException(Code)
Creates a JwmaFolderImpl instance from the given Folder.
Parameters:
  folder - mail Folder this instance will "wrap". the newly created instance.
throws:
  JwmaException - if it fails to create the new instance.



deleteActualMessage
public int deleteActualMessage() throws JwmaException(Code)
Deletes the actual message from this folder. the number of the next message or -1 if there is none.
throws:
  JwmaException - if it fails to delete the message from the store.



deleteAllMessages
public void deleteAllMessages() throws JwmaException(Code)
Deletes all messages from this folder. Note that this is a convenience method that creates an array with a all message numbers, and calls deleteMessage(int[]).
throws:
  JwmaException - if it fails to delete any of the messages.
See Also:   JwmaFolderImpl.deleteMessages(int[])



deleteMessage
public void deleteMessage(int number) throws JwmaException(Code)
Deletes the given message from this folder. Note that this is a convenience method that creates an array with a single entry, and calls deleteMessage(int[]).
Parameters:
  number - the number of the message to be deleted as int.
throws:
  JwmaException - if it fails to delete the given message.
See Also:   JwmaFolderImpl.deleteMessages(int[])



deleteMessages
public void deleteMessages(int[] numbers) throws JwmaException(Code)
Deletes the messages with the given numbers.
Parameters:
  numbers - the messages to be deleted as int[].
throws:
  JwmaException - if it fails to delete any of the given messages.



equals
public boolean equals(Object o)(Code)
Tests if this folder instance equals a given object. Overrides the superclass behaviour to compare the folder's paths in case the given object is a JwmaFolderImpl.
Parameters:
  o - the object to compare this folder with. true if the paths are equal, false otherwise, or when theobject is not an instance of JwmaFolderImpl.



getActualMessage
public JwmaMessage getActualMessage()(Code)
Returns the actual message. The actual message is a reference to the message wrapper instance of the message that was requested last. the JwmaMessage instance wrapping the lastrequested message.



getDraftMessage
public JwmaMessage getDraftMessage(int num) throws JwmaException(Code)



getFolder
public Folder getFolder()(Code)
Returns this folder's wrapped mail folder instance. wrapped instance as javax.mail.Folder.



getJwmaMessage
public JwmaMessage getJwmaMessage(int num) throws JwmaException(Code)
Returns a JwmaMessage instance that wraps the mailmessage with the given number.
Parameters:
  num - the number of the message to be retrieved as int. the JwmaMessage instance wrapping the retrieved message.
throws:
  JwmaException - if the message does not exist, orcannot be retrieved from the store.



getMessageCount
public int getMessageCount()(Code)



getMessageInfoList
public JwmaMessageInfoListImpl getMessageInfoList()(Code)
Returns the JwmaMessageInfoListImpl instance that contains a list of stored JwmaMessageInfoImpl references wrapping information about the messages in the wrapped mailfolder. the list containing the JwmaMessageInfoImpl references.



getName
public String getName()(Code)
Basic info ***********************************************************



getNewMessageCount
public int getNewMessageCount()(Code)



getNextMessageNumber
public int getNextMessageNumber()(Code)
Returns the number of the next message (relative to the actual) in this folder, observing the actual sorting. The method returns -1 if the actual message is the last message in this folder. the number of the next message as int or -1 ifthe actual message is the last message in this folder.



getPath
public String getPath()(Code)



getPreviousMessageNumber
public int getPreviousMessageNumber()(Code)
Returns the number of the previous message (relative to the actual) in this folder, observing the actual sorting. The method returns -1 if the actual message is the first message in this folder. the number of the previous message as int or -1 ifthe actual message is the first message in this folder.



getReadMessages
public int[] getReadMessages() throws JwmaException(Code)
Returns the numbers of all read messages within this instance. array of int's representing the message numbers ofall read messages.
throws:
  JwmaException - if retrieving the numbers from the mailfolder fails.



getType
public int getType()(Code)



getUnreadMessageCount
public int getUnreadMessageCount()(Code)



hasMessages
public boolean hasMessages()(Code)
Messages related *****************************************************



hasNewMessages
public boolean hasNewMessages()(Code)



hasSubfolders
public boolean hasSubfolders()(Code)



hasUnreadMessages
public boolean hasUnreadMessages()(Code)



isEmpty
public boolean isEmpty()(Code)



isOnlineCounting
public boolean isOnlineCounting()(Code)
Tests if this folder returns an online count of the contained messages. Online count means that it will request the count from the JavaMail folder implementation instance, instead of returning the size of the cached list of messages. boolean true if online counting, false otherwise.



isSubfolder
public boolean isSubfolder(String folder, String possiblesubfolder)(Code)
Tests if a folder is a subfolder of another folder, by using their respective paths. A folder is a subfolder if the path starts with the path of the folder it is tested against.
Parameters:
  folder - path of a folder as String.
Parameters:
  possiblesubfolder - path of a possible subfolder of the folderas String. boolean that is true, if possiblesubfolder is a subfolderof folder, false otherwise.



isSubscribed
public boolean isSubscribed()(Code)



isType
public boolean isType(int type)(Code)



listMessageInfos
public JwmaMessageInfo[] listMessageInfos()(Code)
Returns an array of JwmaMessageInfo[] listing the info's of all messages in this folder. The method actually delegates the job to the associated JwmaMessageInfoListImpl instance. an array of JwmaMessageInfo instances.
See Also:   dtw.webmail.model.JwmaMessageInfoListImpl.listMessageInfos



listSubfolders
public JwmaFolder[] listSubfolders(int type)(Code)



listSubfolders
public JwmaFolder[] listSubfolders()(Code)



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



moveActualMessage
public int moveActualMessage(String destfolder) throws JwmaException(Code)
Moves the actual message to the given destination folder.
Parameters:
  destfolder - the path of the destination folder as String. the number of the next message, or -1 if there is none.
throws:
  JwmaException - if it fails to move the message.
See Also:   JwmaFolderImpl.moveMessage(int,String)



moveMessage
public void moveMessage(int number, String destfolder) throws JwmaException(Code)
Moves the given message to the given destination folder. Note that this is actually a convenience method. It wraps the message number into an array and calls moveMessages(int[],String).
Parameters:
  destfolder - the path of the destination folder as String. the number of the next message, or -1 if there is none.
throws:
  JwmaException - if it fails to move the message.
See Also:   JwmaFolderImpl.moveMessages(int[],String)



moveMessages
public void moveMessages(int[] numbers, String destfolder) throws JwmaException(Code)
Moves the messages with the given numbers to the given destination folder.
Parameters:
  numbers - the messages to be moved as int[].
Parameters:
  destfolder - the destination folder path as String.
throws:
  JwmaException - if it fails to move if the destination folder does notexist, or if any of the given messages cannot be moved.



prepare
public void prepare() throws JwmaException(Code)
Prepares this folder instance. This method fills in values from the wrapped mailfolder instance and creates the cached subfolder list and the cached messages list.
throws:
  JwmaException - if it fails to retrieve values from the wrapped instance, orif it fails to create the subfolder list.



removeIfSubfolder
public void removeIfSubfolder(String path)(Code)
Removes a folder from the cached list of subfolders, if it is a subfolder of this folder.
Parameters:
  path - a String representing the path of a folder.



removeIfSubfolder
public void removeIfSubfolder(String[] folders)(Code)
Removes all folder from the cached list of subfolders, if they are a subfolder of this folder. This is a convenience method, it iterates over the array and calls removeIfSubfolder(String)
Parameters:
  folders - a String[] containing paths of folders.
See Also:   JwmaFolderImpl.removeIfSubfolder(String)



setOnlineCounting
public void setOnlineCounting(boolean b)(Code)
Sets the online counting flag. This will cause this folder to return the count of messages as obtained from the JavaMail folder implementation instance, instead of returning the size of the cached list of messages.



setSubscribed
public void setSubscribed(boolean b) throws JwmaException(Code)



update
public void update(JwmaStoreImpl store) throws JwmaException(Code)
Updates this JwmaFolderImpl instance by setting the store instance reference and calling update(). This method can be used on a primarily lightweight created folder, to get it fully prepared for extended use.
Parameters:
  store - the reference to the store this folder belongs to.
throws:
  JwmaException - if the update() method fails.
See Also:   JwmaFolderImpl.prepare()



writeMessagePart
public void writeMessagePart(Part part, OutputStream out) throws IOException, JwmaException(Code)
Writes the given message part from the given message to the given output stream.
Parameters:
  part - the part to be written to the output stream.
Parameters:
  out - the OutputStream to be written to.
throws:
  IOException - if an I/O related error occurs.
throws:
  JwmaException - if the message part does not exist, orcannot be retrieved from the message.



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.