com.redhat.rhn.domain.action
Class ActionFormatter

java.lang.Object
  extended by com.redhat.rhn.domain.action.ActionFormatter
Direct Known Subclasses:
ConfigActionFormatter, ConfigUploadActionFormatter, ErrataActionFormatter, ScriptActionFormatter

public class ActionFormatter
extends java.lang.Object

ActionFormatter - Class that is responsible for properly formatting the fields on an Action object. This is so we can localize the output from certain fields as well as produce an HTML version for output on certain fields.


Constructor Summary
ActionFormatter(Action actionIn)
          Create an ActionFormatter with the associated Action.
 
Method Summary
protected  Action getAction()
          Get the Action for this Formatter
 java.lang.String getActionType()
          Get the Action Type
 java.lang.String getEarliestDate()
          Get the earliest date
 java.lang.String getName()
          Get the Name of the Action
 java.lang.String getNotes()
          Get an HTML version of the notes field
protected  java.lang.String getNotesBody()
          No body for the default formatter
protected  java.lang.String getNotesHeader()
          Get the first section of the Notes field
 java.lang.String getScheduler()
          get the login of the scheduler User
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionFormatter

public ActionFormatter(Action actionIn)
Create an ActionFormatter with the associated Action.

Parameters:
actionIn - the Action we associate with this Formatter
Method Detail

getAction

protected Action getAction()
Get the Action for this Formatter

Returns:
Action associated with this formatter.

getNotesHeader

protected java.lang.String getNotesHeader()
Get the first section of the Notes field

Returns:
String of the first section

getNotesBody

protected java.lang.String getNotesBody()
No body for the default formatter

Returns:
returns an empty string.

getNotes

public java.lang.String getNotes()
Get an HTML version of the notes field

Returns:
the HTML String representation of the Notes

getName

public java.lang.String getName()
Get the Name of the Action

Returns:
String name

getActionType

public java.lang.String getActionType()
Get the Action Type

Returns:
String of the ActionType

getEarliestDate

public java.lang.String getEarliestDate()
Get the earliest date

Returns:
String version of the earliest date

getScheduler

public java.lang.String getScheduler()
get the login of the scheduler User

Returns:
String login of the User