Package com.sodius.oslc.server.core.nls
Enum Class Term
- All Implemented Interfaces:
Serializable,Comparable<Term>,java.lang.constant.Constable
Defines terms that can be
customized by applications integrating the framework.
A typical example is PROJECT that can be rendered as "project", "product", "space"
or anything else in a given application.
This enables to adapt messages displayed to end-user and use vocabulary that they are familiar with.
Terms are usually combined with articles in sentences:
String projectTerm = Article.DEFINITE.capitalizedSingular(Term.PROJECT);which renders
"The project" in English and "Le projet" in French,
but can be adapted to "The space" and "L'espace" in a given application.- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe term to refer to an artifact of the application that can have OSLC links.The term to refer to a Change ManagementDeliverable.The term to refer to aProjectArea, in which associations are defined. -
Method Summary
Modifier and TypeMethodDescriptionReturns the capitalized plural term forpreferred locales.Returns the capitalized singular term forpreferred locales.voidoverrideWith(TermDefinition definition) Overrides the default words for this term with the given definition.plural()Returns the plural term forpreferred locales.static voidreset()Resets the term definitions, to discard any custom definition that may have beenregistered.singular()Returns the singular term forpreferred locales.static TermReturns the enum constant of this class with the specified name.static Term[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ARTIFACT
The term to refer to an artifact of the application that can have OSLC links. -
DELIVERABLE
The term to refer to a Change ManagementDeliverable. -
PROJECT
The term to refer to aProjectArea, in which associations are defined.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
reset
public static void reset()Resets the term definitions, to discard any custom definition that may have beenregistered. -
singular
Returns the singular term forpreferred locales.- Returns:
- the singular term for preferred locales, e.g.
"project"
-
capitalizedSingular
Returns the capitalized singular term forpreferred locales.- Returns:
- the capitalized singular term for preferred locales, e.g.
"Project"
-
plural
Returns the plural term forpreferred locales.- Returns:
- the plural term for preferred locales, e.g.
"projects"
-
capitalizedPlural
Returns the capitalized plural term forpreferred locales.- Returns:
- the capitalized plural term for preferred locales, e.g.
"Projects"
-
overrideWith
Overrides the default words for this term with the given definition.- Parameters:
definition- the definition with words for a given locale to use for this term
-