org.apache.directory.shared.ldap.schema
Class RegexSyntaxChecker

java.lang.Object
  extended byorg.apache.directory.shared.ldap.schema.RegexSyntaxChecker
All Implemented Interfaces:
SyntaxChecker

public class RegexSyntaxChecker
extends java.lang.Object
implements SyntaxChecker

A SyntaxChecker implemented using Perl5 regular expressions to constrain values.

Version:
$Rev: 379008 $
Author:
Apache Directory Project

Constructor Summary
RegexSyntaxChecker(java.lang.String oid, java.lang.String[] matchExprArray)
          Creates a Syntax validator for a specific Syntax using Perl5 matching rules for validation.
 
Method Summary
 void assertSyntax(java.lang.Object value)
          Asserts whether or not the attribute's value conforms to the attribute syntax.
 java.lang.String getSyntaxOid()
          Gets the OID of the attribute syntax.
 boolean isValidSyntax(java.lang.Object value)
          Determines if the attribute's value conforms to the attribute syntax.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexSyntaxChecker

public RegexSyntaxChecker(java.lang.String oid,
                          java.lang.String[] matchExprArray)
Creates a Syntax validator for a specific Syntax using Perl5 matching rules for validation.

Parameters:
oid - the oid of the Syntax values checked
matchExprArray - the array of matching expressions
Method Detail

getSyntaxOid

public java.lang.String getSyntaxOid()
Description copied from interface: SyntaxChecker
Gets the OID of the attribute syntax.

Specified by:
getSyntaxOid in interface SyntaxChecker
Returns:
the object identifier of the Syntax this SyntaxChecker validates
See Also:
SyntaxChecker.getSyntaxOid()

isValidSyntax

public boolean isValidSyntax(java.lang.Object value)
Description copied from interface: SyntaxChecker
Determines if the attribute's value conforms to the attribute syntax.

Specified by:
isValidSyntax in interface SyntaxChecker
Parameters:
value - the value of some attribute with the syntax
Returns:
true if the value is in the valid syntax, false otherwise
See Also:
SyntaxChecker.isValidSyntax(java.lang.Object)

assertSyntax

public void assertSyntax(java.lang.Object value)
                  throws javax.naming.NamingException
Description copied from interface: SyntaxChecker
Asserts whether or not the attribute's value conforms to the attribute syntax.

Specified by:
assertSyntax in interface SyntaxChecker
Parameters:
value - the value of some attribute with the syntax
Throws:
javax.naming.NamingException - if the value does not conform to the attribute syntax.
See Also:
SyntaxChecker.assertSyntax(java.lang.Object)


Copyright © 2003-2006 . All Rights Reserved.