@Component public final class JavamailAccountDaoImpl extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
| Constructor and Description |
|---|
JavamailAccountDaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
clearCache(String username,
String mailAccount) |
AccountSummary |
fetchAccountSummaryFromStore(MailStoreConfiguration config,
javax.mail.Authenticator auth,
String username,
String mailAccount,
int start,
int max)
Performs the heavy-lifting of
IEmailAccountService but in a way
that exposes Javamail implementation details. |
javax.mail.Folder |
getUserInbox(javax.mail.Session session,
String folderName) |
javax.mail.Session |
openMailSession(MailStoreConfiguration config,
javax.mail.Authenticator auth) |
void |
setApplicationContext(org.springframework.context.ApplicationContext ctx) |
void |
setSecurityFile(String path)
Set the file path to the Anti-samy policy file to be used for cleaning
strings.
|
EmailMessage |
wrapMessage(javax.mail.Message msg,
boolean populateContent,
javax.mail.Session session) |
public void setSecurityFile(String path)
path - public void setApplicationContext(org.springframework.context.ApplicationContext ctx)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException@TriggersRemove(cacheName="inboxCache",
keyGenerator=@KeyGenerator(name="StringCacheKeyGenerator",properties=@Property(name="includeMethod",value="false")))
public void clearCache(String username,
String mailAccount)
@Cacheable(cacheName="inboxCache",
selfPopulating=true,
keyGenerator=@KeyGenerator(name="StringCacheKeyGenerator",properties=@Property(name="includeMethod",value="false")))
public AccountSummary fetchAccountSummaryFromStore(MailStoreConfiguration config,
javax.mail.Authenticator auth,
@PartialCacheKey
String username,
@PartialCacheKey
String mailAccount,
int start,
int max)
throws EmailPreviewException
IEmailAccountService but in a way
that exposes Javamail implementation details. Caching annotations can be
wrapped around these methods.username - Portal usernamemailAccount - Email accountstart - Index of the first expected messagemax - Maximum size of the collection of messages in the
returned AccountSummary objectEmailPreviewExceptionpublic javax.mail.Session openMailSession(MailStoreConfiguration config, javax.mail.Authenticator auth)
public javax.mail.Folder getUserInbox(javax.mail.Session session,
String folderName)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic EmailMessage wrapMessage(javax.mail.Message msg, boolean populateContent, javax.mail.Session session) throws javax.mail.MessagingException, IOException, org.owasp.validator.html.ScanException, org.owasp.validator.html.PolicyException
javax.mail.MessagingExceptionIOExceptionorg.owasp.validator.html.ScanExceptionorg.owasp.validator.html.PolicyExceptionCopyright © 2013 Jasig. All Rights Reserved.