directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [14/20] git commit: Minor formatting
Date Wed, 05 Nov 2014 17:33:21 GMT
Minor formatting

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

Branch: refs/heads/master
Commit: 61dc367c7ed21f8cddc7da08b5c5432c3997949f
Parents: 3e94045
Author: Emmanuel L├ęcharny <elecharny@symas.com>
Authored: Sun Nov 2 17:10:11 2014 +0100
Committer: Emmanuel L├ęcharny <elecharny@symas.com>
Committed: Sun Nov 2 17:10:11 2014 +0100

----------------------------------------------------------------------
 .../directory/fortress/core/AccessMgrFactory.java      |  3 +--
 .../core/ldap/container/OrganizationalUnitP.java       |  5 +++++
 .../directory/fortress/core/rbac/AdminRoleP.java       | 13 +++++++++++++
 .../fortress/core/rbac/AccessMgrImplTest.java          |  2 ++
 .../apache/directory/fortress/core/rbac/TestUtils.java |  2 ++
 .../fortress/core/rbac/apacheds/AdminManagerTest.java  |  3 +++
 .../core/rbac/apacheds/FortressJUnitApachedsTest.java  |  1 -
 7 files changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/61dc367c/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
index 5a74567..076e37e 100755
--- a/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
@@ -59,8 +59,7 @@ public class AccessMgrFactory
      * @return instance of {@link AccessMgr}.
      * @throws SecurityException in the event of failure during instantiation.
      */
-    public static AccessMgr createInstance(String contextId)
-        throws SecurityException
+    public static AccessMgr createInstance( String contextId) throws SecurityException
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
         if (!VUtil.isNotNullOrEmpty(accessClassName))

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/61dc367c/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
b/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
index 7ce72d8..ca036db 100755
--- a/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
@@ -118,12 +118,14 @@ public class OrganizationalUnitP
             LOG.warn( error );
             throw new ValidationException( GlobalErrIds.CNTR_NAME_INVLD, error );
         }
+        
         if ( !VUtil.isNotNullOrEmpty( entity.getName() ) )
         {
             String error = "validate name validation failed, null or empty value";
             LOG.warn( error );
             throw new ValidationException( GlobalErrIds.CNTR_NAME_NULL, error );
         }
+        
         if ( entity.getParent().length() > GlobalIds.OU_LEN )
         {
             String name = entity.getName();
@@ -132,13 +134,16 @@ public class OrganizationalUnitP
             LOG.warn( error );
             throw new ValidationException( GlobalErrIds.CNTR_PARENT_INVLD, error );
         }
+        
         if ( !VUtil.isNotNullOrEmpty( entity.getParent() ) )
         {
             String error = "validate parent validation failed, null or empty value";
             LOG.warn( error );
             throw new ValidationException( GlobalErrIds.CNTR_PARENT_NULL, error );
         }
+        
         VUtil.safeText( entity.getDescription(), GlobalIds.DESC_LEN );
+        
         if ( VUtil.isNotNullOrEmpty( entity.getDescription() ) )
         {
             VUtil.description( entity.getDescription() );

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/61dc367c/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
index 35aece2..01f5978 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
@@ -306,10 +306,12 @@ public final class AdminRoleP
         throws SecurityException
     {
         VUtil.safeText( entity.getName(), GlobalIds.ROLE_LEN );
+        
         if ( VUtil.isNotNullOrEmpty( entity.getBeginRange() ) && VUtil.isNotNullOrEmpty(
entity.getEndRange() ) )
         {
             VUtil.safeText( entity.getBeginRange(), GlobalIds.ROLE_LEN );
             VUtil.safeText( entity.getEndRange(), GlobalIds.ROLE_LEN );
+            
             if ( entity.getBeginRange().equalsIgnoreCase( entity.getEndRange() )
                 && ( !entity.isBeginInclusive() || !entity.isEndInclusive() ) )
             {
@@ -341,42 +343,52 @@ public final class AdminRoleP
             LOG.warn( error );
             throw new SecurityException( GlobalErrIds.ARLE_END_RANGE_NULL, error );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getDescription() ) )
         {
             VUtil.description( entity.getDescription() );
         }
+        
         if ( entity.getTimeout() >= 0 )
         {
             VUtil.timeout( entity.getTimeout() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getBeginTime() ) )
         {
             VUtil.beginTime( entity.getBeginTime() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getEndTime() ) )
         {
             VUtil.endTime( entity.getEndTime() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getBeginDate() ) )
         {
             VUtil.beginDate( entity.getBeginDate() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getEndDate() ) )
         {
             VUtil.endDate( entity.getEndDate() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getDayMask() ) )
         {
             VUtil.dayMask( entity.getDayMask() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getBeginLockDate() ) )
         {
             VUtil.beginDate( entity.getBeginDate() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getEndLockDate() ) )
         {
             VUtil.endDate( entity.getEndLockDate() );
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getOsU() ) )
         {
             for ( String ou : entity.getOsU() )
@@ -387,6 +399,7 @@ public final class AdminRoleP
                 op.read( inOe );
             }
         }
