Package org.ldaptive.schema
Class DITContentRule
- java.lang.Object
-
- org.ldaptive.schema.AbstractSchemaElement
-
- org.ldaptive.schema.AbstractNamedSchemaElement
-
- org.ldaptive.schema.DITContentRule
-
- All Implemented Interfaces:
SchemaElement
public 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
- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DITContentRule.DefaultDefinitionFunction
Parses a DIT content rule definition using a char buffer.static class
DITContentRule.RegexDefinitionFunction
Parses a DIT content rule definition using a regular expression.
-
Constructor Summary
Constructors Constructor Description DITContentRule(java.lang.String s)
Creates a new DIT content rule.DITContentRule(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean obsolete, java.lang.String[] auxiliaryClasses, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, java.lang.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 boolean
equals(java.lang.Object o)
java.lang.String
format()
Returns this schema element as formatted string per RFC 4512.java.lang.String[]
getAuxiliaryClasses()
Returns the auxiliary classes.java.lang.String
getOID()
Returns the oid.java.lang.String[]
getOptionalAttributes()
Returns the optional attributes.java.lang.String[]
getRequiredAttributes()
Returns the required attributes.java.lang.String[]
getRestrictedAttributes()
Returns the restricted attributes.int
hashCode()
static DITContentRule
parse(java.lang.String definition)
Parses the supplied definition string and creates an initialized DIT content rule.void
setAuxiliaryClasses(java.lang.String[] s)
Sets the auxiliary classes.void
setOptionalAttributes(java.lang.String[] s)
Sets the optional attributes.void
setRequiredAttributes(java.lang.String[] s)
Sets the required attributes.void
setRestrictedAttributes(java.lang.String[] s)
Sets the restricted attributes.java.lang.String
toString()
-
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsolete
-
Methods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, getDescription, getExtensions, setDescription, setExtensions
-
-
-
-
Constructor Detail
-
DITContentRule
public DITContentRule(java.lang.String s)
Creates a new DIT content rule.- Parameters:
s
- oid
-
DITContentRule
public DITContentRule(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean obsolete, java.lang.String[] auxiliaryClasses, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, java.lang.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 java.lang.String getOID()
Returns the oid.- Returns:
- oid
-
getAuxiliaryClasses
public java.lang.String[] getAuxiliaryClasses()
Returns the auxiliary classes.- Returns:
- auxiliary classes
-
setAuxiliaryClasses
public void setAuxiliaryClasses(java.lang.String[] s)
Sets the auxiliary classes.- Parameters:
s
- auxiliary classes
-
getRequiredAttributes
public java.lang.String[] getRequiredAttributes()
Returns the required attributes.- Returns:
- required attributes
-
setRequiredAttributes
public void setRequiredAttributes(java.lang.String[] s)
Sets the required attributes.- Parameters:
s
- required attributes
-
getOptionalAttributes
public java.lang.String[] getOptionalAttributes()
Returns the optional attributes.- Returns:
- optional attributes
-
setOptionalAttributes
public void setOptionalAttributes(java.lang.String[] s)
Sets the optional attributes.- Parameters:
s
- optional attributes
-
getRestrictedAttributes
public java.lang.String[] getRestrictedAttributes()
Returns the restricted attributes.- Returns:
- restricted attributes
-
setRestrictedAttributes
public void setRestrictedAttributes(java.lang.String[] s)
Sets the restricted attributes.- Parameters:
s
- restricted attributes
-
parse
public static DITContentRule parse(java.lang.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 java.lang.String format()
Description copied from interface:SchemaElement
Returns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAbstractSchemaElement
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classAbstractSchemaElement
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-