org.shaker.dwu
Class BugzillaMail
java.lang.Object
|
+--org.shaker.dwu.BugMail
|
+--org.shaker.dwu.BugzillaMail
- final class BugzillaMail
- extends BugMail
This subclass of MailBody delivers a Bugzilla mail bug sumission compatible
mail body (about 1KB).
- Author:
-
Philipp Bartsch (codeshaker@gmx.net),
GPL License
Field Summary |
private BugProfile |
bug
The corresponding BugProfile |
Method Summary |
protected java.lang.String |
getMailBody()
Returns the bug submission mail body. |
protected java.lang.String |
getMimeType()
Returns text/plain. |
protected java.lang.String |
getSubjectLine()
Returns an empty string. |
private static java.lang.String |
getTextRow(java.lang.String key,
java.lang.String value)
Returns a formatted textrow for a key-value pair |
protected boolean |
isSatisfied()
Returns true, if the BugProfile contains all required properties (must
not be null or empty!). |
private static java.lang.String |
wellform(java.lang.String text)
Returns the given text with replaced linebreaks. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
bug
private final BugProfile bug
- The corresponding BugProfile
BugzillaMail
protected BugzillaMail(BugProfile bugProfile)
- Creates the MailBody.
- Parameters:
bugProfile
- the calling BugProfile that gets exported.
isSatisfied
protected boolean isSatisfied()
- Returns true, if the BugProfile contains all required properties (must
not be null or empty!).
These are:
- Product name
- Product version
- An error class, that is used as a "component" tag
- Message, that is used as a "short_desc" tag
- Overrides:
isSatisfied
in class BugMail
- Returns:
- true, if all necessary informations are available and valid
getMimeType
protected final java.lang.String getMimeType()
- Returns text/plain.
- Overrides:
getMimeType
in class BugMail
- Returns:
- MIME type text/plain
getSubjectLine
protected final java.lang.String getSubjectLine()
- Returns an empty string. You could put the short_desc into the subject
line, but dwu saves it in the mail body.
- Overrides:
getSubjectLine
in class BugMail
- Returns:
- an empty string
getMailBody
protected java.lang.String getMailBody()
- Returns the bug submission mail body.
- Overrides:
getMailBody
in class BugMail
- Returns:
- the bugmail formatted mail body
getTextRow
private static final java.lang.String getTextRow(java.lang.String key,
java.lang.String value)
- Returns a formatted textrow for a key-value pair
- Parameters:
key
- the labelvalue
- the content- Returns:
- the formatted textrow
wellform
private static java.lang.String wellform(java.lang.String text)
- Returns the given text with replaced linebreaks.
- Parameters:
text
- the text to be wellformed- Returns:
- the wellformed text