+        
         if ( VUtil.isNotNullOrEmpty( entity.getOsP() ) )
         {
             for ( String ou : entity.getOsP() )

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/61dc367c/src/test/java/org/apache/directory/fortress/core/rbac/AccessMgrImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/rbac/AccessMgrImplTest.java
b/src/test/java/org/apache/directory/fortress/core/rbac/AccessMgrImplTest.java
index 5804fc1..eaaca95 100755
--- a/src/test/java/org/apache/directory/fortress/core/rbac/AccessMgrImplTest.java
+++ b/src/test/java/org/apache/directory/fortress/core/rbac/AccessMgrImplTest.java
@@ -464,9 +464,11 @@ public class AccessMgrImplTest extends TestCase
     public static void createSessionsWithRolesTrusted( String msg, String[][] uArray, String[][]
rArray )
     {
         LogUtil.logIt( msg );
+        
         try
         {
             AccessMgr accessMgr = AccessMgrFactory.createInstance( TestUtils.getContext()
);
+            
             for ( String[] usr : uArray )
             {
                 User user = UserTestData.getUser( usr );

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/61dc367c/src/test/java/org/apache/directory/fortress/core/rbac/TestUtils.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/rbac/TestUtils.java b/src/test/java/org/apache/directory/fortress/core/rbac/TestUtils.java
index 8230d22..433f70d 100755
--- a/src/test/java/org/apache/directory/fortress/core/rbac/TestUtils.java
+++ b/src/test/java/org/apache/directory/fortress/core/rbac/TestUtils.java
@@ -65,10 +65,12 @@ public class TestUtils extends TestCase
     {
         // This property can be overriden with system property:
         String tenant = System.getProperty( GlobalIds.TENANT );
+        
         if ( VUtil.isNotNullOrEmpty( tenant ) && !tenant.equals( "${tenant}" ) )
         {
             contextId = tenant;
         }
+        
         return contextId;
     }
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/61dc367c/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/AdminManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/AdminManagerTest.java
b/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/AdminManagerTest.java
index da71f81..03c4f64 100644
--- a/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/AdminManagerTest.java
+++ b/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/AdminManagerTest.java
@@ -114,9 +114,11 @@ public class AdminManagerTest extends AbstractLdapTestUnit
     private void addUsers( String msg, String[][] uArray, boolean isAdmin )
     {
         LogUtil.logIt( msg );
+        
         try
         {
             AdminMgr adminMgr;
+            
             if ( isAdmin )
             {
                 adminMgr = getManagedAdminMgr();
@@ -125,6 +127,7 @@ public class AdminManagerTest extends AbstractLdapTestUnit
             {
                 adminMgr = AdminMgrFactory.createInstance( TestUtils.getContext() );
             }
+            
             for ( String[] usr : uArray )
             {
                 User user = UserTestData.getUser( usr );

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/61dc367c/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/FortressJUnitApachedsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/FortressJUnitApachedsTest.java
b/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/FortressJUnitApachedsTest.java
index 45fa6a4..8649332 100644
--- a/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/FortressJUnitApachedsTest.java
+++ b/src/test/java/org/apache/directory/fortress/core/rbac/apacheds/FortressJUnitApachedsTest.java
@@ -35,7 +35,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.ldap.LdapCounters;
 import org.apache.directory.fortress.core.rbac.AccessMgrImplTest;
 import org.apache.directory.fortress.core.rbac.AdminMgrImplTest;
 import org.apache.directory.fortress.core.rbac.AdminRoleTestData;


Mime
View raw message