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


org.apache.james.transport.mailets.AbstractVirtualUserTable
   org.apache.james.transport.mailets.JDBCVirtualUserTable

JDBCVirtualUserTable
public class JDBCVirtualUserTable extends AbstractVirtualUserTable (Code)
Implements a Virtual User Table for JAMES. Derived from the JDBCAlias mailet, but whereas that mailet uses a simple map from a source address to a destination address, this handles simple wildcard selection, verifies that a catchall address is for a domain in the Virtual User Table, and handles forwarding. JDBCVirtualUserTable does not provide any administation tools. You'll have to create the VirtualUserTable yourself. The standard configuration is as follows: CREATE TABLE VirtualUserTable ( user varchar(64) NOT NULL default '', domain varchar(255) NOT NULL default '', target_address varchar(255) NOT NULL default '', PRIMARY KEY (user,domain) ); The user column specifies the username of the virtual recipient, the domain column the domain of the virtual recipient, and the target_address column the email address of the real recipient. The target_address column can contain just the username in the case of a local user, and multiple recipients can be specified in a list separated by commas, semi-colons or colons. The standard query used with VirtualUserTable is: select VirtualUserTable.target_address from VirtualUserTable, VirtualUserTable as VUTDomains where (VirtualUserTable.user like ? or VirtualUserTable.user like "\%") and (VirtualUserTable.domain like ? or (VirtualUserTable.domain like "\%" and VUTDomains.domain like ?)) order by concat(VirtualUserTable.user,'@',VirtualUserTable.domain) desc limit 1 For a given [user, domain, domain] used with the query, this will match as follows (in precedence order): 1. user@domain - explicit mapping for user@domain 2. user@% - catchall mapping for user anywhere 3. %@domain - catchall mapping for anyone at domain 4. null - no valid mapping You need to set the connection. At the moment, there is a limit to what you can change regarding the SQL Query, because there isn't a means to specify where in the query to replace parameters. [TODO] <mailet match="All" class="JDBCVirtualUserTable"> <table>db://maildb/VirtualUserTable</table> <sqlquery>sqlquery</sqlquery> </mailet>


Field Summary
protected  DataSourceComponentdatasource
    
protected  Stringquery
    


Method Summary
public  StringgetMailetInfo()
    
public  voidinit()
    
protected  voidmapRecipients(Map recipientsMap)
     Map any virtual recipients to real recipients using the configured JDBC connection, table and query.

Field Detail
datasource
protected DataSourceComponent datasource(Code)



query
protected String query(Code)
The query used by the mailet to get the alias mapping





Method Detail
getMailetInfo
public String getMailetInfo()(Code)



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



mapRecipients
protected void mapRecipients(Map recipientsMap) throws MessagingException(Code)
Map any virtual recipients to real recipients using the configured JDBC connection, table and query.
Parameters:
  recipientsMap - the mapping of virtual to real recipients



Methods inherited from org.apache.james.transport.mailets.AbstractVirtualUserTable
abstract protected void mapRecipients(Map recipientsMap) throws MessagingException(Code)(Java Doc)
public void service(Mail mail) throws MessagingException(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.