Package org.ldaptive.schema
Class DITContentRule
- java.lang.Object
-
- org.ldaptive.AbstractFreezable
-
- org.ldaptive.schema.AbstractSchemaElement
-
- org.ldaptive.schema.AbstractNamedSchemaElement
-
- org.ldaptive.schema.DITContentRule
-
- All Implemented Interfaces:
Freezable,SchemaElement
public final class DITContentRule extends AbstractNamedSchemaElement
Bean for a DIT content rule schema element.DITContentRuleDescription = LPAREN WSP numericoid ; object identifier [ SP "NAME" SP qdescrs ] ; short names (descriptors) [ SP "DESC" SP qdstring ] ; description [ SP "OBSOLETE" ] ; not active [ SP "AUX" SP oids ] ; auxiliary object classes [ SP "MUST" SP oids ] ; attribute types [ SP "MAY" SP oids ] ; attribute types [ SP "NOT" SP oids ] ; attribute types extensions WSP RPAREN ; extensions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDITContentRule.DefaultDefinitionFunctionParses a DIT content rule definition using a char buffer.static classDITContentRule.RegexDefinitionFunctionParses a DIT content rule definition using a regular expression.
-
Field Summary
Fields Modifier and Type Field Description private String[]auxiliaryClassesAuxiliary classes.private static intHASH_CODE_SEEDhash code seed.private StringoidOID.private String[]optionalAttributesOptional attributes.private String[]requiredAttributesRequired attributes.private String[]restrictedAttributesRestricted attributes.
-
Constructor Summary
Constructors Constructor Description DITContentRule(String s)Creates a new DIT content rule.DITContentRule(String oid, String[] names, String description, boolean obsolete, String[] auxiliaryClasses, String[] requiredAttributes, String[] optionalAttributes, String[] restrictedAttributes, Extensions extensions)Creates a new DIT content rule.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Stringformat()Returns this schema element as formatted string per RFC 4512.String[]getAuxiliaryClasses()Returns the auxiliary classes.StringgetOID()Returns the oid.String[]getOptionalAttributes()Returns the optional attributes.String[]getRequiredAttributes()Returns the required attributes.String[]getRestrictedAttributes()Returns the restricted attributes.inthashCode()static DITContentRuleparse(String definition)Parses the supplied definition string and creates an initialized DIT content rule.voidsetAuxiliaryClasses(String[] s)Sets the auxiliary classes.voidsetOptionalAttributes(String[] s)Sets the optional attributes.voidsetRequiredAttributes(String[] s)Sets the required attributes.voidsetRestrictedAttributes(String[] s)Sets the restricted attributes.StringtoString()-
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsolete
-
Methods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, freeze, getDescription, getExtensions, setDescription, setExtensions
-
Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, isFrozen
-
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
oid
private final String oid
OID.
-
auxiliaryClasses
private String[] auxiliaryClasses
Auxiliary classes.
-
requiredAttributes
private String[] requiredAttributes
Required attributes.
-
optionalAttributes
private String[] optionalAttributes
Optional attributes.
-
restrictedAttributes
private String[] restrictedAttributes
Restricted attributes.
-
-
Constructor Detail
-
DITContentRule
public DITContentRule(String s)
Creates a new DIT content rule.- Parameters:
s- oid
-
DITContentRule
public DITContentRule(String oid, String[] names, String description, boolean obsolete, String[] auxiliaryClasses, String[] requiredAttributes, String[] optionalAttributes, String[] restrictedAttributes, Extensions extensions)
Creates a new DIT content rule.- Parameters:
oid- oidnames- namesdescription- descriptionobsolete- obsoleteauxiliaryClasses- auxiliary classesrequiredAttributes- required attributesoptionalAttributes- optional attributesrestrictedAttributes- restricted attributesextensions- extensions
-
-
Method Detail
-
getOID
public String getOID()
Returns the oid.- Returns:
- oid
-
getAuxiliaryClasses
public String[] getAuxiliaryClasses()
Returns the auxiliary classes.- Returns:
- auxiliary classes
-
setAuxiliaryClasses
public void setAuxiliaryClasses(String[] s)
Sets the auxiliary classes.- Parameters:
s- auxiliary classes
-
getRequiredAttributes
public String[] getRequiredAttributes()
Returns the required attributes.- Returns:
- required attributes
-
setRequiredAttributes
public void setRequiredAttributes(String[] s)
Sets the required attributes.- Parameters:
s- required attributes
-
getOptionalAttributes
public String[] getOptionalAttributes()
Returns the optional attributes.- Returns:
- optional attributes
-
setOptionalAttributes
public void setOptionalAttributes(String[] s)
Sets the optional attributes.- Parameters:
s- optional attributes
-
getRestrictedAttributes
public String[] getRestrictedAttributes()
Returns the restricted attributes.- Returns:
- restricted attributes
-
setRestrictedAttributes
public void setRestrictedAttributes(String[] s)
Sets the restricted attributes.- Parameters:
s- restricted attributes
-
parse
public static DITContentRule parse(String definition) throws SchemaParseException
Parses the supplied definition string and creates an initialized DIT content rule.- Parameters:
definition- to parse- Returns:
- DIT content rule
- Throws:
SchemaParseException- if the supplied definition is invalid
-
format
public String format()
Description copied from interface:SchemaElementReturns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractSchemaElement
-
hashCode
public int hashCode()
- Specified by:
hashCodein classAbstractSchemaElement
-
-