org.apache.james.rrt.jpa
Class JPARecipientRewriteTable

java.lang.Object
  extended by org.apache.james.rrt.lib.AbstractRecipientRewriteTable
      extended by org.apache.james.rrt.jpa.JPARecipientRewriteTable
All Implemented Interfaces:
Configurable, LogEnabled, RecipientRewriteTable

public class JPARecipientRewriteTable
extends AbstractRecipientRewriteTable

Class responsible to implement the Virtual User Table in database with JPA access.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.james.rrt.api.RecipientRewriteTable
RecipientRewriteTable.ErrorMappingException
 
Field Summary
 
Fields inherited from interface org.apache.james.rrt.api.RecipientRewriteTable
ALIASDOMAIN_PREFIX, ERROR_PREFIX, REGEX_PREFIX, WILDCARD
 
Constructor Summary
JPARecipientRewriteTable()
           
 
Method Summary
protected  void addMappingInternal(String user, String domain, String mapping)
           
protected  Map<String,Collection<String>> getAllMappingsInternal()
           
protected  Collection<String> getUserDomainMappingsInternal(String user, String domain)
           
protected  String mapAddressInternal(String user, String domain)
           
protected  void removeMappingInternal(String user, String domain, String mapping)
           
 void setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
          Set the entity manager to use.
 
Methods inherited from class org.apache.james.rrt.lib.AbstractRecipientRewriteTable
addAddressMapping, addAliasDomainMapping, addErrorMapping, addMapping, addRegexMapping, configure, doConfigure, getAllMappings, getFixedDomain, getFixedUser, getLogger, getMappings, getMappings, getUserDomainMappings, removeAddressMapping, removeAliasDomainMapping, removeErrorMapping, removeMapping, removeRegexMapping, setDomainList, setLog, setMappingLimit, setRecursiveMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPARecipientRewriteTable

public JPARecipientRewriteTable()
Method Detail

setEntityManagerFactory

public void setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
Set the entity manager to use.

Parameters:
entityManagerFactory -

addMappingInternal

protected void addMappingInternal(String user,
                                  String domain,
                                  String mapping)
                           throws RecipientRewriteTableException
Specified by:
addMappingInternal in class AbstractRecipientRewriteTable
Throws:
RecipientRewriteTableException
See Also:
AbstractRecipientRewriteTable.addMappingInternal(String, String, String)

mapAddressInternal

protected String mapAddressInternal(String user,
                                    String domain)
                             throws RecipientRewriteTableException
Specified by:
mapAddressInternal in class AbstractRecipientRewriteTable
Throws:
RecipientRewriteTableException
See Also:
AbstractRecipientRewriteTable.mapAddressInternal(java.lang.String, java.lang.String)

getUserDomainMappingsInternal

protected Collection<String> getUserDomainMappingsInternal(String user,
                                                           String domain)
                                                    throws RecipientRewriteTableException
Specified by:
getUserDomainMappingsInternal in class AbstractRecipientRewriteTable
Throws:
RecipientRewriteTableException
See Also:
AbstractRecipientRewriteTable.mapAddress(java.lang.String, java.lang.String)

getAllMappingsInternal

protected Map<String,Collection<String>> getAllMappingsInternal()
                                                         throws RecipientRewriteTableException
Specified by:
getAllMappingsInternal in class AbstractRecipientRewriteTable
Throws:
RecipientRewriteTableException
See Also:
AbstractRecipientRewriteTable.getAllMappingsInternal()

removeMappingInternal

protected void removeMappingInternal(String user,
                                     String domain,
                                     String mapping)
                              throws RecipientRewriteTableException
Specified by:
removeMappingInternal in class AbstractRecipientRewriteTable
Throws:
RecipientRewriteTableException
See Also:
AbstractRecipientRewriteTable.removeMappingInternal(String, String, String)


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.