directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject [1/2] directory-fortress-core git commit: minor cleanup on search dao method error handling
Date Tue, 28 Apr 2015 14:40:09 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 6c4e2b5b4 -> 55accc19a


minor cleanup on search dao method error handling


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/f85b1122
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/f85b1122
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/f85b1122

Branch: refs/heads/master
Commit: f85b1122f0f682dcf0ee078c2e91e67d2b4c5d45
Parents: 71ab0f0
Author: Shawn McKinney <smckinney@apache.org>
Authored: Mon Apr 27 19:55:02 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Mon Apr 27 19:55:02 2015 -0500

----------------------------------------------------------------------
 .../directory/fortress/core/rbac/AdminRoleDAO.java    |  8 ++++----
 .../apache/directory/fortress/core/rbac/AuditDAO.java | 12 ++++++------
 .../directory/fortress/core/rbac/Graphable.java       |  8 --------
 .../directory/fortress/core/rbac/OrgUnitDAO.java      |  6 +++---
 .../apache/directory/fortress/core/rbac/PermDAO.java  | 14 +++++++-------
 .../directory/fortress/core/rbac/PolicyDAO.java       |  2 +-
 .../apache/directory/fortress/core/rbac/RoleDAO.java  |  8 ++++----
 .../apache/directory/fortress/core/rbac/SdDAO.java    |  4 ++--
 .../apache/directory/fortress/core/rbac/UserDAO.java  |  4 ++--
 9 files changed, 29 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
index 396cfc7..9ae4cdf 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
@@ -492,7 +492,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findRoles name [" + adminRole.getName() + "] caught LdapException="
+ e.getMessage();
+            String error = "findRoles name [" + adminRole.getName() + "] caught CursorException="
+ e.getMessage();
             throw new FinderException( GlobalErrIds.ARLE_SEARCH_FAILED, error, e );
         }
         finally
@@ -541,7 +541,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findRoles name [" + searchVal + "] caught LdapException=" + e.getMessage();
+            String error = "findRoles name [" + searchVal + "] caught CursorException=" +
e.getMessage();
             throw new FinderException( GlobalErrIds.ARLE_SEARCH_FAILED, error, e );
         }
         finally
@@ -584,7 +584,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findAssignedRoles userDn [" + userDn + "] caught LdapException="
+ e.getMessage();
+            String error = "findAssignedRoles userDn [" + userDn + "] caught CursorException="
+ e.getMessage();
             throw new FinderException( GlobalErrIds.ARLE_OCCUPANT_SEARCH_FAILED, error, e
);
         }
         finally
@@ -633,7 +633,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "getAllDescendants filter [" + filter + "] caught LdapException="
+ e.getMessage();
+            String error = "getAllDescendants filter [" + filter + "] caught CursorException="
+ e.getMessage();
             throw new FinderException( GlobalErrIds.ARLE_SEARCH_FAILED, error, e );
         }
         finally

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/AuditDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/AuditDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/AuditDAO.java
index 5e70467..81a897c 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/AuditDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/AuditDAO.java
@@ -285,7 +285,7 @@ final class AuditDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "LdapException in AuditDAO.searchAuthZs id=" + e.getMessage();
+            String error = "CursorException in AuditDAO.searchAuthZs id=" + e.getMessage();
             throw new FinderException( GlobalErrIds.AUDT_AUTHN_INVALID_FAILED, error, e );
         }
         finally
@@ -349,7 +349,7 @@ final class AuditDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "LdapException in AuditDAO.searchAuthZs id=" + e.getMessage();
+            String error = "CursorException in AuditDAO.searchAuthZs id=" + e.getMessage();
             throw new FinderException( GlobalErrIds.AUDT_AUTHZ_SEARCH_FAILED, error, e );
         }
         finally
@@ -439,7 +439,7 @@ final class AuditDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "LdapException in AuditDAO.getAllAuthZs id=" + e.getMessage();
+            String error = "CursorException in AuditDAO.getAllAuthZs id=" + e.getMessage();
             throw new FinderException( GlobalErrIds.AUDT_AUTHZ_SEARCH_FAILED, error, e );
         }
         finally
@@ -522,7 +522,7 @@ final class AuditDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "LdapException in AuditDAO.searchBinds id=" + e.getMessage();
+            String error = "CursorException in AuditDAO.searchBinds id=" + e.getMessage();
             throw new FinderException( GlobalErrIds.AUDT_BIND_SEARCH_FAILED, error, e );
         }
         finally
@@ -578,7 +578,7 @@ final class AuditDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "searchUserMods caught LdapException id=" + e.getMessage();
+            String error = "searchUserMods caught CursorException id=" + e.getMessage();
             throw new FinderException( GlobalErrIds.AUDT_MOD_SEARCH_FAILED, error, e );
         }
         finally
