org.apache.directory.shared.ldap.schema.syntax
Class PrintableStringSyntaxChecker

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.syntax.AbstractSyntaxChecker
      extended by org.apache.directory.shared.ldap.schema.syntax.PrintableStringSyntaxChecker
All Implemented Interfaces:
SyntaxChecker

public class PrintableStringSyntaxChecker
extends AbstractSyntaxChecker

A SyntaxChecker which verifies that a value is a Printable String according to RFC 4517. From RFC 4517 : PrintableString = 1*PrintableCharacter PrintableCharacter = ALPHA | DIGIT | SQUOTE | LPAREN | RPAREN | PLUS | COMMA | HYPHEN | DOT | EQUALS | SLASH | COLON | QUESTION | SPACE SLASH = %x2F ; forward slash ("/") COLON = %x3A ; colon (":") QUESTION= %x3F ; question mark ("?") From RFC 4512 : ALPHA = %x41-5A | %x61-7A ; "A"-"Z" / "a"-"z" DIGIT = %x30 | LDIGIT ; "0"-"9" LDIGIT = %x31-39 ; "1"-"9" SQUOTE = %x27 ; single quote ("'") LPAREN = %x28 ; left paren ("(") RPAREN = %x29 ; right paren (")") PLUS = %x2B ; plus sign ("+") COMMA = %x2C ; comma (",") HYPHEN = %x2D ; hyphen ("-") DOT = %x2E ; period (".") EQUALS = %x3D ; equals sign ("=") SPACE = %x20 ; space (" ")

Version:
$Rev$
Author:
Apache Directory Project

Constructor Summary
  PrintableStringSyntaxChecker()
          Creates a new instance of PrintableStringSyntaxChecker.
protected PrintableStringSyntaxChecker(java.lang.String oid)
          Creates a new instance of PrintableStringSyntaxChecker.
 
Method Summary
 boolean isValidSyntax(java.lang.Object value)
          Determines if the attribute's value conforms to the attribute syntax.
 
Methods inherited from class org.apache.directory.shared.ldap.schema.syntax.AbstractSyntaxChecker
assertSyntax, getSyntaxOid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintableStringSyntaxChecker

public PrintableStringSyntaxChecker()
Creates a new instance of PrintableStringSyntaxChecker.


PrintableStringSyntaxChecker

protected PrintableStringSyntaxChecker(java.lang.String oid)
Creates a new instance of PrintableStringSyntaxChecker.

Parameters:
oid - the oid to associate with this new SyntaxChecker
Method Detail

isValidSyntax

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

Parameters:
value - the value of some attribute with the syntax
Returns:
true if the value is in the valid syntax, false otherwise


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.