org.shaker.dwu
Class HTMLMail

java.lang.Object
  |
  +--org.shaker.dwu.BugMail
        |
        +--org.shaker.dwu.HTMLMail

final class HTMLMail
extends BugMail

This subclass of MailBody delivers a well formatted and mail body (above 5KB).

Author:
Philipp Bartsch (codeshaker@gmx.net), GPL License

Field Summary
private  BugProfile bug
          The corresponding BugProfile
 
Fields inherited from class org.shaker.dwu.BugMail
DATE, ERROR_CLASS, MAIL_TO, MESSAGE, NEW_LINE, P_NAME, P_VERSION, SEND_FORMAT, STACK_TRACE, USER_COMMENT
 
Constructor Summary
protected HTMLMail(BugProfile bugProfile)
          Creates the MailBody.
 
Method Summary
protected  java.lang.String getMailBody()
          Returns a clean designed HTML mail body.
protected  java.lang.String getMimeType()
          Returns text/html.
protected  java.lang.String getSubjectLine()
          Returns "DWU $message $bugprofile-hashsig"
private static java.lang.String getTableHeader()
          Returns a locally used, standardized html tableheader.
private static java.lang.String getTableRow(java.lang.String key, java.lang.String value, boolean wellform, boolean highlight)
          Returns a locally used, standardized html table tail
private static java.lang.String getTableTail()
          Returns a locally used, standardized html table tail
protected  boolean isSatisfied()
          Returns true.
private static java.lang.String wellform(java.lang.String text)
          Returns the given text with html-entity replaced linebreaks and tabs.
 
Methods inherited from class org.shaker.dwu.BugMail
isStandardKey, replace_impl
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

bug

private final BugProfile bug
The corresponding BugProfile
Constructor Detail

HTMLMail

protected HTMLMail(BugProfile bugProfile)
Creates the MailBody.
Parameters:
bugProfile - the calling BugProfile that gets exported.
Method Detail

isSatisfied

protected boolean isSatisfied()
Returns true.
Overrides:
isSatisfied in class BugMail
Returns:
always true, this format has no requirements

getMimeType

protected final java.lang.String getMimeType()
Returns text/html.
Overrides:
getMimeType in class BugMail
Returns:
MIME type text/html

getSubjectLine

protected final java.lang.String getSubjectLine()
Returns "DWU $message $bugprofile-hashsig"
Overrides:
getSubjectLine in class BugMail
Returns:
the subject line

getMailBody

protected final java.lang.String getMailBody()
Returns a clean designed HTML mail body.
Overrides:
getMailBody in class BugMail
Returns:
the html formatted mail body

getTableHeader

private static final java.lang.String getTableHeader()
Returns a locally used, standardized html tableheader.
Returns:
the table header code string

getTableRow

private static final java.lang.String getTableRow(java.lang.String key,
                                                  java.lang.String value,
                                                  boolean wellform,
                                                  boolean highlight)
Returns a locally used, standardized html table tail
Parameters:
key - the inserted key
value - the inserted value
wellform - specifies wheter to replace ";" and linebreaks with html line breaks (br)
highlight - specifies wheter to highlight the row label with a blue or the standard grey background
Returns:
the row (html code)

getTableTail

private static final java.lang.String getTableTail()
Returns a locally used, standardized html table tail
Returns:
String the tail (html code)

wellform

private static java.lang.String wellform(java.lang.String text)
Returns the given text with html-entity replaced linebreaks and tabs.
Parameters:
text - the text to be wellformed
Returns:
the wellformed text