Package de.uplanet.lucy.server.newsagent
Class Message
- java.lang.Object
-
- de.uplanet.lucy.server.newsagent.Message
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRecipient(String p_strRecipientId)Add a recipient of this message.voidaddRecipients(String[] p_astrRecipientList)Add recipients of this message.voidclearRecipients()Remove all recipients from this message.Stringdump()Objectget(String p_strName)Get a property of this message.StringgetAppGuid()Get the message's application GUID.StringgetBody()Get the body of the message.TimestampgetCreationDate()Get the creation date of the message.TimestampgetExpirationDate()Get the expiration date of the message.StringgetId()Get the GUID of the message.StringgetRecId()Get the message's record identifier.Iterator<de.uplanet.lucy.server.newsagent.RecipientStatus>getRecipients()Get an (ordered) iterator over the recipients GUID collection.StringgetSender()Get the GUID of the sender.StringgetSubject()Get the subject of the message.StringgetTargetGuid()Get the message's target GUID.StringgetUrl()The URL that is associated to the message.booleanhasRecipient(String p_strRecipientId)Test if this message has the specified individual recipient.booleanhasRecipients()Test if this message has the specified individual recipient.booleanisComplete()Determine if the message is properly initialized.booleanisDirty()Determine if the message was modified.booleanisVisited()Determine if the message has been read by the current user.voidmarkDeleted()Mark this message as deleted if it is currently associated with a certain recipient.voidmarkRead()Mark this message as read if it is currently associated with a certain recipient.booleansave()Save the message to the database.voidset(String p_strName, Object p_objValue)Set a property for this message.voidsetAppGuid(String p_strAppGuid)Set the message's application GUID.voidsetBody(String p_strBody)Set the body of the message.voidsetExpirationDate(Timestamp p_dtExpire)Set the expiration date of the message.voidsetRecId(String p_strRecId)Set the messages record identifier.voidsetSender(String p_strSenderId)Set the sender of the message.voidsetSubject(String p_strSubject)Set the subject of the message.
-
-
-
Method Detail
-
save
public boolean save()
Save the message to the database.- Specified by:
savein interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
trueif the message could be saved,falseotherwise.
-
getId
public String getId()
Get the GUID of the message.- Specified by:
getIdin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The GUID of the message.
-
isComplete
public boolean isComplete()
Determine if the message is properly initialized.- Specified by:
isCompletein interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
trueif the message is properly initialized,falseotherwise.
-
isDirty
public boolean isDirty()
Determine if the message was modified.- Specified by:
isDirtyin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
trueif the message was modifier,falseotherwise.
-
getCreationDate
public Timestamp getCreationDate()
Get the creation date of the message.- Specified by:
getCreationDatein interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The creation date.
-
setAppGuid
public void setAppGuid(String p_strAppGuid)
Set the message's application GUID.The target identifier is adjusted properly.
- Parameters:
p_strAppGuid- The GUID to be set.
-
getAppGuid
public String getAppGuid()
Get the message's application GUID.- Specified by:
getAppGuidin interfacede.uplanet.lucy.server.newsagent.IMessage
-
getTargetGuid
public String getTargetGuid()
Get the message's target GUID.- Specified by:
getTargetGuidin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The target GUID.
-
setRecId
public void setRecId(String p_strRecId)
Set the messages record identifier.
-
getRecId
public String getRecId()
Get the message's record identifier.- Specified by:
getRecIdin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The record identifier.
-
setSender
public void setSender(String p_strSenderId)
Set the sender of the message.- Parameters:
p_strSenderId- The GUID of the sender.
-
getSender
public String getSender()
Get the GUID of the sender.- Specified by:
getSenderin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The GUID of the sender.
-
hasRecipients
public boolean hasRecipients()
Test if this message has the specified individual recipient.- Specified by:
hasRecipientsin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
trueif the message has recipients,falseotherwise.
-
hasRecipient
public boolean hasRecipient(String p_strRecipientId)
Test if this message has the specified individual recipient.- Specified by:
hasRecipientin interfacede.uplanet.lucy.server.newsagent.IMessage- Parameters:
p_strRecipientId- The GUID of the individual recipient. returntrueif the message has the specified individual recipient.
-
addRecipient
public void addRecipient(String p_strRecipientId)
Add a recipient of this message.- Specified by:
addRecipientin interfacede.uplanet.lucy.server.newsagent.IMessage- Parameters:
p_strRecipientId- The GUID of the recipient.
-
addRecipients
public void addRecipients(String[] p_astrRecipientList)
Add recipients of this message.- Specified by:
addRecipientsin interfacede.uplanet.lucy.server.newsagent.IMessage- Parameters:
p_astrRecipientList- The GUIDs of the recipients of this message.
-
getRecipients
public Iterator<de.uplanet.lucy.server.newsagent.RecipientStatus> getRecipients()
Get an (ordered) iterator over the recipients GUID collection. The elements accessed through the iterator are actuallyRecipientStatusobjects so users must apply theRecipientStatus.toString()method to obtain the string representation.- Specified by:
getRecipientsin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- An ordered iterator over the individual recipients of the message.
-
clearRecipients
public void clearRecipients()
Remove all recipients from this message.- Specified by:
clearRecipientsin interfacede.uplanet.lucy.server.newsagent.IMessage
-
setSubject
public void setSubject(String p_strSubject)
Set the subject of the message.- Parameters:
p_strSubject- The subject.
-
getSubject
public String getSubject()
Get the subject of the message.- Specified by:
getSubjectin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The subject of the message.
-
setBody
public void setBody(String p_strBody)
Set the body of the message.- Parameters:
p_strBody- The body.
-
getBody
public String getBody()
Get the body of the message.- Specified by:
getBodyin interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The body of the message.
-
setExpirationDate
public void setExpirationDate(Timestamp p_dtExpire)
Set the expiration date of the message.- Parameters:
p_dtExpire- The expiration date.
-
getExpirationDate
public Timestamp getExpirationDate()
Get the expiration date of the message.- Specified by:
getExpirationDatein interfacede.uplanet.lucy.server.newsagent.IMessage- Returns:
- The expiration date.
-
getUrl
public String getUrl()
The URL that is associated to the message.- Returns:
- The associated URL.
-
isVisited
public boolean isVisited()
Determine if the message has been read by the current user.- Returns:
trueif the message has been read by the current user,falseif this is not the case or if the visited-status can not be determined.
-
set
public void set(String p_strName, Object p_objValue)
Set a property for this message.- Parameters:
p_strName- The name of the property.p_objValue- The value of the property.
-
get
public Object get(String p_strName)
Get a property of this message.- Parameters:
p_strName- The name of the property.- Returns:
- The value of the property.
-
markRead
public void markRead()
Mark this message as read if it is currently associated with a certain recipient.- See Also:
m_strRecipientId
-
markDeleted
public void markDeleted()
Mark this message as deleted if it is currently associated with a certain recipient.- See Also:
m_strRecipientId
-
dump
public String dump()
- Specified by:
dumpin interfacede.uplanet.util.IDumpable
-
-