Liferay, as you know, is full of utility classes to perform various functions; one of these classes is called TextFormatter
and is extremely useful in the attribute names management, to conform to the standards imposed by Liferay.
TextFormatter
class does not have many methods but what we look now is the method format (String s, int style)
which converts the string passed as first parameter using a different algorithm depending on the second parameter.
The applicable styles are 16 and they are defined in the TextFormatter
class via some public constants represented by letters, listed below:
TextFormatter.A
- Converts
Web Search
inWEB_SEARCH
TextFormatter.B
- Converts
Web Search
inwebsearch
TextFormatter.C
- Converts
Web Search
inweb_search
TextFormatter.D
- Converts
Web Search
inWebSearch
TextFormatter.E
- Converts
Web Search
inweb search
TextFormatter.F
- Converts
Web Search
inwebSearch
TextFormatter.G
- Converts
formatId
inFormatId
TextFormatter.H
- Converts
formatId
informat id
TextFormatter.I
- Converts
FormatId
informatId
TextFormatter.J
- Converts
format-id
inFormat Id
TextFormatter.K
- Converts
formatId
informat-id
TextFormatter.L
- Converts
FormatId
informatId
andFOrmatId
inFOrmatId
TextFormatter.M
- Converts
format-id
informatId
TextFormatter.N
- Converts
format-id
informat_id
TextFormatter.O
- Converts
format_id
informat-id
TextFormatter.P
- Converts
formatID
informat-id