public abstract class AbstractIncomingMailFetchCriteria extends java.lang.Object implements FetchCriteria
Goal is to test the context of the fetching process, (eg: Mail's workspace, Mail's author) depending on which FetchCriteria is used.
Example of a fetching Criteria: NoCheckIncomingMailFetchCriteria
.
Modifier and Type | Field and Description |
---|---|
protected static Channel |
channel |
static java.lang.String |
REVISION |
Constructor and Description |
---|
AbstractIncomingMailFetchCriteria(IncomingMailFetching fetching) |
Modifier and Type | Method and Description |
---|---|
Member |
getAuthor() |
Category[] |
getAvailableCategories()
Get the default categories to set on the new MailMessage.
|
IncomingMailFetching |
getFetching() |
Workspace |
getWorkspace() |
boolean |
isMatchingCheck() |
void |
setFields()
Sets criteria's author and workspace fields on the mail being fetched.
|
boolean |
validate()
A default validation of a Mail fetching.
|
boolean |
validateAttachments() |
protected boolean |
validateAuthkey(Member author,
java.lang.String recipient)
Utility method to validate a recipient address given an author.
|
boolean |
validateAuthor() |
protected static boolean |
validateAuthor(Member author,
MailMessage mail)
Check that given Member is not disabled, and he can publish required Types.
|
boolean |
validateWorkspace() |
protected static boolean |
validateWorkspace(Workspace ws,
MailMessage mail)
Check that given Workspace is not closed, not model, and allows required Types publication.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
public static final java.lang.String REVISION
protected static final Channel channel
public AbstractIncomingMailFetchCriteria(IncomingMailFetching fetching)
public boolean validate()
validate
in interface FetchCriteria
protected boolean validateAuthkey(Member author, java.lang.String recipient)
author
- the authorrecipient
- the recipient to test if it contains author's authkeypublic boolean validateAuthor()
validateAuthor
in interface FetchCriteria
validateAuthor(Member, MailMessage)
.public boolean validateWorkspace()
validateWorkspace
in interface FetchCriteria
public boolean validateAttachments()
public boolean isMatchingCheck()
isMatchingCheck
in interface FetchCriteria
FetchCriteria.isMatchingCheck()
protected static boolean validateWorkspace(Workspace ws, MailMessage mail)
Static method for it to be possibly called manually.
ws
- workspace to validatemail
- the mail to fetch.protected static boolean validateAuthor(Member author, MailMessage mail)
Static method for it to be possibly called manually.
author
- author to validatemail
- the mail to fetch.public Member getAuthor()
getAuthor
in interface FetchCriteria
public Workspace getWorkspace()
getWorkspace
in interface FetchCriteria
public void setFields()
Sets the default categories if any
setFields
in interface FetchCriteria
getWorkspace()
,
getAvailableCategories()
public Category[] getAvailableCategories()
If a workspace is available, returns its wsTypeEntry's categories.
Else, return TypeEntry's categories.
public IncomingMailFetching getFetching()
getFetching
in interface FetchCriteria
FetchCriteria.getFetching()
Copyright © 2001-2021 Jalios SA. All Rights Reserved.