Java Doc for CommandListservProcessor.java in  » Web-Mail » james-2.3.1 » org » apache » james » transport » mailets » 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 » james 2.3.1 » org.apache.james.transport.mailets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.mailet.GenericMailet
      org.apache.james.transport.mailets.CommandListservProcessor

CommandListservProcessor
public class CommandListservProcessor extends GenericMailet (Code)
CommandListservProcessor processes messages intended for the list serv mailing list. For command handling, see CommandListservManager
This class is based on the existing list serv processor shipped with James.

To configure the CommandListservProcessor place this configuratin in the root processor:
 <mailet match="RecipientIs=announce@localhost" class="CommandListservProcessor">
 <membersonly>false</membersonly>
 <attachmentsallowed>true</attachmentsallowed>
 <replytolist>true</replytolist>
 <repositoryName>list-announce</repositoryName>
 <subjectprefix>Announce</subjectprefix>
 <autobracket>true</autobracket>
 <listOwner>owner@localhost</listOwner>
 <listName>announce</listName>
 </mailet>
 

version:
   CVS $Revision: 494012 $ $Date: 2007-01-08 11:23:58 +0100 (Mo, 08 Jan 2007) $
since:
   2.2.0


Field Summary
protected  CollectionallowedPosters
    
protected  booleanattachmentsAllowed
     Whether attachments can be sent to the list specified by the config param: 'attachmentsallowed'.
protected  booleanautoBracket
     Whether the subject prefix should be bracketed with '[' and ']' specified by the config param: 'autoBracket'.
protected  CommandListservFootercommandListservFooter
    
protected  ICommandListservManagercommandListservManager
    
protected  StringlistName
     Name of the mailing list specified by the config param: 'listName'.
protected  MailAddresslistOwner
     The list owner specified by the config param: 'listOwner'.
protected  booleanmembersOnly
     Whether only members can post to the list specified by the config param: 'membersonly'.
protected  booleanreplyToList
     Whether the reply-to header should be set to the list address specified by the config param: 'replytolist'.
protected  booleanspecificPostersOnly
    
protected  StringsubjectPrefix
     A String to prepend to the subject of the message when it is sent to the list specified by the config param: 'subjectPrefix'.
protected  UsersRepositoryusersRepository
     The repository containing the users on this list specified by the config param: 'repositoryName'.
protected  XMLResourcesxmlResources
    


Method Summary
protected  voidaddFooter(Mail mail)
    
protected  booleancheckAllowedPoster(Mail mail, Collection members)
    
protected  booleancheckAnnouncements(Mail mail)
    
protected  booleancheckBeenThere(MailAddress listservAddr, Mail mail)
     return true if this is ok, false otherwise Check if the X-been-there header is set to the listserv's name (the address).
protected  booleancheckMembers(Collection members, Mail mail)
    
protected  booleangetBoolean(String attrName, boolean defValue)
    
protected  CommandListservFootergetCommandListservFooter()
    
protected  ICommandListservManagergetCommandListservManager()
    
protected static  ObjectgetField(Object instance, String name)
     Retrieves a data field, potentially defined by a super class.
public  CollectiongetMembers()
    
protected  StringgetString(String attrName, String defValue)
    
public  voidinit()
    
protected  voidinitAllowedPosters(Configuration configuration)
    
protected  voidinitUsersRepository()
    
protected  voidinitializeResources()
    
protected  MimeMessageprepareListMessage(Mail mail, MailAddress listservAddr)
    
public  voidservice(Mail mail)
     A message was sent to the list serv.
protected  voidsetSubject(MimeMessage message)
    

Field Detail
allowedPosters
protected Collection allowedPosters(Code)



attachmentsAllowed
protected boolean attachmentsAllowed(Code)
Whether attachments can be sent to the list specified by the config param: 'attachmentsallowed'.
eg:
<attachmentsallowed>true</attachmentsallowed>
Defaults to true



autoBracket
protected boolean autoBracket(Code)
Whether the subject prefix should be bracketed with '[' and ']' specified by the config param: 'autoBracket'.
eg:
<autoBracket>true</autoBracket>
Defaults to true



commandListservFooter
protected CommandListservFooter commandListservFooter(Code)
Mailet that will add the footer to the message



commandListservManager
protected ICommandListservManager commandListservManager(Code)
The list serv manager



listName
protected String listName(Code)
Name of the mailing list specified by the config param: 'listName'.
eg:
<listName>announce</listName>



listOwner
protected MailAddress listOwner(Code)
The list owner specified by the config param: 'listOwner'.
eg:
<listOwner>owner@localhost</listOwner>



membersOnly
protected boolean membersOnly(Code)
Whether only members can post to the list specified by the config param: 'membersonly'.
eg:
<membersonly>false</membersonly>
Defaults to false



