Package com.netscape.certsrv.usrgrp
Interface IUGSubsystem
-
- All Superinterfaces:
IIdEvaluator,ISubsystem,IUsrGrp,java.io.Serializable
public interface IUGSubsystem extends ISubsystem, IUsrGrp
This class defines low-level LDAP usr/grp management usr/grp information is located remotely on another LDAP server.- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringIDConstant for IDstatic java.lang.StringSUPER_CERT_ADMINSConstant for super administrators
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCertSubjectDN(IUser identity)Add a certSubjectDN field to the uservoidaddGroup(IGroup group)Adds a group of identities.voidaddUser(IUser identity)Adds the given user to the internal databasevoidaddUserCert(IUser identity)Adds a user certificate to uservoidaddUserToGroup(IGroup grp, java.lang.String userid)Adds the user with the given id into the given groupIGroupcreateGroup(java.lang.String id)Create group with the given id.IUsercreateUser(java.lang.String id)Create user with the given id.IGroupfindGroup(java.lang.String name)Find a group for the given namejava.util.Enumeration<IGroup>findGroups(java.lang.String filter)Finds groups that match the filter.java.util.Enumeration<IGroup>findGroupsByUser(java.lang.String userDn, java.lang.String filter)Finds groups that contain the user.java.util.Enumeration<IUser>findUsers(java.lang.String filter)Searchs for identities that matches the filter.IUserfindUsersByCert(java.lang.String filter)Searchs for identities that matches the certificate locater generated filter.java.lang.StringgetCertificateString(java.security.cert.X509Certificate cert)Get string representation of the given certificateICertUserLocatorgetCertUserLocator()Get user locator which does the mapping between the user and the certificate.IGroupgetGroup(java.lang.String DN)Retrieves a group from LDAP for the given DN.IGroupgetGroupFromName(java.lang.String name)Retrieves a group from LDAP for the given group nameIUsergetUser(java.lang.String userID)Retrieves a user from LDAPbooleanisGroupPresent(java.lang.String name)Checks if the given group exists.booleanisMemberOf(IUser id, java.lang.String name)booleanisMemberOf(java.lang.String uid, java.lang.String name)Checks if the given context is a member of the given groupjava.util.Enumeration<IGroup>listGroups(java.lang.String filter)List groups.java.util.Enumeration<IUser>listUsers(java.lang.String filter)Searches for users that matches the filter.voidmodifyGroup(IGroup group)Modifies a group.voidmodifyUser(IUser identity)Modifies user attributes.voidremoveCertSubjectDN(IUser identity)Remove a certSubjectDN field from the uservoidremoveGroup(java.lang.String name)Removes a group.voidremoveUser(java.lang.String userid)Removes identity.voidremoveUserCert(IUser identity)Removes a user certificate for a user entry given a user certificate DN (actually, a combination of version, serialNumber, issuerDN, and SubjectDN), and it gets removedvoidremoveUserFromGroup(IGroup grp, java.lang.String userid)Removes the user with the given id from the given group-
Methods inherited from interface com.netscape.certsrv.usrgrp.IIdEvaluator
evaluate
-
Methods inherited from interface com.netscape.certsrv.base.ISubsystem
getConfigStore, getId, init, setId, shutdown, startup
-
Methods inherited from interface com.netscape.certsrv.usrgrp.IUsrGrp
getDescription, getId
-
-
-
-
Field Detail
-
ID
static final java.lang.String ID
Constant for ID- See Also:
- Constant Field Values
-
SUPER_CERT_ADMINS
static final java.lang.String SUPER_CERT_ADMINS
Constant for super administrators- See Also:
- Constant Field Values
-
-
Method Detail
-
getUser
IUser getUser(java.lang.String userID) throws EUsrGrpException
Retrieves a user from LDAP- Specified by:
getUserin interfaceIUsrGrp- Parameters:
userID- the given user ID- Returns:
- the user object or null if user not found
- Throws:
EUsrGrpException
-
listUsers
java.util.Enumeration<IUser> listUsers(java.lang.String filter) throws EUsrGrpException
Searches for users that matches the filter.- Parameters:
filter- search filter for efficiency- Returns:
- list of users
- Throws:
EUsrGrpException- thrown when any internal error occurs
-
addUser
void addUser(IUser identity) throws EUsrGrpException
Adds the given user to the internal database- Specified by:
addUserin interfaceIUsrGrp- Parameters:
identity- the given user- Throws:
EUsrGrpException- thrown when failed to add user to the group
-
addUserCert
void addUserCert(IUser identity) throws EUsrGrpException
Adds a user certificate to user- Parameters:
identity- user interface- Throws:
EUsrGrpException- thrown when failed to add the user certificate to the given user
-
addCertSubjectDN
void addCertSubjectDN(IUser identity) throws EUsrGrpException
Add a certSubjectDN field to the user- Parameters:
identity-- Throws:
EUsrGrpExceptionnetscape.ldap.LDAPException
-
removeCertSubjectDN
void removeCertSubjectDN(IUser identity) throws EUsrGrpException
Remove a certSubjectDN field from the user- Parameters:
identity-- Throws:
EUsrGrpException
-
removeUserCert
void removeUserCert(IUser identity) throws EUsrGrpException
Removes a user certificate for a user entry given a user certificate DN (actually, a combination of version, serialNumber, issuerDN, and SubjectDN), and it gets removed- Parameters:
identity- the given user whose user certificate is going to be be removed.- Throws:
EUsrGrpException- thrown when failed to remove user certificate
-
removeUser
void removeUser(java.lang.String userid) throws EUsrGrpExceptionRemoves identity.- Specified by:
removeUserin interfaceIUsrGrp- Parameters:
userid- the given user id- Throws:
EUsrGrpException- thrown when failed to remove user
-
modifyUser
void modifyUser(IUser identity) throws EUsrGrpException
Modifies user attributes. Certs are handled separately- Specified by:
modifyUserin interfaceIUsrGrp- Parameters:
identity- the given identity which contains all the user attributes being modified- Throws:
EUsrGrpException- thrown when modification failed
-
findGroups
java.util.Enumeration<IGroup> findGroups(java.lang.String filter) throws EUsrGrpException
Finds groups that match the filter.- Parameters:
filter- the search filter- Returns:
- a list of groups that match the given search filter
- Throws:
EUsrGrpException
-
findGroupsByUser
java.util.Enumeration<IGroup> findGroupsByUser(java.lang.String userDn, java.lang.String filter) throws EUsrGrpException
Finds groups that contain the user.- Parameters:
userDn- the user DNfilter- the search filter- Returns:
- a list of groups that contain the given user
- Throws:
EUsrGrpException
-
findGroup
IGroup findGroup(java.lang.String name) throws EUsrGrpException
Find a group for the given name- Parameters:
name- the given name- Returns:
- a group that matched the given name
- Throws:
EUsrGrpException
-
listGroups
java.util.Enumeration<IGroup> listGroups(java.lang.String filter) throws EUsrGrpException
List groups. This method is more efficient than findGroups because this method retrieves group names and description only. Each retrieved group just contains group name and description.- Parameters:
filter- the search filter- Returns:
- a list of groups, each group just contains group name and its description.
- Throws:
EUsrGrpException- thrown when failed to list groups
-
getGroupFromName
IGroup getGroupFromName(java.lang.String name)
Retrieves a group from LDAP for the given group name- Parameters:
name- the given group name- Returns:
- a group interface
-
getGroup
IGroup getGroup(java.lang.String DN)
Retrieves a group from LDAP for the given DN.
-
isGroupPresent
boolean isGroupPresent(java.lang.String name)
Checks if the given group exists.- Parameters:
name- the given group name- Returns:
- true if the given group exists in the internal database; otherwise false.
-
isMemberOf
boolean isMemberOf(java.lang.String uid, java.lang.String name)Checks if the given context is a member of the given group- Parameters:
uid- the given user idname- the given group name- Returns:
- true if the user with the given user id is a member of the given group
-
isMemberOf
boolean isMemberOf(IUser id, java.lang.String name)
-
addGroup
void addGroup(IGroup group) throws EUsrGrpException
Adds a group of identities.- Specified by:
addGroupin interfaceIUsrGrp- Parameters:
group- the given group- Throws:
EUsrGrpException- thrown when failed to add group.
-
removeGroup
void removeGroup(java.lang.String name) throws EUsrGrpExceptionRemoves a group. Can't remove SUPER_CERT_ADMINS- Specified by:
removeGroupin interfaceIUsrGrp- Parameters:
name- the given group name- Throws:
EUsrGrpException- thrown when the given group failed to remove
-
modifyGroup
void modifyGroup(IGroup group) throws EUsrGrpException
Modifies a group.- Specified by:
modifyGroupin interfaceIUsrGrp- Parameters:
group- the given group which contain all group attributes being modified.- Throws:
EUsrGrpException- thrown when failed to modify group.
-
addUserToGroup
void addUserToGroup(IGroup grp, java.lang.String userid) throws EUsrGrpException
Adds the user with the given id into the given group- Parameters:
grp- the given groupuserid- the given user id- Throws:
EUsrGrpException- thrown when failed to add the user into the given group
-
removeUserFromGroup
void removeUserFromGroup(IGroup grp, java.lang.String userid) throws EUsrGrpException
Removes the user with the given id from the given group- Parameters:
grp- the given groupuserid- the given user id- Throws:
EUsrGrpException- thrown when failed to remove the user from the given group
-
createUser
IUser createUser(java.lang.String id)
Create user with the given id.- Parameters:
id- the user with the given id.- Returns:
- a new user
-
createGroup
IGroup createGroup(java.lang.String id)
Create group with the given id.- Parameters:
id- the group with the given id.- Returns:
- a new group
-
getCertificateString
java.lang.String getCertificateString(java.security.cert.X509Certificate cert)
Get string representation of the given certificate- Parameters:
cert- given certificate- Returns:
- the string representation of the given certificate
-
findUsers
java.util.Enumeration<IUser> findUsers(java.lang.String filter) throws EUsrGrpException
Searchs for identities that matches the filter.- Throws:
EUsrGrpException
-
findUsersByCert
IUser findUsersByCert(java.lang.String filter) throws EUsrGrpException
Searchs for identities that matches the certificate locater generated filter.- Parameters:
filter- search filter- Returns:
- an user
- Throws:
EUsrGrpException- thrown when failed to find user
-
getCertUserLocator
ICertUserLocator getCertUserLocator()
Get user locator which does the mapping between the user and the certificate.- Returns:
- CertUserLocator
-
-