@@ -668,7 +668,7 @@ final class AuditDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "searchAdminMods caught LdapException id=" + e.getMessage();
+            String error = "searchAdminMods caught CursorException id=" + e.getMessage();
             throw new FinderException( GlobalErrIds.AUDT_MOD_ADMIN_SEARCH_FAILED, error,
e );
         }
         finally

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/Graphable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/Graphable.java b/src/main/java/org/apache/directory/fortress/core/rbac/Graphable.java
index 3255846..1eec9c8 100644
--- a/src/main/java/org/apache/directory/fortress/core/rbac/Graphable.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/Graphable.java
@@ -26,14 +26,6 @@ import java.util.Set;
  * The Fortress Graphable interface prescribes attributes that are used to maintain implementor
within a simple directed graph.
  * {@link org.apache.directory.fortress.core.rbac.Role}, {@link org.apache.directory.fortress.core.rbac.AdminRole},
{@link org.apache.directory.fortress.core.rbac.OrgUnit} entities.
  * <p/>
- * <img src="../doc-files/HierRoleAscendants.png">
- * <p/>
- * <p/>
- * <img src="../doc-files/HierRoleDescendants.png">
- * <p/>
- * <p/>
- * <img src="../doc-files/HierRoleSimple.png">
- * <p/>
  * <h4>Manageable Schema</h4>
  * The entity maps to Fortress LDAP attributetype ( 1.3.6.1.4.1.1.38088.1.28
  * NAME 'ftParents'

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitDAO.java
index 1d86a8d..8f934c9 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/OrgUnitDAO.java
@@ -448,7 +448,7 @@ final class OrgUnitDAO extends ApacheDsDataProvider
         catch ( CursorException e )
         {
             String error = "findOrgs search val [" + orgUnit.getName() + "] type [" + orgUnit.getType()
-                + "] root [" + orgUnitRoot + "] caught LdapException=" + e;
+                + "] root [" + orgUnitRoot + "] caught CursorException=" + e;
             int errCode;
 
             if ( orgUnit.getType() == OrgUnit.Type.PERM )
@@ -517,7 +517,7 @@ final class OrgUnitDAO extends ApacheDsDataProvider
         catch ( CursorException e )
         {
             String error = "getOrgs type [" + orgUnit.getType() + "] root [" + orgUnitRoot
-                + "] caught LdapException=" + e;
+                + "] caught CursorException=" + e;
             int errCode;
 
             if ( orgUnit.getType() == OrgUnit.Type.PERM )
@@ -577,7 +577,7 @@ final class OrgUnitDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "getAllDescendants filter [" + filter + "] caught LdapException="
+            String error = "getAllDescendants filter [" + filter + "] caught CursorException="
                 + e.getMessage();
             throw new FinderException( GlobalErrIds.ARLE_SEARCH_FAILED, error, e );
         }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/PermDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/PermDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/PermDAO.java
index 96f4b4e..2637b0c 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/PermDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/PermDAO.java
@@ -1082,7 +1082,7 @@ final class PermDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findPermissions caught LdapException=" + e.getMessage();
+            String error = "findPermissions caught CursorException=" + e.getMessage();
             throw new FinderException( GlobalErrIds.PERM_SEARCH_FAILED, error, e );
         }
         finally
@@ -1128,7 +1128,7 @@ final class PermDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findPermissions caught LdapException=" + e.getMessage();
+            String error = "findPermissions caught CursorException=" + e.getMessage();
             throw new FinderException( GlobalErrIds.PERM_SEARCH_FAILED, error, e );
         }
         finally
@@ -1184,7 +1184,7 @@ final class PermDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findPermissions caught LdapException=" + e.getMessage();
+            String error = "findPermissions caught CursorException=" + e.getMessage();
             throw new FinderException( GlobalErrIds.PERM_SEARCH_FAILED, error, e );
         }
         finally
@@ -1268,7 +1268,7 @@ final class PermDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findPermissions caught LdapException=" + e.getMessage();
+            String error = "findPermissions caught CursorException=" + e.getMessage();
             throw new FinderException( GlobalErrIds.PERM_ROLE_SEARCH_FAILED, error, e );
         }
         finally
@@ -1325,7 +1325,7 @@ final class PermDAO extends ApacheDsDataProvider
         catch ( CursorException e )
         {
             String error = "findPermissions user [" + user.getUserId()
-                + "] caught LdapException in PermDAO.findPermissions=" + e.getMessage();
+                + "] caught CursorException in PermDAO.findPermissions=" + e.getMessage();
             throw new FinderException( GlobalErrIds.PERM_USER_SEARCH_FAILED, error, e );
         }
         finally