replyToList
protected boolean replyToList(Code)
Whether the reply-to header should be set to the list address specified by the config param: 'replytolist'.
eg:
<replytolist>true</replytolist>
Defaults to true



specificPostersOnly
protected boolean specificPostersOnly(Code)



subjectPrefix
protected String subjectPrefix(Code)
A String to prepend to the subject of the message when it is sent to the list specified by the config param: 'subjectPrefix'.
eg:
<subjectPrefix>MyList</subjectPrefix>
For example: MyList



usersRepository
protected UsersRepository usersRepository(Code)
The repository containing the users on this list specified by the config param: 'repositoryName'.
eg:
<repositoryName>list-announce</repositoryName>



xmlResources
protected XMLResources xmlResources(Code)

See Also:   XMLResources





Method Detail
addFooter
protected void addFooter(Mail mail) throws MessagingException(Code)
Add the footer using CommandListservFooter
Parameters:
  mail -
throws:
  MessagingException -



checkAllowedPoster
protected boolean checkAllowedPoster(Mail mail, Collection members) throws MessagingException(Code)
Returns true if this user is ok to send to the list
Parameters:
  mail - true if this message is ok, false otherwise
throws:
  MessagingException -



checkAnnouncements
protected boolean checkAnnouncements(Mail mail) throws IOException, MessagingException(Code)
Returns true if this is ok to send to the list
Parameters:
  mail - true if this message is ok, false otherwise
throws:
  IOException -
throws:
  MessagingException -



checkBeenThere
protected boolean checkBeenThere(MailAddress listservAddr, Mail mail) throws MessagingException(Code)
return true if this is ok, false otherwise Check if the X-been-there header is set to the listserv's name (the address). If it has, this means it's a message from this listserv that's getting bounced back, so we need to swallow it
Parameters:
  listservAddr -
Parameters:
  mail - true if this message has already bounced, false otherwse
throws:
  MessagingException -



checkMembers
protected boolean checkMembers(Collection members, Mail mail) throws MessagingException(Code)
Returns true if this user is ok to send to the list
Parameters:
  members -
Parameters:
  mail - true if this message is ok, false otherwise
throws:
  MessagingException -



getBoolean
protected boolean getBoolean(String attrName, boolean defValue)(Code)
Get a configuration value
Parameters:
  attrName -
Parameters:
  defValue - the value if found, defValue otherwise



getCommandListservFooter
protected CommandListservFooter getCommandListservFooter() throws MessagingException(Code)
Lazy init
throws:
  MessagingException -



getCommandListservManager
protected ICommandListservManager getCommandListservManager()(Code)
lazy retrieval ICommandListservManager



getField
protected static Object getField(Object instance, String name) throws IllegalAccessException(Code)
Retrieves a data field, potentially defined by a super class. null if not found, the object otherwise



getMembers
public Collection getMembers() throws ParseException(Code)



getString
protected String getString(String attrName, String defValue)(Code)
Get a configuration value
Parameters:
  attrName -
Parameters:
  defValue - the attrValue if found, defValue otherwise



init
public void init() throws MessagingException(Code)
Initialize the mailet



initAllowedPosters
protected void initAllowedPosters(Configuration configuration) throws Exception(Code)



initUsersRepository
protected void initUsersRepository() throws Exception(Code)
Fetch the repository of users



initializeResources
protected void initializeResources() throws Exception(Code)
initialize the resources
throws:
  Exception -



prepareListMessage
protected MimeMessage prepareListMessage(Mail mail, MailAddress listservAddr) throws MessagingException(Code)
Create a new message with some set headers
Parameters:
  mail -
Parameters:
  listservAddr - a prepared List Message
throws:
  MessagingException -



service
public void service(Mail mail) throws MessagingException(Code)
A message was sent to the list serv. Broadcast if appropriate...
Parameters:
  mail -
throws:
  MessagingException -



setSubject
protected void setSubject(MimeMessage message) throws MessagingException(Code)



Methods inherited from org.apache.mailet.GenericMailet
public void destroy()(Code)(Java Doc)
public String getInitParameter(String name)(Code)(Java Doc)
public String getInitParameter(String name, String defValue)(Code)(Java Doc)
public Iterator getInitParameterNames()(Code)(Java Doc)
public MailetConfig getMailetConfig()(Code)(Java Doc)
public MailetContext getMailetContext()(Code)(Java Doc)
public String getMailetInfo()(Code)(Java Doc)
public String getMailetName()(Code)(Java Doc)
public void init(MailetConfig newConfig) throws MessagingException(Code)(Java Doc)
public void init() throws MessagingException(Code)(Java Doc)
public void log(String message)(Code)(Java Doc)
public void log(String message, Throwable t)(Code)(Java Doc)
abstract public void service(Mail mail) throws javax.mail.MessagingException(Code)(Java Doc)

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.