summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/usrgrp
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-11-05 11:10:15 -0500
committerEndi S. Dewata <edewata@redhat.com>2013-11-07 11:49:38 -0500
commit66eabd97adafa95f97215202a825d73f5fca7692 (patch)
treed5759739e4bd0042e0d02124ad351d8b3cfb0040 /base/common/src/com/netscape/certsrv/usrgrp
parent89eebe6729b8a7ed53441649d0baa98c98fdfa7f (diff)
downloadpki-66eabd97adafa95f97215202a825d73f5fca7692.tar.gz
pki-66eabd97adafa95f97215202a825d73f5fca7692.tar.xz
pki-66eabd97adafa95f97215202a825d73f5fca7692.zip
Fixed return code for user and group services.
The user and group services have been modified to return consistent HTTP return codes under various situations. The UGSubsystem has been modified to capture any LDAP exceptions and throw the proper PKIException subclass that represents the appropriate HTTP error code for the situation. Ticket #669, #749
Diffstat (limited to 'base/common/src/com/netscape/certsrv/usrgrp')
-rw-r--r--base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java16
-rw-r--r--base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java6
2 files changed, 6 insertions, 16 deletions
diff --git a/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java b/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java
index 543b33c26..66914feec 100644
--- a/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java
+++ b/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java
@@ -65,19 +65,16 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
*
* @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
*/
- public void addUser(IUser identity) throws EUsrGrpException, LDAPException;
+ public void addUser(IUser identity) throws EUsrGrpException;
/**
* 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
*/
- public void addUserCert(IUser identity) throws EUsrGrpException,
- LDAPException;
+ public void addUserCert(IUser identity) throws EUsrGrpException;
/**
* Add a certSubjectDN field to the user
@@ -85,15 +82,14 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
* @throws EUsrGrpException
* @throws LDAPException
*/
- public void addCertSubjectDN(IUser identity) throws EUsrGrpException, LDAPException;
+ public void addCertSubjectDN(IUser identity) throws EUsrGrpException;
/**
* Remove a certSubjectDN field from the user
* @param identity
* @throws EUsrGrpException
- * @throws LDAPException
*/
- public void removeCertSubjectDN(IUser identity) throws EUsrGrpException, LDAPException;
+ public void removeCertSubjectDN(IUser identity) throws EUsrGrpException;
/**
* Removes a user certificate for a user entry
@@ -281,10 +277,8 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
* @param filter search filter
* @return an user
* @exception EUsrGrpException thrown when failed to find user
- * @exception LDAPException thrown when the internal database is not available
*/
- public IUser findUsersByCert(String filter) throws
- EUsrGrpException, LDAPException;
+ public IUser findUsersByCert(String filter) throws EUsrGrpException;
/**
* Get user locator which does the mapping between the user and the certificate.
diff --git a/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java b/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
index db9c1539f..84bda3d08 100644
--- a/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
+++ b/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
@@ -19,8 +19,6 @@ package com.netscape.certsrv.usrgrp;
import java.io.Serializable;
-import netscape.ldap.LDAPException;
-
/**
* This interface defines the basic capabilities of
* a usr/group manager. (get/add/modify/remove users or groups)
@@ -62,10 +60,8 @@ public interface IUsrGrp extends IIdEvaluator , Serializable {
* @param user an user interface
* @exception EUsrGrpException thrown when some of the user attribute values
* are null
- * @exception LDAPException thrown when the LDAP internal database is not
- * available, or the add operation failed
*/
- public void addUser(IUser user) throws EUsrGrpException, LDAPException;
+ public void addUser(IUser user) throws EUsrGrpException;
/**
* Removes a user.