Class DefaultFileNameValidator
- java.lang.Object
-
- org.uberfire.ext.editor.commons.backend.validation.DefaultFileNameValidator
-
- All Implemented Interfaces:
FileNameValidator
@ApplicationScoped public class DefaultFileNameValidator extends Object implements FileNameValidator
Default validation of resource file names
-
-
Constructor Summary
Constructors Constructor Description DefaultFileNameValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(String fileName)Indicates if the current parameter path matched the current validatorbooleanaccept(org.uberfire.backend.vfs.Path path)Indicates if the current parameter path matched the current validatorintgetPriority()Defines the validator priority in terms of validator resolution.booleanisValid(String value)Validate the value
-
-
-
Method Detail
-
getPriority
public int getPriority()
Description copied from interface:FileNameValidatorDefines the validator priority in terms of validator resolution. Lower is lower priority.- Specified by:
getPriorityin interfaceFileNameValidator- Returns:
- the priority
-
accept
public boolean accept(String fileName)
Description copied from interface:FileNameValidatorIndicates if the current parameter path matched the current validator- Specified by:
acceptin interfaceFileNameValidator- Parameters:
fileName- File name to validate (including extension)- Returns:
- true if matches, otherwise false
-
accept
public boolean accept(org.uberfire.backend.vfs.Path path)
Description copied from interface:FileNameValidatorIndicates if the current parameter path matched the current validator- Specified by:
acceptin interfaceFileNameValidator- Parameters:
path- Path to validate- Returns:
- true if matches, otherwise false
-
isValid
public boolean isValid(String value)
Description copied from interface:FileNameValidatorValidate the value- Specified by:
isValidin interfaceFileNameValidator- Parameters:
value- Value to be validated
-
-