Package org.forgerock.opendj.ldap.schema
Class DitContentRule
- java.lang.Object
-
- org.forgerock.opendj.ldap.schema.DitContentRule
-
- All Implemented Interfaces:
SchemaElement
public final class DitContentRule extends Object
This class defines a DIT content rule, which defines the set of allowed, required, and prohibited attributes for entries with a given structural objectclass, and also indicates which auxiliary classes may be included in the entry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDitContentRule.BuilderA fluent API for incrementally constructing DIT content rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Returnstrueif the provided object is a DIT content rule having the same structural object class OID as this DIT content rule.Set<ObjectClass>getAuxiliaryClasses()Returns an unmodifiable set containing the auxiliary objectclasses that may be used for entries associated with this DIT content rule.StringgetDescription()Returns the description of this schema element, or the empty string if it does not have a description.Map<String,List<String>>getExtraProperties()Returns an unmodifiable map containing all of the extra properties associated with this schema element.StringgetNameOrOid()Returns the name or structural class OID for this schema definition.List<String>getNames()Returns an unmodifiable list containing the user-defined names that may be used to reference this schema definition.Set<AttributeType>getOptionalAttributes()Returns an unmodifiable set containing the optional attributes for this DIT content rule.Set<AttributeType>getProhibitedAttributes()Returns an unmodifiable set containing the prohibited attributes for this DIT content rule.Set<AttributeType>getRequiredAttributes()Returns an unmodifiable set containing the required attributes for this DIT content rule.ObjectClassgetStructuralClass()Returns the structural objectclass for this DIT content rule.StringgetStructuralClassOid()Returns the structural class OID for this schema definition.inthashCode()Returns the hash code for this DIT content rule.booleanhasName(String name)Indicates whether this schema definition has the specified name.booleanhasNameOrOid(String value)Indicates whether this schema definition has the specified name or structural class OID.booleanisObsolete()Indicates whether this schema definition is declared "obsolete".booleanisOptional(AttributeType attributeType)Indicates whether the provided attribute type is included in the optional attribute list for this DIT content rule.booleanisRequired(AttributeType attributeType)Indicates whether the provided attribute type is included in the required attribute list for this DIT content rule.booleanisRequiredOrOptional(AttributeType attributeType)Indicates whether the provided attribute type is in the list of required or optional attributes for this DIT content rule.StringtoString()Returns the string representation of this schema element as defined in RFC 2252.
-
-
-
Method Detail
-
equals
public boolean equals(Object o)
Returnstrueif the provided object is a DIT content rule having the same structural object class OID as this DIT content rule.- Parameters:
o- The object to be compared.- Returns:
trueif the provided object is a DIT content rule having the same numeric OID as this DIT content rule.
-
getAuxiliaryClasses
public Set<ObjectClass> getAuxiliaryClasses()
Returns an unmodifiable set containing the auxiliary objectclasses that may be used for entries associated with this DIT content rule.- Returns:
- An unmodifiable set containing the auxiliary objectclasses that may be used for entries associated with this DIT content rule.
-
getNameOrOid
public String getNameOrOid()
Returns the name or structural class OID for this schema definition. If it has one or more names, then the primary name will be returned. If it does not have any names, then the OID will be returned.- Returns:
- The name or OID for this schema definition.
-
getNames
public List<String> getNames()
Returns an unmodifiable list containing the user-defined names that may be used to reference this schema definition.- Returns:
- Returns an unmodifiable list containing the user-defined names that may be used to reference this schema definition.
-
getOptionalAttributes
public Set<AttributeType> getOptionalAttributes()
Returns an unmodifiable set containing the optional attributes for this DIT content rule.- Returns:
- An unmodifiable set containing the optional attributes for this DIT content rule.
-
getProhibitedAttributes
public Set<AttributeType> getProhibitedAttributes()
Returns an unmodifiable set containing the prohibited attributes for this DIT content rule.- Returns:
- An unmodifiable set containing the prohibited attributes for this DIT content rule.
-
getRequiredAttributes
public Set<AttributeType> getRequiredAttributes()
Returns an unmodifiable set containing the required attributes for this DIT content rule.- Returns:
- An unmodifiable set containing the required attributes for this DIT content rule.
-
getStructuralClass
public ObjectClass getStructuralClass()
Returns the structural objectclass for this DIT content rule.- Returns:
- The structural objectclass for this DIT content rule.
-
getStructuralClassOid
public String getStructuralClassOid()
Returns the structural class OID for this schema definition.- Returns:
- The structural class OID for this schema definition.
-
hashCode
public int hashCode()
Returns the hash code for this DIT content rule. It will be calculated as the hash code of the structural object class OID.- Returns:
- The hash code for this DIT content rule.
-
hasName
public boolean hasName(String name)
Indicates whether this schema definition has the specified name.- Parameters:
name- The name for which to make the determination.- Returns:
trueif the specified name is assigned to this schema definition, orfalseif not.
-
hasNameOrOid
public boolean hasNameOrOid(String value)
Indicates whether this schema definition has the specified name or structural class OID.- Parameters:
value- The value for which to make the determination.- Returns:
trueif the provided value matches the OID or one of the names assigned to this schema definition, orfalseif not.
-
isObsolete
public boolean isObsolete()
Indicates whether this schema definition is declared "obsolete".- Returns:
trueif this schema definition is declared "obsolete", orfalseif not.
-
isOptional
public boolean isOptional(AttributeType attributeType)
Indicates whether the provided attribute type is included in the optional attribute list for this DIT content rule.- Parameters:
attributeType- The attribute type for which to make the determination.- Returns:
trueif the provided attribute type is optional for this DIT content rule, orfalseif not.
-
isRequired
public boolean isRequired(AttributeType attributeType)
Indicates whether the provided attribute type is included in the required attribute list for this DIT content rule.- Parameters:
attributeType- The attribute type for which to make the determination.- Returns:
trueif the provided attribute type is required by this DIT content rule, orfalseif not.
-
isRequiredOrOptional
public boolean isRequiredOrOptional(AttributeType attributeType)
Indicates whether the provided attribute type is in the list of required or optional attributes for this DIT content rule.- Parameters:
attributeType- The attribute type for which to make the determination.- Returns:
trueif the provided attribute type is required or allowed for this DIT content rule, orfalseif it is not.
-
getDescription
public final String getDescription()
Description copied from interface:SchemaElementReturns the description of this schema element, or the empty string if it does not have a description.- Specified by:
getDescriptionin interfaceSchemaElement- Returns:
- The description of this schema element, or the empty string if it does not have a description.
-
getExtraProperties
public final Map<String,List<String>> getExtraProperties()
Description copied from interface:SchemaElementReturns an unmodifiable map containing all of the extra properties associated with this schema element.- Specified by:
getExtraPropertiesin interfaceSchemaElement- Returns:
- An unmodifiable map containing all of the extra properties associated with this schema element.
-
-