Class DeliveryMethodSyntaxChecker
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
-
- org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
-
- org.apache.directory.api.ldap.model.schema.SyntaxChecker
-
- org.apache.directory.api.ldap.model.schema.syntaxCheckers.DeliveryMethodSyntaxChecker
-
- All Implemented Interfaces:
Serializable,SchemaObject
public final class DeliveryMethodSyntaxChecker extends SyntaxChecker
A SyntaxChecker which verifies that a value is a delivery method according to RFC 4517. From RFC 4517 & RFC 4512:DeliveryMethod = pdm *( WSP DOLLAR WSP pdm ) pdm = "any" | "mhs" | "physical" | "telex" | "teletex" | "g3fax" | "g4fax" | "ia5" | "videotex" | "telephone" WSP = 0*SPACE ; zero or more " " DOLLAR = %x24 ; dollar sign ("$") SPACE = %x20 ; space (" ")- Author:
- Apache Directory Project
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeliveryMethodSyntaxChecker.BuilderA static Builder for this class-
Nested classes/interfaces inherited from class org.apache.directory.api.ldap.model.schema.SyntaxChecker
SyntaxChecker.SCBuilder<SC>
-
-
Field Summary
Fields Modifier and Type Field Description private static Set<String>DELIVERY_METHODSThe Set which contains the delivery methodsstatic DeliveryMethodSyntaxCheckerINSTANCEA static instance of DeliveryMethodSyntaxCheckerprivate static String[]PDMS-
Fields inherited from class org.apache.directory.api.ldap.model.schema.SyntaxChecker
LOG, serialVersionUID
-
Fields inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification
-
-
Constructor Summary
Constructors Modifier Constructor Description privateDeliveryMethodSyntaxChecker(String oid)Creates a new instance of DeliveryMethodSyntaxChecker.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeliveryMethodSyntaxChecker.Builderbuilder()private intisPdm(String strValue, int start, Set<String> pdms)Check if the string contains a delivery method which has not already been found.booleanisValidSyntax(Object value)Determines if the attribute's value conforms to the attribute syntax.-
Methods inherited from class org.apache.directory.api.ldap.model.schema.SyntaxChecker
equals, setSchemaManager, toString
-
Methods inherited from class org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
copy, getBytecode, getFqcn, hashCode, isValid, setBytecode, setFqcn
-
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, clear, compareOid, computeHashCode, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
-
-
-
Field Detail
-
PDMS
private static final String[] PDMS
-
DELIVERY_METHODS
private static final Set<String> DELIVERY_METHODS
The Set which contains the delivery methods
-
INSTANCE
public static final DeliveryMethodSyntaxChecker INSTANCE
A static instance of DeliveryMethodSyntaxChecker
-
-
Constructor Detail
-
DeliveryMethodSyntaxChecker
private DeliveryMethodSyntaxChecker(String oid)
Creates a new instance of DeliveryMethodSyntaxChecker.- Parameters:
oid- The OID to use for this SyntaxChecker
-
-
Method Detail
-
builder
public static DeliveryMethodSyntaxChecker.Builder builder()
- Returns:
- An instance of the Builder for this class
-
isPdm
private int isPdm(String strValue, int start, Set<String> pdms)
Check if the string contains a delivery method which has not already been found.- Parameters:
strValue- The string we want to look into for a PDMstart- The current position in the stringpdms- The set containing all the PDM- Returns:
- if a Prefered Delivery Method is found in the given string, returns its position, otherwise, returns -1
-
isValidSyntax
public boolean isValidSyntax(Object value)
Determines if the attribute's value conforms to the attribute syntax.- Overrides:
isValidSyntaxin classSyntaxChecker- Parameters:
value- the value of some attribute with the syntax- Returns:
- true if the value is in the valid syntax, false otherwise
-
-