anon.pay
Class PayMessage
java.lang.Object
anon.pay.PayMessage
public class PayMessage
- extends java.lang.Object
Data class for holding a message
that is set for an account via the PIG,
stored in the JPI database, and shown by the JAP as a status message
Sent as a member variable in an XMLBalance
(Though this class could easily be retrofit to implement IXMLEncodable if necessary)
- Author:
- Elmar Schraml
Constructor Summary |
PayMessage(java.lang.String a_shortMessage)
builds a Message that only consists of a text that is short enough to be fully shown in one line,
messageText and messageLink will be null |
PayMessage(java.lang.String a_shortMessage,
java.lang.String a_messageText,
java.net.URL a_messageLink)
|
Method Summary |
boolean |
equals(java.lang.Object anotherObject)
PayMessages are equal if shortMesage, messageText and messagelink are all equal
(e.g. |
java.net.URL |
getMessageLink()
|
java.lang.String |
getMessageText()
|
java.lang.String |
getShortMessage()
|
void |
setMessageLink(java.lang.String a_messageLink)
sets the internal URL from a string supplied
If a_messageLink is not a valid link, messageLink will be set to null
(If you want to deal with the exception yourself, you'd just do a new URL(String) yourself
and call setMessageLink(URL) ) |
void |
setMessageLink(java.net.URL a_messageLink)
|
void |
setMessageText(java.lang.String a_messageText)
|
void |
setShortMessage(java.lang.String a_shortMessage)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_shortMessage
private java.lang.String m_shortMessage
m_messageText
private java.lang.String m_messageText
m_messageLink
private java.net.URL m_messageLink
PayMessage
public PayMessage(java.lang.String a_shortMessage)
- builds a Message that only consists of a text that is short enough to be fully shown in one line,
messageText and messageLink will be null
- Parameters:
a_shortMessage
- String: it probably doesn't make sense to build a Message object with a shortMessage of null,
but if you need to you can
PayMessage
public PayMessage(java.lang.String a_shortMessage,
java.lang.String a_messageText,
java.net.URL a_messageLink)
- Parameters:
a_shortMessage
- String: message that is short enough to be shown in one line. Can be null, but probably shouldn't be.a_messageText
- String: longer message text that will be displayed in its own dialog, but only upon click. Can be null.a_messageLink
- String: a link associated with the message (i.e. message "Contact us" -> click -> open email. Can be null.
equals
public boolean equals(java.lang.Object anotherObject)
- PayMessages are equal if shortMesage, messageText and messagelink are all equal
(e.g. change one character in the URL -> considered a different message)
the messageLinks are compared as Strings, not URLs, so different hostnames pointing to the same IP will be considered UNequal
- Overrides:
equals
in class java.lang.Object
setShortMessage
public void setShortMessage(java.lang.String a_shortMessage)
getShortMessage
public java.lang.String getShortMessage()
setMessageText
public void setMessageText(java.lang.String a_messageText)
getMessageText
public java.lang.String getMessageText()
setMessageLink
public void setMessageLink(java.lang.String a_messageLink)
- sets the internal URL from a string supplied
If a_messageLink is not a valid link, messageLink will be set to null
(If you want to deal with the exception yourself, you'd just do a new URL(String) yourself
and call setMessageLink(URL) )
- Parameters:
a_messageLink
- String
setMessageLink
public void setMessageLink(java.net.URL a_messageLink)
getMessageLink
public java.net.URL getMessageLink()