org.alfresco.util
Class FileNameValidator

java.lang.Object
  extended by org.alfresco.util.FileNameValidator

public class FileNameValidator
extends java.lang.Object

Static checker for valid file names.


Field Summary
static java.lang.String FILENAME_ILLEGAL_REGEX
          The bad file name pattern.
 
Constructor Summary
FileNameValidator()
           
 
Method Summary
static java.lang.String getValidFileName(java.lang.String fileName)
          Replaces illegal filename characters with '_'
static boolean isValid(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILENAME_ILLEGAL_REGEX

public static final java.lang.String FILENAME_ILLEGAL_REGEX
The bad file name pattern.

See Also:
Constant Field Values
Constructor Detail

FileNameValidator

public FileNameValidator()
Method Detail

isValid

public static boolean isValid(java.lang.String name)

getValidFileName

public static java.lang.String getValidFileName(java.lang.String fileName)
Replaces illegal filename characters with '_'



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.