Class Posting

java.lang.Object
org.ctan.site.services.postings.Posting
All Implemented Interfaces:
Comparable<Posting>

public class Posting extends Object implements Comparable<Posting>
This class represents a mail from a mailing list. This consists of some header fields and the mail body.
  • Constructor Details

    • Posting

      public Posting(String from)
      This is the constructor for Posting.
      Parameters:
      from - the from line
  • Method Details

    • addPkg

      public void addPkg(String p)
      This method adds a package to the list of associated packages.
      Parameters:
      p - the package key
    • compareTo

      public int compareTo(Posting other)
      Specified by:
      compareTo in interface Comparable<Posting>
      See Also:
    • get

      public String get(Object key)
      Getter for a header field.
      Parameters:
      key - the name of the header
      Returns:
      the value of the header or null for none
    • getBodyAsHtml

      public String getBodyAsHtml()
      This is the getter for body in a HTMLified form.
      Returns:
      the body
    • getDateFormatted

      public String getDateFormatted()
      The method getDateFormatted returns the date in the form of a day.
      Returns:
      the date as day
    • getDay

      public String getDay()
      The method getDay returns the date in the form of a day.
      Returns:
      the date as day
    • getFromEmail

      public String getFromEmail()
      The method getFromEmail returns the from email.
      Returns:
      the from email
    • getFromName

      public String getFromName()
      The method getFromName returns the from name.
      Returns:
      the from name
    • getId

      public String getId()
      This is the getter for id.
      Returns:
      the body
    • getOrDefault

      public String getOrDefault(Object key, String defaultValue)
      Getter for a header field with a fall-back value.
      Parameters:
      key - the key
      defaultValue - the fall-back value
      Returns:
      the header field or the fall-back if the header is undefined
    • getSubject

      public String getSubject()
      This is the getter for subject.
      Returns:
      the subject
    • put

      public String put(String key, String value)
      Setter for a header field.
      Parameters:
      key - the key
      value - the value
      Returns:
      the value
    • putAll

      public void putAll(Map<? extends String,? extends String> m)
      Copies all of the mappings from the specified map to this map.
      Parameters:
      m - the values
      See Also:
    • setBody

      public void setBody(String body)
      This is the setter for body.
      Parameters:
      body - the new value for body
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: