Class TerminologyEntryValidator
java.lang.Object
com.atlassian.jira.i18n.terminology.TerminologyEntryValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidateNewTerminologyEntries(Collection<TerminologyEntry> terminologyEntries) Validate if thenewNameandnewNamePluralis valid andoriginalNameis allowed for newTerminologyEntry.
-
Constructor Details
-
TerminologyEntryValidator
-
-
Method Details
-
validateNewTerminologyEntries
public TerminologyEntryWriter.TerminologyValidationResult validateNewTerminologyEntries(Collection<TerminologyEntry> terminologyEntries) Validate if thenewNameandnewNamePluralis valid andoriginalNameis allowed for newTerminologyEntry. Provided names are changed to lowercase and trimmed from whitespaces.newNameandnewNamePluralcan only be composed of letters, numbers and whitespaces.newNameandnewNamePluralare not valid when they are:- null,
- empty,
- composed only of whitespaces,
- used by other
TerminologyEntryas new name, - equal to any restricted JQL words
Operator.values(). - equal to other than this object
TerminologyEntry.getOriginalName()listed inValidatedTerminologyEntryImpl.AllowedOriginalName,
Allowed values for
originalNameare specified by theValidatedTerminologyEntryImpl.AllowedOriginalName.- Returns:
- valid result with
TerminologyEntryif validation passed. Otherwise a result with error collection. Errors have fields set to affected name, one of "originalName", "newName" or "newNamePlural". Their message indicates what is the issue. The reason for all of them is set toErrorCollection.Reason.VALIDATION_FAILED.
-