org.alfresco.util.schemacomp.validator
Class NameValidator

java.lang.Object
  extended by org.alfresco.util.schemacomp.validator.NameValidator
All Implemented Interfaces:
DbValidator

public class NameValidator
extends java.lang.Object
implements DbValidator

Validates the name of a DbObject using a regular expression. A regular expression can be supplied for each supported database dialect. In addition to dialect specific regular expressions, a default may be supplied - comparisons will fall back to the default if no specific dialect is matched.


Constructor Summary
NameValidator()
           
 
Method Summary
 java.util.regex.Pattern getPattern()
           
 java.lang.String getProperty(java.lang.String name)
           
 java.util.Set getPropertyNames()
           
 void setPattern(java.util.regex.Pattern pattern)
           
 void setProperty(java.lang.String name, java.lang.String value)
           
 void validate(DbObject reference, DbObject target, DiffContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameValidator

public NameValidator()
Method Detail

validate

public void validate(DbObject reference,
                     DbObject target,
                     DiffContext ctx)
Specified by:
validate in interface DbValidator

setPattern

public void setPattern(java.util.regex.Pattern pattern)

getPattern

public java.util.regex.Pattern getPattern()

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Specified by:
setProperty in interface DbValidator

getProperty

public java.lang.String getProperty(java.lang.String name)
Specified by:
getProperty in interface DbValidator

getPropertyNames

public java.util.Set getPropertyNames()
Specified by:
getPropertyNames in interface DbValidator


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