public class

DefaultFormatSettingsManager

extends Object
implements FormatSettingsManager
java.lang.Object
   ↳ com.atlassian.confluence.core.DefaultFormatSettingsManager

Class Overview

Implementation of FormatSettingsManager which persists the date format settings in Bandana.

Returns constant default values if the configuration has not been set.
See Also
  • com.atlassian.bandana.BandanaManager

Summary

Constants
String BLOG_DATE_PATTERN
String DEFAULT_DATE_PATTERN
String DEFAULT_DATE_TIME_PATTERN
String DEFAULT_DECIMAL_NUMBER_PATTERN
String DEFAULT_LONG_NUMBER_PATTERN
String DEFAULT_TIME_PATTERN
String EDITOR_BLOG_DATE_PATTERN
Public Constructors
DefaultFormatSettingsManager()
Public Methods
String getDateFormat()
Returns the formatting pattern used for dates.
String getDateTimeFormat()
Returns the formatting pattern used for date and time together.
@Deprecated String getDayFormat()
This method is deprecated. since 3.5 this simply redirects to getDateFormat. Previously defaulted to "MMM dd"
String getDecimalNumberFormat()
Returns the formatting pattern used for decimal numbers.
String getEditorBlogPostDate()
Returns the date time format for the editor blog post date
String getLongNumberFormat()
Returns the formatting pattern used for integer numbers.
String getTimeFormat()
Returns the formatting pattern used for times.
void setBandanaManager(BandanaManager bandanaManager)
void setDateFormat(String pattern)
Stores the formatting pattern to be used for dates.
void setDateTimeFormat(String pattern)
Stores the formatting pattern to be used for date and time together.
@Deprecated void setDayFormat(String pattern)
This method is deprecated. since 3.5 dayFormat is no longer supported
void setDecimalNumberFormat(String pattern)
Stores the formatting pattern to be used for decimal numbers.
void setLongNumberFormat(String pattern)
Stores the formatting pattern to be used for integer numbers.
void setTimeFormat(String pattern)
Stores the formatting pattern to be used for times.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.core.FormatSettingsManager

Constants

public static final String BLOG_DATE_PATTERN

Constant Value: "MMM dd, yyyy"

public static final String DEFAULT_DATE_PATTERN

Constant Value: "MMM dd, yyyy"

public static final String DEFAULT_DATE_TIME_PATTERN

Constant Value: "MMM dd, yyyy HH:mm"

public static final String DEFAULT_DECIMAL_NUMBER_PATTERN

Constant Value: "###############.##########"

public static final String DEFAULT_LONG_NUMBER_PATTERN

Constant Value: "###############"

public static final String DEFAULT_TIME_PATTERN

Constant Value: "h:mm a"

public static final String EDITOR_BLOG_DATE_PATTERN

Constant Value: "yyyy-MM-dd"

Public Constructors

public DefaultFormatSettingsManager ()

Public Methods

public String getDateFormat ()

Returns the formatting pattern used for dates. Typically something like "d MMM, yyyy".

public String getDateTimeFormat ()

Returns the formatting pattern used for date and time together. Typically something like "d MMM, yyyy HH:mm".

@Deprecated public String getDayFormat ()

This method is deprecated.
since 3.5 this simply redirects to getDateFormat. Previously defaulted to "MMM dd"

Was previously a slightly shorter format for representing a day, usually without a year. Is now identical to getDateFormat().

Returns
  • the String representation of the date format

public String getDecimalNumberFormat ()

Returns the formatting pattern used for decimal numbers. Typically something like "###############.##########".

public String getEditorBlogPostDate ()

Returns the date time format for the editor blog post date

public String getLongNumberFormat ()

Returns the formatting pattern used for integer numbers. Typically something like "###############".

public String getTimeFormat ()

Returns the formatting pattern used for times. Typically something like "h:mm a".

public void setBandanaManager (BandanaManager bandanaManager)

public void setDateFormat (String pattern)

Stores the formatting pattern to be used for dates.

Parameters
pattern a pattern compatible with java.text.SimpleDateFormat

public void setDateTimeFormat (String pattern)

Stores the formatting pattern to be used for date and time together.

Parameters
pattern a pattern compatible with java.text.SimpleDateFormat

@Deprecated public void setDayFormat (String pattern)

This method is deprecated.
since 3.5 dayFormat is no longer supported

Does nothing. Previously set the "dayFormat", which has been dropped in favour of always using getDateFormat().

public void setDecimalNumberFormat (String pattern)

Stores the formatting pattern to be used for decimal numbers.

Parameters
pattern a pattern compatible with java.text.DecimalFormat

public void setLongNumberFormat (String pattern)

Stores the formatting pattern to be used for integer numbers.

Parameters
pattern a pattern compatible with java.text.DecimalFormat

public void setTimeFormat (String pattern)

Stores the formatting pattern to be used for times.

Parameters
pattern a pattern compatible with java.text.SimpleDateFormat