@@ -1372,7 +1372,7 @@ final class PermDAO extends ApacheDsDataProvider
         catch ( CursorException e )
         {
             String error = "findUserPermissions user [" + user.getUserId()
-                + "] caught LdapException in PermDAO.findPermissions=" + e.getMessage();
+                + "] caught CursorException in PermDAO.findPermissions=" + e.getMessage();
             throw new FinderException( GlobalErrIds.PERM_USER_SEARCH_FAILED, error, e );
         }
         finally
@@ -1437,7 +1437,7 @@ final class PermDAO extends ApacheDsDataProvider
         catch ( CursorException e )
         {
             String error = "findPermissions user [" + session.getUserId()
-                + "] caught LdapException in PermDAO.findPermissions=" + e.getMessage();
+                + "] caught CursorException in PermDAO.findPermissions=" + e.getMessage();
             throw new FinderException( GlobalErrIds.PERM_SESS_SEARCH_FAILED, error, e );
         }
         finally

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/PolicyDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/PolicyDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/PolicyDAO.java
index 6a6ab65..288f861 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/PolicyDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/PolicyDAO.java
@@ -617,7 +617,7 @@ final class PolicyDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findPolicy name [" + searchVal + "] caught LdapException=" +
e.getMessage();
+            String error = "findPolicy name [" + searchVal + "] caught CursorException="
+ e.getMessage();
             throw new FinderException( GlobalErrIds.PSWD_SEARCH_FAILED, error, e );
         }
         finally

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/RoleDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/RoleDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/RoleDAO.java
index 677893c..91b82ff 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/RoleDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/RoleDAO.java
@@ -447,7 +447,7 @@ final class RoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findRoles filter [" + filter + "] caught LdapException=" + e.getMessage();
+            String error = "findRoles filter [" + filter + "] caught CursorException=" +
e.getMessage();
             throw new FinderException( GlobalErrIds.ROLE_SEARCH_FAILED, error, e );
         }
         finally
@@ -496,7 +496,7 @@ final class RoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findRoles filter [" + filter + "] caught LdapException=" + e.getMessage();
+            String error = "findRoles filter [" + filter + "] caught CursorException=" +
e.getMessage();
             throw new FinderException( GlobalErrIds.ROLE_SEARCH_FAILED, error, e );
         }
         finally
@@ -542,7 +542,7 @@ final class RoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "findAssignedRoles userDn [" + userDn + "] caught LdapException="
+ e.getMessage();
+            String error = "findAssignedRoles userDn [" + userDn + "] caught CursorException="
+ e.getMessage();
             throw new FinderException( GlobalErrIds.ROLE_OCCUPANT_SEARCH_FAILED, error, e
);
         }
         finally
@@ -591,7 +591,7 @@ final class RoleDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "getAllDescendants filter [" + filter + "] caught LdapException="
+ e.getMessage();
+            String error = "getAllDescendants filter [" + filter + "] caught CursorException="
+ e.getMessage();
             throw new FinderException( GlobalErrIds.ROLE_SEARCH_FAILED, error, e );
         }
         finally

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/SdDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/SdDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/SdDAO.java
index 6088c83..85eab65 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/SdDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/SdDAO.java
@@ -497,7 +497,7 @@ final class SdDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "search role [" + role.getName() + "] type [" + type + "] caught
LdapException="
+            String error = "search role [" + role.getName() + "] type [" + type + "] caught
CursorException="
                 + e.getMessage();
             int errCode;
 
@@ -577,7 +577,7 @@ final class SdDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String error = "search type [" + sdSet.getType() + "] caught LdapException="
+ e.getMessage();
+            String error = "search type [" + sdSet.getType() + "] caught CursorException="
+ e.getMessage();
             int errCode;
 
             if ( sdSet.getType() == SDSet.SDType.DYNAMIC )

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f85b1122/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
index 5e049b7..928c176 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
@@ -1441,7 +1441,7 @@ final class UserDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String warning = "findUsersList caught LDAPException=" + e.getMessage();
+            String warning = "findUsersList caught CursorException=" + e.getMessage();
             throw new FinderException( GlobalErrIds.USER_SEARCH_FAILED, warning, e );
         }
         finally
@@ -1497,7 +1497,7 @@ final class UserDAO extends ApacheDsDataProvider
         }
         catch ( CursorException e )
         {
-            String warning = "findUsers caught LDAPException=" + e.getMessage();
+            String warning = "findUsers caught CursorException=" + e.getMessage();
             throw new FinderException( GlobalErrIds.USER_SEARCH_FAILED, warning, e );
         }
         finally


Mime
View raw message