com.atlassian.jira.issue.fields
Class DefaultTextFieldCharacterLengthValidator

java.lang.Object
  extended by com.atlassian.jira.issue.fields.DefaultTextFieldCharacterLengthValidator
All Implemented Interfaces:
TextFieldCharacterLengthValidator

public class DefaultTextFieldCharacterLengthValidator
extends Object
implements TextFieldCharacterLengthValidator

Reads the maximum character length from the application properties.

Since:
v5.0.3

Constructor Summary
DefaultTextFieldCharacterLengthValidator(TextFieldLimitProvider textFieldLimitProvider)
           
 
Method Summary
 long getMaximumNumberOfCharacters()
          Returns the maximum number of characters to be entered for a single field.
 boolean isTextTooLong(String text)
          Validate the length of the given string against the maximum number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTextFieldCharacterLengthValidator

public DefaultTextFieldCharacterLengthValidator(TextFieldLimitProvider textFieldLimitProvider)
Method Detail

isTextTooLong

public boolean isTextTooLong(String text)
Description copied from interface: TextFieldCharacterLengthValidator
Validate the length of the given string against the maximum number.

Specified by:
isTextTooLong in interface TextFieldCharacterLengthValidator
Parameters:
text - the text to be checked; can be null
Returns:
whether the given text is longer than the maximum number of characters; null is always valid

getMaximumNumberOfCharacters

public long getMaximumNumberOfCharacters()
Description copied from interface: TextFieldCharacterLengthValidator
Returns the maximum number of characters to be entered for a single field.

Specified by:
getMaximumNumberOfCharacters in interface TextFieldCharacterLengthValidator
Returns:
the maximum number of characters to be entered for a single field.


Copyright © 2002-2014 Atlassian. All Rights Reserved.