directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [4/8] git commit: o Removed some compilation warnings o Expanded the import *
Date Wed, 29 Oct 2014 05:10:25 GMT
o Removed some compilation warnings
o Expanded the import *

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/8818908c
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/8818908c
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/8818908c

Branch: refs/heads/master
Commit: 8818908cce6895af35bf78d14b828a3f6a18258e
Parents: 627899e
Author: Emmanuel L├ęcharny <elecharny@symas.com>
Authored: Wed Oct 29 06:02:34 2014 +0100
Committer: Emmanuel L├ęcharny <elecharny@symas.com>
Committed: Wed Oct 29 06:02:34 2014 +0100

----------------------------------------------------------------------
 .../fortress/core/ldap/group/GroupMgrImpl.java   | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/8818908c/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrImpl.java
b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrImpl.java
index 8c5722a..d85d3ea 100755
--- a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrImpl.java
@@ -19,7 +19,9 @@
  */
 package org.apache.directory.fortress.core.ldap.group;
 
-import org.apache.directory.fortress.core.*;
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.ReviewMgr;
+import org.apache.directory.fortress.core.ReviewMgrFactory;
 import org.apache.directory.fortress.core.SecurityException;
 import org.apache.directory.fortress.core.rbac.Manageable;
 import org.apache.directory.fortress.core.rbac.User;
@@ -57,6 +59,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         String methodName = "add";
         assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
         checkAccess(CLS_NM, methodName);
+        
         if(!group.isMemberDn())
         {
             loadUserDns( group );
@@ -80,6 +83,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         String methodName = "update";
         assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
         checkAccess(CLS_NM, methodName);
+        
         return groupP.update( group );
     }
 
@@ -96,6 +100,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         String methodName = "delete";
         assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
         checkAccess(CLS_NM, methodName);
+        
         return groupP.delete( group );
     }
 
@@ -113,6 +118,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         String methodName = "addProperty";
         assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
         checkAccess(CLS_NM, methodName);
+        
         return groupP.add( group, key, value );
     }
 
@@ -130,6 +136,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         String methodName = "deleteProperty";
         assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
         checkAccess(CLS_NM, methodName);
+        
         return groupP.delete( group, key, value );
     }
 
@@ -146,6 +153,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         String methodName = "read";
         assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
         checkAccess(CLS_NM, methodName);
+        
         return groupP.read( group );
     }
 
@@ -162,6 +170,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         String methodName = "find";
         assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
         checkAccess(CLS_NM, methodName);
+        
         return groupP.search( group );
     }
 
@@ -178,6 +187,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         assertContext(CLS_NM, methodName, user, GlobalErrIds.USER_NULL);
         checkAccess(CLS_NM, methodName);
         loadUserDn( user );
+        
         return groupP.search( user );
     }
 
@@ -197,6 +207,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         checkAccess(CLS_NM, methodName);
         ReviewMgr reviewMgr = ReviewMgrFactory.createInstance();
         User user = reviewMgr.readUser( new User( member ) );
+        
         return groupP.assign( group, user.getDn() );
     }
 
@@ -216,6 +227,7 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         checkAccess(CLS_NM, methodName);
         ReviewMgr reviewMgr = ReviewMgrFactory.createInstance();
         User user = reviewMgr.readUser( new User( member ) );
+        
         return groupP.deassign( group, user.getDn() );
     }
 
@@ -224,12 +236,14 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
         if( VUtil.isNotNullOrEmpty( group.getMembers() ))
         {
             ReviewMgr reviewMgr = ReviewMgrFactory.createInstance();
-            List<String> userDns = new ArrayList<>();
+            List<String> userDns = new ArrayList<String>();
+            
             for( String member : group.getMembers() )
             {
                 User user = reviewMgr.readUser( new User( member ) );
                 userDns.add( user.getDn() );
             }
+            
             group.setMembers( userDns );
         }
     }
@@ -237,7 +251,6 @@ public class GroupMgrImpl extends Manageable implements GroupMgr
     private void loadUserDn( User inUser ) throws SecurityException
     {
         ReviewMgr reviewMgr = ReviewMgrFactory.createInstance();
-        String userDns;
         User outUser = reviewMgr.readUser( inUser );
         inUser.setDn( outUser.getDn() );
     }


Mime
View raw message