com.atlassian.jira.issue.history
Class DateTimeFieldChangeLogHelperImpl

java.lang.Object
  extended by com.atlassian.jira.issue.history.DateTimeFieldChangeLogHelperImpl
All Implemented Interfaces:
DateTimeFieldChangeLogHelper

public class DateTimeFieldChangeLogHelperImpl
extends Object
implements DateTimeFieldChangeLogHelper

Since:
v4.4

Constructor Summary
DateTimeFieldChangeLogHelperImpl(DateTimeFormatterFactory dateTimeFormatterFactory)
           
 
Method Summary
 String createChangelogValueForDateField(Date date)
          Converts a Date into a string representation for the issue change history.
 String createChangelogValueForDateTimeField(Date date)
          Converts a Date into a string representation for the issue change history.
 String renderChangeHistoryValueDate(String dateValue, String dateStr)
          Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateField().
 String renderChangeHistoryValueDateTime(String dateTimeValue, String dateTimeString)
          Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateTimeField().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeFieldChangeLogHelperImpl

public DateTimeFieldChangeLogHelperImpl(DateTimeFormatterFactory dateTimeFormatterFactory)
Method Detail

createChangelogValueForDateTimeField

public String createChangelogValueForDateTimeField(Date date)
Description copied from interface: DateTimeFieldChangeLogHelper
Converts a Date into a string representation for the issue change history. Call this method, if you want to store a change history value for a (custom)field which stores date AND time information.

Specified by:
createChangelogValueForDateTimeField in interface DateTimeFieldChangeLogHelper
Parameters:
date - the value Date of the (custome)field
Returns:
a string representation of the date, which contains date AND time.

createChangelogValueForDateField

public String createChangelogValueForDateField(Date date)
Description copied from interface: DateTimeFieldChangeLogHelper
Converts a Date into a string representation for the issue change history. Call this method, if you want to store a change history value for a (custom)field which stores ONLY calendar date (day, month, year) information.

Specified by:
createChangelogValueForDateField in interface DateTimeFieldChangeLogHelper
Parameters:
date - date the value Date of the (custome)field
Returns:
a string representation of the date.

renderChangeHistoryValueDate

public String renderChangeHistoryValueDate(String dateValue,
                                           String dateStr)
Description copied from interface: DateTimeFieldChangeLogHelper
Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateField(). This value should contain only date information. The com.atlassian.jira.datetime.DateTimeStyle.DATE formatter is used to render the change history value.

Specified by:
renderChangeHistoryValueDate in interface DateTimeFieldChangeLogHelper
Parameters:
dateValue - the value of the ChangeHistoryItem
dateStr - the string of the ChangeHistoryItem, if it can't convert the dateValue it will return the dateStr.
Returns:
either a formatted date string, if it failed to convert the value it return the dateStr.

renderChangeHistoryValueDateTime

public String renderChangeHistoryValueDateTime(String dateTimeValue,
                                               String dateTimeString)
Description copied from interface: DateTimeFieldChangeLogHelper
Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateTimeField(). This value should contain time AND time information. The com.atlassian.jira.datetime.DateTimeStyle.DATE_TIME_PICKER formatter is used to render the change history value.

Specified by:
renderChangeHistoryValueDateTime in interface DateTimeFieldChangeLogHelper
Parameters:
dateTimeValue - the value of the ChangeHistoryItem
dateTimeString - the string of the ChangeHistoryItem, if it can't convert the dateTimeValue it will return the dateStr.
Returns:
either a formatted date string, if it failed to convert the value it return the dateTimeString.


Copyright © 2002-2014 Atlassian. All Rights Reserved.