|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines an object that will provide a connection to the corporate directory
defined for the cluster. This interface serves as a thin-layer between the
actual LDAP connection and the Process Manager world, where all corporate
directory user entries are encapsulated as IParticipant
objects.
There is only one corporate directory defined for the cluster; a handle to
the object can be obtained via the getCorporateDirectory
method off the IPMCluster
interface.
IParticipant
,
IPMCluster
Method Summary | |
void |
addUser(java.lang.String dn,
java.util.Hashtable attributes,
java.util.Vector objectClasses)
Adds a user entry with the DN (distinguished name) dn ,
attributes specified in attributes and compliant with the
object classes listed in objectClasses into the corporate
directory. |
boolean |
authenticate(java.lang.String userName,
java.lang.String password)
Returns true if the authentication with the corporate directory is successful. |
void |
deleteUserByCN(java.lang.String cn)
Deletes the user entry specified by the CN (common name) cn from the corporate directory. |
void |
deleteUserByDN(java.lang.String dn)
Deletes the user entry specified by the DN (distinguished name) dn from the corporate directory. |
void |
deleteUserById(java.lang.String uid)
Deletes the user entry specified by the user id uid
from the corporate directory. |
IParticipant |
getUserByCN(java.lang.String cn)
Returns the user entry corresponding to the CN (common name) cn . |
IParticipant |
getUserByDN(java.lang.String dn)
Returns the user entry corresponding to the DN (distinguished name) dn . |
IParticipant |
getUserById(java.lang.String uid)
Returns the user entry corresponding to the user id uid . |
boolean |
isAvailable()
Returns true if the connection to the corporate directory is available. |
java.lang.String[] |
listMembers(java.lang.String groupDN)
Returns the members of any group defined in the corporate directory. |
java.lang.String[] |
listMembersByQuery(java.lang.String filter)
Returns the results of an LDAP user query against the corporate directory. |
void |
modifyUserByCN(java.lang.String cn,
java.lang.String attrName,
java.lang.String attrValue,
java.lang.String operation)
Modifies the user entry specified by the CN (common name) cn in the corporate directory. |
void |
modifyUserByDN(java.lang.String dn,
java.lang.String attrName,
java.lang.String attrValue,
java.lang.String operation)
Modifies the user entry specified by the DN (distinguished name) dn in the corporate directory. |
void |
modifyUserById(java.lang.String uid,
java.lang.String attrName,
java.lang.String attrValue,
java.lang.String operation)
Modifies the user entry specified by the user id uid
in the corporate directory. |
java.util.Hashtable |
search(java.lang.String filter,
java.lang.String indexedBy)
Perform a generic search for users in the corporate directory based upon the specified LDAP filter. |
Method Detail |
public IParticipant getUserByDN(java.lang.String dn) throws PMException
dn
.dn
- the DN of the user entry to fetchPMException
- if there is a problem retrieving the
user's entry from the corporate directory.IParticipant
public IParticipant getUserById(java.lang.String uid) throws PMException
uid
.uid
- the user id of the user entry to fetchPMException
- if there is a problem retrieving the
user's entry from the corporate directory.IParticipant
public IParticipant getUserByCN(java.lang.String cn) throws PMException
cn
.cn
- the CN of the user entry to fetchPMException
- if there is a problem retrieving the
user's entry from the corporate directory.IParticipant
public void deleteUserByDN(java.lang.String dn) throws PMException
dn
from the corporate directory. In order for the
entry to be deleted successfully, the cluster's authentication to the
corporate directory must possess the necessary permissions.dn
- the DN of the user entry to deletePMException
- if there is a problem deleting the user's
entry from the corporate directory.public void deleteUserById(java.lang.String uid) throws PMException
uid
from the corporate directory. In order for the entry to be deleted
successfully, the cluster's authentication to the corporate directory
must possess the necessary permissions.uid
- the user id of the user entry to deletePMException
- if there is a problem deleting the user's
entry from the corporate directory.public void deleteUserByCN(java.lang.String cn) throws PMException
cn
from the corporate directory. In order for the
entry to be deleted successfully, the cluster's authentication to the
corporate directory must possess the necessary permissions.cn
- the CN of the user entry to deletePMException
- if there is a problem deleting the user's
entry from the corporate directory.public void modifyUserByDN(java.lang.String dn, java.lang.String attrName, java.lang.String attrValue, java.lang.String operation) throws PMException
dn
in the corporate directory. In order for the
entry to be modified successfully, the cluster's authentication to the
corporate directory must possess the necessary permissions.
The type of modification is specified by the operation, which can have the following values:
ADD
attrName
with value
attrValue
to the user entry. Note that if
the attribute attrName
is multivalued, this
operation could result in multiple attributes with name
attrName
being present in the user entry.
The attribute attrName
should be a valid
attribute of one of the objectclasses the user entry is
compliant with.
REPLACE
attrName
with the new value
attrValue
.
DELETE
attrName
from the user
entry.dn
- the DN of the user entry to modifyattrName
- the attribute name to modifyattrValue
- the value to apply to the attributeoperation
- the modification operation to perform to
the entryPMException
- if there is a problem modifying the user's
entry in the corporate directory.public void modifyUserById(java.lang.String uid, java.lang.String attrName, java.lang.String attrValue, java.lang.String operation) throws PMException
uid
in the corporate directory. In order for the entry to be modified
successfully, the cluster's authentication to the corporate
directory must possess the necessary permissions.
For the type of modifications supported, see the comments for the
method
.modifyUserByDN
uid
- the user id of the user entry to modifyattrName
- the attribute name to modifyattrValue
- the value to apply to the attributeoperation
- the modification operation to perform to
the entryPMException
- if there is a problem modifying the user's
entry in the corporate directory.public void modifyUserByCN(java.lang.String cn, java.lang.String attrName, java.lang.String attrValue, java.lang.String operation) throws PMException
cn
in the corporate directory. In order for the
entry to be modified successfully, the cluster's authentication to the
corporate directory must possess the necessary permissions.
For the type of modifications supported, see the comments for the
method
.modifyUserByDN
cn
- the CN of the user entry to modifyattrName
- the attribute name to modifyattrValue
- the value to apply to the attributeoperation
- the modification operation to perform to
the entryPMException
- if there is a problem modifying the user's
entry in the corporate directory.public void addUser(java.lang.String dn, java.util.Hashtable attributes, java.util.Vector objectClasses) throws PMException
dn
,
attributes specified in attributes
and compliant with the
object classes listed in objectClasses
into the corporate
directory.
The attributes are expected to be specified as a java.util.Hashtable indexed by the attribute name. For the addition operation to be successful, it is important that all the necessary attributes required by the listed object classes are provided.
The object classes parameter objectClasses
specifies any
additional objectclasses over and above the standard Netscape user
objectclasses the user entry will be compliant with. The default
object classes assumed for all user entries are:
If the objectClasses
parameter is omitted, the default
objectclasses are presumed. If your user entry is expected to be
compliant with additional object classes, they should be specified
in objectClasses
.
try { ICorporateDirectory cd = cluster.getCorporateDirectory(); // Build up the attributes for the user // Hashtable attrs = new Hashtable(); attrs.put( "uid", "joe" ); attrs.put( "cn", "Joe Cool" ); attrs.put( "sn", "Cool" ); attrs.put( "mail", "joe@acme.com" ); attrs.put( "favoriteColor", "green" ); // Specify additional objectclasses // Vector OCs = new Vector(); OCs.addElement( "favoriteColorOC" ); cd.addUser( "uid=joe, ou=People, o=acme.com", attrs, OCs ); } catch( Exception e ) { System.out.println( "Problems adding user entry joe" ); }
dn
- the DN of the user entry to addattributes
- a set of key/values pairs specifying the
user's attributesobjectClasses
- a list of objectclasses the user entry
will be compliant withPMException
- if there is a problem adding the user's
entry in the corporate directory.public java.lang.String[] listMembers(java.lang.String groupDN) throws PMException
groupDN
- the DN of a corporate directory groupPMException
- if there is a problem connecting to the
corporate directory.IRole.members()
public java.lang.String[] listMembersByQuery(java.lang.String filter) throws PMException
filter
- an LDAP filterPMException
- if there is a problem connecting to the
corporate directory.IRole.members()
public java.util.Hashtable search(java.lang.String filter, java.lang.String indexedBy) throws PMException
IParticipant
objects indexed by the specified attribute.
If multiple users have the same indexedBy
attribute,
they are kept in a java.util.Vector of IParticipant
objects.filter
- an LDAP filterindexedBy
- attribute to index returned hashtable byIParticipant
public boolean isAvailable()
true
if the connection to the corporate
directory is available; false
otherwise.public boolean authenticate(java.lang.String userName, java.lang.String password)
true
if the authentication to the corporate
directory is successful; false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |