public interface

FormatSettingsManager

com.atlassian.confluence.core.FormatSettingsManager
Known Indirect Subclasses

Class Overview

Persistent storage and retrieval of format settings. Implementations should return a default value if no configuration currently exists.

Summary

Public Methods
abstract String getDateFormat()
Returns the formatting pattern used for dates.
abstract String getDateTimeFormat()
Returns the formatting pattern used for date and time together.
abstract String getDayFormat()
This method is deprecated. since 3.5 this simply redirects to getDateFormat. Previously defaulted to "MMM dd"
abstract String getDecimalNumberFormat()
Returns the formatting pattern used for decimal numbers.
abstract String getEditorBlogPostDate()
Returns the date time format for the editor blog post date
abstract String getLongNumberFormat()
Returns the formatting pattern used for integer numbers.
abstract String getTimeFormat()
Returns the formatting pattern used for times.
abstract void setDateFormat(String pattern)
Stores the formatting pattern to be used for dates.
abstract void setDateTimeFormat(String pattern)
Stores the formatting pattern to be used for date and time together.
abstract void setDayFormat(String pattern)
This method is deprecated. since 3.5 dayFormat is no longer supported
abstract void setDecimalNumberFormat(String pattern)
Stores the formatting pattern to be used for decimal numbers.
abstract void setLongNumberFormat(String pattern)
Stores the formatting pattern to be used for integer numbers.
abstract void setTimeFormat(String pattern)
Stores the formatting pattern to be used for times.

Public Methods

public abstract String getDateFormat ()

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

public abstract String getDateTimeFormat ()

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

public abstract 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 abstract String getDecimalNumberFormat ()

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

public abstract String getEditorBlogPostDate ()

Returns the date time format for the editor blog post date

public abstract String getLongNumberFormat ()

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

public abstract String getTimeFormat ()

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

public abstract void setDateFormat (String pattern)

Stores the formatting pattern to be used for dates.

Parameters
pattern a pattern compatible with SimpleDateFormat

public abstract void setDateTimeFormat (String pattern)

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

Parameters
pattern a pattern compatible with SimpleDateFormat

public abstract 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().

See Also

public abstract void setDecimalNumberFormat (String pattern)

Stores the formatting pattern to be used for decimal numbers.

Parameters
pattern a pattern compatible with java.text.DecimalFormat

public abstract void setLongNumberFormat (String pattern)

Stores the formatting pattern to be used for integer numbers.

Parameters
pattern a pattern compatible with java.text.DecimalFormat

public abstract void setTimeFormat (String pattern)

Stores the formatting pattern to be used for times.

Parameters
pattern a pattern compatible with SimpleDateFormat