com.novell.admin.ns.nds
Class NDSAttributeDefinition

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

public class NDSAttributeDefinition
extends AttributeDefinition

Concrete class for NDS 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
NDSAttributeDefinition(java.lang.String attrName, int syntax, int flags, long lBound, long uBound, byte[] asn1)
          Constructor for all NDS attribute definitions.
NDSAttributeDefinition(java.lang.String attrName, NDSSyntax syntax, NDSAttributeFlags flags, long lBound, long uBound, byte[] asn1)
          Constructor for all NDS attribute definitions.
 
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.
 byte[] getASN1Data()
          Retrieves the ASN1 information for this attribute.
 NDSAttributeFlags getAttributeFlag()
          Returns the attribute flags associated with this attribute definition.
 boolean isAberrant()
          Check to see if the attribute behaves in an atypical manner.
 boolean isHidden()
          Deprecated. Use method in NDSAttributeFlags.
 boolean isReadOnly()
          Deprecated. Use method in NDSAttributeFlags.
 boolean isSingleValued()
          Deprecated. Use method in NDSAttributeFlags.
 
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

NDSAttributeDefinition

public NDSAttributeDefinition(java.lang.String attrName,
                              int syntax,
                              int flags,
                              long lBound,
                              long uBound,
                              byte[] asn1)
                       throws NamespaceException
Constructor for all NDS attribute definitions. Flags are specified with an int instead of a structure.

Parameters:
attrName - Name of the attribute.
syntax - The attribute syntax.
flags - The attribute flags.
lBound - Lower bound for values associated with this attribute, if this attribute is sized.
uBound - upper bound for values associated with this attribute, if this attribute is sized.
asn1 - See NDS Schema Reference.
Throws:
NamespaceException - Attribute is not sizeable.

NDSAttributeDefinition

public NDSAttributeDefinition(java.lang.String attrName,
                              NDSSyntax syntax,
                              NDSAttributeFlags flags,
                              long lBound,
                              long uBound,
                              byte[] asn1)
                       throws NamespaceException
Constructor for all NDS attribute definitions.

Parameters:
attrName - Name of the attribute.
syntax - NDSSyntax for the attribute.
flags - NDS flags for this attribute.
lBound - Lower bound for values associated with this attribute, if the attribute is sized.
uBound - Upper bound for values associated with this attribute, if this attribute is sized.
asn1 - See NDS Schema Reference.
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.

getASN1Data

public final byte[] getASN1Data()
Retrieves the ASN1 information for this attribute.

Returns:
A new copy of the ASN1 data.

getAttributeFlag

public final NDSAttributeFlags getAttributeFlag()
Returns the attribute flags associated with this attribute definition.

Returns:
The attribute flags associated with this definition.

This is a cloned version of the flags.


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 final boolean isHidden()
Deprecated. Use method in NDSAttributeFlags.

Checks to see if the attribute is hidden.

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

isReadOnly

public final boolean isReadOnly()
Deprecated. Use method in NDSAttributeFlags.

Checks to see if the attribute is read-only.

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

isSingleValued

public final boolean isSingleValued()
Deprecated. Use method in NDSAttributeFlags.

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.