|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimx.nuggets.pab.PABEntry
public abstract class PABEntry
The parent of PABGroup and PABPerson. It handles attributes that are common to both classes. However, it is not intended to be instantiated directly.
The backend storage requires two compulsory fields: UNIQUE_NAME and COMMON_NAMES. At least one value must be assigned to each of these two attributes.
The constant strings declared in this class are the attribute names for PAB Person. Any constant name ends in plural form (ie. S) implies that the corresponding attribute is a multi-value attribute. Otherwise, it is a single value attribute.
Field Summary | |
---|---|
static java.lang.String |
COMMON_NAMES
[REQUIRED] Common Name is mapped to LDAP attribute "cn". |
static java.lang.String |
DESCRIPTIONS
Description is mapped to LDAP attribute "description". |
static java.lang.String |
NICKNAME
Nickname is mapped to LDAP attribute "nickname". |
static java.lang.String |
PAB_MEMBERS
PAB Member is mapped to LDAP attribute "memberOfPAB". |
static java.lang.String |
UNIQUE_NAME
[REQUIRED] UniqueName is mapped to LDAP attribute "un". |
Constructor Summary | |
---|---|
PABEntry(PABEntry entry)
Copy constructor. |
|
PABEntry(java.lang.String un)
Convenient constructor. |
|
PABEntry(java.lang.String un,
java.lang.String cn)
Default constructor. |
Method Summary | |
---|---|
void |
addAttributeValue(java.lang.String key,
java.lang.Object value)
Append value to the attribute. |
abstract java.lang.Object |
clone()
|
protected OpenHashMap |
getAllAttributes()
This method returns all the attributes in a multi-value hash table. |
java.util.Enumeration |
getAttributeNames()
Get all attribute names that has values assigned. |
java.util.Set |
getAttributeNamesSet()
Get all attribute names that has values assigned. |
java.lang.Object |
getAttributeValue(java.lang.String key)
Get the first value of the attribute |
java.util.Enumeration |
getAttributeValues(java.lang.String key)
Get all values of the attribute. |
java.util.List |
getAttributeValuesList(java.lang.String key)
Get all values of the attribute. |
boolean |
isRequiredAttribute(java.lang.String key)
A utility method to check whether the specified attribute is required. |
void |
removeAttribute(java.lang.String key)
Remove all values of the attribute. |
void |
removeAttributeValue(java.lang.String key,
int index)
Remove the specified attribute value mapped to the specific key and index. |
void |
removeAttributeValue(java.lang.String key,
java.lang.String value)
Remove the specified attribute value. |
void |
replaceAttributeValue(java.lang.String key,
int index,
java.lang.String value)
Replace the existing attribute value associated to key at the index with the new value. |
void |
replaceAttributeValue(java.lang.String key,
java.lang.String value)
Replace any existing attribute values with the new value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UNIQUE_NAME
This is a single-value, case-insensitive string field.
public static final java.lang.String COMMON_NAMES
This is a multi-value, case-insensitive string field.
public static final java.lang.String PAB_MEMBERS
This is a multi-value, case-insensitive string field.
public static final java.lang.String DESCRIPTIONS
This is a multi-value, case-insensitive string field.
public static final java.lang.String NICKNAME
This is a single-value, case-insensitive string field.
Constructor Detail |
---|
public PABEntry(java.lang.String un)
public PABEntry(java.lang.String un, java.lang.String cn)
un
- Unique name as required by iPlanet products.cn
- Common name of the PAB entry. This field is required by the
underlying LDAP schema.public PABEntry(PABEntry entry)
Method Detail |
---|
protected OpenHashMap getAllAttributes()
It is used by PABNugget only.
public java.lang.Object getAttributeValue(java.lang.String key)
key
- The attribute key name.public java.util.List getAttributeValuesList(java.lang.String key)
key
- The attribute key name.
public java.util.Enumeration getAttributeValues(java.lang.String key)
key
- The attribute key name.
public java.util.Set getAttributeNamesSet()
public java.util.Enumeration getAttributeNames()
public void addAttributeValue(java.lang.String key, java.lang.Object value)
key
- The attribute key name.value
- The new value.public void removeAttributeValue(java.lang.String key, java.lang.String value)
If the specified value does not exists, nothing would be changed and no exception will be thrown.
key
- The attribute key name.value
- The value to be removed..public void removeAttributeValue(java.lang.String key, int index) throws InvalidAttributeException
If the specified value does not exists, nothing would be changed and no exception will be thrown.
key
- The attribute key name.index
- The index of the attribute value to remove The index
starts from 0.
InvalidAttributeException
- This exception is thrown if the specified attribute is a
required attribute and the value is the last value the attribute has.public void removeAttribute(java.lang.String key)
key
- The attribute key name.public void replaceAttributeValue(java.lang.String key, java.lang.String value)
key
- The attribute key name.value
- The new value.public void replaceAttributeValue(java.lang.String key, int index, java.lang.String value)
key
- The attribute key.index
- The index of the attribute value to be replaced. The index
starts from 0.value
- The new value.public boolean isRequiredAttribute(java.lang.String key)
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.