Kie Workbench - Common - Services API 6.2.0.Beta1

org.kie.workbench.common.services.backend.validation
Interface FileNameValidator


public interface FileNameValidator

Generic validator for Path based resources


Method Summary
 boolean accept(org.uberfire.backend.vfs.Path path)
          Indicates if the current parameter path matched the current validator
 boolean accept(String fileName)
          Indicates if the current parameter path matched the current validator
 int getPriority()
          Defines the validator priority in terms of validator resolution.
 boolean isValid(String value)
          Validate the value
 

Method Detail

getPriority

int getPriority()
Defines the validator priority in terms of validator resolution. Lower is lower priority.

Returns:
the priority

accept

boolean accept(String fileName)
Indicates if the current parameter path matched the current validator

Parameters:
fileName - File name to validate (including extension)
Returns:
true if matches, otherwise false

accept

boolean accept(org.uberfire.backend.vfs.Path path)
Indicates if the current parameter path matched the current validator

Parameters:
path - Path to validate
Returns:
true if matches, otherwise false

isValid

boolean isValid(String value)
Validate the value

Parameters:
value - Value to be validated

Kie Workbench - Common - Services API 6.2.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.