You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2015/05/19 12:50:14 UTC
[1/3] directory-fortress-core git commit: Fixed the Sonar 'info' :
mainly, removal of 'public' in methods declaration in interfaces
Repository: directory-fortress-core
Updated Branches:
refs/heads/master 4d037cb2b -> 4fde4a99c
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/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..f4625fe 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
@@ -22,7 +22,6 @@ package org.apache.directory.fortress.core.rbac;
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import org.apache.directory.api.ldap.model.constants.SchemaConstants;
import org.apache.directory.api.ldap.model.cursor.CursorException;
@@ -46,7 +45,6 @@ import org.apache.directory.fortress.core.RemoveException;
import org.apache.directory.fortress.core.UpdateException;
import org.apache.directory.fortress.core.ldap.ApacheDsDataProvider;
import org.apache.directory.fortress.core.rbac.AdminRole;
-import org.apache.directory.fortress.core.rbac.AdminRoleP;
import org.apache.directory.fortress.core.rbac.AdminRoleUtil;
import org.apache.directory.fortress.core.rbac.Graphable;
import org.apache.directory.fortress.core.rbac.Role;
@@ -240,7 +238,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider
if ( entity.isTemporalSet() )
{
String szRawData = CUtil.setConstraint( entity );
-
+
if ( VUtil.isNotNullOrEmpty( szRawData ) )
{
mods.add( new DefaultModification(
@@ -358,7 +356,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider
{
LdapConnection ld = null;
String dn = getDn( entity );
-
+
try
{
List<Modification> mods = new ArrayList<Modification>();
@@ -427,7 +425,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider
{
ld = getAdminConnection();
Entry findEntry = read( ld, dn, ROLE_ATRS );
- if(findEntry != null)
+ if ( findEntry != null )
{
entity = unloadLdapEntry( findEntry, 0, adminRole.getContextId() );
}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/rbac/Administrator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/Administrator.java b/src/main/java/org/apache/directory/fortress/core/rbac/Administrator.java
index 0c0c0f9..557dff3 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/Administrator.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/Administrator.java
@@ -19,8 +19,10 @@
*/
package org.apache.directory.fortress.core.rbac;
+
import java.util.Set;
+
/**
* This interface is used by Fortress admin role processing. It prescribes the APIs that are necessary for an Administrative
* Role entity to fullfill the ARBAC functionality.
@@ -37,42 +39,48 @@ public interface Administrator
*
* @return List of type String containing Perm OU. This maps to 'ftOSP' attribute on 'ftPools' aux object class.
*/
- public Set<String> getOsP();
+ Set<String> getOsP();
+
/**
* Set a collection of optional Perm OU attributes to be stored on the AdminRole entity.
*
* @param osPs is a List of type String containing Perm OU. This maps to 'ftOSP' attribute on 'ftPools' aux object class.
*/
- public void setOsP(Set<String> osPs);
+ void setOsP( Set<String> osPs );
+
/**
* Set a Perm OU attribute to be stored on the AdminRole entity.
*
* @param osP is a Perm OU that maps to 'ftOSP' attribute on 'ftPools' aux object class.
*/
- public void setOsP(String osP);
+ void setOsP( String osP );
+
/**
* Get a collection of optional User OU attributes that were stored on the AdminRole entity.
*
* @return List of type String containing User OU. This maps to 'ftOSU' attribute on 'ftPools' aux object class.
*/
- public Set<String> getOsU();
+ Set<String> getOsU();
+
/**
* Set a collection of optional User OU attributes to be stored on the AdminRole entity.
*
* @param osUs is a List of type String containing User OU. This maps to 'ftOSU' attribute on 'ftPools' aux object class.
*/
- public void setOsU(Set<String> osUs);
+ void setOsU( Set<String> osUs );
+
/**
* Set a User OU attribute to be stored on the AdminRole entity.
*
* @param osU is a User OU that maps to 'ftOSU' attribute on 'ftPools' aux object class.
*/
- public void setOsU(String osU);
+ void setOsU( String osU );
+
/**
* Load the role range attributes given a raw format. This method is used internal to Fortress and is not intended
@@ -80,7 +88,8 @@ public interface Administrator
*
* @param szRaw maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- void setRoleRangeRaw(String szRaw);
+ void setRoleRangeRaw( String szRaw );
+
/**
* Get the raw format for role range using current AdminRole entity attributes. This method is used internal to Fortress and is not intended
@@ -88,62 +97,69 @@ public interface Administrator
*
* @return String maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public String getRoleRangeRaw();
+ String getRoleRangeRaw();
+
/**
* Return the begin Role range attribute for AdminRole entity.
*
* @return String that maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public String getBeginRange();
+ String getBeginRange();
+
/**
* Set the begin Role range attribute for AdminRole entity.
*
* @param beginRange maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public void setBeginRange(String beginRange);
+ void setBeginRange( String beginRange );
+
/**
* Return the end Role range attribute for AdminRole entity.
*
* @return String that maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public String getEndRange();
+ String getEndRange();
+
/**
* Set the end Role range attribute for AdminRole entity.
*
* @param endRange maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public void setEndRange(String endRange);
+ void setEndRange( String endRange );
+
/**
* Set the begin inclusive which specifies if role range includes or excludes the 'beginRange' attribute.
*
* @return String that maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public boolean isBeginInclusive();
+ boolean isBeginInclusive();
+
/**
* Get the begin inclusive which specifies if role range includes or excludes the 'beginRange' attribute.
*
* @param beginInclusive maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public void setBeginInclusive(boolean beginInclusive);
+ void setBeginInclusive( boolean beginInclusive );
+
/**
* Set the end inclusive which specifies if role range includes or excludes the 'endRange' attribute.
*
* @return String that maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public boolean isEndInclusive();
+ boolean isEndInclusive();
+
/**
* Get the end inclusive which specifies if role range includes or excludes the 'endRange' attribute.
*
* @param endInclusive maps to 'ftRange' attribute on 'ftPools' aux object class.
*/
- public void setEndInclusive(boolean endInclusive);
+ void setEndInclusive( boolean endInclusive );
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/rbac/DSDChecker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/DSDChecker.java b/src/main/java/org/apache/directory/fortress/core/rbac/DSDChecker.java
index c80c32a..d68d3b4 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/DSDChecker.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/DSDChecker.java
@@ -24,11 +24,10 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import org.apache.directory.fortress.core.*;
-import org.apache.directory.fortress.core.util.attr.VUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.ObjectFactory;
import org.apache.directory.fortress.core.util.time.Constraint;
import org.apache.directory.fortress.core.util.time.Time;
import org.apache.directory.fortress.core.util.time.Validator;
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/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..658b4fd 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
@@ -22,6 +22,7 @@ package org.apache.directory.fortress.core.rbac;
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.
@@ -52,39 +53,44 @@ public interface Graphable
*
* @return Set of parent role names assigned to this role.
*/
- public Set<String> getParents();
+ Set<String> getParents();
+
/**
* Set the names of roles names that are parents (direct ascendants) of this role.
*
* @param parents contains the Set of parent role names assigned to this role.
*/
- public void setParents(Set<String> parents);
+ void setParents( Set<String> parents );
+
/**
* Set the occupant attribute with the contents of the User dn.
*
* @param parent maps to 'ftParents' attribute on 'ftRls' object class.
*/
- public void setParent(String parent);
+ void setParent( String parent );
+
/**
* Set the occupant attribute with the contents of the User dn.
*
* @param parent maps to 'ftParents' attribute on 'ftRls' object class.
*/
- public void delParent(String parent);
+ void delParent( String parent );
+
/**
* Get the name required attribute of the node.
*
* @return attribute maps to attribute on 'organizationalUnit' object class.
*/
- public String getName();
+ String getName();
+
/**
* Sets the required name attribute on the node.
*
*/
- public void setName(String name);
+ void setName( String name );
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/rbac/PwMessage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/PwMessage.java b/src/main/java/org/apache/directory/fortress/core/rbac/PwMessage.java
index ba9e777..d16b74d 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/PwMessage.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/PwMessage.java
@@ -19,8 +19,10 @@
*/
package org.apache.directory.fortress.core.rbac;
+
import java.util.List;
+
/**
* Interface is implemented by {@link org.apache.directory.fortress.core.rbac.Session} and prescribes methods used to return Fortress
* password messages to the caller.
@@ -36,101 +38,116 @@ public interface PwMessage
*
* @param userId maps to {@code uid} attribute on inetOrgPerson object class.
*/
- public void setUserId(String userId);
+ void setUserId( String userId );
+
/**
* Set the {@link org.apache.directory.fortress.core.rbac.User#userId} in entity.
*
* @return userId maps to {@code uid} attribute on inetOrgPerson object class.
*/
- public String getUserId();
+ String getUserId();
+
/**
* Contains the message that corresponds to password. These messages map to {@link GlobalPwMsgIds#pwMsgs}
*
* @param message
*/
- public void setMsg(String message);
+ void setMsg( String message );
+
/**
* Return the message that corresponds to last password check.
*
* @return message maps to {@link GlobalPwMsgIds#pwMsgs}
*/
- public String getMsg();
+ String getMsg();
+
/**
* If set to true the user's password check out good.
*
* @param isAuthenticated
*/
- public void setAuthenticated(boolean isAuthenticated);
+ void setAuthenticated( boolean isAuthenticated );
+
/**
* If set to true the user's password check out good.
*
* @return param isAuthenticated
*/
- public boolean isAuthenticated();
+ boolean isAuthenticated();
+
/**
* Return the warning id that pertain to User's password. This attribute maps to values between 0 and 100 contained within here {@link GlobalPwMsgIds}
*
* @param warning contains warning id.
*/
- public void setWarning(Warning warning);
- public void setWarnings(List<Warning> warnings);
- //public void setWarningId(int warning);
+ void setWarning( Warning warning );
+
+
+ void setWarnings( List<Warning> warnings );
+ //void setWarningId(int warning);
+
/**
* Set the warning id that pertain to User's password. This attribute maps to values between 0 and 100 contained within here {@link GlobalPwMsgIds}
*
* @return warning contains warning id.
*/
- public List<Warning> getWarnings();
- //public int getWarningId();
+ List<Warning> getWarnings();
+
+
+ //int getWarningId();
/**
* Set the error id that pertain to User's password. This attribute maps to values greater than or equal to 100 contained within here {@link GlobalPwMsgIds}
*
* @param error contains error id that maps to {@link GlobalPwMsgIds#pwIds}
*/
- public void setErrorId(int error);
+ void setErrorId( int error );
+
/**
* Return the error id that pertain to User's password. This attribute maps to values greater than or equal to 100 contained within here {@link GlobalPwMsgIds}
*
* @return error contains error id that maps to {@link GlobalPwMsgIds#pwIds}
*/
- public int getErrorId();
+ int getErrorId();
+
/**
* Grace count indicates how many binds User can perform before password slips into expired state.
*
* @param grace integer containing number of binds allowed for user.
*/
- public void setGraceLogins(int grace);
+ void setGraceLogins( int grace );
+
/**
* Get the grace count which indicates how many binds User can perform before password slips into expired state.
*
* @return grace integer containing number of binds allowed for user.
*/
- public int getGraceLogins();
+ int getGraceLogins();
+
/**
* The number of seconds until the User's password expires.
*
* @param expire value is computed by ldap server and contains the number of seconds until password will expire.
*/
- public void setExpirationSeconds(int expire);
+ void setExpirationSeconds( int expire );
+
/**
* Get the number of seconds until the User's password expires.
*
* @return expire value is computed by ldap server and contains the number of seconds until password will expire.
*/
- public int getExpirationSeconds();
+ int getExpirationSeconds();
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/rbac/PwPolicyControl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/PwPolicyControl.java b/src/main/java/org/apache/directory/fortress/core/rbac/PwPolicyControl.java
index e3ade70..cbe1f0f 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/PwPolicyControl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/PwPolicyControl.java
@@ -20,7 +20,6 @@
package org.apache.directory.fortress.core.rbac;
-
/**
* Interface is used to allow pluggable password policy interrogation.
*
@@ -35,5 +34,5 @@ public interface PwPolicyControl
* @param isAuthenticated set to 'true' if password checks pass.
* @param pwMsg describes the outcome of the policy checks.
*/
- public void checkPasswordPolicy( Object[] controls, boolean isAuthenticated, PwMessage pwMsg );
+ void checkPasswordPolicy( Object[] controls, boolean isAuthenticated, PwMessage pwMsg );
}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/rest/PwPolicyMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/PwPolicyMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/PwPolicyMgrRestImpl.java
index 4980157..41748a2 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/PwPolicyMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/PwPolicyMgrRestImpl.java
@@ -19,16 +19,17 @@
*/
package org.apache.directory.fortress.core.rest;
+
import org.apache.directory.fortress.core.GlobalErrIds;
import org.apache.directory.fortress.core.PwPolicyMgr;
import org.apache.directory.fortress.core.SecurityException;
import org.apache.directory.fortress.core.rbac.Manageable;
import org.apache.directory.fortress.core.rbac.PwPolicy;
import org.apache.directory.fortress.core.util.attr.VUtil;
-import org.apache.directory.fortress.core.rbac.User;
import java.util.List;
+
/**
* This class is used to perform administrative and review functions on the PWPOLICIES and USERS data sets using HTTP access to En Masse REST server.
* <p/>
@@ -63,6 +64,7 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
{
private static final String CLS_NM = PwPolicyMgrRestImpl.class.getName();
+
/**
* This method will add a new policy entry to the POLICIES data set. This command is valid
* if and only if the policy entry is not already present in the POLICIES data set.
@@ -149,23 +151,23 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
* @throws SecurityException In the event of data validation or system error.
*/
@Override
- public void add(PwPolicy policy)
+ public void add( PwPolicy policy )
throws SecurityException
{
- VUtil.assertNotNull(policy, GlobalErrIds.PSWD_PLCY_NULL, CLS_NM + ".add");
+ VUtil.assertNotNull( policy, GlobalErrIds.PSWD_PLCY_NULL, CLS_NM + ".add" );
FortRequest request = new FortRequest();
- request.setContextId(this.contextId);
- request.setEntity(policy);
- if (this.adminSess != null)
+ request.setContextId( this.contextId );
+ request.setEntity( policy );
+ if ( this.adminSess != null )
{
- request.setSession(adminSess);
+ request.setSession( adminSess );
}
- String szRequest = RestUtils.marshal(request);
- String szResponse = RestUtils.post(szRequest, HttpIds.PSWD_ADD);
- FortResponse response = RestUtils.unmarshall(szResponse);
- if (response.getErrorCode() != 0)
+ String szRequest = RestUtils.marshal( request );
+ String szResponse = RestUtils.post( szRequest, HttpIds.PSWD_ADD );
+ FortResponse response = RestUtils.unmarshall( szResponse );
+ if ( response.getErrorCode() != 0 )
{
- throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
+ throw new SecurityException( response.getErrorCode(), response.getErrorMessage() );
}
}
@@ -256,23 +258,23 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
* @throws SecurityException In the event policy not found , data validation or system error.
*/
@Override
- public void update(PwPolicy policy)
+ public void update( PwPolicy policy )
throws SecurityException
{
- VUtil.assertNotNull(policy, GlobalErrIds.PSWD_PLCY_NULL, CLS_NM + ".update");
+ VUtil.assertNotNull( policy, GlobalErrIds.PSWD_PLCY_NULL, CLS_NM + ".update" );
FortRequest request = new FortRequest();
- request.setContextId(this.contextId);
- request.setEntity(policy);
- if (this.adminSess != null)
+ request.setContextId( this.contextId );
+ request.setEntity( policy );
+ if ( this.adminSess != null )
{
- request.setSession(adminSess);
+ request.setSession( adminSess );
}
- String szRequest = RestUtils.marshal(request);
- String szResponse = RestUtils.post(szRequest, HttpIds.PSWD_UPDATE);
- FortResponse response = RestUtils.unmarshall(szResponse);
- if (response.getErrorCode() != 0)
+ String szRequest = RestUtils.marshal( request );
+ String szResponse = RestUtils.post( szRequest, HttpIds.PSWD_UPDATE );
+ FortResponse response = RestUtils.unmarshall( szResponse );
+ if ( response.getErrorCode() != 0 )
{
- throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
+ throw new SecurityException( response.getErrorCode(), response.getErrorMessage() );
}
}
@@ -291,23 +293,23 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
* In the event policy entity not found or system error.
*/
@Override
- public void delete(PwPolicy policy)
+ public void delete( PwPolicy policy )
throws SecurityException
{
- VUtil.assertNotNull(policy, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + ".delete");
+ VUtil.assertNotNull( policy, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + ".delete" );
FortRequest request = new FortRequest();
- request.setContextId(this.contextId);
- request.setEntity(policy);
- if (this.adminSess != null)
+ request.setContextId( this.contextId );
+ request.setEntity( policy );
+ if ( this.adminSess != null )
{
- request.setSession(adminSess);
+ request.setSession( adminSess );
}
- String szRequest = RestUtils.marshal(request);
- String szResponse = RestUtils.post(szRequest, HttpIds.PSWD_DELETE);
- FortResponse response = RestUtils.unmarshall(szResponse);
- if (response.getErrorCode() != 0)
+ String szRequest = RestUtils.marshal( request );
+ String szResponse = RestUtils.post( szRequest, HttpIds.PSWD_DELETE );
+ FortResponse response = RestUtils.unmarshall( szResponse );
+ if ( response.getErrorCode() != 0 )
{
- throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
+ throw new SecurityException( response.getErrorCode(), response.getErrorMessage() );
}
}
@@ -324,28 +326,28 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
* @throws SecurityException In the event policy entry not found, data validation or system error.
*/
@Override
- public PwPolicy read(String name)
+ public PwPolicy read( String name )
throws SecurityException
{
- VUtil.assertNotNullOrEmpty(name, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + ".read");
+ VUtil.assertNotNullOrEmpty( name, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + ".read" );
PwPolicy retPolicy;
FortRequest request = new FortRequest();
- request.setContextId(this.contextId);
- request.setEntity(new PwPolicy(name));
- if (this.adminSess != null)
+ request.setContextId( this.contextId );
+ request.setEntity( new PwPolicy( name ) );
+ if ( this.adminSess != null )
{
- request.setSession(adminSess);
+ request.setSession( adminSess );
}
- String szRequest = RestUtils.marshal(request);
- String szResponse = RestUtils.post(szRequest, HttpIds.PSWD_READ);
- FortResponse response = RestUtils.unmarshall(szResponse);
- if (response.getErrorCode() == 0)
+ String szRequest = RestUtils.marshal( request );
+ String szResponse = RestUtils.post( szRequest, HttpIds.PSWD_READ );
+ FortResponse response = RestUtils.unmarshall( szResponse );
+ if ( response.getErrorCode() == 0 )
{
- retPolicy = (PwPolicy) response.getEntity();
+ retPolicy = ( PwPolicy ) response.getEntity();
}
else
{
- throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
+ throw new SecurityException( response.getErrorCode(), response.getErrorMessage() );
}
return retPolicy;
}
@@ -360,28 +362,28 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
* @throws SecurityException In the event of data validation or system error.
*/
@Override
- public List<PwPolicy> search(String searchVal)
+ public List<PwPolicy> search( String searchVal )
throws SecurityException
{
- VUtil.assertNotNull(searchVal, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + ".search");
+ VUtil.assertNotNull( searchVal, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + ".search" );
List<PwPolicy> retPolicies;
FortRequest request = new FortRequest();
- request.setContextId(this.contextId);
- request.setEntity(new PwPolicy(searchVal));
- if (this.adminSess != null)
+ request.setContextId( this.contextId );
+ request.setEntity( new PwPolicy( searchVal ) );
+ if ( this.adminSess != null )
{
- request.setSession(adminSess);
+ request.setSession( adminSess );
}
- String szRequest = RestUtils.marshal(request);
- String szResponse = RestUtils.post(szRequest, HttpIds.PSWD_SEARCH);
- FortResponse response = RestUtils.unmarshall(szResponse);
- if (response.getErrorCode() == 0)
+ String szRequest = RestUtils.marshal( request );
+ String szResponse = RestUtils.post( szRequest, HttpIds.PSWD_SEARCH );
+ FortResponse response = RestUtils.unmarshall( szResponse );
+ if ( response.getErrorCode() == 0 )
{
retPolicies = response.getEntities();
}
else
{
- throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
+ throw new SecurityException( response.getErrorCode(), response.getErrorMessage() );
}
return retPolicies;
}
@@ -397,26 +399,26 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
* @throws SecurityException thrown in the event either user or policy not valid or system error.
*/
@Override
- public void updateUserPolicy(String userId, String name)
+ public void updateUserPolicy( String userId, String name )
throws SecurityException
{
String methodName = "updateUserPolicy";
- VUtil.assertNotNullOrEmpty(userId, GlobalErrIds.USER_NULL, CLS_NM + "." + methodName);
- VUtil.assertNotNullOrEmpty(name, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + "." + methodName);
+ VUtil.assertNotNullOrEmpty( userId, GlobalErrIds.USER_NULL, CLS_NM + "." + methodName );
+ VUtil.assertNotNullOrEmpty( name, GlobalErrIds.PSWD_NAME_NULL, CLS_NM + "." + methodName );
FortRequest request = new FortRequest();
- request.setContextId(this.contextId);
- request.setEntity(new PwPolicy(name));
- request.setValue(userId);
- if (this.adminSess != null)
+ request.setContextId( this.contextId );
+ request.setEntity( new PwPolicy( name ) );
+ request.setValue( userId );
+ if ( this.adminSess != null )
{
- request.setSession(adminSess);
+ request.setSession( adminSess );
}
- String szRequest = RestUtils.marshal(request);
- String szResponse = RestUtils.post(szRequest, HttpIds.PSWD_USER_ADD);
- FortResponse response = RestUtils.unmarshall(szResponse);
- if (response.getErrorCode() != 0)
+ String szRequest = RestUtils.marshal( request );
+ String szResponse = RestUtils.post( szRequest, HttpIds.PSWD_USER_ADD );
+ FortResponse response = RestUtils.unmarshall( szResponse );
+ if ( response.getErrorCode() != 0 )
{
- throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
+ throw new SecurityException( response.getErrorCode(), response.getErrorMessage() );
}
}
@@ -431,23 +433,23 @@ public class PwPolicyMgrRestImpl extends Manageable implements PwPolicyMgr
* @throws SecurityException Thrown in the event either user not valid or system error.
*/
@Override
- public void deletePasswordPolicy(String userId)
+ public void deletePasswordPolicy( String userId )
throws SecurityException
{
- VUtil.assertNotNullOrEmpty(userId, GlobalErrIds.USER_NULL, CLS_NM + ".deletePasswordPolicy");
+ VUtil.assertNotNullOrEmpty( userId, GlobalErrIds.USER_NULL, CLS_NM + ".deletePasswordPolicy" );
FortRequest request = new FortRequest();
- request.setContextId(this.contextId);
- request.setValue(userId);
- if (this.adminSess != null)
+ request.setContextId( this.contextId );
+ request.setValue( userId );
+ if ( this.adminSess != null )
{
- request.setSession(adminSess);
+ request.setSession( adminSess );
}
- String szRequest = RestUtils.marshal(request);
- String szResponse = RestUtils.post(szRequest, HttpIds.PSWD_USER_DELETE);
- FortResponse response = RestUtils.unmarshall(szResponse);
- if (response.getErrorCode() != 0)
+ String szRequest = RestUtils.marshal( request );
+ String szResponse = RestUtils.post( szRequest, HttpIds.PSWD_USER_DELETE );
+ FortResponse response = RestUtils.unmarshall( szResponse );
+ if ( response.getErrorCode() != 0 )
{
- throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
+ throw new SecurityException( response.getErrorCode(), response.getErrorMessage() );
}
}
}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/util/Testable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/Testable.java b/src/main/java/org/apache/directory/fortress/core/util/Testable.java
index c605c65..98a8a5e 100644
--- a/src/main/java/org/apache/directory/fortress/core/util/Testable.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/Testable.java
@@ -19,8 +19,10 @@
*/
package org.apache.directory.fortress.core.util;
+
import org.apache.tools.ant.Task;
+
/**
* Interface is extended by custom Ant tasks that require JUnit validation.
*
@@ -28,5 +30,5 @@ import org.apache.tools.ant.Task;
*/
public interface Testable
{
- public void execute( Task task );
+ void execute( Task task );
}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/util/cache/Cache.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/cache/Cache.java b/src/main/java/org/apache/directory/fortress/core/util/cache/Cache.java
index 2634da1..1cefc4f 100644
--- a/src/main/java/org/apache/directory/fortress/core/util/cache/Cache.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/cache/Cache.java
@@ -19,9 +19,11 @@
*/
package org.apache.directory.fortress.core.util.cache;
+
import net.sf.ehcache.search.Attribute;
import net.sf.ehcache.search.Query;
+
/**
* This Interface is implemented by cacheable Fortress objects and is used to wrap the caching implementation to provide isolation.
*
@@ -36,7 +38,8 @@ public interface Cache
* @return entry stored in the cache.
* @throws CacheException will wraps the implementation's exception.
*/
- public Object get(Object key) throws CacheException;
+ Object get( Object key ) throws CacheException;
+
/**
* Add a new entry to the cache.
@@ -45,7 +48,8 @@ public interface Cache
* @param value object that is stored.
* @throws CacheException will wraps the implementation's exception.
*/
- public void put(Object key, Object value) throws CacheException;
+ void put( Object key, Object value ) throws CacheException;
+
/**
* Clear a cache entry for a given name.
@@ -54,14 +58,16 @@ public interface Cache
* @return boolean value will be false if entry not found and true if entry was found and removed.
* @throws CacheException will wraps the implementation's exception.
*/
- public boolean clear(Object key) throws CacheException;
+ boolean clear( Object key ) throws CacheException;
+
/**
* Remove all entries from the cache.
*
* @throws CacheException will wraps the implementation's exception.
*/
- public void flush() throws CacheException;
+ void flush() throws CacheException;
+
/**
* Retrieve the Cache attribute
@@ -71,12 +77,13 @@ public interface Cache
* @return the search attribute
* @throws CacheException will wraps the implementation's exception.
*/
- public <T> Attribute<T> getSearchAttribute(String attributeName) throws CacheException;
+ <T> Attribute<T> getSearchAttribute( String attributeName ) throws CacheException;
+
/**
* Create a search query for the cache.
*
* @return a new Query builder
*/
- public Query createQuery();
+ Query createQuery();
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/util/time/Constraint.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/time/Constraint.java b/src/main/java/org/apache/directory/fortress/core/util/time/Constraint.java
index 036732f..8021133 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/time/Constraint.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/time/Constraint.java
@@ -70,7 +70,8 @@ public interface Constraint
*
* @return boolean indicating if temporal constraints are placed on user.
*/
- public boolean isTemporalSet();
+ boolean isTemporalSet();
+
/**
* Set the integer timeout that contains max time (in seconds) that entity may remain inactive.
@@ -78,7 +79,8 @@ public interface Constraint
*
* @param timeout maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setTimeout(Integer timeout);
+ void setTimeout( Integer timeout );
+
/**
* Set the begin time of day entity is allowed to be activated in system. The format is military time - HHMM, i.e. 0800 (8:00 am) or 1700 (5:00 p.m.).
@@ -86,7 +88,8 @@ public interface Constraint
*
* @param beginTime maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setBeginTime(String beginTime);
+ void setBeginTime( String beginTime );
+
/**
* Set the end time of day entity is allowed to be activated in system. The format is military time - HHMM, i.e. 0000 (12:00 am) or 2359 (11:59 p.m.).
@@ -94,7 +97,8 @@ public interface Constraint
*
* @param endTime maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setEndTime(String endTime);
+ void setEndTime( String endTime );
+
/**
* Set the beginDate when entity is allowed to be activated in system. The format is - YYYYMMDD, i.e. 20100101 (January 1, 2001).
@@ -102,7 +106,8 @@ public interface Constraint
*
* @param beginDate maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setBeginDate(String beginDate);
+ void setBeginDate( String beginDate );
+
/**
* Set the end date when entity is not allowed to be activated in system. The format is - YYYYMMDD, i.e. 20100101 (January 1, 2010).
@@ -110,7 +115,8 @@ public interface Constraint
*
* @param endDate maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setEndDate(String endDate);
+ void setEndDate( String endDate );
+
/**
* Set the daymask that specifies what days of week entity is allowed to be activated in system. The format is 1234567, i.e. 23456 (Monday, Tuesday, Wednesday, Thursday, Friday).
@@ -118,7 +124,8 @@ public interface Constraint
*
* @param dayMask maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setDayMask(String dayMask);
+ void setDayMask( String dayMask );
+
/**
* Set the begin lock date when entity is temporarily not allowed to be activated in system. The format is - YYYYMMDD, 20100101 (January 1, 2010).
@@ -126,7 +133,8 @@ public interface Constraint
*
* @param beginLockDate maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setBeginLockDate(String beginLockDate);
+ void setBeginLockDate( String beginLockDate );
+
/**
* Set the end lock date when entity is allowed to be activated in system once again. The format is - YYYYMMDD, i.e. 20100101 (January 1, 2010).
@@ -134,21 +142,24 @@ public interface Constraint
*
* @param endLockDate maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public void setEndLockDate(String endLockDate);
+ void setEndLockDate( String endLockDate );
+
/**
* This is used internally by Fortress for Constraint operations. Values set here by external caller will be ignored.
*
* @param name contains attribute used internally for constraint checking.
*/
- public void setName(String name);
+ void setName( String name );
+
/**
* Required on DAO classes convert from raw data to object format. Not intended for external use.
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getRawData();
+ String getRawData();
+
/**
* Return the integer timeout that contains total time (in seconds) that entity may remain inactive.
@@ -156,7 +167,8 @@ public interface Constraint
*
* @return int that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public Integer getTimeout();
+ Integer getTimeout();
+
/**
* Contains the begin time of day entity is allowed to be activated in system. The format is military time - HHMM, i.e. 0800 (8:00 am) or 1700 (5:00 p.m.).
@@ -164,7 +176,8 @@ public interface Constraint
*
* @return String that maps to 'ftCstr', 'ftRC', 'ftARC' attributes in 'ftUserAttrs' object class and 'ftCstr' attribute in 'ftRls' object class.
*/
- public String getBeginTime();
+ String getBeginTime();
+
/**
* Contains the end time of day entity is allowed to be activated in system. The format is military time - HHMM, i.e. 0000 (12:00 am) or 2359 (11:59 p.m.).
@@ -172,7 +185,8 @@ public interface Constraint
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getEndTime();
+ String getEndTime();
+
/**
* Contains the begin date when entity is allowed to be activated in system. The format is - YYYYMMDD, i.e. 20100101 (January 1, 2010).
@@ -180,7 +194,8 @@ public interface Constraint
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getBeginDate();
+ String getBeginDate();
+
/**
* Contains the end date when entity is allowed to be activated in system. The format is - YYYYMMDD, i.e. 20101231 (December 31, 2011).
@@ -188,7 +203,8 @@ public interface Constraint
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getEndDate();
+ String getEndDate();
+
/**
* Contains the begin lock date when entity is temporarily not allowed to activated in system. The format is - YYYYMMDD, i.e. 20100101 (January 1, 2010).
@@ -196,7 +212,8 @@ public interface Constraint
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getBeginLockDate();
+ String getBeginLockDate();
+
/**
* Contains the end lock date when entity is allowed to be activated in system once again. The format is - YYYYMMDD, i.e. 20100101 (January 1, 2010).
@@ -204,7 +221,8 @@ public interface Constraint
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getEndLockDate();
+ String getEndLockDate();
+
/**
* Get the daymask that indicates what days of week entity is allowed to be activated in system. The format is 1234567, i.e. 23456 (Monday, Tuesday, Wednesday, Thursday, Friday).
@@ -212,12 +230,13 @@ public interface Constraint
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getDayMask();
+ String getDayMask();
+
/**
* This is used internally by Fortress for Constraint operations.
*
* @return String that maps to {@code ftCstr}, {@code ftRC}, {@code ftARC} attributes in {@code ftUserAttrs} object class and {@code ftCstr} attribute in {@code ftRls} object class.
*/
- public String getName();
+ String getName();
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/util/time/Validator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/time/Validator.java b/src/main/java/org/apache/directory/fortress/core/util/time/Validator.java
index 63b9725..dc23385 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/time/Validator.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/time/Validator.java
@@ -19,8 +19,10 @@
*/
package org.apache.directory.fortress.core.util.time;
+
import org.apache.directory.fortress.core.rbac.Session;
+
/**
* Interface used by Fortress to provide pluggable validation routines for constraints.
*
@@ -76,6 +78,6 @@ public interface Validator
* @return activation failure code.
* @throws org.apache.directory.fortress.core.SecurityException in the event of validation fails or system exception.
*/
- public int validate(Session session, Constraint constraint, Time time) throws org.apache.directory.fortress.core.SecurityException;
+ int validate( Session session, Constraint constraint, Time time )
+ throws org.apache.directory.fortress.core.SecurityException;
}
-
[3/3] directory-fortress-core git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/directory-fortress-core
Posted by el...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/directory-fortress-core
Conflicts:
src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
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/4fde4a99
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/4fde4a99
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/4fde4a99
Branch: refs/heads/master
Commit: 4fde4a99cc9a475431c94777f3821cb276b3a8d6
Parents: d0922cd 4d037cb
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Tue May 19 12:49:38 2015 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Tue May 19 12:49:38 2015 +0200
----------------------------------------------------------------------
LICENSE | 257 ++++++++
LICENSE.txt | 178 ------
NOTICE | 15 +
NOTICE.txt | 30 -
build.xml | 28 +-
docker/Dockerfile | 45 ++
docker/Dockerfile.centos6 | 46 ++
docker/README.md | 67 ++
docker/run-tests.sh | 48 ++
ldap/schema/apacheds-fortress.ldif | 36 ++
ldap/schema/mavibot-setup.ldif | 123 ++++
ldap/setup/LoadTestUsers.xml | 200 +++---
pom.xml | 189 +++---
.../directory/fortress/core/GlobalErrIds.java | 610 +++++++++----------
.../directory/fortress/core/GlobalIds.java | 157 ++---
.../directory/fortress/core/cfg/Config.java | 225 +++++--
.../fortress/core/cli/CmdLineParser.java | 6 +-
.../core/cli/CommandLineInterpreter.java | 7 +-
.../directory/fortress/core/cli/Options.java | 4 +-
.../core/doc-files/apache-fortress-core.html | 6 +-
.../core/doc-files/apache-fortress-rest.html | 11 +-
.../core/doc-files/apache-fortress-web.html | 12 +-
.../screenshot-fortress-console-main.png | Bin 0 -> 56230 bytes
.../core/ldap/ApacheDsDataProvider.java | 71 +--
.../core/ldap/LdapClientTrustStoreManager.java | 2 +-
.../fortress/core/ldap/group/GroupDAO.java | 7 +-
.../directory/fortress/core/rbac/AdminRole.java | 11 +
.../fortress/core/rbac/AdminRoleDAO.java | 8 +-
.../directory/fortress/core/rbac/AuditDAO.java | 12 +-
.../fortress/core/rbac/GlobalPwMsgIds.java | 36 +-
.../directory/fortress/core/rbac/Graphable.java | 8 -
.../directory/fortress/core/rbac/OrgUnit.java | 11 +
.../fortress/core/rbac/OrgUnitDAO.java | 6 +-
.../directory/fortress/core/rbac/PermDAO.java | 85 ++-
.../directory/fortress/core/rbac/PermObj.java | 15 +
.../fortress/core/rbac/Permission.java | 17 +
.../directory/fortress/core/rbac/PolicyDAO.java | 22 +-
.../directory/fortress/core/rbac/Props.java | 8 +
.../directory/fortress/core/rbac/PwPolicy.java | 21 +
.../directory/fortress/core/rbac/Role.java | 25 +-
.../directory/fortress/core/rbac/RoleDAO.java | 20 +-
.../directory/fortress/core/rbac/SDSet.java | 13 +-
.../directory/fortress/core/rbac/SdDAO.java | 60 +-
.../directory/fortress/core/rbac/User.java | 15 +-
.../fortress/core/rbac/UserAdminRole.java | 13 +
.../directory/fortress/core/rbac/UserDAO.java | 4 +-
.../directory/fortress/core/rbac/UserRole.java | 16 +
.../fortress/core/DefaultTestCase.java | 30 -
.../fortress/core/UnstableTestCase.java | 33 -
.../fortress/core/example/EErrIds.java | 22 +-
.../directory/fortress/core/example/EIds.java | 14 +-
.../fortress/core/rbac/AccelMgrImplTest.java | 3 -
.../fortress/core/rbac/AdminRoleTestData.java | 16 +-
.../fortress/core/rbac/FortressJUnitTest.java | 4 -
.../fortress/core/rbac/OrgUnitTestData.java | 28 +-
.../fortress/core/rbac/PRATestData.java | 2 +-
.../fortress/core/rbac/PermTestData.java | 58 +-
.../fortress/core/rbac/RoleTestData.java | 96 +--
.../fortress/core/rbac/URATestData.java | 2 +-
.../fortress/core/rbac/UserTestData.java | 48 +-
.../core/rbac/accelerator/TestAccelerator.java | 3 -
.../apacheds/FortressJUnitApachedsTest.java | 3 -
.../core/samples/AllSamplesJUnitTest.java | 3 -
src/test/jmeter/acCheckAccess.jmx | 2 +-
src/test/jmeter/acCreateSession.jmx | 2 +-
src/test/jmeter/ftCheckAccess.jmx | 2 +-
66 files changed, 1965 insertions(+), 1212 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4fde4a99/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
----------------------------------------------------------------------
diff --cc src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
index af7e97d,72a1a88..1167b84
--- a/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
@@@ -156,15 -144,16 +144,15 @@@ public abstract class ApacheDsDataProvi
private static final PasswordPolicy PP_REQ_CTRL = new PasswordPolicyImpl();
-
static
{
- String host = Config.getProperty( LDAP_HOST, "localhost" );
- int port = Config.getInt( LDAP_PORT, 10389 );
- int min = Config.getInt( LDAP_ADMIN_POOL_MIN, 1 );
- int max = Config.getInt( LDAP_ADMIN_POOL_MAX, 10 );
+ String host = Config.getProperty( GlobalIds.LDAP_HOST, "localhost" );
+ int port = Config.getInt( GlobalIds.LDAP_PORT, 10389 );
+ int min = Config.getInt( GlobalIds.LDAP_ADMIN_POOL_MIN, 1 );
+ int max = Config.getInt( GlobalIds.LDAP_ADMIN_POOL_MAX, 10 );
int logmin = Config.getInt( LDAP_LOG_POOL_MIN, 1 );
int logmax = Config.getInt( LDAP_LOG_POOL_MAX, 10 );
- LOG.info( "LDAP POOL: host=[{}], port=[{}], min=[{}], max=[{}]", host, port, min, max);
+ LOG.info( "LDAP POOL: host=[{}], port=[{}], min=[{}], max=[{}]", host, port, min, max );
if ( IS_SET_TRUST_STORE_PROP )
{
@@@ -1561,4 -1540,4 +1542,4 @@@
{
return counters;
}
--}
++}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4fde4a99/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4fde4a99/src/main/java/org/apache/directory/fortress/core/rbac/Graphable.java
----------------------------------------------------------------------
[2/3] directory-fortress-core git commit: Fixed the Sonar 'info' :
mainly, removal of 'public' in methods declaration in interfaces
Posted by el...@apache.org.
Fixed the Sonar 'info' : mainly, removal of 'public' in methods
declaration in interfaces
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/d0922cd9
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/d0922cd9
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/d0922cd9
Branch: refs/heads/master
Commit: d0922cd943b25179cb1d11ea0d3cc03ca2d7e57c
Parents: 46a7554
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Tue May 19 12:05:04 2015 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Tue May 19 12:05:04 2015 +0200
----------------------------------------------------------------------
.../directory/fortress/core/AccelMgr.java | 18 +-
.../directory/fortress/core/AccessMgr.java | 24 +--
.../directory/fortress/core/AdminMgr.java | 93 ++++++-----
.../directory/fortress/core/AuditMgr.java | 19 ++-
.../directory/fortress/core/DelAccessMgr.java | 26 +--
.../directory/fortress/core/DelAdminMgr.java | 60 ++++---
.../directory/fortress/core/DelReviewMgr.java | 17 +-
.../directory/fortress/core/Manageable.java | 6 +-
.../directory/fortress/core/PwPolicyMgr.java | 16 +-
.../directory/fortress/core/ReviewMgr.java | 81 +++++----
.../fortress/core/StandardException.java | 4 +-
.../directory/fortress/core/cfg/ConfigMgr.java | 17 +-
.../core/ldap/ApacheDsDataProvider.java | 14 +-
.../fortress/core/ldap/group/GroupMgr.java | 31 ++--
.../fortress/core/ldap/suffix/SuffixDAO.java | 5 +-
.../fortress/core/rbac/AdminRoleDAO.java | 8 +-
.../fortress/core/rbac/Administrator.java | 50 ++++--
.../fortress/core/rbac/DSDChecker.java | 5 +-
.../directory/fortress/core/rbac/Graphable.java | 18 +-
.../directory/fortress/core/rbac/PwMessage.java | 53 ++++--
.../fortress/core/rbac/PwPolicyControl.java | 3 +-
.../fortress/core/rest/PwPolicyMgrRestImpl.java | 164 ++++++++++---------
.../directory/fortress/core/util/Testable.java | 4 +-
.../fortress/core/util/cache/Cache.java | 19 ++-
.../fortress/core/util/time/Constraint.java | 59 ++++---
.../fortress/core/util/time/Validator.java | 6 +-
26 files changed, 478 insertions(+), 342 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/AccelMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AccelMgr.java b/src/main/java/org/apache/directory/fortress/core/AccelMgr.java
index 3d401a2..19c6d4d 100644
--- a/src/main/java/org/apache/directory/fortress/core/AccelMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/AccelMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import java.util.List;
import org.apache.directory.fortress.core.rbac.Permission;
@@ -26,6 +27,7 @@ import org.apache.directory.fortress.core.rbac.User;
import org.apache.directory.fortress.core.rbac.Session;
import org.apache.directory.fortress.core.rbac.UserRole;
+
/**
* This object performs runtime access control operations on objects that are provisioned RBAC entities
* that reside in LDAP directory. These APIs map directly to similar named APIs specified by ANSI and NIST
@@ -125,7 +127,7 @@ public interface AccelMgr extends Manageable
* @throws SecurityException
* in the event of data validation failure, security policy violation or DAO error.
*/
- public Session createSession(User user, boolean isTrusted)
+ Session createSession( User user, boolean isTrusted )
throws SecurityException;
@@ -136,9 +138,10 @@ public interface AccelMgr extends Manageable
* @param session object contains the user's returned RBAC session from the createSession method.
* @throws SecurityException is thrown if session invalid or system. error.
*/
- public void deleteSession(Session session)
+ void deleteSession( Session session )
throws SecurityException;
+
/**
* This function returns the active roles associated with a session. The function is valid if
* and only if the session is a valid Fortress session.
@@ -147,7 +150,7 @@ public interface AccelMgr extends Manageable
* @return list containing all roles active in user's session. This will NOT contain inherited roles.
* @throws SecurityException is thrown if session invalid or system. error.
*/
- public List<UserRole> sessionRoles(Session session)
+ List<UserRole> sessionRoles( Session session )
throws SecurityException;
@@ -166,7 +169,7 @@ public interface AccelMgr extends Manageable
* @throws SecurityException
* in the event of data validation failure, security policy violation or DAO error.
*/
- public boolean checkAccess(Session session, Permission perm)
+ boolean checkAccess( Session session, Permission perm )
throws SecurityException;
@@ -178,7 +181,7 @@ public interface AccelMgr extends Manageable
* @return List<Permission> containing permissions (op, obj) active for user's session.
* @throws SecurityException is thrown if runtime error occurs with system.
*/
- public List<Permission> sessionPermissions(Session session)
+ List<Permission> sessionPermissions( Session session )
throws SecurityException;
@@ -200,7 +203,7 @@ public interface AccelMgr extends Manageable
* @param role object contains the role name, {@link UserRole#name}, to be activated into session.
* @throws SecurityException is thrown if user is not allowed to activate or runtime error occurs with system.
*/
- public void addActiveRole(Session session, UserRole role)
+ void addActiveRole( Session session, UserRole role )
throws SecurityException;
@@ -214,7 +217,6 @@ public interface AccelMgr extends Manageable
* @param role object contains the role name, {@link org.apache.directory.fortress.core.rbac.UserRole#name}, to be deactivated.
* @throws SecurityException is thrown if user is not allowed to deactivate or runtime error occurs with system.
*/
- public void dropActiveRole(Session session, UserRole role)
+ void dropActiveRole( Session session, UserRole role )
throws SecurityException;
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/AccessMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AccessMgr.java b/src/main/java/org/apache/directory/fortress/core/AccessMgr.java
index 85b9575..ceb3955 100755
--- a/src/main/java/org/apache/directory/fortress/core/AccessMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/AccessMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import java.util.List;
import java.util.Set;
@@ -27,6 +28,7 @@ import org.apache.directory.fortress.core.rbac.User;
import org.apache.directory.fortress.core.rbac.Session;
import org.apache.directory.fortress.core.rbac.UserRole;
+
/**
* This object performs runtime access control operations on objects that are provisioned RBAC entities
* that reside in LDAP directory. These APIs map directly to similar named APIs specified by ANSI and NIST
@@ -74,7 +76,7 @@ public interface AccessMgr extends Manageable
* @throws SecurityException
* in the event of data validation failure, security policy violation or DAO error.
*/
- public Session authenticate(String userId, char[] password)
+ Session authenticate( String userId, char[] password )
throws SecurityException;
@@ -134,7 +136,7 @@ public interface AccessMgr extends Manageable
* @throws SecurityException
* in the event of data validation failure, security policy violation or DAO error.
*/
- public Session createSession(User user, boolean isTrusted)
+ Session createSession( User user, boolean isTrusted )
throws SecurityException;
@@ -153,7 +155,7 @@ public interface AccessMgr extends Manageable
* @throws SecurityException
* in the event of data validation failure, security policy violation or DAO error.
*/
- public boolean checkAccess(Session session, Permission perm)
+ boolean checkAccess( Session session, Permission perm )
throws SecurityException;
@@ -165,7 +167,7 @@ public interface AccessMgr extends Manageable
* @return List<Permission> containing permissions (op, obj) active for user's session.
* @throws SecurityException is thrown if runtime error occurs with system.
*/
- public List<Permission> sessionPermissions(Session session)
+ List<Permission> sessionPermissions( Session session )
throws SecurityException;
@@ -177,7 +179,7 @@ public interface AccessMgr extends Manageable
* @return List<UserRole> containing all roles active in user's session. This will NOT contain inherited roles.
* @throws SecurityException is thrown if session invalid or system. error.
*/
- public List<UserRole> sessionRoles(Session session)
+ List<UserRole> sessionRoles( Session session )
throws SecurityException;
@@ -189,7 +191,7 @@ public interface AccessMgr extends Manageable
* @return Set<String> containing all roles active in user's session. This will contain inherited roles.
* @throws SecurityException is thrown if session invalid or system. error.
*/
- public Set<String> authorizedRoles(Session session)
+ Set<String> authorizedRoles( Session session )
throws SecurityException;
@@ -211,7 +213,7 @@ public interface AccessMgr extends Manageable
* @param role object contains the role name, {@link UserRole#name}, to be activated into session.
* @throws SecurityException is thrown if user is not allowed to activate or runtime error occurs with system.
*/
- public void addActiveRole(Session session, UserRole role)
+ void addActiveRole( Session session, UserRole role )
throws SecurityException;
@@ -225,7 +227,7 @@ public interface AccessMgr extends Manageable
* @param role object contains the role name, {@link org.apache.directory.fortress.core.rbac.UserRole#name}, to be deactivated.
* @throws SecurityException is thrown if user is not allowed to deactivate or runtime error occurs with system.
*/
- public void dropActiveRole(Session session, UserRole role)
+ void dropActiveRole( Session session, UserRole role )
throws SecurityException;
@@ -237,9 +239,10 @@ public interface AccessMgr extends Manageable
* @return The userId value
* @throws SecurityException is thrown if user session not active or runtime error occurs with system.
*/
- public String getUserId(Session session)
+ String getUserId( Session session )
throws SecurityException;
+
/**
* This function returns the user object that is contained within the session object.
* The function is valid if and only if the session object contains a valid Fortress session.
@@ -288,7 +291,6 @@ public interface AccessMgr extends Manageable
* </ul>
* @throws SecurityException is thrown if user session not active or runtime error occurs with system.
*/
- public User getUser(Session session)
+ User getUser( Session session )
throws SecurityException;
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/AdminMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AdminMgr.java b/src/main/java/org/apache/directory/fortress/core/AdminMgr.java
index 803da25..e7b51ea 100755
--- a/src/main/java/org/apache/directory/fortress/core/AdminMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/AdminMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import org.apache.directory.fortress.core.rbac.PermObj;
import org.apache.directory.fortress.core.rbac.Permission;
import org.apache.directory.fortress.core.rbac.Role;
@@ -26,6 +27,7 @@ import org.apache.directory.fortress.core.rbac.SDSet;
import org.apache.directory.fortress.core.rbac.User;
import org.apache.directory.fortress.core.rbac.UserRole;
+
/**
* This class performs administrative functions to provision Fortress RBAC entities into the LDAP directory. These APIs
* map directly to similar named APIs specified by ANSI and NIST RBAC models.
@@ -102,7 +104,7 @@ public interface AdminMgr extends Manageable
* @return Returns entity containing user data that was added.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public User addUser(User user)
+ User addUser( User user )
throws SecurityException;
@@ -123,7 +125,7 @@ public interface AdminMgr extends Manageable
* @param user Contains the {@link User#userId} of the User targeted for deletion.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public void disableUser(User user)
+ void disableUser( User user )
throws SecurityException;
@@ -141,7 +143,7 @@ public interface AdminMgr extends Manageable
* @param user Contains the {@link User#userId} of the User targeted for deletion.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public void deleteUser(User user)
+ void deleteUser( User user )
throws SecurityException;
@@ -183,7 +185,7 @@ public interface AdminMgr extends Manageable
* @return Updated user entity data.
* @throws SecurityException thrown in the event of validation or system error.
*/
- public User updateUser(User user)
+ User updateUser( User user )
throws SecurityException;
@@ -200,7 +202,7 @@ public interface AdminMgr extends Manageable
* @param newPassword contains new user password.
* @throws SecurityException will be thrown in the event of password policy violation or system error.
*/
- public void changePassword(User user, char[] newPassword)
+ void changePassword( User user, char[] newPassword )
throws SecurityException;
@@ -215,7 +217,7 @@ public interface AdminMgr extends Manageable
* @param user entity contains {@link User#userId} of User to be locked.
* @throws SecurityException will be thrown in the event of pw policy violation or system error.
*/
- public void lockUserAccount(User user)
+ void lockUserAccount( User user )
throws SecurityException;
@@ -230,7 +232,7 @@ public interface AdminMgr extends Manageable
* @param user entity contains {@link User#userId} of User to be unlocked.
* @throws SecurityException will be thrown in the event of pw policy violation or system error.
*/
- public void unlockUserAccount(User user)
+ void unlockUserAccount( User user )
throws SecurityException;
@@ -247,7 +249,7 @@ public interface AdminMgr extends Manageable
* @param user entity contains {@link User#userId} of User to be reset.
* @throws SecurityException will be thrown in the event of pw policy violation or system error.
*/
- public void resetPassword(User user, char[] newPassword)
+ void resetPassword( User user, char[] newPassword )
throws SecurityException;
@@ -262,7 +264,7 @@ public interface AdminMgr extends Manageable
* @param user contains {@link User#userId}.
* @throws SecurityException will be thrown in the event of password policy violation or system error.
*/
- public void deletePasswordPolicy(User user)
+ void deletePasswordPolicy( User user )
throws SecurityException;
@@ -289,7 +291,7 @@ public interface AdminMgr extends Manageable
* @param role must contains {@link Role#name} (required) and optional {@link Role#description}.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public Role addRole(Role role)
+ Role addRole( Role role )
throws SecurityException;
@@ -304,7 +306,7 @@ public interface AdminMgr extends Manageable
* @param role Must contain {@link Role#name} for Role to delete.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public void deleteRole(Role role)
+ void deleteRole( Role role )
throws SecurityException;
@@ -330,7 +332,7 @@ public interface AdminMgr extends Manageable
* @return Role contains reference to entity operated on.
* @throws SecurityException in the event of validation or system error.
*/
- public Role updateRole(Role role)
+ Role updateRole( Role role )
throws SecurityException;
@@ -382,7 +384,7 @@ public interface AdminMgr extends Manageable
* @param uRole must contain {@link UserRole#userId} and {@link UserRole#name} and optional {@code Constraints}.
* @throws SecurityException in the event of validation or system error.
*/
- public void assignUser(UserRole uRole)
+ void assignUser( UserRole uRole )
throws SecurityException;
@@ -403,7 +405,7 @@ public interface AdminMgr extends Manageable
* @param uRole must contain {@link org.apache.directory.fortress.core.rbac.UserRole#userId} and {@link UserRole#name}.
* @throws SecurityException - in the event data error in user or role objects or system error.
*/
- public void deassignUser(UserRole uRole)
+ void deassignUser( UserRole uRole )
throws SecurityException;
@@ -428,7 +430,7 @@ public interface AdminMgr extends Manageable
* @return copy of Permission entity.
* @throws SecurityException - thrown in the event of perm object data or system error.
*/
- public Permission addPermission(Permission perm)
+ Permission addPermission( Permission perm )
throws SecurityException;
@@ -454,7 +456,7 @@ public interface AdminMgr extends Manageable
* @throws SecurityException
* - thrown in the event of perm object data or system error.
*/
- public Permission updatePermission(Permission perm)
+ Permission updatePermission( Permission perm )
throws SecurityException;
@@ -470,7 +472,7 @@ public interface AdminMgr extends Manageable
* @param perm must contain the object, {@link Permission#objName}, and operation, {@link Permission#opName}, that identifies target.
* @throws SecurityException - thrown in the event of perm object data or system error.
*/
- public void deletePermission(Permission perm)
+ void deletePermission( Permission perm )
throws SecurityException;
@@ -493,7 +495,7 @@ public interface AdminMgr extends Manageable
* @return copy of PermObj entity.
* @throws SecurityException - thrown in the event of perm object data or system error.
*/
- public PermObj addPermObj(PermObj pObj)
+ PermObj addPermObj( PermObj pObj )
throws SecurityException;
@@ -517,7 +519,7 @@ public interface AdminMgr extends Manageable
* @throws SecurityException
* - thrown in the event of perm object data or system error.
*/
- public PermObj updatePermObj(PermObj pObj)
+ PermObj updatePermObj( PermObj pObj )
throws SecurityException;
@@ -532,7 +534,7 @@ public interface AdminMgr extends Manageable
* @param pObj must contain the {@link PermObj#objName} of object targeted for removal.
* @throws SecurityException - thrown in the event of perm object data or system error.
*/
- public void deletePermObj(PermObj pObj)
+ void deletePermObj( PermObj pObj )
throws SecurityException;
@@ -553,7 +555,7 @@ public interface AdminMgr extends Manageable
* @param role must contains {@link Role#name}.
* @throws SecurityException Thrown in the event of data validation or system error.
*/
- public void grantPermission(Permission perm, Role role)
+ void grantPermission( Permission perm, Role role )
throws SecurityException;
@@ -574,7 +576,7 @@ public interface AdminMgr extends Manageable
* @param role must contains {@link Role#name}.
* @throws SecurityException Thrown in the event of data validation or system error.
*/
- public void revokePermission(Permission perm, Role role)
+ void revokePermission( Permission perm, Role role )
throws SecurityException;
@@ -595,7 +597,7 @@ public interface AdminMgr extends Manageable
* @param user must contain {@link User#userId} of target User entity.
* @throws SecurityException Thrown in the event of data validation or system error.
*/
- public void grantPermission(Permission perm, User user)
+ void grantPermission( Permission perm, User user )
throws SecurityException;
@@ -616,9 +618,10 @@ public interface AdminMgr extends Manageable
* @param user must contain {@link User#userId} of target User entity.
* @throws SecurityException Thrown in the event of data validation or system error.
*/
- public void revokePermission(Permission perm, User user)
+ void revokePermission( Permission perm, User user )
throws SecurityException;
+
/**
* This command creates a new role childRole, and inserts it in the role hierarchy as an immediate descendant of
* the existing role parentRole.
@@ -656,7 +659,7 @@ public interface AdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void addDescendant(Role parentRole, Role childRole)
+ void addDescendant( Role parentRole, Role childRole )
throws SecurityException;
@@ -696,7 +699,7 @@ public interface AdminMgr extends Manageable
* @param childRole completion of op assigns new parent relationship with parentRole.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public void addAscendant(Role childRole, Role parentRole)
+ void addAscendant( Role childRole, Role parentRole )
throws SecurityException;
@@ -720,7 +723,7 @@ public interface AdminMgr extends Manageable
* @param childRole completion of op deassigns parent relationship with parentRole.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public void addInheritance(Role parentRole, Role childRole)
+ void addInheritance( Role parentRole, Role childRole )
throws SecurityException;
@@ -744,7 +747,7 @@ public interface AdminMgr extends Manageable
* @param childRole completion of op removes parent relationship with parentRole.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public void deleteInheritance(Role parentRole, Role childRole)
+ void deleteInheritance( Role parentRole, Role childRole )
throws SecurityException;
@@ -774,9 +777,10 @@ public interface AdminMgr extends Manageable
* @return reference to newly created SSDSet object.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet createSsdSet(SDSet ssdSet)
+ SDSet createSsdSet( SDSet ssdSet )
throws SecurityException;
+
/**
* This command updates existing SSD set of roles and sets the cardinality n of its subsets
* that cannot have common users.
@@ -803,9 +807,10 @@ public interface AdminMgr extends Manageable
* @return reference to SSDSet object targeted for update.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet updateSsdSet(SDSet ssdSet)
+ SDSet updateSsdSet( SDSet ssdSet )
throws SecurityException;
+
/**
* This command adds a role to a named SSD set of roles. The cardinality associated with the role set remains unchanged.
* <p>
@@ -827,9 +832,10 @@ public interface AdminMgr extends Manageable
* @throws SecurityException
* in the event of data validation or system error.
*/
- public SDSet addSsdRoleMember(SDSet ssdSet, Role role)
+ SDSet addSsdRoleMember( SDSet ssdSet, Role role )
throws SecurityException;
+
/**
* This command removes a role from a named SSD set of roles. The cardinality associated with the role set remains unchanged.
* <p>
@@ -851,9 +857,10 @@ public interface AdminMgr extends Manageable
* @return reference to updated SSDSet object.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet deleteSsdRoleMember(SDSet ssdSet, Role role)
+ SDSet deleteSsdRoleMember( SDSet ssdSet, Role role )
throws SecurityException;
+
/**
* This command deletes a SSD role set completely. The command is valid if and only if the SSD role set exists.
* <h4>required parameters</h4>
@@ -865,9 +872,10 @@ public interface AdminMgr extends Manageable
* @return reference to deleted SSDSet object.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet deleteSsdSet(SDSet ssdSet)
+ SDSet deleteSsdSet( SDSet ssdSet )
throws SecurityException;
+
/**
* This command sets the cardinality associated with a given SSD role set.
* <p>
@@ -889,7 +897,7 @@ public interface AdminMgr extends Manageable
* @throws SecurityException
* in the event of data validation or system error.
*/
- public SDSet setSsdSetCardinality(SDSet ssdSet, int cardinality)
+ SDSet setSsdSetCardinality( SDSet ssdSet, int cardinality )
throws SecurityException;
@@ -920,9 +928,10 @@ public interface AdminMgr extends Manageable
* @return reference to newly created SSDSet object.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet createDsdSet(SDSet dsdSet)
+ SDSet createDsdSet( SDSet dsdSet )
throws SecurityException;
+
/**
* This command updates existing DSD set of roles and sets the cardinality n of its subsets
* that cannot have common users.
@@ -949,9 +958,10 @@ public interface AdminMgr extends Manageable
* @return reference to DSDSet object targeted for update.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet updateDsdSet(SDSet dsdSet)
+ SDSet updateDsdSet( SDSet dsdSet )
throws SecurityException;
+
/**
* This command adds a role to a named DSD set of roles. The cardinality associated with
* the role set remains unchanged.
@@ -973,9 +983,10 @@ public interface AdminMgr extends Manageable
* @return reference to updated DSDSet object.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet addDsdRoleMember(SDSet dsdSet, Role role)
+ SDSet addDsdRoleMember( SDSet dsdSet, Role role )
throws SecurityException;
+
/**
* This command removes a role from a named DSD set of roles. The cardinality associated
* with the role set remains unchanged.
@@ -998,9 +1009,10 @@ public interface AdminMgr extends Manageable
* @return reference to updated DSDSet object.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet deleteDsdRoleMember(SDSet dsdSet, Role role)
+ SDSet deleteDsdRoleMember( SDSet dsdSet, Role role )
throws SecurityException;
+
/**
* This command deletes a DSD role set completely. The command is valid if and only if the DSD role set exists.
* <h4>required parameters</h4>
@@ -1012,9 +1024,10 @@ public interface AdminMgr extends Manageable
* @return reference to deleted DSDSet object.
* @throws SecurityException in the event of data validation or system error.
*/
- public SDSet deleteDsdSet(SDSet dsdSet)
+ SDSet deleteDsdSet( SDSet dsdSet )
throws SecurityException;
+
/**
* This command sets the cardinality associated with a given DSD role set.
* <p>
@@ -1036,6 +1049,6 @@ public interface AdminMgr extends Manageable
* @throws SecurityException
* in the event of data validation or system error.
*/
- public SDSet setDsdSetCardinality(SDSet dsdSet, int cardinality)
+ SDSet setDsdSetCardinality( SDSet dsdSet, int cardinality )
throws SecurityException;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/AuditMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AuditMgr.java b/src/main/java/org/apache/directory/fortress/core/AuditMgr.java
index db808da..9f63315 100755
--- a/src/main/java/org/apache/directory/fortress/core/AuditMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/AuditMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import org.apache.directory.fortress.core.rbac.AuthZ;
import org.apache.directory.fortress.core.rbac.Mod;
import org.apache.directory.fortress.core.rbac.UserAudit;
@@ -26,6 +27,7 @@ import org.apache.directory.fortress.core.rbac.Bind;
import java.util.List;
+
/**
* This interface prescribes methods used to search <a href="http://www.openldap.org/">OpenLDAP</a>'s slapd access log. The access log events are
* persisted in <a href="http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html">BDB</a> and available for inquiry via common LDAP protocols.
@@ -88,9 +90,10 @@ public interface AuditMgr extends Manageable
* @return a List of objects of type AuthZ. Each AuthZ object contains one authorization event.
* @throws SecurityException if a runtime system error occurs.
*/
- public List<AuthZ> getUserAuthZs(UserAudit uAudit)
+ List<AuthZ> getUserAuthZs( UserAudit uAudit )
throws SecurityException;
+
/**
* This method returns a list of authorization events for a particular user {@link org.apache.directory.fortress.core.rbac.UserAudit#userId},
* object {@link org.apache.directory.fortress.core.rbac.UserAudit#objName}, and given timestamp field {@link org.apache.directory.fortress.core.rbac.UserAudit#beginDate}.<BR>
@@ -111,9 +114,10 @@ public interface AuditMgr extends Manageable
* @throws SecurityException
* if a runtime system error occurs.
*/
- public List<AuthZ> searchAuthZs(UserAudit uAudit)
+ List<AuthZ> searchAuthZs( UserAudit uAudit )
throws SecurityException;
+
/**
* This method returns a list of authentication audit events for a particular user {@link org.apache.directory.fortress.core.rbac.UserAudit#userId},
* and given timestamp field {@link org.apache.directory.fortress.core.rbac.UserAudit#beginDate}.<BR>
@@ -129,9 +133,10 @@ public interface AuditMgr extends Manageable
* @throws SecurityException
* if a runtime system error occurs.
*/
- public List<Bind> searchBinds(UserAudit uAudit)
+ List<Bind> searchBinds( UserAudit uAudit )
throws SecurityException;
+
/**
* This method returns a list of sessions created for a given user {@link UserAudit#userId},
* and timestamp {@link org.apache.directory.fortress.core.rbac.UserAudit#beginDate}.<BR>
@@ -148,9 +153,10 @@ public interface AuditMgr extends Manageable
* @return a List of objects of type Mod. Each Mod object in list corresponds to one update or delete event on directory.
* @throws SecurityException if a runtime system error occurs.
*/
- public List<Mod> searchUserSessions(UserAudit uAudit)
+ List<Mod> searchUserSessions( UserAudit uAudit )
throws SecurityException;
+
/**
* This method returns a list of admin operations events for a particular entity {@link org.apache.directory.fortress.core.rbac.UserAudit#dn},
* object {@link UserAudit#objName} and timestamp {@link org.apache.directory.fortress.core.rbac.UserAudit#beginDate}. If the internal
@@ -171,9 +177,10 @@ public interface AuditMgr extends Manageable
* @throws SecurityException
* if a runtime system error occurs.
*/
- public List<Mod> searchAdminMods(UserAudit uAudit)
+ List<Mod> searchAdminMods( UserAudit uAudit )
throws SecurityException;
+
/**
* This method returns a list of failed authentication attempts on behalf of an invalid identity {@link org.apache.directory.fortress.core.rbac.UserAudit#userId},
* and given timestamp {@link UserAudit#beginDate}. If the {@link org.apache.directory.fortress.core.rbac.UserAudit#failedOnly} is true it will
@@ -193,7 +200,7 @@ public interface AuditMgr extends Manageable
* @throws SecurityException
* if a runtime system error occurs.
*/
- public List<AuthZ> searchInvalidUsers(UserAudit uAudit)
+ List<AuthZ> searchInvalidUsers( UserAudit uAudit )
throws SecurityException;
}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/DelAccessMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelAccessMgr.java b/src/main/java/org/apache/directory/fortress/core/DelAccessMgr.java
index 4ff0072..b2003db 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelAccessMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelAccessMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import org.apache.directory.fortress.core.rbac.UserAdminRole;
import org.apache.directory.fortress.core.rbac.Permission;
import org.apache.directory.fortress.core.rbac.Role;
@@ -58,9 +59,10 @@ public interface DelAccessMgr extends Manageable
* @throws SecurityException
* In the event of data validation error (i.e. invalid userId or role name) or system error.
*/
- public boolean canAssign(Session session, User user, Role role)
+ boolean canAssign( Session session, User user, Role role )
throws SecurityException;
+
/**
* This function will determine if the user contains an AdminRole that is authorized revoke control over
* User-Role Assignment (URA). This adheres to the ARBAC02 functional specification for can-revoke URA.
@@ -71,9 +73,10 @@ public interface DelAccessMgr extends Manageable
* @throws SecurityException
* In the event of data validation error (i.e. invalid userId or role name) or system error.
*/
- public boolean canDeassign(Session session, User user, Role role)
+ boolean canDeassign( Session session, User user, Role role )
throws SecurityException;
+
/**
* This function will determine if the user contains an AdminRole that is authorized assignment control over
* Permission-Role Assignment (PRA). This adheres to the ARBAC02 functional specification for can-assign-p PRA.
@@ -84,9 +87,10 @@ public interface DelAccessMgr extends Manageable
* @throws SecurityException
* In the event of data validation error (i.e. invalid perm or role name) or system error.
*/
- public boolean canGrant(Session session, Role role, Permission perm)
+ boolean canGrant( Session session, Role role, Permission perm )
throws SecurityException;
+
/**
* This function will determine if the user contains an AdminRole that is authorized revoke control over
* Permission-Role Assignment (PRA). This adheres to the ARBAC02 functional specification for can-revoke-p PRA.
@@ -96,9 +100,10 @@ public interface DelAccessMgr extends Manageable
* @return boolean value true indicates access allowed.
* @throws SecurityException In the event of data validation error (i.e. invalid perm or role name) or system error.
*/
- public boolean canRevoke(Session session, Role role, Permission perm)
+ boolean canRevoke( Session session, Role role, Permission perm )
throws SecurityException;
+
/**
* This function returns a Boolean value meaning whether the subject of a given session is
* allowed or not to perform a given operation on a given object. The function is valid if and
@@ -115,7 +120,7 @@ public interface DelAccessMgr extends Manageable
* @throws SecurityException
* is thrown if runtime error occurs with system.
*/
- public boolean checkAccess(Session session, Permission perm)
+ boolean checkAccess( Session session, Permission perm )
throws SecurityException;
@@ -137,7 +142,7 @@ public interface DelAccessMgr extends Manageable
* @throws SecurityException
* is thrown if user is not allowed to activate or runtime error occurs with system.
*/
- public void addActiveRole(Session session, UserAdminRole role)
+ void addActiveRole( Session session, UserAdminRole role )
throws SecurityException;
@@ -151,7 +156,7 @@ public interface DelAccessMgr extends Manageable
* @param role object contains the adminRole name to be deactivated.
* @throws SecurityException is thrown if user is not allowed to deactivate or runtime error occurs with system.
*/
- public void dropActiveRole(Session session, UserAdminRole role)
+ void dropActiveRole( Session session, UserAdminRole role )
throws SecurityException;
@@ -164,7 +169,7 @@ public interface DelAccessMgr extends Manageable
* @throws SecurityException
* is thrown if session invalid or system. error.
*/
- public List<UserAdminRole> sessionAdminRoles(Session session)
+ List<UserAdminRole> sessionAdminRoles( Session session )
throws SecurityException;
@@ -176,9 +181,10 @@ public interface DelAccessMgr extends Manageable
* @return Set<String> containing all adminRoles authorized in user's session. This will contain inherited roles.
* @throws SecurityException is thrown if session invalid or system. error.
*/
- public Set<String> authorizedAdminRoles(Session session)
+ Set<String> authorizedAdminRoles( Session session )
throws SecurityException;
+
/**
* This function returns the ARBAC (administrative) permissions of the session, i.e., the permissions assigned
* to its authorized admin roles. The function is valid if and only if the session is a valid Fortress session.
@@ -187,6 +193,6 @@ public interface DelAccessMgr extends Manageable
* @return List<Permission> containing admin permissions (op, obj) active for user's session.
* @throws SecurityException in the event runtime error occurs with system.
*/
- public List<Permission> sessionPermissions(Session session)
+ List<Permission> sessionPermissions( Session session )
throws SecurityException;
}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/DelAdminMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelAdminMgr.java b/src/main/java/org/apache/directory/fortress/core/DelAdminMgr.java
index d693e94..abc08cc 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelAdminMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelAdminMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import org.apache.directory.fortress.core.rbac.AdminRole;
import org.apache.directory.fortress.core.rbac.OrgUnit;
import org.apache.directory.fortress.core.rbac.UserAdminRole;
@@ -26,6 +27,7 @@ import org.apache.directory.fortress.core.rbac.PermObj;
import org.apache.directory.fortress.core.rbac.Permission;
import org.apache.directory.fortress.core.rbac.User;
+
/**
* This class prescribes the ARBAC02 DelAdminMgr interface for performing policy administration of Fortress ARBAC entities
* that reside in LDAP directory.
@@ -77,7 +79,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public AdminRole addRole(AdminRole role)
+ AdminRole addRole( AdminRole role )
throws SecurityException;
@@ -95,7 +97,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* Thrown in the event of data validation or system error.
*/
- public void deleteRole(AdminRole role)
+ void deleteRole( AdminRole role )
throws SecurityException;
@@ -129,7 +131,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* Thrown in the event of data validation or system error.
*/
- public AdminRole updateRole(AdminRole role)
+ AdminRole updateRole( AdminRole role )
throws SecurityException;
@@ -172,7 +174,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* in the event data error in user or role objects or system error.
*/
- public void assignUser(UserAdminRole uAdminRole)
+ void assignUser( UserAdminRole uAdminRole )
throws SecurityException;
@@ -192,9 +194,10 @@ public interface DelAdminMgr extends Manageable
* @param uAdminRole entity contains {@link org.apache.directory.fortress.core.rbac.User#userId} and {@link org.apache.directory.fortress.core.rbac.AdminRole#name}.
* @throws SecurityException - in the event data error in user or role objects or system error.
*/
- public void deassignUser(UserAdminRole uAdminRole)
+ void deassignUser( UserAdminRole uAdminRole )
throws SecurityException;
+
/**
* Commands adds a new OrgUnit entity to OrgUnit dataset. The OrgUnit can be either User or Perm and is
* set by setting type attribute.
@@ -213,9 +216,10 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* in the event of data validation or system error.
*/
- public OrgUnit add(OrgUnit entity)
+ OrgUnit add( OrgUnit entity )
throws SecurityException;
+
/**
* Commands updates existing OrgUnit entity to OrgUnit dataset. The OrgUnit can be either User or Perm and is
* set by setting type attribute.
@@ -234,9 +238,10 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* in the event of data validation or system error.
*/
- public OrgUnit update(OrgUnit entity)
+ OrgUnit update( OrgUnit entity )
throws SecurityException;
+
/**
* Commands deletes existing OrgUnit entity to OrgUnit dataset. The OrgUnit can be either User or Perm and is
* set by setting type attribute.
@@ -251,7 +256,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* in the event of data validation or system error.
*/
- public OrgUnit delete(OrgUnit entity)
+ OrgUnit delete( OrgUnit entity )
throws SecurityException;
@@ -286,7 +291,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void addDescendant(OrgUnit parent, OrgUnit child)
+ void addDescendant( OrgUnit parent, OrgUnit child )
throws SecurityException;
@@ -321,7 +326,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void addAscendant(OrgUnit child, OrgUnit parent)
+ void addAscendant( OrgUnit child, OrgUnit parent )
throws SecurityException;
@@ -346,7 +351,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void addInheritance(OrgUnit parent, OrgUnit child)
+ void addInheritance( OrgUnit parent, OrgUnit child )
throws SecurityException;
@@ -372,7 +377,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void deleteInheritance(OrgUnit parent, OrgUnit child)
+ void deleteInheritance( OrgUnit parent, OrgUnit child )
throws SecurityException;
@@ -406,9 +411,10 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void addDescendant(AdminRole parentRole, AdminRole childRole)
+ void addDescendant( AdminRole parentRole, AdminRole childRole )
throws SecurityException;
+
/**
* This command creates a new role parentRole, and inserts it in the role hierarchy as an immediate ascendant of
* the existing role childRole. The command is valid if and only if parentRole is not a member of the ADMINROLES data set,
@@ -437,9 +443,10 @@ public interface DelAdminMgr extends Manageable
* @param childRole completion of op assigns new parent relationship with parentRole.
* @throws SecurityException thrown in the event of data validation or system error.
*/
- public void addAscendant(AdminRole childRole, AdminRole parentRole)
+ void addAscendant( AdminRole childRole, AdminRole parentRole )
throws SecurityException;
+
/**
* This command establishes a new immediate inheritance relationship parentRole <<-- childRole between existing
* roles parentRole, childRole. The command is valid if and only if parentRole and childRole are members of the ADMINROLES data
@@ -456,9 +463,10 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void addInheritance(AdminRole parentRole, AdminRole childRole)
+ void addInheritance( AdminRole parentRole, AdminRole childRole )
throws SecurityException;
+
/**
* This command deletes an existing immediate inheritance relationship parentRole <<-- childRole. The command is
* valid if and only if the roles parentRole and childRole are members of the ADMINROLES data set, and parentRole is an
@@ -475,7 +483,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* thrown in the event of data validation or system error.
*/
- public void deleteInheritance(AdminRole parentRole, AdminRole childRole)
+ void deleteInheritance( AdminRole parentRole, AdminRole childRole )
throws SecurityException;
@@ -500,7 +508,7 @@ public interface DelAdminMgr extends Manageable
* @return copy of Permission entity.
* @throws SecurityException - thrown in the event of perm object data or system error.
*/
- public Permission addPermission(Permission perm)
+ Permission addPermission( Permission perm )
throws SecurityException;
@@ -526,7 +534,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* - thrown in the event of perm object data or system error.
*/
- public Permission updatePermission(Permission perm)
+ Permission updatePermission( Permission perm )
throws SecurityException;
@@ -543,7 +551,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* - thrown in the event of perm object data or system error.
*/
- public void deletePermission(Permission perm)
+ void deletePermission( Permission perm )
throws SecurityException;
@@ -566,7 +574,7 @@ public interface DelAdminMgr extends Manageable
* @return copy of PermObj entity.
* @throws SecurityException - thrown in the event of perm object data or system error.
*/
- public PermObj addPermObj(PermObj pObj)
+ PermObj addPermObj( PermObj pObj )
throws SecurityException;
@@ -590,7 +598,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* - thrown in the event of perm object data or system error.
*/
- public PermObj updatePermObj(PermObj pObj)
+ PermObj updatePermObj( PermObj pObj )
throws SecurityException;
@@ -605,7 +613,7 @@ public interface DelAdminMgr extends Manageable
* @param pObj must contain the {@link org.apache.directory.fortress.core.rbac.PermObj#objName} of object targeted for removal.
* @throws SecurityException - thrown in the event of perm object data or system error.
*/
- public void deletePermObj(PermObj pObj)
+ void deletePermObj( PermObj pObj )
throws SecurityException;
@@ -627,7 +635,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* Thrown in the event of data validation or system error.
*/
- public void grantPermission(Permission perm, AdminRole role)
+ void grantPermission( Permission perm, AdminRole role )
throws SecurityException;
@@ -648,7 +656,7 @@ public interface DelAdminMgr extends Manageable
* @param role must contains {@link org.apache.directory.fortress.core.rbac.AdminRole#name}.
* @throws SecurityException Thrown in the event of data validation or system error.
*/
- public void revokePermission(Permission perm, AdminRole role)
+ void revokePermission( Permission perm, AdminRole role )
throws SecurityException;
@@ -670,7 +678,7 @@ public interface DelAdminMgr extends Manageable
* @throws SecurityException
* Thrown in the event of data validation or system error.
*/
- public void grantPermission(Permission perm, User user)
+ void grantPermission( Permission perm, User user )
throws SecurityException;
@@ -691,7 +699,7 @@ public interface DelAdminMgr extends Manageable
* @param user must contain {@link org.apache.directory.fortress.core.rbac.User#userId} of target User entity.
* @throws SecurityException Thrown in the event of data validation or system error.
*/
- public void revokePermission(Permission perm, User user)
+ void revokePermission( Permission perm, User user )
throws SecurityException;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/DelReviewMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelReviewMgr.java b/src/main/java/org/apache/directory/fortress/core/DelReviewMgr.java
index 1f3c369..bc5f126 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelReviewMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelReviewMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import org.apache.directory.fortress.core.rbac.AdminRole;
import org.apache.directory.fortress.core.rbac.OrgUnit;
import org.apache.directory.fortress.core.rbac.UserAdminRole;
@@ -26,6 +27,7 @@ import org.apache.directory.fortress.core.rbac.User;
import java.util.List;
+
/**
* This class prescribes the ARBAC02 DelReviewMgr interface for performing policy interrogation of provisioned Fortress ARBAC entities
* that reside in LDAP directory.
@@ -56,7 +58,7 @@ public interface DelReviewMgr extends Manageable
* @throws SecurityException
* will be thrown if role not found or system error occurs.
*/
- public AdminRole readRole(AdminRole role)
+ AdminRole readRole( AdminRole role )
throws SecurityException;
@@ -72,7 +74,7 @@ public interface DelReviewMgr extends Manageable
* @throws SecurityException
* in the event of system error.
*/
- public List<AdminRole> findRoles(String searchVal)
+ List<AdminRole> findRoles( String searchVal )
throws SecurityException;
@@ -89,9 +91,10 @@ public interface DelReviewMgr extends Manageable
* @throws SecurityException
* If user not found or system error occurs.
*/
- public List<UserAdminRole> assignedRoles(User user)
+ List<UserAdminRole> assignedRoles( User user )
throws SecurityException;
+
/**
* This method returns the data set of all users who are assigned the given admin role. This searches the User data set for
* AdminRole relationship. This method does NOT search for hierarchical Admin Roles relationships.
@@ -105,7 +108,7 @@ public interface DelReviewMgr extends Manageable
* @throws SecurityException
* If system error occurs.
*/
- public List<User> assignedUsers(AdminRole role)
+ List<User> assignedUsers( AdminRole role )
throws SecurityException;
@@ -122,9 +125,10 @@ public interface DelReviewMgr extends Manageable
* @return OrgUnit entity that corresponds with ou name and type.
* @throws SecurityException in the event of data validation or system error.
*/
- public OrgUnit read(OrgUnit entity)
+ OrgUnit read( OrgUnit entity )
throws SecurityException;
+
/**
* Commands searches existing OrgUnit entities from OrgUnit dataset. The OrgUnit can be either User or Perm and is
* set by setting type parameter on API.
@@ -140,7 +144,6 @@ public interface DelReviewMgr extends Manageable
* @throws SecurityException
*
*/
- public List<OrgUnit> search(OrgUnit.Type type, String searchVal)
+ List<OrgUnit> search( OrgUnit.Type type, String searchVal )
throws SecurityException;
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/Manageable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/Manageable.java b/src/main/java/org/apache/directory/fortress/core/Manageable.java
index 825d1b6..b6cd7e7 100644
--- a/src/main/java/org/apache/directory/fortress/core/Manageable.java
+++ b/src/main/java/org/apache/directory/fortress/core/Manageable.java
@@ -22,6 +22,7 @@ package org.apache.directory.fortress.core;
import org.apache.directory.fortress.core.rbac.Session;
+
/**
* Interface allows outside clients to manage security and multi-tenant concerns within the Fortress runtime.
* The {@link #setAdmin(org.apache.directory.fortress.core.rbac.Session)} method allows A/RBAC sessions to be loaded and allows authorization
@@ -41,7 +42,8 @@ public interface Manageable
*
* @param session contains a valid Fortress ARBAC Session object.
*/
- public void setAdmin(Session session);
+ void setAdmin( Session session );
+
/**
* Use this method to set the tenant id onto function call into Fortress which allows segregation of data by customer.
@@ -50,5 +52,5 @@ public interface Manageable
*
* @param contextId maps to sub-tree in DIT, for example ou=contextId, dc=jts, dc = com.
*/
- public void setContextId(String contextId);
+ void setContextId( String contextId );
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/PwPolicyMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/PwPolicyMgr.java b/src/main/java/org/apache/directory/fortress/core/PwPolicyMgr.java
index 69b5b7c..1b9407d 100755
--- a/src/main/java/org/apache/directory/fortress/core/PwPolicyMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/PwPolicyMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import org.apache.directory.fortress.core.rbac.PwPolicy;
import java.util.List;
@@ -140,7 +141,7 @@ public interface PwPolicyMgr extends Manageable
* @param policy Object must contain {@link org.apache.directory.fortress.core.rbac.PwPolicy#name} and optionally other attributes.
* @throws SecurityException In the event of data validation or system error.
*/
- public void add(PwPolicy policy)
+ void add( PwPolicy policy )
throws SecurityException;
@@ -229,7 +230,7 @@ public interface PwPolicyMgr extends Manageable
* @param policy Object must contain {@link org.apache.directory.fortress.core.rbac.PwPolicy#name} and optionally all non-null attributes will be updated. null attributes will be ignored.
* @throws SecurityException In the event policy not found , data validation or system error.
*/
- public void update(PwPolicy policy)
+ void update( PwPolicy policy )
throws SecurityException;
@@ -245,7 +246,7 @@ public interface PwPolicyMgr extends Manageable
* @param policy Object must contain {@link org.apache.directory.fortress.core.rbac.PwPolicy#name} of the policy entity to remove.
* @throws SecurityException In the event policy entity not found or system error.
*/
- public void delete(PwPolicy policy)
+ void delete( PwPolicy policy )
throws SecurityException;
@@ -261,7 +262,7 @@ public interface PwPolicyMgr extends Manageable
* @return PswdPolicy entity returns fully populated with attributes.
* @throws SecurityException In the event policy entry not found, data validation or system error.
*/
- public PwPolicy read(String name)
+ PwPolicy read( String name )
throws SecurityException;
@@ -273,7 +274,7 @@ public interface PwPolicyMgr extends Manageable
* @return List<PswdPolicy> contains all matching password policy entities. If no records found this will be empty.
* @throws SecurityException In the event of data validation or system error.
*/
- public List<PwPolicy> search(String searchVal)
+ List<PwPolicy> search( String searchVal )
throws SecurityException;
@@ -286,7 +287,7 @@ public interface PwPolicyMgr extends Manageable
* @param policyName String contains the {@link org.apache.directory.fortress.core.rbac.PwPolicy#name} of a pw policy entity contained within the PWPOLICIES data set.
* @throws SecurityException thrown in the event either user or policy not valid or system error.
*/
- public void updateUserPolicy(String userId, String policyName)
+ void updateUserPolicy( String userId, String policyName )
throws SecurityException;
@@ -299,7 +300,6 @@ public interface PwPolicyMgr extends Manageable
* @param userId Contains {@link org.apache.directory.fortress.core.rbac.User#userId} of a User entity in USERS data set.
* @throws SecurityException Thrown in the event either user not valid or system error.
*/
- public void deletePasswordPolicy(String userId)
+ void deletePasswordPolicy( String userId )
throws SecurityException;
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/ReviewMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ReviewMgr.java b/src/main/java/org/apache/directory/fortress/core/ReviewMgr.java
index 61073c8..b81f30f 100755
--- a/src/main/java/org/apache/directory/fortress/core/ReviewMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/ReviewMgr.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
import org.apache.directory.fortress.core.rbac.OrgUnit;
import org.apache.directory.fortress.core.rbac.Permission;
import org.apache.directory.fortress.core.rbac.PermObj;
@@ -30,6 +31,7 @@ import org.apache.directory.fortress.core.rbac.UserRole;
import java.util.List;
import java.util.Set;
+
/**
* This interface prescribes the administrative review functions on already provisioned Fortress RBAC entities
* that reside in LDAP directory. These APIs map directly to similar named APIs specified by ANSI and NIST RBAC models.
@@ -81,9 +83,10 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* if permission not found or system error occurs.
*/
- public Permission readPermission(Permission permission)
+ Permission readPermission( Permission permission )
throws SecurityException;
+
/**
* Method reads permission object from perm container in directory.
* <h4>required parameters</h4>
@@ -95,9 +98,10 @@ public interface ReviewMgr extends Manageable
* @return PermObj loaded with perm object data.
* @throws SecurityException is thrown if object not found or system error.
*/
- public PermObj readPermObj(PermObj permObj)
+ PermObj readPermObj( PermObj permObj )
throws SecurityException;
+
/**
* Method returns a list of type Permission that match the perm object search string.
* <h4>optional parameters</h4>
@@ -112,7 +116,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* thrown in the event of system error.
*/
- public List<Permission> findPermissions(Permission permission)
+ List<Permission> findPermissions( Permission permission )
throws SecurityException;
@@ -127,7 +131,7 @@ public interface ReviewMgr extends Manageable
* @return List of type PermObj. Fortress permissions are object->operation mappings.
* @throws SecurityException thrown in the event of system error.
*/
- public List<PermObj> findPermObjs(PermObj permObj)
+ List<PermObj> findPermObjs( PermObj permObj )
throws SecurityException;
@@ -143,7 +147,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* thrown in the event of system error.
*/
- public List<PermObj> findPermObjs(OrgUnit ou)
+ List<PermObj> findPermObjs( OrgUnit ou )
throws SecurityException;
@@ -159,7 +163,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* will be thrown if role not found or system error occurs.
*/
- public Role readRole(Role role)
+ Role readRole( Role role )
throws SecurityException;
@@ -170,7 +174,7 @@ public interface ReviewMgr extends Manageable
* @return List of type Role containing role entities that match the search criteria.
* @throws SecurityException in the event of system error.
*/
- public List<Role> findRoles(String searchVal)
+ List<Role> findRoles( String searchVal )
throws SecurityException;
@@ -185,7 +189,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of system error.
*/
- public List<String> findRoles(String searchVal, int limit)
+ List<String> findRoles( String searchVal, int limit )
throws SecurityException;
@@ -201,7 +205,7 @@ public interface ReviewMgr extends Manageable
* @return entity containing matching user data.
* @throws SecurityException if record not found or system error occurs.
*/
- public User readUser(User user)
+ User readUser( User user )
throws SecurityException;
@@ -216,7 +220,7 @@ public interface ReviewMgr extends Manageable
* @return List of type User.
* @throws SecurityException In the event of system error.
*/
- public List<User> findUsers(User user)
+ List<User> findUsers( User user )
throws SecurityException;
@@ -232,7 +236,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* In the event of system error.
*/
- public List<User> findUsers(OrgUnit ou)
+ List<User> findUsers( OrgUnit ou )
throws SecurityException;
@@ -250,7 +254,7 @@ public interface ReviewMgr extends Manageable
* @return List of type String containing matching userIds.
* @throws SecurityException in the event of system error.
*/
- public List<String> findUsers(User user, int limit)
+ List<String> findUsers( User user, int limit )
throws SecurityException;
@@ -271,7 +275,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of data validation or system error.
*/
- public List<String> assignedUsers(Role role, int limit)
+ List<String> assignedUsers( Role role, int limit )
throws SecurityException;
@@ -288,9 +292,10 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* If user not found or system error occurs.
*/
- public List<UserRole> assignedRoles(User user)
+ List<UserRole> assignedRoles( User user )
throws SecurityException;
+
/**
* This method returns the data set of all users who are assigned the given role. This searches the User data set for
* Role relationship. This method does NOT search for hierarchical RBAC Roles relationships.
@@ -304,7 +309,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* If system error occurs.
*/
- public List<User> assignedUsers(Role role)
+ List<User> assignedUsers( Role role )
throws SecurityException;
@@ -317,7 +322,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* If user not found or system error occurs.
*/
- public List<String> assignedRoles(String userId)
+ List<String> assignedRoles( String userId )
throws SecurityException;
@@ -334,7 +339,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* In the event the role is not present in directory or system error occurs.
*/
- public List<User> authorizedUsers(Role role)
+ List<User> authorizedUsers( Role role )
throws SecurityException;
@@ -350,7 +355,7 @@ public interface ReviewMgr extends Manageable
* @return Set of type String containing the roles assigned and roles inherited.
* @throws SecurityException If user not found or system error occurs.
*/
- public Set<String> authorizedRoles(User user)
+ Set<String> authorizedRoles( User user )
throws SecurityException;
@@ -368,7 +373,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* In the event system error occurs.
*/
- public List<Permission> rolePermissions(Role role)
+ List<Permission> rolePermissions( Role role )
throws SecurityException;
@@ -385,7 +390,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of validation or system error.
*/
- public List<Permission> userPermissions(User user)
+ List<Permission> userPermissions( User user )
throws SecurityException;
@@ -401,7 +406,7 @@ public interface ReviewMgr extends Manageable
* @return List of type string containing the Role names that have the matching perm granted.
* @throws SecurityException in the event permission not found or system error occurs.
*/
- public List<String> permissionRoles(Permission perm)
+ List<String> permissionRoles( Permission perm )
throws SecurityException;
@@ -418,7 +423,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of validation or system error.
*/
- public Set<String> authorizedPermissionRoles(Permission perm)
+ Set<String> authorizedPermissionRoles( Permission perm )
throws SecurityException;
@@ -435,7 +440,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of validation or system error.
*/
- public List<String> permissionUsers(Permission perm)
+ List<String> permissionUsers( Permission perm )
throws SecurityException;
@@ -452,7 +457,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of validation or system error.
*/
- public Set<String> authorizedPermissionUsers(Permission perm)
+ Set<String> authorizedPermissionUsers( Permission perm )
throws SecurityException;
@@ -469,9 +474,10 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of data or system error.
*/
- public List<SDSet> ssdRoleSets(Role role)
+ List<SDSet> ssdRoleSets( Role role )
throws SecurityException;
+
/**
* This function returns the SSD data set that matches a particular set name.
* <h4>required parameters</h4>
@@ -484,9 +490,10 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of data or system error.
*/
- public SDSet ssdRoleSet(SDSet set)
+ SDSet ssdRoleSet( SDSet set )
throws SecurityException;
+
/**
* This function returns the list of SSDs that match a given ssd name value.
* <h4>required parameters</h4>
@@ -498,9 +505,10 @@ public interface ReviewMgr extends Manageable
* @return List containing all SSDSets that match a given SSDSet name.
* @throws SecurityException in the event of data or system error.
*/
- public List<SDSet> ssdSets(SDSet ssd)
+ List<SDSet> ssdSets( SDSet ssd )
throws SecurityException;
+
/**
* This function returns the set of roles of a SSD role set. The function is valid if and only if the
* role set exists.
@@ -513,9 +521,10 @@ public interface ReviewMgr extends Manageable
* @return Set containing all Roles that are members of SSD data set.
* @throws SecurityException in the event of data or system error.
*/
- public Set<String> ssdRoleSetRoles(SDSet ssd)
+ Set<String> ssdRoleSetRoles( SDSet ssd )
throws SecurityException;
+
/**
* This function returns the cardinality associated with a SSD role set. The function is valid if and only if the
* role set exists.
@@ -528,7 +537,7 @@ public interface ReviewMgr extends Manageable
* @return int value containing cardinality of SSD set.
* @throws SecurityException in the event of data or system error.
*/
- public int ssdRoleSetCardinality(SDSet ssd)
+ int ssdRoleSetCardinality( SDSet ssd )
throws SecurityException;
@@ -545,9 +554,10 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of data or system error.
*/
- public List<SDSet> dsdRoleSets(Role role)
+ List<SDSet> dsdRoleSets( Role role )
throws SecurityException;
+
/**
* This function returns the DSD data set that matches a particular set name.
* <h4>required parameters</h4>
@@ -560,7 +570,7 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of data or system error.
*/
- public SDSet dsdRoleSet(SDSet set)
+ SDSet dsdRoleSet( SDSet set )
throws SecurityException;
@@ -575,9 +585,10 @@ public interface ReviewMgr extends Manageable
* @return List containing all DSDSets that match a given DSDSet name.
* @throws SecurityException in the event of data or system error.
*/
- public List<SDSet> dsdSets(SDSet dsd)
+ List<SDSet> dsdSets( SDSet dsd )
throws SecurityException;
+
/**
* This function returns the set of roles of a DSD role set. The function is valid if and only if the
* role set exists.
@@ -591,9 +602,10 @@ public interface ReviewMgr extends Manageable
* @throws SecurityException
* in the event of data or system error.
*/
- public Set<String> dsdRoleSetRoles(SDSet dsd)
+ Set<String> dsdRoleSetRoles( SDSet dsd )
throws SecurityException;
+
/**
* This function returns the cardinality associated with a DSD role set. The function is valid if and only if the
* role set exists.
@@ -606,7 +618,6 @@ public interface ReviewMgr extends Manageable
* @return int value containing cardinality of DSD set.
* @throws SecurityException in the event of data or system error.
*/
- public int dsdRoleSetCardinality(SDSet dsd)
+ int dsdRoleSetCardinality( SDSet dsd )
throws SecurityException;
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/StandardException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/StandardException.java b/src/main/java/org/apache/directory/fortress/core/StandardException.java
index 462fd42..4d2928a 100755
--- a/src/main/java/org/apache/directory/fortress/core/StandardException.java
+++ b/src/main/java/org/apache/directory/fortress/core/StandardException.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.fortress.core;
+
/**
* Interface that is implemented by exception base class {@link StandardException} used to associate a Fortress error code to the exception instance.
* See the {@link GlobalErrIds} javadoc for list of error ids used by Fortress.
@@ -32,6 +33,5 @@ public interface StandardException
*
* @return integer containing the source error code. Valid values for Fortress error codes fall between 0 and 100_000.
*/
- public int getErrorId();
+ int getErrorId();
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgr.java b/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgr.java
index 47bde44..5cfca79 100755
--- a/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgr.java
@@ -19,10 +19,12 @@
*/
package org.apache.directory.fortress.core.cfg;
+
import org.apache.directory.fortress.core.SecurityException;
import java.util.Properties;
+
/**
* This interface prescribes CRUD methods used to manage properties stored within the ldap directory.
* The Fortress config nodes are used to remotely share Fortress client specific properties between processes.
@@ -48,7 +50,8 @@ public interface ConfigMgr
* @return {@link Properties} containing the collection of name/value pairs just added.
* @throws org.apache.directory.fortress.core.SecurityException in the event entry already present or other system error.
*/
- public Properties add(String name, Properties inProps) throws SecurityException;
+ Properties add( String name, Properties inProps ) throws SecurityException;
+
/**
* Update existing cfg node with additional properties, or, replace existing properties. The name is required. If node does not exist,
@@ -59,7 +62,8 @@ public interface ConfigMgr
* @return {@link Properties} containing the collection of name/value pairs to be added to existing node.
* @throws org.apache.directory.fortress.core.SecurityException in the event entry not present or other system error.
*/
- public Properties update(String name, Properties inProps) throws SecurityException;
+ Properties update( String name, Properties inProps ) throws SecurityException;
+
/**
* Completely removes named cfg node from the directory. The name is required. If node does not exist,
@@ -68,7 +72,8 @@ public interface ConfigMgr
* @param name is required and maps to 'cn' attribute on 'device' object class of node targeted for operation.
* @throws org.apache.directory.fortress.core.SecurityException in the event of system error.
*/
- public void delete(String name) throws SecurityException;
+ void delete( String name ) throws SecurityException;
+
/**
* Delete properties from existing cfg node. The name is required. If node does not exist,
@@ -77,7 +82,8 @@ public interface ConfigMgr
* @param name attribute is required and maps to 'cn' attribute in 'device' object class.
* @throws org.apache.directory.fortress.core.SecurityException in the event entry not present or other system error.
*/
- public void delete(String name, Properties inProps) throws SecurityException;
+ void delete( String name, Properties inProps ) throws SecurityException;
+
/**
* Read an existing cfg node with given name and return to caller. The name is required. If node doesn't exist,
@@ -87,6 +93,5 @@ public interface ConfigMgr
* @return {@link Properties} containing the collection of name/value pairs just added. Maps to 'ftProps' attribute in 'ftProperties' object class.
* @throws org.apache.directory.fortress.core.SecurityException in the event entry doesn't exist or other system error.
*/
- public Properties read(String name) throws SecurityException;
+ Properties read( String name ) throws SecurityException;
}
-
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java b/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
index ae6ecaf..af7e97d 100644
--- a/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
@@ -86,8 +86,6 @@ import org.apache.directory.fortress.core.util.time.Constraint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.naming.ldap.ExtendedResponse;
-
/**
* Abstract class contains methods to perform low-level entity to ldap persistence. These methods are called by the
@@ -158,7 +156,6 @@ public abstract class ApacheDsDataProvider
private static final PasswordPolicy PP_REQ_CTRL = new PasswordPolicyImpl();
-
static
{
String host = Config.getProperty( LDAP_HOST, "localhost" );
@@ -167,7 +164,7 @@ public abstract class ApacheDsDataProvider
int max = Config.getInt( LDAP_ADMIN_POOL_MAX, 10 );
int logmin = Config.getInt( LDAP_LOG_POOL_MIN, 1 );
int logmax = Config.getInt( LDAP_LOG_POOL_MAX, 10 );
- LOG.info( "LDAP POOL: host=[{}], port=[{}], min=[{}], max=[{}]", host, port, min, max);
+ LOG.info( "LDAP POOL: host=[{}], port=[{}], min=[{}], max=[{}]", host, port, min, max );
if ( IS_SET_TRUST_STORE_PROP )
{
@@ -466,7 +463,8 @@ public abstract class ApacheDsDataProvider
protected void modify( LdapConnection connection, String dn, List<Modification> mods ) throws LdapException
{
counters.incrementMod();
- connection.modify( dn, mods.toArray( new Modification[]{} ) );
+ connection.modify( dn, mods.toArray( new Modification[]
+ {} ) );
}
@@ -1121,7 +1119,8 @@ public abstract class ApacheDsDataProvider
{
if ( list != null && list.size() > 0 )
{
- entry.add( attrName, list.toArray( new String[]{} ) );
+ entry.add( attrName, list.toArray( new String[]
+ {} ) );
}
}
@@ -1416,6 +1415,7 @@ public abstract class ApacheDsDataProvider
return ( ( PasswordPolicyDecorator ) control ).getDecorated();
}
+
/**
* Calls the PoolMgr to perform an LDAP bind for a user/password combination. This function is valid
* if and only if the user entity is a member of the USERS data set.
@@ -1432,7 +1432,7 @@ public abstract class ApacheDsDataProvider
Dn userDn = new Dn( szUserDn );
BindRequest bindReq = new BindRequestImpl();
bindReq.setDn( new Dn( szUserDn ) );
- bindReq.setCredentials( new String ( password ) );
+ bindReq.setCredentials( new String( password ) );
bindReq.addControl( PP_REQ_CTRL );
return connection.bind( bindReq );
}
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgr.java b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgr.java
index c03a3c8..2f78f21 100755
--- a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgr.java
@@ -19,12 +19,14 @@
*/
package org.apache.directory.fortress.core.ldap.group;
+
import org.apache.directory.fortress.core.*;
import org.apache.directory.fortress.core.SecurityException;
import org.apache.directory.fortress.core.rbac.User;
import java.util.List;
+
/**
* This interface prescribes CRUD methods used to manage groups stored within the ldap directory.
* <p/>
@@ -42,7 +44,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity just added.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public Group add( Group group ) throws org.apache.directory.fortress.core.SecurityException;
+ Group add( Group group ) throws org.apache.directory.fortress.core.SecurityException;
+
/**
* Modify existing group node. The name is required. Does not update members or properties.
@@ -53,7 +56,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity just modified.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public Group update( Group group ) throws SecurityException;
+ Group update( Group group ) throws SecurityException;
+
/**
* Delete existing group node. The name is required.
@@ -62,7 +66,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity just removed.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public Group delete( Group group ) throws SecurityException;
+ Group delete( Group group ) throws SecurityException;
+
/**
* Add a property to an existing group node. Must have a name and at least one member.
@@ -73,7 +78,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity just modified.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public Group add( Group group, String key, String value ) throws SecurityException;
+ Group add( Group group, String key, String value ) throws SecurityException;
+
/**
* Delete existing group node. The name is required.
@@ -84,7 +90,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity just modified.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public Group delete( Group group, String key, String value ) throws SecurityException;
+ Group delete( Group group, String key, String value ) throws SecurityException;
+
/**
* Read an existing group node. The name is required.
@@ -93,7 +100,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity found.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public Group read( Group group ) throws SecurityException;
+ Group read( Group group ) throws SecurityException;
+
/**
* Search using a full or partial group node. The name is required.
@@ -102,7 +110,8 @@ public interface GroupMgr extends Manageable
* @return List of type {@link Group} containing entities found.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public List<Group> find( Group group ) throws SecurityException;
+ List<Group> find( Group group ) throws SecurityException;
+
/**
* Search for groups by userId. Member (maps to userId) and is required.
@@ -111,7 +120,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity just added.
* @throws org.apache.directory.fortress.core.SecurityException in the event system error.
*/
- public List<Group> find( User user ) throws SecurityException;
+ List<Group> find( User user ) throws SecurityException;
+
/**
* Assign a user to an existing group node. The group name and member are required.
@@ -121,7 +131,8 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity to assign.
* @throws org.apache.directory.fortress.core.SecurityException in the event entry already present or other system error.
*/
- public Group assign( Group group, String member ) throws SecurityException;
+ Group assign( Group group, String member ) throws SecurityException;
+
/**
* Deassign a member from an existing group node. The group name and member are required.
@@ -131,5 +142,5 @@ public interface GroupMgr extends Manageable
* @return {@link Group} containing entity to deassign
* @throws org.apache.directory.fortress.core.SecurityException in the event entry already present or other system error.
*/
- public Group deassign( Group group, String member ) throws SecurityException;
+ Group deassign( Group group, String member ) throws SecurityException;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d0922cd9/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixDAO.java b/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixDAO.java
index 27477e8..7afc01e 100644
--- a/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixDAO.java
@@ -31,7 +31,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.directory.fortress.core.CreateException;
import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.GlobalIds;
import org.apache.directory.fortress.core.RemoveException;
import org.apache.directory.fortress.core.util.attr.VUtil;
@@ -72,7 +71,7 @@ final class SuffixDAO extends ApacheDsDataProvider
private static final String[] SUFFIX_OBJ_CLASS =
{
SchemaConstants.DC_OBJECT_OC, SchemaConstants.ORGANIZATION_OC
- };
+ };
/**
@@ -168,7 +167,7 @@ final class SuffixDAO extends ApacheDsDataProvider
String dn = SchemaConstants.DC_AT + "=" + se.getName() + "," + SchemaConstants.DC_AT + "=" + se.getDc();
// only use this domain component variable if it has been set in the build.properties file:
- if( VUtil.isNotNullOrEmpty( se.getDc2() ) && !se.getDc2().equals( "${suffix.dc2}" ))
+ if ( VUtil.isNotNullOrEmpty( se.getDc2() ) && !se.getDc2().equals( "${suffix.dc2}" ) )
{
dn += "," + SchemaConstants.DC_AT + "=" + se.getDc2();
}