|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.OBBase com.oberon.ooql.sdk.AdminBase com.oberon.ooql.sdk.Mail
public class Mail
Mail object: used to access a User
's mailbox and to send internal / external mail
Field Summary | |
---|---|
static java.lang.String |
BCC
Recipient type BCC - blind carbon copy |
static java.lang.String |
CC
Recipient type CC - carbon copy |
static java.lang.String |
TO
Recipient type TO |
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
Mail()
Constructor to send new mail |
|
Mail(java.lang.String code)
Constructor to manipulate existing user Mail object |
Method Summary | |
---|---|
void |
addAttachFile(java.lang.String fileName)
Attach a file to the Mail (only for external mail address) |
void |
addAttachObj(java.lang.String objectID)
Attach a ObjectObj to the Mail (only for internal mail address) |
void |
addAttachObj(java.lang.String objectClass,
java.lang.String objectName,
java.lang.String objectRevision)
Attach a ObjectObj to the Mail (only for internal mail address) |
void |
addBccAddress(java.lang.String mailAddress)
Add an external mail address to the BCC recipient list |
void |
addBccAssignment(java.lang.String assignmentName)
Add an Assignment to the BCC recipient list |
void |
addBccTeam(java.lang.String teamName)
Add a Team to the BCC recipient list |
void |
addBccUser(java.lang.String userName)
Add a User to the BCC recipient list |
void |
addCcAddress(java.lang.String mailAddress)
Add an external mail address to the CC recipient list |
void |
addCcAssignment(java.lang.String assignmentName)
Add an Assignment to the CC recipient list |
void |
addCcTeam(java.lang.String teamName)
Add a Team to the CC recipient list |
void |
addCcUser(java.lang.String userName)
Add a User to the CC recipient list |
void |
addRecipient(java.lang.String type,
java.lang.String recipient)
Add a User/Team/Assignment or a Mail address to the recipient list |
void |
addRecipient(java.lang.String type,
java.lang.String userType,
java.lang.String userName)
Add a User/Team/Assignment to the recipient list |
void |
addRecipients(java.lang.String toList,
java.lang.String ccList,
java.lang.String bccList)
Add a User/Team/Assignment to the recipient list |
void |
addToAddress(java.lang.String mailAddress)
Add an external mail address to the recipient list |
void |
addToAssignment(java.lang.String assignmentName)
Add an Assignment to the recipient list |
void |
addToTeam(java.lang.String teamName)
Add a Team to the recipient list |
void |
addToUser(java.lang.String userName)
Add a User to the recipient list |
static java.lang.String |
convertRecipientType(int recipientType)
Convert the recipient type from numeric code to String format |
static int |
convertRecipientType(java.lang.String recipientType)
Convert the recipient type from String format to numeric code |
void |
create(Framework framework)
Send the Mail to relative internal / external recipients |
void |
destroy(Framework framework)
Remove the Mail object from the database. |
org.jdom.Element |
destToXML(java.lang.String sToCc)
Return the Mail object addresses as XML element tree |
void |
fromXML(org.jdom.Element rootElement)
Load the Mail object properties from XML element tree |
java.util.Vector<java.lang.Object> |
getAttached()
Get the attached ObjectObjs. |
java.lang.String |
getBody()
Get the Mail message body |
java.lang.String |
getCcRecipientsToString(java.lang.String token)
Return the CC recipient list as a string |
java.lang.String |
getCreateCommand(boolean force)
[Inherited but not used] |
java.util.Vector<java.lang.String> |
getFiles()
Get the list of attached file names |
java.lang.String |
getFromUser()
Get the Sender User |
java.lang.String |
getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
Get a property for this Mail object by its OOQL identifier |
java.util.Vector<java.lang.String[]> |
getRecipients()
Return the recipient list |
java.lang.String |
getSaveCommand(boolean force)
[Inherited but not used] |
java.lang.String |
getSendCommand(boolean bodyTag)
Return the OOQL command for sending a mail with the settled properties |
java.util.Vector<java.lang.String> |
getSentUser()
Return the full list of recipient users (without repetitions). |
java.lang.String |
getSubject()
Get the Mail subject |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
java.lang.String |
getToRecipientsToString(java.lang.String token)
Return the TO recipient list as a string |
boolean |
isRead()
Check if mail is never read |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the Mail object: connect the memory instance with the database instance |
static void |
list(Selector selector,
java.io.DataOutputStream outStream,
Framework framework)
List the Mail objects from the user MailBox |
static Mail |
open(java.lang.String code,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the object and read its properties from the database |
void |
resetRecipients()
Remove all elements from the recipient list |
void |
send(Framework framework)
Send the Mail to relative internal / external recipients |
void |
setBody(java.lang.String body)
Set the Mail message body |
void |
setFromUser(java.lang.String userName)
Set the Sender User |
void |
setId(int mailId)
Set the Mail object id |
void |
setRead(boolean isRead)
Force the read flag |
void |
setSubject(java.lang.String subject)
Set the Mail subject |
void |
show(Selector selector,
java.io.DataOutputStream outStream,
Framework framework,
java.lang.Boolean setRead)
Show the Mail object properties |
static void |
show(java.lang.String code,
Selector selector,
java.io.DataOutputStream outStream,
Framework framework,
java.lang.Boolean setRead)
Show the properties for the given Mail |
java.lang.String |
toString()
Return the Mail object properties as a single String |
java.lang.String |
toString(Framework framework)
Return the Mail object properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the Mail object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the Mail object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
write(Framework framework)
Not used |
Methods inherited from class com.oberon.ooql.sdk.OBBase |
---|
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setLinked |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TO
public static final java.lang.String CC
public static final java.lang.String BCC
Constructor Detail |
---|
public Mail()
public Mail(java.lang.String code) throws OberonException
code
- the Mail reference code
OberonException
- if the code contains invalid charactersMethod Detail |
---|
public void setId(int mailId)
setId
in class OBBase
public static Mail open(java.lang.String code, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
code
- the Mail reference codeframework
- the current User
frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void link(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
link
in class AdminBase
framework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void show(Selector selector, java.io.DataOutputStream outStream, Framework framework, java.lang.Boolean setRead) throws java.io.IOException, OberonException
selector
- selection parameters (if null return all the object properties)outStream
- the stream for the results (if null the result is stored into the framework)framework
- the current frameworksetRead
- if true mark the Mail object as read
java.io.IOException
- when the output stream return an exception
OberonException
- for all other problemsFramework.getResult()
public static void show(java.lang.String code, Selector selector, java.io.DataOutputStream outStream, Framework framework, java.lang.Boolean setRead) throws java.io.IOException, OberonException
code
- the Mail reference codeselector
- selection parameters (if null return all the mail properties)outStream
- the stream for the results (if null the result is stored into the framework)framework
- the current frameworksetRead
- if true mark the Mail object as read
java.io.IOException
- when the output stream return an exception
OberonException
- for all other problemsFramework.getResult()
public void unlink(Framework framework) throws OberonException
unlink
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void destroy(Framework framework) throws OberonException
destroy
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void create(Framework framework) throws OberonException
create
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL or Java Mail exceptionssend(Framework)
public void send(Framework framework) throws OberonException
framework
- the current framework
OberonException
- usually due to DB SQL or Java Mail exceptionspublic static void list(Selector selector, java.io.DataOutputStream outStream, Framework framework) throws java.io.IOException, OberonException
selector
- selection parameters (if null return the Mail codes)outStream
- the stream for the results (if null the result is stored into the framework)framework
- the current framework
java.io.IOException
- when the output stream return an exception
OberonException
Framework.getResult()
public void write(Framework framework) throws OberonException
write
in class AdminBase
framework
- the current framework
OberonException
public void setFromUser(java.lang.String userName)
userName
- the User
namepublic java.lang.String getFromUser()
User
public void resetRecipients()
public java.util.Vector<java.lang.String[]> getRecipients()
public void addRecipients(java.lang.String toList, java.lang.String ccList, java.lang.String bccList)
toList
- list of TO recipientsccList
- list of CC recipientsbccList
- list of BCC recipients
public void addRecipient(java.lang.String type, java.lang.String recipient)
type
- the recipient type ( TO ,CC , BCC )recipient
- one of user[userName] assignment[assignName] team[teamName] or email@domain.compublic void addRecipient(java.lang.String type, java.lang.String userType, java.lang.String userName)
type
- the recipient type ( TO ,CC , BCC )userType
- the user type: one of User
/ Team
/ Assignment
userName
- the user namepublic static int convertRecipientType(java.lang.String recipientType)
public static java.lang.String convertRecipientType(int recipientType)
public void addToUser(java.lang.String userName)
userName
- the User
namepublic void addToTeam(java.lang.String teamName)
teamName
- the Team
namepublic void addToAssignment(java.lang.String assignmentName)
assignmentName
- the Assignment
namepublic void addToAddress(java.lang.String mailAddress)
mailAddress
- the mail addresspublic java.lang.String getToRecipientsToString(java.lang.String token)
token
- the separator tokenpublic void addCcUser(java.lang.String userName)
userName
- the User
namepublic void addCcTeam(java.lang.String teamName)
teamName
- the Team
namepublic void addCcAssignment(java.lang.String assignmentName)
assignmentName
- the Assignment
namepublic void addCcAddress(java.lang.String mailAddress)
mailAddress
- the mail addresspublic java.lang.String getCcRecipientsToString(java.lang.String token)
token
- the separator tokenpublic void addBccUser(java.lang.String userName)
userName
- the User
namepublic void addBccTeam(java.lang.String teamName)
teamName
- the Team
namepublic void addBccAssignment(java.lang.String assignmentName)
assignmentName
- the Assignment
namepublic void addBccAddress(java.lang.String mailAddress)
mailAddress
- the mail addresspublic java.util.Vector<java.lang.String> getSentUser()
public void setSubject(java.lang.String subject)
public java.lang.String getSubject()
public void setBody(java.lang.String body)
public java.lang.String getBody()
public void addAttachObj(java.lang.String objectID)
ObjectObj
to the Mail (only for internal mail address)
objectID
- the ObjectObj IDpublic void addAttachObj(java.lang.String objectClass, java.lang.String objectName, java.lang.String objectRevision)
ObjectObj
to the Mail (only for internal mail address)
objectClass
- the ObjectObj Class
nameobjectName
- the ObjectObj NameobjectRevision
- the ObjectObj Revisionpublic java.util.Vector<java.lang.Object> getAttached()
public void addAttachFile(java.lang.String fileName)
fileName
- the file full path/namepublic java.util.Vector<java.lang.String> getFiles()
public void setRead(boolean isRead)
isRead
- if true the Mail object is marked as readpublic boolean isRead()
public java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
getProperty
in class OBBase
propertyName
- OOQL property identifier/name (example: subject , sender ...)filterArgs
- extra arguments used to compute propertiestoken
- separator token for complex propertiesframework
- the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
getTargetNames
in class OBBase
composedName
- OOQL property identifier/name (example: attach, .. )filterArgs
- extra arguments used to compute propertiesframework
- the current framework
public java.lang.String toString()
toString
in class AdminBase
public java.lang.String toString(Framework framework)
toString
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element destToXML(java.lang.String sToCc)
sToCc
- can be TO or CCpublic org.jdom.Element toXML(Framework framework)
toXML
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
toXML
in class AdminBase
getImage
- true to include "imagedata" element with the base64 encoded image datafullDump
- true to include detailed informationframework
- the current frameworkpublic void fromXML(org.jdom.Element rootElement)
fromXML
in class AdminBase
public java.lang.String getCreateCommand(boolean force)
getCreateCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getSendCommand(boolean bodyTag)
bodyTag
- if true, replace the body text with tag "<MAIL-BODY>"
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |