com.novell.admin.ns.ldap
Class LDAPAttributeDefinition

java.lang.Object
  extended bycom.novell.admin.ns.AttributeDefinition
      extended bycom.novell.admin.ns.ldap.LDAPAttributeDefinition
All Implemented Interfaces:
java.io.Serializable

public final class LDAPAttributeDefinition
extends AttributeDefinition

Concrete class for LDAP attribute definitions.

This is an immutable class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.novell.admin.ns.AttributeDefinition
aliasNames, lowerBound, name, sized, syntax, upperBound
 
Constructor Summary
LDAPAttributeDefinition(java.lang.String attrName, Syntax syntax, LDAPAttributeFlags flags, java.lang.String oid)
          Constructs an LDAPAttributeDefinition object - simple version.
LDAPAttributeDefinition(java.lang.String attrName, Syntax syntax, long lowerBound, long upperBound, java.lang.String[] aliasNames, LDAPAttributeFlags flags, java.lang.String oid, java.lang.String NDAPName)
          Constructs an LDAPAttributeDefinition object.
LDAPAttributeDefinition(java.lang.String attrName, Syntax syntax, long lowerBound, long upperBound, java.lang.String[] aliasNames, LDAPAttributeFlags flags, java.lang.String oid, java.lang.String NDAPName, java.lang.String supOID, java.lang.String equalityOID, java.lang.String orderingOID, java.lang.String substrOID)
          Constructs an LDAPAttributeDefinition object.
 
Method Summary
 ObjectAttribute createAttribute()
          Creates a valid ObjectAttribute according to this attribute definition.
 boolean equals(java.lang.Object obj)
          Checks to see if this definition is equal to another.
 LDAPAttributeFlags getAttributeFlag()
          Get the flags associated with this attribute definition.
 java.lang.String getEqualityOID()
          Retrieves the EQUALITY matching rule OID.
 java.lang.String getNDAPName()
          Retrieves the NDAP equivalent name for this attribute.
 java.lang.String getOID()
          Retrieves the dotted numeric OID for this attribute.
 java.lang.String getOrderingOID()
          Retrieves the ORDERING matching rule OID.
 java.lang.String getSubstringOID()
          Retrieves the Substring matching rule OID.
 java.lang.String getSupOID()
          Retrieves the SUP attribute.
 boolean isAberrant()
          Check to see if the attribute behaves in an atypical manner.
 boolean isHidden()
          Checks to see if the attribute is hidden.
 boolean isReadOnly()
          Checks to see if the attribute is read-only.
 boolean isSingleValued()
          Checks to see if the attribute is single-valued.
 
Methods inherited from class com.novell.admin.ns.AttributeDefinition
getAliasNames, getLowerBound, getName, getSyntax, getUpperBound, isSized, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPAttributeDefinition

public LDAPAttributeDefinition(java.lang.String attrName,
                               Syntax syntax,
                               LDAPAttributeFlags flags,
                               java.lang.String oid)
                        throws NamespaceException
Constructs an LDAPAttributeDefinition object - simple version.

Parameters:
attrName - Name of the attribute.
syntax - LDAPSyntax for the attribute.
flags - LDAP flags for this attribute.
oid - Dotted numeric OID for this attribute definition.
Throws:
NamespaceException - Attribute is not sizeable.

LDAPAttributeDefinition

public LDAPAttributeDefinition(java.lang.String attrName,
                               Syntax syntax,
                               long lowerBound,
                               long upperBound,
                               java.lang.String[] aliasNames,
                               LDAPAttributeFlags flags,
                               java.lang.String oid,
                               java.lang.String NDAPName)
                        throws NamespaceException
Constructs an LDAPAttributeDefinition object.

Parameters:
attrName - Name of the attribute.
syntax - LDAPSyntax for the attribute.
lowerBound - lower bound for values associated with this attribute. This is only used if 'flags' indicates that this attribute is sized.
upperBound - upper bound for values associated with this attribute This is only used if 'flags' indicates that this attribute is sized.
aliasNames -
flags - LDAP flags for this attribute.
oid - Dotted numeric OID for this attribute definition.
NDAPName - The equivalent NDAP name for this attribute.
Throws:
NamespaceException - Attribute is not sizeable.

LDAPAttributeDefinition

public LDAPAttributeDefinition(java.lang.String attrName,
                               Syntax syntax,
                               long lowerBound,
                               long upperBound,
                               java.lang.String[] aliasNames,
                               LDAPAttributeFlags flags,
                               java.lang.String oid,
                               java.lang.String NDAPName,
                               java.lang.String supOID,
                               java.lang.String equalityOID,
                               java.lang.String orderingOID,
                               java.lang.String substrOID)
                        throws NamespaceException
Constructs an LDAPAttributeDefinition object.

Parameters:
attrName - Name of the attribute.
syntax - LDAPSyntax for the attribute.
lowerBound - lower bound for values associated with this attribute. This is only used if 'flags' indicates that this attribute is sized.
upperBound - upper bound for values associated with this attribute. This is only used if 'flags' indicates that this attribute is sized.
aliasNames -
flags - LDAP flags for this attribute.
oid - Dotted numeric OID for this attribute definition.
NDAPName - The equivalent NDAP name for this attribute.
supOID - The attribute from which this attribute is derived.
equalityOID - The matching rule OID.
orderingOID - The ordering rule OID.
substrOID - The substring rule OID.
Throws:
NamespaceException - Attribute is not sizeable.
Method Detail

createAttribute

public ObjectAttribute createAttribute()
Creates a valid ObjectAttribute according to this attribute definition.

The ObjectAttribute returned contains a single ValueComponent based on the syntax of the attribute.

Specified by:
createAttribute in class AttributeDefinition
Returns:
A new ObjectAttribute.

equals

public boolean equals(java.lang.Object obj)
Description copied from class: AttributeDefinition
Checks to see if this definition is equal to another.

Overrides:
equals in class AttributeDefinition
Parameters:
obj - The other AttributeDefinition to compare this to.
Returns:
True if objects are equal, false otherwise.

getAttributeFlag

public LDAPAttributeFlags getAttributeFlag()
Get the flags associated with this attribute definition.

Returns:
The attribute flags associated with this attribute definition.

This is a cloned version of the flags.


getEqualityOID

public java.lang.String getEqualityOID()
Retrieves the EQUALITY matching rule OID.

Returns:
The the EQUALITY matching rule OID. Returns null if the EQUALITY keyword was not present in the schema definition.

getNDAPName

public java.lang.String getNDAPName()
Retrieves the NDAP equivalent name for this attribute.

Returns:
new copy of the NDAP name, or null if it does not exist.

getOID

public java.lang.String getOID()
Retrieves the dotted numeric OID for this attribute.

Returns:
new copy of the OID string.

getOrderingOID

public java.lang.String getOrderingOID()
Retrieves the ORDERING matching rule OID.

Returns:
The the ORDERING matching rule OID. Returns null if the ORDERING keyword was not present in the schema definition.

getSubstringOID

public java.lang.String getSubstringOID()
Retrieves the Substring matching rule OID.

Returns:
The the Substring matching rule OID. Returns null if the SUBSTR keyword was not present in the schema definition.

getSupOID

public java.lang.String getSupOID()
Retrieves the SUP attribute. The attribute from which this attribute is derived.

Returns:
The SUP attribute. Returns null if the SUP keyword was not present in the schema definition.

isAberrant

public boolean isAberrant()
Check to see if the attribute behaves in an atypical manner.

The only attribute that returns true is the "Object Class" attribute, which cannot be modified like other attributes.

Overrides:
isAberrant in class AttributeDefinition
Returns:
True if aberrant, false if multivalued.

isHidden

public boolean isHidden()
Checks to see if the attribute is hidden.

Specified by:
isHidden in class AttributeDefinition
Returns:
true if hidden, false otherwise.

isReadOnly

public boolean isReadOnly()
Checks to see if the attribute is read-only.

Specified by:
isReadOnly in class AttributeDefinition
Returns:
true if read-only, false otherwise.

isSingleValued

public boolean isSingleValued()
Checks to see if the attribute is single-valued.

Specified by:
isSingleValued in class AttributeDefinition
Returns:
true if single-valued, false otherwise.


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.