public abstract class AbstractSQLWhitelistMatcher
extends org.apache.mailet.base.GenericMatcher
Modifier and Type | Field and Description |
---|---|
protected DataSource |
datasource |
protected SqlResources |
sqlQueries
Contains all of the sql strings for this component.
|
protected JDBCUtil |
theJDBCUtil
The JDBCUtil helper class
|
Constructor and Description |
---|
AbstractSQLWhitelistMatcher() |
Modifier and Type | Method and Description |
---|---|
protected String |
getPrimaryName(String originalUsername)
Gets the main name of a local customer, handling alias
|
protected abstract String |
getSQLSectionName() |
protected abstract String |
getTableCreateQueryName() |
protected abstract String |
getTableName() |
void |
init() |
protected void |
initSqlQueries(Connection conn,
org.apache.mailet.MailetContext mailetContext)
Initializes the sql query environment from the SqlResources file.
Will look for conf/sqlResources.xml. Will not create the database resources, if missing (this task is done, if needed, in the WhiteListManager
initialization routine). |
Collection<org.apache.mailet.MailAddress> |
match(org.apache.mailet.Mail mail) |
protected abstract boolean |
matchedWhitelist(org.apache.mailet.MailAddress recipient,
org.apache.mailet.Mail mail) |
void |
setDataSource(DataSource datasource) |
void |
setFilesystem(FileSystem fs) |
void |
setUsersRepository(UsersRepository localusers) |
protected DataSource datasource
protected final JDBCUtil theJDBCUtil
protected SqlResources sqlQueries
public void setDataSource(DataSource datasource)
public void setUsersRepository(UsersRepository localusers)
public void setFilesystem(FileSystem fs)
public void init() throws javax.mail.MessagingException
init
in class org.apache.mailet.base.GenericMatcher
javax.mail.MessagingException
public Collection<org.apache.mailet.MailAddress> match(org.apache.mailet.Mail mail) throws javax.mail.MessagingException
match
in interface org.apache.mailet.Matcher
match
in class org.apache.mailet.base.GenericMatcher
javax.mail.MessagingException
protected abstract boolean matchedWhitelist(org.apache.mailet.MailAddress recipient, org.apache.mailet.Mail mail) throws javax.mail.MessagingException
javax.mail.MessagingException
protected String getPrimaryName(String originalUsername)
protected void initSqlQueries(Connection conn, org.apache.mailet.MailetContext mailetContext) throws Exception
WhiteListManager
initialization routine).conn
- The connection for accessing the databasemailetContext
- The current mailet context, for finding the
conf/sqlResources.xml fileException
- If any error occursprotected abstract String getTableName()
protected abstract String getTableCreateQueryName()
protected abstract String getSQLSectionName()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.