public class EmailListnerTask
extends java.lang.Object
| Constructor and Description |
|---|
EmailListnerTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
appExistForSecurityCheck(MboRemote inboundComm,
int formatMode)
Check if app name exist to perform security check
|
void |
deleteMailAfterAgeThreshold(javax.mail.Message m,
int age,
java.lang.String ageUOM,
java.lang.String emailAddress)
Delete the mail after the age threshold
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getAccessToken(java.lang.String tokenUrl,
java.lang.String clientId,
java.lang.String clientSecret,
java.lang.String refreshToken,
java.lang.String grantType) |
java.lang.String |
getAppFromInbCommSecurity(MboRemote inboundComm,
java.lang.String objectName)
Get the app name for the objectname for the inboundcomm record.
|
java.lang.String |
getAppFromMaxApps(java.lang.String objectName)
Return the app name from maxapps table
|
static java.lang.String |
getContentTypeFrom(java.lang.String fileName) |
static MXLogger |
getLogger()
Returns the logger to be used to log messages.
|
MailData |
getMultipartPart(javax.mail.internet.MimeMultipart mp,
MailData md,
java.util.Vector<java.lang.Object> vector)
Read each part of multipart message and retrieve all parts
|
MboRemote |
getObjectActionForFormattedMode(MboRemote inboundComm,
LSNRParser parser,
int mode)
Process email to get Object and action for XML or Attribute-value mode.
|
UserInfo |
getRunAsUserInfo()
Returns the user information to be used to retrieve
the business objects.
|
java.lang.String |
getTextPart(javax.mail.internet.MimeBodyPart mbp,
java.lang.String text)
Read each part of multipart message and retrieve only the text part
|
boolean |
isNewMail(java.lang.String mailId)
Deprecated.
in 7.1.1.6
|
boolean |
isNewMail(java.lang.String mailId,
java.lang.String emailAddress)
Deprecated.
in 7.5
Check if a mail is a new mail or not.Pop3 doesn't return new mail count
in getNewMessageCount()
|
boolean |
isNewMail(java.lang.String mailId,
java.lang.String emailAddress,
UserInfo ui)
Check if a mail is a new mail or not.Pop3 doesn't return new mail count
in getNewMessageCount()
|
void |
parseFormattedMessage(MboRemote inboundComm,
LSNRParser parser,
int mode)
Parse the formatted message body to get object,action,where clause and result columns
|
void |
performTask(java.lang.String taskName,
java.lang.String instanceName) |
MboRemote |
processMailForFreeformMode(MboRemote inboundComm)
Process email for freeform mode.
|
void |
processNEWStatusFromInboundComm(MboRemote inboundCommCfgMbo)
Process NEW Status mail from staging table
|
MboRemote |
processNewStatusMail(MboRemote inboundComm)
Process inboundcomm record of status NEW.
|
void |
readMessagesFromMailServer(InboundCommCfgData cfgData,
MboRemote inboundCommCfgMbo)
Read mails from the mail Server and process it
|
void |
setLogger(MXLogger logger)
Set the logger to be used to log messages.
|
void |
setRunAsUserInfo(UserInfo userInfo)
Sets the the user information to be used to retrieve
the business objects.
|
MboRemote |
writeIntoInboundComm(MailData md,
InboundCommCfgData cfgData,
MboRemote inboundCommCfgMbo)
Deprecated.
|
MboRemote |
writeIntoInboundComm(MailData md,
InboundCommCfgData cfgData,
MboRemote inboundCommCfgMbo,
javax.mail.Message m)
Writes data to the INBOUNDCOMM table
|
void |
writeToDocInfoAndDocLinks(MailData md,
java.lang.String inbCommUser,
MboRemote inboundComm,
java.lang.String attFileName,
java.lang.String doclinkName,
boolean msgFirstLevel,
int msgLevel)
Write attatchments to docinfo and doclinks
|
public void performTask(java.lang.String taskName,
java.lang.String instanceName)
public static MXLogger getLogger()
public void setLogger(MXLogger logger)
logger - the logger to be used to log messages.public UserInfo getRunAsUserInfo()
public void setRunAsUserInfo(UserInfo userInfo)
userInfo - the user information to be used to retrieve
the business objects.public void readMessagesFromMailServer(InboundCommCfgData cfgData, MboRemote inboundCommCfgMbo)
cfgData - inboundCommCfgMbo - public void processNEWStatusFromInboundComm(MboRemote inboundCommCfgMbo)
inboundcommcfg - mbopublic MboRemote processNewStatusMail(MboRemote inboundComm) throws java.lang.Exception
inboundComm - inboundCommCfgMbo - java.lang.Exceptionpublic java.lang.String getAppFromInbCommSecurity(MboRemote inboundComm, java.lang.String objectName) throws java.lang.Exception
inboundComm - objectName - java.lang.Exceptionpublic void appExistForSecurityCheck(MboRemote inboundComm, int formatMode) throws java.lang.Exception
inboundComm - formatMode - java.lang.Exceptionpublic java.lang.String getAppFromMaxApps(java.lang.String objectName)
throws java.lang.Exception
objectName - java.lang.Exceptionpublic void parseFormattedMessage(MboRemote inboundComm, LSNRParser parser, int mode) throws java.lang.Exception
inboundComm - parser - mode - java.lang.Exceptionpublic MboRemote processMailForFreeformMode(MboRemote inboundComm) throws java.lang.Exception
inboundComm - java.lang.Exceptionpublic MboRemote getObjectActionForFormattedMode(MboRemote inboundComm, LSNRParser parser, int mode) throws java.lang.Exception
inboundComm - parser - mode - adminEmail - java.lang.Exceptionpublic MailData getMultipartPart(javax.mail.internet.MimeMultipart mp, MailData md, java.util.Vector<java.lang.Object> vector) throws java.lang.Exception
mp - md - cfgData - java.lang.Exceptionpublic java.lang.String getTextPart(javax.mail.internet.MimeBodyPart mbp,
java.lang.String text)
throws java.lang.Exception
m - md - cfgData - java.lang.Exceptionpublic MboRemote writeIntoInboundComm(MailData md, InboundCommCfgData cfgData, MboRemote inboundCommCfgMbo) throws java.lang.Exception
md - cfgData - inboundCommCfgMbo - java.lang.Exceptionpublic MboRemote writeIntoInboundComm(MailData md, InboundCommCfgData cfgData, MboRemote inboundCommCfgMbo, javax.mail.Message m) throws java.lang.Exception
md - cfgData - inboundCommCfgMbo - java.lang.Exceptionpublic void writeToDocInfoAndDocLinks(MailData md, java.lang.String inbCommUser, MboRemote inboundComm, java.lang.String attFileName, java.lang.String doclinkName, boolean msgFirstLevel, int msgLevel) throws java.lang.Exception
md - inbCommUser - inboundComm - attFileName - doclinkName - msgFirstLevel - msgLevel - java.lang.Exceptionpublic static java.lang.String getContentTypeFrom(java.lang.String fileName)
throws java.rmi.RemoteException,
MXException
java.rmi.RemoteExceptionMXExceptionpublic boolean isNewMail(java.lang.String mailId,
java.lang.String emailAddress,
UserInfo ui)
throws java.lang.Exception
mailId - emalAddress - userinfo - java.lang.Exceptionpublic boolean isNewMail(java.lang.String mailId,
java.lang.String emailAddress)
throws java.lang.Exception
mailId - emalAddress - java.lang.Exceptionpublic boolean isNewMail(java.lang.String mailId)
throws java.lang.Exception
mailId - java.lang.ExceptionCheck if a mail is a new mail or not.Pop3 doesn't return new mail count
in getNewMessageCount()public void deleteMailAfterAgeThreshold(javax.mail.Message m,
int age,
java.lang.String ageUOM,
java.lang.String emailAddress)
throws java.lang.Exception
m - age - ageUOM - java.lang.Exceptionpublic java.util.HashMap<java.lang.String,java.lang.Integer> getAccessToken(java.lang.String tokenUrl,
java.lang.String clientId,
java.lang.String clientSecret,
java.lang.String refreshToken,
java.lang.String grantType)