diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/usrgrp')
11 files changed, 104 insertions, 56 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java index c57117251..fdfa3cd38 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java @@ -17,14 +17,12 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - import java.security.cert.X509Certificate; - /** * This class defines the strong authentication basic elements, * the X509 certificates. - * + * * @version $Revision$, $Date$ */ public class Certificates { @@ -33,6 +31,7 @@ public class Certificates { /** * Constructs strong authenticator. + * * @param certs a list of X509Certificates */ public Certificates(X509Certificate certs[]) { @@ -41,6 +40,7 @@ public class Certificates { /** * Retrieves certificates. + * * @return a list of X509Certificates */ public X509Certificate[] getCertificates() { diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java index ca4634a67..a25a1a6b3 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java @@ -17,14 +17,12 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - import com.netscape.certsrv.base.EBaseException; - /** * A class represents a Identity exception. * <P> - * + * * @version $Revision$, $Date$ */ public class EUsrGrpException extends EBaseException { @@ -40,8 +38,9 @@ public class EUsrGrpException extends EBaseException { /** * Constructs a usr/grp management exception + * * @param msgFormat exception details in message string format - * <P> + * <P> */ public EUsrGrpException(String msgFormat) { super(msgFormat); @@ -49,9 +48,10 @@ public class EUsrGrpException extends EBaseException { /** * Constructs a Identity exception. + * * @param msgFormat exception details in message string format * @param param message string parameter - * <P> + * <P> */ public EUsrGrpException(String msgFormat, String param) { super(msgFormat, param); @@ -59,8 +59,9 @@ public class EUsrGrpException extends EBaseException { /** * Constructs a Identity exception. + * * @param e system exception - * <P> + * <P> */ public EUsrGrpException(String msgFormat, Exception e) { super(msgFormat, e); @@ -68,9 +69,10 @@ public class EUsrGrpException extends EBaseException { /** * Constructs a Identity exception. + * * @param msgFormat exception details in message string format * @param params list of message format parameters - * <P> + * <P> */ public EUsrGrpException(String msgFormat, Object params[]) { super(msgFormat, params); diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java index a9d789e65..dbbd068c4 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java @@ -17,24 +17,23 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - import netscape.ldap.LDAPException; import com.netscape.certsrv.ldap.ELdapException; - /** * This interface defines a certificate mapping strategy to locate * a user - * + * * @version $Revision$, $Date$ */ public interface ICertUserLocator { /** * Returns a user whose certificates match with the given certificates + * * @return an user interface - * @exception EUsrGrpException thrown when failed to build user + * @exception EUsrGrpException thrown when failed to build user * @exception LDAPException thrown when LDAP internal database is not available * @exception ELdapException thrown when the LDAP search failed */ @@ -43,6 +42,7 @@ public interface ICertUserLocator { /** * Retrieves description. + * * @return description */ public String getDescription(); diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java index 778b9aab2..18903f4a5 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java @@ -17,40 +17,42 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - import java.util.Enumeration; import com.netscape.certsrv.base.IAttrSet; - /** * This interface defines the basic interfaces for * an identity group. (get/set methods for a group entry attributes) - * + * * @version $Revision$, $Date$ */ public interface IGroup extends IAttrSet, IGroupConstants { /** * Retrieves the group name. + * * @return the group name */ public String getName(); /** * Retrieves group identifier. + * * @return the group id */ public String getGroupID(); /** * Retrieves group description. + * * @return description */ public String getDescription(); /** * Checks if the given name is member of this group. + * * @param name the given name * @return true if the given name is the member of this group; otherwise false. */ @@ -58,12 +60,14 @@ public interface IGroup extends IAttrSet, IGroupConstants { /** * Adds new member. + * * @param name the given name. */ public void addMemberName(String name); /** * Retrieves a list of member names. + * * @return a list of member names for this group. */ public Enumeration getMemberNames(); diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java index 2f8711ceb..22d89455c 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java @@ -17,12 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - - - /** * This interface defines the attribute names for a group entry - * + * * @version $Revision$, $Date$ */ public interface IGroupConstants { diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java index 94bdf8857..41209b4b9 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java @@ -17,9 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - - - /** * A class represents an ID evaluator. * <P> @@ -31,6 +28,7 @@ public interface IIdEvaluator { /** * Evaluates if the given value satisfies the ID evaluation: * is a user a member of a group + * * @param type the type of evaluator, in this case, it is group * @param id the user id for the given user * @param op operator, only "=" and "!=" are supported diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java index ff6f7be6f..fee5627ae 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - import java.security.cert.X509Certificate; import java.util.Enumeration; @@ -25,12 +24,11 @@ import netscape.ldap.LDAPException; import com.netscape.certsrv.base.ISubsystem; - /** * This class defines low-level LDAP usr/grp management * usr/grp information is located remotely on another * LDAP server. - * + * * @version $Revision$, $Date$ */ public interface IUGSubsystem extends ISubsystem, IUsrGrp { @@ -47,6 +45,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Retrieves a user from LDAP + * * @param userid the given user id * @exception EUsrGrpException thrown when failed to find the user */ @@ -54,6 +53,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Searches for users that matches the filter. + * * @param filter search filter for efficiency * @return list of users * @exception EUsrGrpException thrown when any internal error occurs @@ -62,6 +62,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Adds the given user to the internal database + * * @param identity the given user * @exception EUsrGrpException thrown when failed to add user to the group * @exception LDAPException thrown when the LDAP internal database is not available @@ -70,6 +71,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Adds a user certificate to user + * * @param identity user interface * @exception EUsrGrpException thrown when failed to add the user certificate to the given user * @exception LDAPException thrown when the LDAP internal database is not available @@ -81,29 +83,33 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { * 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 + * * @param identity the given user whose user certificate is going to be - * be removed. + * be removed. * @exception EUsrGrpException thrown when failed to remove user certificate */ public void removeUserCert(IUser identity) throws EUsrGrpException; /** * Removes identity. + * * @param userid the given user id * @exception EUsrGrpException thrown when failed to remove user */ public void removeUser(String userid) throws EUsrGrpException; /** - * Modifies user attributes. Certs are handled separately + * Modifies user attributes. Certs are handled separately + * * @param identity the given identity which contains all the user - * attributes being modified + * attributes being modified * @exception EUsrGrpException thrown when modification failed */ public void modifyUser(IUser identity) throws EUsrGrpException; /** * Finds groups that match the filter. + * * @param filter the search filter * @return a list of groups that match the given search filter */ @@ -111,24 +117,27 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Find a group for the given name + * * @param name the given name * @return a group that matched the given name */ public IGroup findGroup(String name); /** - * List groups. This method is more efficient than findGroups because - * this method retrieves group names and description only. Each + * 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. + * * @param filter the search filter * @return a list of groups, each group just contains group name and - * its description. + * its description. * @exception EUsrGrpException thrown when failed to list groups */ public Enumeration<IGroup> listGroups(String filter) throws EUsrGrpException; /** * Retrieves a group from LDAP for the given group name + * * @param name the given group name * @return a group interface */ @@ -136,13 +145,15 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Retrieves a group from LDAP for the given DN. - * @param DN the given DN + * + * @param DN the given DN * @return a group interface for the given DN. */ public IGroup getGroup(String DN); /** * Checks if the given group exists. + * * @param name the given group name * @return true if the given group exists in the internal database; otherwise false. */ @@ -150,23 +161,27 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Checks if the given context is a member of the given group + * * @param uid the given user id * @param name the given group name - * @return true if the user with the given user id is a member of the given - * group + * @return true if the user with the given user id is a member of the given + * group */ public boolean isMemberOf(String uid, String name); + public boolean isMemberOf(IUser id, String name); /** * Adds a group of identities. + * * @param group the given group * @exception EUsrGrpException thrown when failed to add group. */ public void addGroup(IGroup group) throws EUsrGrpException; /** - * Removes a group. Can't remove SUPER_CERT_ADMINS + * Removes a group. Can't remove SUPER_CERT_ADMINS + * * @param name the given group name * @exception EUsrGrpException thrown when the given group failed to remove */ @@ -174,24 +189,27 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Modifies a group. + * * @param group the given group which contain all group attributes being - * modified. + * modified. * @exception EUsrGrpException thrown when failed to modify group. */ public void modifyGroup(IGroup group) throws EUsrGrpException; /** * Removes the user with the given id from the given group + * * @param grp the given group * @param userid the given user id * @exception EUsrGrpException thrown when failed to remove the user from - * the given group + * the given group */ public void removeUserFromGroup(IGroup grp, String userid) - throws EUsrGrpException; + throws EUsrGrpException; /** * Create user with the given id. + * * @param id the user with the given id. * @return a new user */ @@ -199,6 +217,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Create group with the given id. + * * @param id the group with the given id. * @return a new group */ @@ -206,6 +225,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Get string representation of the given certificate + * * @param cert given certificate * @return the string representation of the given certificate */ @@ -214,6 +234,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Searchs for identities that matches the certificate locater * generated filter. + * * @param filter search filter * @return an user * @exception EUsrGrpException thrown when failed to find user @@ -224,6 +245,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp { /** * Get user locator which does the mapping between the user and the certificate. + * * @return CertUserLocator */ public ICertUserLocator getCertUserLocator(); diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java index 398ccb71e..9370a6718 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java @@ -17,136 +17,154 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - import java.security.cert.X509Certificate; import com.netscape.certsrv.base.IAttrSet; - /** * This interface defines the basic interfaces for * a user identity. (get/set methods for a user entry attributes) - * + * * @version $Revision$, $Date$ */ public interface IUser extends IAttrSet, IUserConstants { /** * Retrieves name. + * * @return user name */ public String getName(); /** * Retrieves user identifier. + * * @return user id */ public String getUserID(); /** * Retrieves user full name. + * * @return user fullname */ public String getFullName(); /** * Retrieves user phonenumber. + * * @return user phonenumber */ public String getPhone(); /** * Retrieves user state + * * @return user state */ public String getState(); /** * Sets user full name. + * * @param name the given full name */ public void setFullName(String name); /** * Sets user ldap DN. + * * @param userdn the given user DN */ public void setUserDN(String userdn); /** * Gets user ldap dn + * * @return user DN */ public String getUserDN(); /** * Retrieves user password. + * * @return user password */ public String getPassword(); /** * Sets user password. + * * @param p the given password */ public void setPassword(String p); /** * Sets user phonenumber - * @param p user phonenumber + * + * @param p user phonenumber */ public void setPhone(String p); /** * Sets user state + * * @param p the given user state */ public void setState(String p); /** * Sets user type + * * @param userType the given user type */ public void setUserType(String userType); /** * Gets user email address. + * * @return email address */ public String getEmail(); /** * Sets user email address. + * * @param email the given email address */ public void setEmail(String email); /** * Gets list of certificates from this user + * * @return list of certificates */ public X509Certificate[] getX509Certificates(); /** * Sets list of certificates in this user + * * @param certs list of certificates */ public void setX509Certificates(X509Certificate certs[]); /** * Get certificate DN + * * @return certificate DN */ public String getCertDN(); /** * Set certificate DN + * * @param userdn the given DN */ public void setCertDN(String userdn); /** * Get user type + * * @return user type. */ public String getUserType(); diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java index f24e9fb4f..f66f01c73 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java @@ -17,12 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.usrgrp; - - - /** * This interface defines the attribute names for a user entry - * + * * @version $Revision$, $Date$ */ public interface IUserConstants { diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java index 17b00c883..f6cef0d46 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java @@ -22,48 +22,52 @@ import netscape.ldap.LDAPException; /** * This interface defines the basic capabilities of * a usr/group manager. (get/add/modify/remove users or groups) - * + * * @version $Revision$, $Date$ */ public interface IUsrGrp extends IIdEvaluator { /** * Retrieves usr/grp manager identifier. + * * @return id */ public String getId(); /** * Retrieves the description + * * @return description */ public String getDescription(); /** * Retrieves an identity + * * @param userid the user id for the given user * @return user interface */ public IUser getUser(String userid) throws EUsrGrpException; /** - * Adds a user identity to the LDAP server. For example, - * <code> + * Adds a user identity to the LDAP server. For example, <code> * User user = new User("joe"); * user.setFullName("joe doe"); * user.setPassword("secret"); * usrgrp.addUser(user); * </code> + * * @param user an user interface * @exception EUsrGrpException thrown when some of the user attribute values - * are null + * are null * @exception LDAPException thrown when the LDAP internal database is not - * available, or the add operation failed + * available, or the add operation failed */ public void addUser(IUser user) throws EUsrGrpException, LDAPException; /** * Removes a user. + * * @param userid the user id for the given user * @exception EUsrGrpException thrown when failed to remove user */ @@ -71,6 +75,7 @@ public interface IUsrGrp extends IIdEvaluator { /** * Modifies user. + * * @param user the user interface which contains the modified information * @exception EUsrGrpException thrown when failed to modify user */ @@ -78,6 +83,7 @@ public interface IUsrGrp extends IIdEvaluator { /** * Retrieves an identity group + * * @param groupid the given group id. * @return the group interface */ @@ -85,6 +91,7 @@ public interface IUsrGrp extends IIdEvaluator { /** * Adds a group + * * @param group the given group * @exception EUsrGrpException thrown when failed to add the group. */ @@ -92,6 +99,7 @@ public interface IUsrGrp extends IIdEvaluator { /** * Modifies a group + * * @param group the given group contains the new information for modification. * @exception EUsrGrpException thrown when failed to modify the group. */ @@ -99,9 +107,10 @@ public interface IUsrGrp extends IIdEvaluator { /** * Removes a group + * * @param name the group name * @exception EUsrGrpException thrown when failed to remove the given - * group. + * group. */ public void removeGroup(String name) throws EUsrGrpException; diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java index ed4f28b83..11a3da23b 100644 --- a/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java +++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java @@ -20,9 +20,9 @@ package com.netscape.certsrv.usrgrp; import java.util.ListResourceBundle; /** - * A class represents a resource bundle for the + * A class represents a resource bundle for the * user/group manager - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -30,6 +30,7 @@ public class UsrGrpResources extends ListResourceBundle { /** * Returns the content of this resource. + * * @return the content of this resource. */ public Object[][] getContents() { |