public abstract class AttributeDefinition
extends java.lang.Object
implements java.io.Serializable
Objects of this type are immutable, and any extensions to this class must enforce the immutable nature.
Attributes may have lower and upper bounds associated with them. If bounds are applicable, the attribute is sized. The attribute may be hidden, indicating that any class with a hidden attribute will not return a value for such an attribute. If the attribute may contain only a single value it is said to be a single-valued attribute. The attribute may be read-only, indicating that values associated with the attribute cannot be modified.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList |
aliasNames
List of alias names for the attribute.
|
protected long |
lowerBound
Lower bound for the attribute.
|
protected java.lang.String |
name
Name of the attribute.
|
protected boolean |
sized
Flag to indicate if the attribute is sized or not.
|
protected Syntax |
syntax
Syntax of the attribute.
|
protected long |
upperBound
Upper bound for the attribute.
|
| Constructor and Description |
|---|
AttributeDefinition(java.lang.String attrName,
Syntax syntax)
Simple constructor that assumes the attribute is not sized and no aliases.
|
AttributeDefinition(java.lang.String attrName,
Syntax syntax,
boolean sized,
long lowerBound,
long upperBound,
java.lang.String[] aliasArray)
Constructor with bounds and alias names.
|
AttributeDefinition(java.lang.String attrName,
Syntax syntax,
long lowerBound,
long upperBound)
Constructor that assumes the attribute is sized.
|
| Modifier and Type | Method and Description |
|---|---|
abstract ObjectAttribute |
createAttribute()
Abstract factory method for creating ObjectAttributes.
|
boolean |
equals(java.lang.Object obj)
Checks to see if this definition is equal to another.
|
java.lang.String[] |
getAliasNames()
Retrieves the alias names of the attribute.
|
long |
getLowerBound()
Returns the lower bound of the attribute.
|
java.lang.String |
getName()
Returns the name of this attribute definition.
|
Syntax |
getSyntax()
Returns the Syntax of this attribute definition.
|
long |
getUpperBound()
Returns the upper bound of the attribute.
|
boolean |
isAberrant()
Check to see if the attribute behaves in some atypical manner.
|
abstract boolean |
isHidden()
Checks to see if an attribute is hidden.
|
boolean |
isOperational()
Check to see if the attribute is Operational.
|
abstract boolean |
isReadOnly()
Checks to see if an attribute is read-only.
|
abstract boolean |
isSingleValued()
Check to see if attribute is single-valued.
|
boolean |
isSized()
Checks to see if the attribute is sized.
|
void |
setSyntax(Syntax syn) |
java.lang.String |
toString()
Converts this attribute definition to a String.
|
protected java.lang.String name
protected Syntax syntax
protected boolean sized
protected long lowerBound
The bound should be inclusive. It should also be zero if the attribute is not sized.
protected long upperBound
The bound should be inclusive. It should also be zero if the attribute is not sized.
protected java.util.ArrayList aliasNames
public AttributeDefinition(java.lang.String attrName,
Syntax syntax)
attrName - Name of the attribute.syntax - Syntax for the attribute.public AttributeDefinition(java.lang.String attrName,
Syntax syntax,
long lowerBound,
long upperBound)
attrName - Name of the attribute.syntax - Syntax for the attribute.lowerBound - Lower bound for values associated with this attribute.upperBound - Upper bound for values associated with this attribute.public AttributeDefinition(java.lang.String attrName,
Syntax syntax,
boolean sized,
long lowerBound,
long upperBound,
java.lang.String[] aliasArray)
attrName - Name of the attribute.syntax - Syntax for the attribute.sized - Indicates whether the lower and upper bounds are defined.lowerBound - Lower bound for values associated with this attribute.upperBound - Upper bound for values associated with this attribute.aliasArray - The alternate names which can be used to access the attribute. May be null.public java.lang.String getName()
public java.lang.String[] getAliasNames()
public java.lang.String toString()
toString in class java.lang.ObjectgetName().public Syntax getSyntax()
public void setSyntax(Syntax syn)
public boolean isSized()
public long getLowerBound()
public long getUpperBound()
public abstract ObjectAttribute createAttribute()
This method is used to create a brand new Attribute. The returned ObjectAttribute should contain the necessary ValueComponents so that it is considered fully, but minimally, constructed.
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The other AttributeDefinition to compare this to.public abstract boolean isHidden()
public abstract boolean isReadOnly()
public abstract boolean isSingleValued()
public boolean isAberrant()
The behavior of attributes which return true are atypical and should not be handled like normal attributes. Most common are attributes that may be modified but are handled in a namespace specific manner. Most attributes should return false which is the default.
public boolean isOperational()
LDAP has attributes such as 'ACL' which are not listed as either Mandatory or Optional, yet are valid attributes which may be written by users. NDAP always returns false, but this method is overridden in LDAPAttributeDefinition to examine the attribute flags.
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 ${TODAY} ${TSTAMP}.