Package com.unboundid.ldap.sdk.schema
Class DITContentRuleDefinition
- java.lang.Object
-
- com.unboundid.ldap.sdk.schema.SchemaElement
-
- com.unboundid.ldap.sdk.schema.DITContentRuleDefinition
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class DITContentRuleDefinition extends SchemaElement
This class provides a data structure that describes an LDAP DIT content rule schema element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DITContentRuleDefinition(java.lang.String s)Creates a new DIT content rule from the provided string representation.DITContentRuleDefinition(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean isObsolete, java.lang.String[] auxiliaryClasses, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, java.lang.String[] prohibitedAttributes, java.util.Map<java.lang.String,java.lang.String[]> extensions)Creates a new DIT content rule with the provided information.DITContentRuleDefinition(java.lang.String oid, java.lang.String name, java.lang.String description, java.lang.String[] auxiliaryClasses, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, java.lang.String[] prohibitedAttributes, java.util.Map<java.lang.String,java.lang.String[]> extensions)Creates a new DIT content rule with the provided information.DITContentRuleDefinition(java.lang.String oid, java.lang.String name, java.lang.String description, java.util.Collection<java.lang.String> auxiliaryClasses, java.util.Collection<java.lang.String> requiredAttributes, java.util.Collection<java.lang.String> optionalAttributes, java.util.Collection<java.lang.String> prohibitedAttributes, java.util.Map<java.lang.String,java.lang.String[]> extensions)Creates a new DIT content rule with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Indicates whether the provided object is equal to this schema element.java.lang.String[]getAuxiliaryClasses()Retrieves the names or OIDs of the auxiliary object classes that may be present in entries containing the structural class for this DIT content rule.java.lang.StringgetDescription()Retrieves the description for this DIT content rule, if available.java.util.Map<java.lang.String,java.lang.String[]>getExtensions()Retrieves the set of extensions for this DIT content rule.java.lang.StringgetNameOrOID()Retrieves the primary name that can be used to reference this DIT content rule.java.lang.String[]getNames()Retrieves the set of names for this DIT content rule.java.lang.StringgetOID()Retrieves the OID for the structural object class associated with this DIT content rule.java.lang.String[]getOptionalAttributes()Retrieves the names or OIDs of the attributes that are optionally allowed to be present in entries containing the structural object class for this DIT content rule.java.lang.String[]getProhibitedAttributes()Retrieves the names or OIDs of the attributes that are not allowed to be present in entries containing the structural object class for this DIT content rule.java.lang.String[]getRequiredAttributes()Retrieves the names or OIDs of the attributes that are required to be present in entries containing the structural object class for this DIT content rule.inthashCode()Retrieves a hash code for this schema element.booleanhasNameOrOID(java.lang.String s)Indicates whether the provided string matches the OID or any of the names for this DIT content rule.booleanisObsolete()Indicates whether this DIT content rule is declared obsolete.java.lang.StringtoString()Retrieves a string representation of this DIT content rule definition, in the format described in RFC 4512 section 4.1.6.-
Methods inherited from class com.unboundid.ldap.sdk.schema.SchemaElement
extensionsEqual
-
-
-
-
Constructor Detail
-
DITContentRuleDefinition
public DITContentRuleDefinition(java.lang.String s) throws LDAPException
Creates a new DIT content rule from the provided string representation.- Parameters:
s- The string representation of the DIT content rule to create, using the syntax described in RFC 4512 section 4.1.6. It must not benull.- Throws:
LDAPException- If the provided string cannot be decoded as a DIT content rule definition.
-
DITContentRuleDefinition
public DITContentRuleDefinition(java.lang.String oid, java.lang.String name, java.lang.String description, java.lang.String[] auxiliaryClasses, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, java.lang.String[] prohibitedAttributes, java.util.Map<java.lang.String,java.lang.String[]> extensions)
Creates a new DIT content rule with the provided information.- Parameters:
oid- The OID for the structural object class with which this DIT content rule is associated. It must not benull.name- The name for this DIT content rule. It may benullif the DIT content rule should only be referenced by OID.description- The description for this DIT content rule. It may benullif there is no description.auxiliaryClasses- The names/OIDs of the auxiliary object classes that may be present in entries containing this DIT content rule.requiredAttributes- The names/OIDs of the attributes which must be present in entries containing this DIT content rule.optionalAttributes- The names/OIDs of the attributes which may be present in entries containing this DIT content rule.prohibitedAttributes- The names/OIDs of the attributes which may not be present in entries containing this DIT content rule.extensions- The set of extensions for this DIT content rule. It may benullor empty if there should not be any extensions.
-
DITContentRuleDefinition
public DITContentRuleDefinition(java.lang.String oid, java.lang.String name, java.lang.String description, java.util.Collection<java.lang.String> auxiliaryClasses, java.util.Collection<java.lang.String> requiredAttributes, java.util.Collection<java.lang.String> optionalAttributes, java.util.Collection<java.lang.String> prohibitedAttributes, java.util.Map<java.lang.String,java.lang.String[]> extensions)
Creates a new DIT content rule with the provided information.- Parameters:
oid- The OID for the structural object class with which this DIT content rule is associated. It must not benull.name- The name for this DIT content rule. It may benullif the DIT content rule should only be referenced by OID.description- The description for this DIT content rule. It may benullif there is no description.auxiliaryClasses- The names/OIDs of the auxiliary object classes that may be present in entries containing this DIT content rule.requiredAttributes- The names/OIDs of the attributes which must be present in entries containing this DIT content rule.optionalAttributes- The names/OIDs of the attributes which may be present in entries containing this DIT content rule.prohibitedAttributes- The names/OIDs of the attributes which may not be present in entries containing this DIT content rule.extensions- The set of extensions for this DIT content rule. It may benullor empty if there should not be any extensions.
-
DITContentRuleDefinition
public DITContentRuleDefinition(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean isObsolete, java.lang.String[] auxiliaryClasses, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, java.lang.String[] prohibitedAttributes, java.util.Map<java.lang.String,java.lang.String[]> extensions)
Creates a new DIT content rule with the provided information.- Parameters:
oid- The OID for the structural object class with which this DIT content rule is associated. It must not benull.names- The set of names for this DIT content rule. It may benullor empty if the DIT content rule should only be referenced by OID.description- The description for this DIT content rule. It may benullif there is no description.isObsolete- Indicates whether this DIT content rule is declared obsolete.auxiliaryClasses- The names/OIDs of the auxiliary object classes that may be present in entries containing this DIT content rule.requiredAttributes- The names/OIDs of the attributes which must be present in entries containing this DIT content rule.optionalAttributes- The names/OIDs of the attributes which may be present in entries containing this DIT content rule.prohibitedAttributes- The names/OIDs of the attributes which may not be present in entries containing this DIT content rule.extensions- The set of extensions for this DIT content rule. It may benullor empty if there should not be any extensions.
-
-
Method Detail
-
getOID
public java.lang.String getOID()
Retrieves the OID for the structural object class associated with this DIT content rule.- Returns:
- The OID for the structural object class associated with this DIT content rule.
-
getNames
public java.lang.String[] getNames()
Retrieves the set of names for this DIT content rule.- Returns:
- The set of names for this DIT content rule, or an empty array if it does not have any names.
-
getNameOrOID
public java.lang.String getNameOrOID()
Retrieves the primary name that can be used to reference this DIT content rule. If one or more names are defined, then the first name will be used. Otherwise, the structural object class OID will be returned.- Returns:
- The primary name that can be used to reference this DIT content rule.
-
hasNameOrOID
public boolean hasNameOrOID(java.lang.String s)
Indicates whether the provided string matches the OID or any of the names for this DIT content rule.- Parameters:
s- The string for which to make the determination. It must not benull.- Returns:
trueif the provided string matches the OID or any of the names for this DIT content rule, orfalseif not.
-
getDescription
public java.lang.String getDescription()
Retrieves the description for this DIT content rule, if available.- Returns:
- The description for this DIT content rule, or
nullif there is no description defined.
-
isObsolete
public boolean isObsolete()
Indicates whether this DIT content rule is declared obsolete.- Returns:
trueif this DIT content rule is declared obsolete, orfalseif it is not.
-
getAuxiliaryClasses
public java.lang.String[] getAuxiliaryClasses()
Retrieves the names or OIDs of the auxiliary object classes that may be present in entries containing the structural class for this DIT content rule.- Returns:
- The names or OIDs of the auxiliary object classes that may be present in entries containing the structural class for this DIT content rule.
-
getRequiredAttributes
public java.lang.String[] getRequiredAttributes()
Retrieves the names or OIDs of the attributes that are required to be present in entries containing the structural object class for this DIT content rule.- Returns:
- The names or OIDs of the attributes that are required to be present in entries containing the structural object class for this DIT content rule, or an empty array if there are no required attributes.
-
getOptionalAttributes
public java.lang.String[] getOptionalAttributes()
Retrieves the names or OIDs of the attributes that are optionally allowed to be present in entries containing the structural object class for this DIT content rule.- Returns:
- The names or OIDs of the attributes that are optionally allowed to be present in entries containing the structural object class for this DIT content rule, or an empty array if there are no required attributes.
-
getProhibitedAttributes
public java.lang.String[] getProhibitedAttributes()
Retrieves the names or OIDs of the attributes that are not allowed to be present in entries containing the structural object class for this DIT content rule.- Returns:
- The names or OIDs of the attributes that are not allowed to be present in entries containing the structural object class for this DIT content rule, or an empty array if there are no required attributes.
-
getExtensions
public java.util.Map<java.lang.String,java.lang.String[]> getExtensions()
Retrieves the set of extensions for this DIT content rule. They will be mapped from the extension name (which should start with "X-") to the set of values for that extension.- Returns:
- The set of extensions for this DIT content rule.
-
hashCode
public int hashCode()
Retrieves a hash code for this schema element.- Specified by:
hashCodein classSchemaElement- Returns:
- A hash code for this schema element.
-
equals
public boolean equals(java.lang.Object o)
Indicates whether the provided object is equal to this schema element.- Specified by:
equalsin classSchemaElement- Parameters:
o- The object for which to make the determination.- Returns:
trueif the provided object may be considered equal to this schema element, orfalseif not.
-
toString
public java.lang.String toString()
Retrieves a string representation of this DIT content rule definition, in the format described in RFC 4512 section 4.1.6.- Specified by:
toStringin classSchemaElement- Returns:
- A string representation of this DIT content rule definition.
-
-