Package org.ctan.site.services.postings
Class Posting
java.lang.Object
org.ctan.site.services.postings.Posting
- All Implemented Interfaces:
Comparable<Posting>
This class represents a mail from a mailing list. This consists of some
header fields and the mail body.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method adds a package to the list of associated packages.intGetter for a header field.This is the getter forbodyin a HTMLified form.The methodgetDateFormattedreturns the date in the form of a day.getDay()The methodgetDayreturns the date in the form of a day.The methodgetFromEmailreturns the from email.The methodgetFromNamereturns the from name.getId()This is the getter forid.This is the getter forsubject.Setter for a header field.voidThis is the setter forbody.toString()
-
Constructor Details
-
Posting
This is the constructor forPosting.- Parameters:
from- the from line
-
-
Method Details
-
addPkg
This method adds a package to the list of associated packages.- Parameters:
p- the package key
-
compareTo
- Specified by:
compareToin interfaceComparable<Posting>- See Also:
-
get
Getter for a header field.- Parameters:
key- the name of the header- Returns:
- the value of the header or
nullfor none
-
getBodyAsHtml
This is the getter forbodyin a HTMLified form.- Returns:
- the body
-
getDateFormatted
The methodgetDateFormattedreturns the date in the form of a day.- Returns:
- the date as day
-
getDay
The methodgetDayreturns the date in the form of a day.- Returns:
- the date as day
-
getFromEmail
The methodgetFromEmailreturns the from email.- Returns:
- the from email
-
getFromName
The methodgetFromNamereturns the from name.- Returns:
- the from name
-
getId
This is the getter forid.- Returns:
- the body
-
getSubject
This is the getter forsubject.- Returns:
- the subject
-
put
Setter for a header field.- Parameters:
key- the keyvalue- the value- Returns:
- the value
-
setBody
This is the setter forbody.- Parameters:
body- the new value for body
-
toString
-