|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.Nugget
com.nitido.nim.CachableNugget
com.nitido.nimx.nuggets.pab.PABNugget
public abstract class PABNugget
Personal Address Book Nugget provides services for accessing and modifying a user's address book. It assume that the backend is LDAP directory type of data storage.
This nugget encapsulate the information of the address group and personal information with PABGroup and PABNugget classes. You should refer to the JavaDoc of these two classes for a detail list of information supported by them.
Field Summary |
---|
Fields inherited from class com.nitido.nim.Nugget |
---|
_entity, _nim, _nuggetName, _settings |
Constructor Summary | |
---|---|
PABNugget(NuggetVisa visa)
Default Nugget constructor. |
Method Summary | |
---|---|
void |
activate()
Used by NiM Nugget mechanism. |
abstract PABBatchResult |
addEntries(PABEntry[] entries)
Add a large number of entries in one batch. |
abstract java.lang.String |
addEntry(PABEntry entry)
Add a new PAB entry. |
void |
deactivate()
Used by NiM Nugget mechanism. |
protected java.lang.String |
generateNewCN(java.lang.String firstName,
java.lang.String lastName)
|
protected java.lang.String |
generateNewUN(java.lang.String cn)
|
java.lang.String |
getDescriptor()
Used by NiM Nugget mechanism. |
abstract java.util.Vector |
getEmailAddresses(java.lang.String entryUN)
Resolve the specified unique name into a vector of email addresses. |
abstract java.util.Enumeration |
getEntries()
An enumeration of PABEntries. |
abstract java.util.Enumeration |
getEntries(java.lang.String filter)
An enumeration of PABEntries based on the search filter. |
abstract PABEntry |
getEntry(java.lang.String un)
Fetch PABEntry based on the unique name. |
abstract PABGroup |
getGroup(java.lang.String un)
Fetch the PABGroup based on the unique name. |
abstract java.util.Enumeration |
getGroupMembers(java.lang.String groupUN)
Get the Unique Name of members belong to the group |
abstract java.lang.String |
getGroupObjectClass()
Get the "objectclass" string that will be used by a PAB group LDAP entry. |
abstract PABPerson |
getPerson(java.lang.String un)
Fetch the PABPerson based on the unique name. |
abstract java.lang.String |
getPersonObjectClass()
Get the "objectclass" string that will be used by a PAB person LDAP entry. |
protected abstract void |
initImpl()
Used by NiM Nugget mechanism. |
abstract void |
modifyEntry(PABEntry entry)
Replace an existing PAB entry with the new one. |
abstract void |
removeEntry(PABEntry entry)
Remove an existing PAB entry. |
abstract void |
removeFromGroup(java.lang.String groupUN,
java.lang.String entryUN)
Remove the specified PABEntry from the group. |
abstract void |
setGroupMembers(java.lang.String groupUN,
java.util.Vector personUNs)
Set the group member of a group. |
abstract void |
setGroups(java.util.Vector groupUNs,
java.lang.String entryUN)
Set the groups that the specified entryDN belongs to. |
Methods inherited from class com.nitido.nim.CachableNugget |
---|
isCachable |
Methods inherited from class com.nitido.nim.Nugget |
---|
destroy, destroyImpl, getEntity, getNuggetName, getSetting, getSettings, init, requestBegin, requestEnd |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PABNugget(NuggetVisa visa)
Method Detail |
---|
protected abstract void initImpl() throws InitializationFailedException, InvalidSettingException
initImpl
in class Nugget
InitializationFailedException
- If unable to initialize the nugget with the given parameters.
InvalidSettingException
- If any of the expected initialization settings are null.public void activate() throws ActivationException
activate
in class Nugget
ActivationException
- If unable to activate the Nuggetpublic void deactivate() throws ActivationException
deactivate
in class Nugget
ActivationException
- If unable to deactivate the Nuggetpublic java.lang.String getDescriptor()
getDescriptor
in class Nugget
public abstract PABPerson getPerson(java.lang.String un) throws PABException
un
- The unique name of the PABPerson.
PABException
public abstract PABGroup getGroup(java.lang.String un) throws PABException
un
- The unique name of the PABGroup.
PABException
public abstract PABEntry getEntry(java.lang.String un) throws PABException
un
- The unique name of the PABEntry.
PABException
public abstract java.util.Enumeration getEntries() throws PABException
PABException
public abstract java.util.Enumeration getEntries(java.lang.String filter) throws PABException
The filter string follows the LDAP Search Filter standard (RFC 2254).
For example, if you want to get all person and folders with unique name starts with 'A', you may type in the following code:
String filter = "( "+PABEntry.UNIQUE_NAME+"=A* )"; Enumeration entries = getEntries( filter ); ....
filter
- The filter string.
PABException
public abstract java.lang.String addEntry(PABEntry entry) throws PABException, InvalidEntryException
entry
- The entry to be added. A new entry does not require the un
specified (i.e. just pass "" to the un parameter when you construct
the object).
InvalidEntryException
- Thrown when another entry with the same unique name already exists.
PABException
public abstract PABBatchResult addEntries(PABEntry[] entries) throws PABException
entries
- The list of PABEntry objects to be added.
PABException
- Major problem at the backend (such as major IO exception). For other
entry specific errors, this method will only indicate those error codes
in the PABBatchResult object instead of throwing an exception.public abstract void modifyEntry(PABEntry entry) throws PABException, InvalidEntryException
entry
- The entry to be replaced.
InvalidEntryException
- If the specified entry does not exist.
PABException
public abstract void removeEntry(PABEntry entry) throws PABException, InvalidEntryException
If it is a PABGroup, this will remove the links to child PABEntry that it contains. However, it would not attempt to remove them from the system completely.
entry
- The entry to be removed.
InvalidEntryException
- If the specified entry does not exist.
PABException
public abstract void setGroups(java.util.Vector groupUNs, java.lang.String entryUN) throws PABException, InvalidEntryException
groupUNs
- The unique name of groups that the entry is going to be added to.entryUN
- The unique name of the entry to be added.
InvalidEntryException
- If the entry or one of the specified groups does not exist.
PABException
public abstract void setGroupMembers(java.lang.String groupUN, java.util.Vector personUNs) throws PABException, InvalidEntryException
groupUN
- The unique name of the target grouppersonUNs
- The UNs of the PAB persons to be added to the group.
PABException
- PB problem
InvalidEntryException
public abstract void removeFromGroup(java.lang.String groupUN, java.lang.String entryUN) throws PABException, InvalidEntryException
groupUN
- The unique name of the group that the entry is going to be
removed to.entryUN
- The unique name of the entry to be added.
InvalidEntryException
- If the entry or the group does not exist.
PABException
public abstract java.util.Enumeration getGroupMembers(java.lang.String groupUN) throws PABException, InvalidEntryException
groupUN
- The unique name of the group
InvalidEntryException
- If the entry does not exist.
PABException
public abstract java.util.Vector getEmailAddresses(java.lang.String entryUN) throws PABException
If it is a person, it will return the email of the corresponding person (if it is specified).
If it is a group, it will return the email addresses of ALL members.
entryUN
-
"Display Name"If no matches, an empty vector.
PABException
public abstract java.lang.String getGroupObjectClass()
public abstract java.lang.String getPersonObjectClass()
protected java.lang.String generateNewUN(java.lang.String cn)
protected java.lang.String generateNewCN(java.lang.String firstName, java.lang.String lastName)
|
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.