directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-109 - move cfgmgr to base package. Move cutils to util folder.
Date Tue, 02 Jun 2015 13:52:03 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/1.0-RC41 c0551de98 -> 55a182d06


FC-109 - move cfgmgr to base package.  Move cutils to util folder.


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

Branch: refs/heads/1.0-RC41
Commit: 55a182d064c57e6306c3924aba01379cfe2fd882
Parents: c0551de
Author: Shawn McKinney <smckinney@apache.org>
Authored: Tue Jun 2 08:52:11 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Tue Jun 2 08:52:11 2015 -0500

----------------------------------------------------------------------
 .../fortress/core/AccelMgrFactory.java          |   2 +-
 .../fortress/core/AccessMgrFactory.java         |   2 +-
 .../fortress/core/AdminMgrFactory.java          |   2 +-
 .../directory/fortress/core/AuditMgr.java       |   2 +-
 .../fortress/core/AuditMgrFactory.java          |   2 +-
 .../directory/fortress/core/ConfigMgr.java      |  97 ++++++++++
 .../fortress/core/ConfigMgrFactory.java         |  76 ++++++++
 .../fortress/core/DelAccessMgrFactory.java      |   2 +-
 .../fortress/core/DelAdminMgrFactory.java       |   2 +-
 .../fortress/core/DelReviewMgrFactory.java      |   2 +-
 .../directory/fortress/core/ObjectFactory.java  |   3 +-
 .../fortress/core/PwPolicyMgrFactory.java       |   2 +-
 .../fortress/core/ReviewMgrFactory.java         |   2 +-
 .../fortress/core/SecurityException.java        |   2 +-
 .../directory/fortress/core/ant/Addconfig.java  |   2 +-
 .../directory/fortress/core/ant/Delconfig.java  |   2 +-
 .../fortress/core/ant/FortressAntTask.java      |   8 +-
 .../directory/fortress/core/cfg/Config.java     |   2 +
 .../directory/fortress/core/cfg/ConfigMgr.java  |  97 ----------
 .../fortress/core/cfg/ConfigMgrFactory.java     |  72 -------
 .../fortress/core/cfg/ConfigMgrImpl.java        |   1 +
 .../core/ldap/group/GroupMgrFactory.java        |   2 +-
 .../fortress/core/model/PwMessage.java          | 153 +++++++++++++++
 .../directory/fortress/core/model/Session.java  |   3 -
 .../directory/fortress/core/model/Warning.java  | 187 +++++++++++++++++++
 .../fortress/core/rbac/AuditMgrImpl.java        |   2 +-
 .../directory/fortress/core/rbac/ClassUtil.java | 117 ------------
 .../fortress/core/rbac/DSDChecker.java          |   1 +
 .../directory/fortress/core/rbac/PwMessage.java | 153 ---------------
 .../fortress/core/rbac/PwPolicyControl.java     |   2 +
 .../directory/fortress/core/rbac/UserDAO.java   |   2 +
 .../directory/fortress/core/rbac/Warning.java   | 187 -------------------
 .../fortress/core/rest/AuditMgrRestImpl.java    |   2 +-
 .../fortress/core/rest/ConfigMgrRestImpl.java   |   2 +-
 .../directory/fortress/core/util/ClassUtil.java | 117 ++++++++++++
 .../fortress/core/util/cache/CacheMgr.java      |   2 +-
 .../fortress/core/util/time/CUtil.java          |   4 +-
 .../fortress/core/ConfigMgrConsole.java         |   2 -
 .../core/example/ExampleAdminMgrFactory.java    |   2 +-
 .../fortress/core/rbac/FortressAntLoadTest.java |   1 +
 40 files changed, 665 insertions(+), 658 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
index 8a1f95b..38cf853 100644
--- a/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
@@ -21,7 +21,7 @@ package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
 import org.apache.directory.fortress.core.rbac.AccelMgrImpl;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.util.attr.VUtil;
 
 /**

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
index d3ca29d..63902e7 100755
--- a/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
@@ -21,7 +21,7 @@ package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
 import org.apache.directory.fortress.core.rbac.AccessMgrImpl;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rest.AccessMgrRestImpl;
 import org.apache.directory.fortress.core.util.attr.VUtil;
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
index a867cd1..d74a749 100755
--- a/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
@@ -21,7 +21,7 @@ package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
 import org.apache.directory.fortress.core.rbac.AdminMgrImpl;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.AdminMgrRestImpl;
 import org.apache.directory.fortress.core.util.attr.VUtil;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/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 3ef0c15..7a9d840 100755
--- a/src/main/java/org/apache/directory/fortress/core/AuditMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/AuditMgr.java
@@ -54,7 +54,7 @@ import java.util.List;
  * <li> {@link AdminMgr}
  * <li> {@link AdminMgr}
  * <li> {@link DelAdminMgr}
- * <li> {@link org.apache.directory.fortress.core.cfg.ConfigMgr}
+ * <li> {@link ConfigMgr}
  * <li> {@link PwPolicyMgr}
  * </ul>
  * <h4>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
index 8119e0a..c5e4e07 100755
--- a/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
@@ -21,7 +21,7 @@ package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
 import org.apache.directory.fortress.core.rbac.AuditMgrImpl;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.AuditMgrRestImpl;
 import org.apache.directory.fortress.core.util.attr.VUtil;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ConfigMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ConfigMgr.java b/src/main/java/org/apache/directory/fortress/core/ConfigMgr.java
new file mode 100755
index 0000000..e37a673
--- /dev/null
+++ b/src/main/java/org/apache/directory/fortress/core/ConfigMgr.java
@@ -0,0 +1,97 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core;
+
+
+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.
+ * Fortress places no limits on the number of unique configurations that can be present at one time in the directory.
+ * The Fortress client will specify the preferred cfg node by name via a property named, {@link org.apache.directory.fortress.core.GlobalIds#CONFIG_REALM}.
+ * Each process using Fortress client is free to share an existing node with other processes or create its own unique config
+ * instance using the methods within this class.<BR>
+ * <p/>
+ * This class is thread safe.
+ * <p/>
+
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface ConfigMgr
+{
+    /**
+     * Create a new cfg node with given name and properties.  The name is required.  If node already exists,
+     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_ALREADY_EXISTS} will be thrown.
+     *
+     * @param name    attribute is required and maps to 'cn' attribute in 'device' object class.
+     * @param inProps contains {@link Properties} with list of name/value pairs to add to existing config node.
+     * @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.
+     */
+    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,
+     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
+     *
+     * @param name    attribute is required and maps to 'cn' attribute in 'device' object class.
+     * @param inProps contains {@link Properties} with list of name/value pairs to add or update from existing config node.
+     * @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.
+     */
+    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,
+     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
+     *
+     * @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.
+     */
+    void delete( String name ) throws SecurityException;
+
+
+    /**
+     * Delete properties from existing cfg node.  The name is required.  If node does not exist,
+     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
+     *
+     * @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.
+     */
+    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,
+     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
+     *
+     * @param name attribute is required and maps to 'cn' attribute in 'device' object class.
+     * @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.
+     */
+    Properties read( String name ) throws SecurityException;
+}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java
new file mode 100755
index 0000000..2e242d5
--- /dev/null
+++ b/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java
@@ -0,0 +1,76 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core;
+
+import org.apache.directory.fortress.core.ConfigMgr;
+import org.apache.directory.fortress.core.GlobalIds;
+import org.apache.directory.fortress.core.cfg.Config;
+import org.apache.directory.fortress.core.cfg.ConfigMgrImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.SecurityException;
+import org.apache.directory.fortress.core.rest.ConfigMgrRestImpl;
+
+/**
+ * Creates an instance of the ConfigMgr object.
+ * <p/>
+ * The default implementation class is specified as {@link org.apache.directory.fortress.core.cfg.ConfigMgrImpl} but can be overridden by
+ * adding the {@link org.apache.directory.fortress.core.GlobalIds#CONFIG_IMPLEMENTATION} config property.
+ * <p/>
+
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public final class ConfigMgrFactory
+{
+    private static String configClassName = Config.getProperty( GlobalIds.CONFIG_IMPLEMENTATION );
+    private final static String ENABLE_REST = "enable.mgr.impl.rest";
+    private static final boolean IS_REST = ((Config.getProperty(ENABLE_REST) != null) && (Config.getProperty(ENABLE_REST).equalsIgnoreCase("true")));
+
+    private ConfigMgrFactory()
+    {
+
+    }
+
+    /**
+     * Create and return a reference to {@link org.apache.directory.fortress.core.ConfigMgr} object.
+     *
+     * @return instance of {@link org.apache.directory.fortress.core.ConfigMgr}.
+     * @throws org.apache.directory.fortress.core.SecurityException in the event of failure during instantiation.
+     */
+    public static ConfigMgr createInstance()
+        throws SecurityException
+    {
+        // TODO: Don't reuse {@link VUtil#isNotNullOrEmpty} here until it is determined why it forces different execution path through GlobalIds.IS_OPENLDAP:
+        if (configClassName == null || configClassName.compareTo("") == 0)
+        {
+            if(IS_REST)
+            {
+                // todo: this creates a cycle with rest package:
+                configClassName = ConfigMgrRestImpl.class.getName();
+            }
+            else
+            {
+                configClassName = ConfigMgrImpl.class.getName();
+            }
+        }
+
+        return (ConfigMgr) ClassUtil.createInstance(configClassName);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
index 9608f3e..137c154 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
@@ -20,7 +20,7 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rbac.DelAccessMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.DelAccessMgrRestImpl;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
index 02ed9f9..346b0d5 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
@@ -21,7 +21,7 @@ package org.apache.directory.fortress.core;
 
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rbac.DelAdminMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.DelAdminMgrRestImpl;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
index 47221f7..42e9886 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
@@ -20,7 +20,7 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rbac.DelReviewMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.DelReviewMgrRestImpl;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ObjectFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ObjectFactory.java b/src/main/java/org/apache/directory/fortress/core/ObjectFactory.java
index c07db4d..0ef7e74 100755
--- a/src/main/java/org/apache/directory/fortress/core/ObjectFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/ObjectFactory.java
@@ -22,7 +22,6 @@ package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.ldap.group.Group;
 import org.apache.directory.fortress.core.model.*;
-import org.apache.directory.fortress.core.rbac.*;
 import org.apache.directory.fortress.core.rest.FortRequest;
 import org.apache.directory.fortress.core.rest.FortResponse;
 
@@ -330,7 +329,7 @@ public class ObjectFactory
 
 
     /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link org.apache.directory.fortress.core.rbac.Warning }{@code >}}
+     * Create an instance of {@link JAXBElement }{@code <}{@link org.apache.directory.fortress.core.model.Warning }{@code >}}
      */
     @XmlElementDecl(namespace = "", name = "fortWarning")
     public JAXBElement<Warning> createFortWarning( Warning value )

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
index 64ca35c..3c6a8a9 100755
--- a/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
@@ -20,7 +20,7 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rbac.PwPolicyMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.PwPolicyMgrRestImpl;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
index 90a3670..0d56a00 100755
--- a/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
@@ -20,7 +20,7 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rbac.ReviewMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.ReviewMgrRestImpl;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/SecurityException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/SecurityException.java b/src/main/java/org/apache/directory/fortress/core/SecurityException.java
index 3f17398..e2577e6 100755
--- a/src/main/java/org/apache/directory/fortress/core/SecurityException.java
+++ b/src/main/java/org/apache/directory/fortress/core/SecurityException.java
@@ -23,7 +23,7 @@ package org.apache.directory.fortress.core;
 /**
  * This exception is declared to be thrown by all APIs within Fortress Manager interfaces: ({@link AdminMgr}, {@link AccessMgr},
  * {@link ReviewMgr},{@link PwPolicyMgr},{@link AuditMgr},{@link DelAdminMgr},
- * {@link DelAccessMgr},{@link DelReviewMgr},{@link org.apache.directory.fortress.core.cfg.ConfigMgr}).
+ * {@link DelAccessMgr},{@link DelReviewMgr},{@link ConfigMgr}).
  * <h3>
  * <p/>The original exception thrown may be of this type or one of its extensions
  * </h3>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ant/Addconfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ant/Addconfig.java b/src/main/java/org/apache/directory/fortress/core/ant/Addconfig.java
index 190e8d2..8720623 100755
--- a/src/main/java/org/apache/directory/fortress/core/ant/Addconfig.java
+++ b/src/main/java/org/apache/directory/fortress/core/ant/Addconfig.java
@@ -23,7 +23,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * The class is used by {@link FortressAntTask} to load {@link ConfigAnt}s used to drive {@link org.apache.directory.fortress.core.cfg.ConfigMgr#add(String, java.util.Properties)}.
+ * The class is used by {@link FortressAntTask} to load {@link ConfigAnt}s used to drive {@link org.apache.directory.fortress.core.ConfigMgr#add(String, java.util.Properties)}.
  * It is not intended to be callable by programs outside of the Ant load utility.  The class name itself maps to the xml tag used by load utility.
  * <p>This class name, 'Addconfig', is used for the xml tag in the load script.</p>
  * <pre>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ant/Delconfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ant/Delconfig.java b/src/main/java/org/apache/directory/fortress/core/ant/Delconfig.java
index e4f930d..276c937 100755
--- a/src/main/java/org/apache/directory/fortress/core/ant/Delconfig.java
+++ b/src/main/java/org/apache/directory/fortress/core/ant/Delconfig.java
@@ -24,7 +24,7 @@ import java.util.List;
 
 
 /**
- * The class is used by {@link FortressAntTask} to load {@link org.apache.directory.fortress.core.ant.ConfigAnt}s used to drive {@link org.apache.directory.fortress.core.cfg.ConfigMgr#delete(String, java.util.Properties)}.
+ * The class is used by {@link FortressAntTask} to load {@link org.apache.directory.fortress.core.ant.ConfigAnt}s used to drive {@link org.apache.directory.fortress.core.ConfigMgr#delete(String, java.util.Properties)}.
  * It is not intended to be callable by programs outside of the Ant load utility.  The class name itself maps to the xml tag used by load utility.
  * <p>This class name, 'Delconfig', is used for the xml tag in the load script.</p>
  * <pre>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java b/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
index 14dd242..818247e 100755
--- a/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
+++ b/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
@@ -47,15 +47,15 @@ import org.apache.directory.fortress.core.GlobalIds;
 import org.apache.directory.fortress.core.PwPolicyMgr;
 import org.apache.directory.fortress.core.PwPolicyMgrFactory;
 import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.cfg.ConfigMgr;
-import org.apache.directory.fortress.core.cfg.ConfigMgrFactory;
+import org.apache.directory.fortress.core.ConfigMgr;
+import org.apache.directory.fortress.core.ConfigMgrFactory;
 import org.apache.directory.fortress.core.ldap.container.OrganizationalUnit;
 import org.apache.directory.fortress.core.ldap.container.OrganizationalUnitP;
 import org.apache.directory.fortress.core.ldap.suffix.Suffix;
 import org.apache.directory.fortress.core.ldap.suffix.SuffixP;
 
 import org.apache.directory.fortress.core.model.AdminRole;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Context;
 import org.apache.directory.fortress.core.model.OrgUnit;
 import org.apache.directory.fortress.core.model.PermGrant;
@@ -160,7 +160,7 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
  * org.apache.directory.fortress.core.model.OrgUnit)} USER and PERM</li>
  * <li>Delete User and Perm OUs {@link org.apache.directory.fortress.core.DelAdminMgr#delete(org.apache.directory.fortress.core.model.OrgUnit)} USER and
  * PERM</li>
- * <li>Delete Configuration Entries {@link org.apache.directory.fortress.core.cfg.ConfigMgr#delete(String, java.util.Properties)}</li>
+ * <li>Delete Configuration Entries {@link org.apache.directory.fortress.core.ConfigMgr#delete(String, java.util.Properties)}</li>
  * <li>Delete Containers {@link OrganizationalUnitP#delete(OrganizationalUnit)}</li>
  * <li>Delete Suffix {@link org.apache.directory.fortress.core.ldap.suffix.SuffixP#delete(org.apache.directory.fortress.core.ldap.suffix.Suffix)}}</li>
  * <li>Add Suffix {@link SuffixP#add(Suffix)}}</li>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/cfg/Config.java b/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
index 5638246..b91dff0 100755
--- a/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
+++ b/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
@@ -25,6 +25,8 @@ import java.util.Enumeration;
 import java.util.Properties;
 
 import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.directory.fortress.core.ConfigMgr;
+import org.apache.directory.fortress.core.ConfigMgrFactory;
 import org.apache.directory.fortress.core.util.attr.VUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/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
deleted file mode 100755
index 5cfca79..0000000
--- a/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgr.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-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.
- * Fortress places no limits on the number of unique configurations that can be present at one time in the directory.
- * The Fortress client will specify the preferred cfg node by name via a property named, {@link org.apache.directory.fortress.core.GlobalIds#CONFIG_REALM}.
- * Each process using Fortress client is free to share an existing node with other processes or create its own unique config
- * instance using the methods within this class.<BR>
- * <p/>
- * This class is thread safe.
- * <p/>
-
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface ConfigMgr
-{
-    /**
-     * Create a new cfg node with given name and properties.  The name is required.  If node already exists,
-     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_ALREADY_EXISTS} will be thrown.
-     *
-     * @param name    attribute is required and maps to 'cn' attribute in 'device' object class.
-     * @param inProps contains {@link Properties} with list of name/value pairs to add to existing config node.
-     * @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.
-     */
-    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,
-     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
-     *
-     * @param name    attribute is required and maps to 'cn' attribute in 'device' object class.
-     * @param inProps contains {@link Properties} with list of name/value pairs to add or update from existing config node.
-     * @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.
-     */
-    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,
-     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
-     *
-     * @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.
-     */
-    void delete( String name ) throws SecurityException;
-
-
-    /**
-     * Delete properties from existing cfg node.  The name is required.  If node does not exist,
-     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
-     *
-     * @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.
-     */
-    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,
-     * a {@link org.apache.directory.fortress.core.SecurityException} with error {@link org.apache.directory.fortress.core.GlobalErrIds#FT_CONFIG_NOT_FOUND} will be thrown.
-     *
-     * @param name attribute is required and maps to 'cn' attribute in 'device' object class.
-     * @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.
-     */
-    Properties read( String name ) throws SecurityException;
-}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrFactory.java
deleted file mode 100755
index 709302d..0000000
--- a/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-package org.apache.directory.fortress.core.cfg;
-
-import org.apache.directory.fortress.core.GlobalIds;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
-import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.rest.ConfigMgrRestImpl;
-
-/**
- * Creates an instance of the ConfigMgr object.
- * <p/>
- * The default implementation class is specified as {@link ConfigMgrImpl} but can be overridden by
- * adding the {@link org.apache.directory.fortress.core.GlobalIds#CONFIG_IMPLEMENTATION} config property.
- * <p/>
-
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class ConfigMgrFactory
-{
-    private static String configClassName = Config.getProperty(GlobalIds.CONFIG_IMPLEMENTATION);
-    private final static String ENABLE_REST = "enable.mgr.impl.rest";
-    private static final boolean IS_REST = ((Config.getProperty(ENABLE_REST) != null) && (Config.getProperty(ENABLE_REST).equalsIgnoreCase("true")));
-
-    private ConfigMgrFactory()
-    {
-
-    }
-
-    /**
-     * Create and return a reference to {@link ConfigMgr} object.
-     *
-     * @return instance of {@link ConfigMgr}.
-     * @throws org.apache.directory.fortress.core.SecurityException in the event of failure during instantiation.
-     */
-    public static ConfigMgr createInstance()
-        throws SecurityException
-    {
-        // TODO: Don't reuse {@link VUtil#isNotNullOrEmpty} here until it is determined why it forces different execution path through GlobalIds.IS_OPENLDAP:
-        if (configClassName == null || configClassName.compareTo("") == 0)
-        {
-            if(IS_REST)
-            {
-                configClassName = ConfigMgrRestImpl.class.getName();
-            }
-            else
-            {
-                configClassName = ConfigMgrImpl.class.getName();
-            }
-        }
-
-        return (ConfigMgr) ClassUtil.createInstance(configClassName);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrImpl.java
index f134dd9..4492be5 100755
--- a/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/cfg/ConfigMgrImpl.java
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.fortress.core.cfg;
 
+import org.apache.directory.fortress.core.ConfigMgr;
 import org.apache.directory.fortress.core.SecurityException;
 
 import java.util.Properties;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
index f8de6df..29f67e0 100755
--- a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
@@ -23,7 +23,7 @@ import org.apache.directory.api.util.Strings;
 import org.apache.directory.fortress.core.GlobalErrIds;
 import org.apache.directory.fortress.core.GlobalIds;
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.SecurityException;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.util.attr.VUtil;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/model/PwMessage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/model/PwMessage.java b/src/main/java/org/apache/directory/fortress/core/model/PwMessage.java
new file mode 100755
index 0000000..971a36e
--- /dev/null
+++ b/src/main/java/org/apache/directory/fortress/core/model/PwMessage.java
@@ -0,0 +1,153 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core.model;
+
+
+import java.util.List;
+
+
+/**
+ * Interface is implemented by {@link org.apache.directory.fortress.core.model.Session} and prescribes methods used to return Fortress
+ * password messages to the caller.
+ * <p/>
+
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface PwMessage
+{
+    /**
+     * Return the {@link org.apache.directory.fortress.core.model.User#userId} from entity.
+     *
+     * @param userId maps to {@code uid} attribute on inetOrgPerson object class.
+     */
+    void setUserId( String userId );
+
+
+    /**
+     * Set the {@link org.apache.directory.fortress.core.model.User#userId} in entity.
+     *
+     * @return userId maps to {@code uid} attribute on inetOrgPerson object class.
+     */
+    String getUserId();
+
+
+    /**
+     * Contains the message that corresponds to password.  These messages map to {@link org.apache.directory.fortress.core.rbac.GlobalPwMsgIds#pwMsgs}
+     *
+     * @param message
+     */
+    void setMsg( String message );
+
+
+    /**
+     * Return the message that corresponds to last password check.
+     *
+     * @return message maps to {@link org.apache.directory.fortress.core.rbac.GlobalPwMsgIds#pwMsgs}
+     */
+    String getMsg();
+
+
+    /**
+     * If set to true the user's password check out good.
+     *
+     * @param isAuthenticated
+     */
+    void setAuthenticated( boolean isAuthenticated );
+
+
+    /**
+     * If set to true the user's password check out good.
+     *
+     * @return param 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 org.apache.directory.fortress.core.rbac.GlobalPwMsgIds}
+     *
+     * @param warning contains warning id.
+     */
+    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 org.apache.directory.fortress.core.rbac.GlobalPwMsgIds}
+     *
+     * @return warning contains warning id.
+     */
+    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 org.apache.directory.fortress.core.rbac.GlobalPwMsgIds}
+     *
+     * @param error contains error id that maps to {@link org.apache.directory.fortress.core.rbac.GlobalPwMsgIds#pwIds}
+     */
+    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 org.apache.directory.fortress.core.rbac.GlobalPwMsgIds}
+     *
+     * @return error contains error id that maps to {@link org.apache.directory.fortress.core.rbac.GlobalPwMsgIds#pwIds}
+     */
+    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.
+     */
+    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.
+     */
+    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.
+     */
+    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.
+     */
+    int getExpirationSeconds();
+}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/model/Session.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/model/Session.java b/src/main/java/org/apache/directory/fortress/core/model/Session.java
index 3d8e8f8..2b8004e 100755
--- a/src/main/java/org/apache/directory/fortress/core/model/Session.java
+++ b/src/main/java/org/apache/directory/fortress/core/model/Session.java
@@ -19,9 +19,6 @@
  */
 package org.apache.directory.fortress.core.model;
 
-import org.apache.directory.fortress.core.rbac.PwMessage;
-import org.apache.directory.fortress.core.rbac.Warning;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/model/Warning.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/model/Warning.java b/src/main/java/org/apache/directory/fortress/core/model/Warning.java
new file mode 100644
index 0000000..5b543db
--- /dev/null
+++ b/src/main/java/org/apache/directory/fortress/core/model/Warning.java
@@ -0,0 +1,187 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core.model;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import java.io.Serializable;
+
+/**
+ * This class contains messages that map to warning that occur during role activation and password policy validation.
+ * <p/>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+/**
+ * This entity is stored on {@link org.apache.directory.fortress.core.model.Session} and is used to pass warnings
+ * that occur during role activation and password policy validation.
+ * <p/>
+ * Contains data from event that occurs during session initialization:
+ * <p/>
+ * <ul>
+ * <li>  ------------------------------------------
+ * <li> <code>id</code>
+ * <li> <code>msg</code>
+ * <li> <code>type</code>
+ * <li> <code>name</code>
+ * <li>  ------------------------------------------
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+@XmlRootElement(name = "fortWarning")
+@XmlAccessorType( XmlAccessType.FIELD)
+@XmlType(name = "warning", propOrder =
+    {
+        "id",
+        "msg",
+        "type",
+        "name"
+    })
+public class Warning implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    private int id;
+    private String msg;
+    private String name;
+    private Type type;
+
+    public Warning()
+    {
+    }
+    
+
+    /**
+     *
+     * @param id
+     * @param msg
+     * @param type
+     */
+    public Warning( int id, String msg, Type type )
+    {
+        this.id = id;
+        this.msg = msg;
+        this.type = type;
+    }
+    
+
+    /**
+     *
+     * @param id
+     * @param msg
+     * @param type
+     * @param name
+     */
+    public Warning( int id, String msg, Type type, String name )
+    {
+        this.id = id;
+        this.msg = msg;
+        this.name = name;
+        this.type = type;
+    }
+    
+
+    /**
+     * Type determines if warning is of type Role or Password Policy.
+     */
+    @XmlType(name = "warnType")
+    @XmlEnum
+    public enum Type
+    {
+        /**
+         * Problem during role activation.
+         */
+        ROLE,
+
+        /**
+         * Problem during password policy validation.
+         */
+        PASSWORD
+    }
+    
+
+    public int getId()
+    {
+        return id;
+    }
+
+    public void setId( int id )
+    {
+        this.id = id;
+    }
+    
+
+    public String getMsg()
+    {
+        return msg;
+    }
+    
+
+    public void setMsg( String msg )
+    {
+        this.msg = msg;
+    }
+    
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+    
+
+    public Type getType()
+    {
+        return type;
+    }
+    
+
+    public void setType( Type type )
+    {
+        this.type = type;
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( "Warning object: \n" );
+
+        sb.append( "    id :" ).append( id ).append( '\n' );
+        sb.append( "    name :" ).append( name ).append( '\n' );
+        sb.append( "    type :" ).append( type ).append( '\n' );
+        sb.append( "    msg :" ).append( msg ).append( '\n' );
+
+        return sb.toString();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/rbac/AuditMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/AuditMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/rbac/AuditMgrImpl.java
index 37d8cd8..120610e 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/AuditMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/AuditMgrImpl.java
@@ -59,7 +59,7 @@ import java.util.List;
  * <li> {@link org.apache.directory.fortress.core.AdminMgr}
  * <li> {@link org.apache.directory.fortress.core.AdminMgr}
  * <li> {@link org.apache.directory.fortress.core.DelAdminMgr}
- * <li> {@link org.apache.directory.fortress.core.cfg.ConfigMgr}
+ * <li> {@link org.apache.directory.fortress.core.ConfigMgr}
  * <li> {@link org.apache.directory.fortress.core.PwPolicyMgr}
  * </ul>
  * <h4>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/rbac/ClassUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/ClassUtil.java b/src/main/java/org/apache/directory/fortress/core/rbac/ClassUtil.java
deleted file mode 100755
index 0d90946..0000000
--- a/src/main/java/org/apache/directory/fortress/core/rbac/ClassUtil.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-package org.apache.directory.fortress.core.rbac;
-
-
-import org.apache.directory.fortress.core.CfgException;
-import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.api.util.Strings;
-
-import java.io.InputStream;
-
-
-/**
- * General purpose factory uses java reflection to instantiate new Manager object.
- * </p>
- * This class is called by the Manager factories:
- * <ol>
- * <li>{@link org.apache.directory.fortress.core.AccessMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.AdminMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.AuditMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.DelAccessMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.DelAdminMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.DelReviewMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.PwPolicyMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.ReviewMgrFactory}</li>
- * <li>{@link org.apache.directory.fortress.core.cfg.ConfigMgrFactory}</li>
- * </ol>
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class ClassUtil
-{
-    /**
-     * Private constructor
-     *
-     */
-    private ClassUtil()
-    {
-    }
-
-    /**
-     * Given a valid class name call the default constructor through reflexion and return the reference to the caller.
-     * @param className contains fully qualified java class name to be instantiated.  Must have a public default constructor to be successful.
-     * @return reference to instantiated ManagerImpl object.
-     * @throws org.apache.directory.fortress.core.CfgException in the event of failure to instantiate.
-     *
-     */
-    public static Object createInstance( String className ) throws CfgException
-    {
-        Object target;
-
-        try
-        {
-            if ( Strings.isEmpty( className ) )
-            {
-                String error = "createInstance() null or empty classname";
-                throw new CfgException( GlobalErrIds.FT_MGR_CLASS_NAME_NULL, error );
-            }
-
-            target = Class.forName( className ).newInstance();
-        }
-        catch ( ClassNotFoundException e )
-        {
-            String error = "createInstance() className [" + className + "] caught java.lang.ClassNotFoundException="
-                + e;
-            throw new CfgException( GlobalErrIds.FT_MGR_CLASS_NOT_FOUND, error, e );
-        }
-        catch ( InstantiationException e )
-        {
-            String error = "createInstance()  [" + className + "] caught java.lang.InstantiationException=" + e;
-            throw new CfgException( GlobalErrIds.FT_MGR_INST_EXCEPTION, error, e );
-        }
-        catch ( IllegalAccessException e )
-        {
-            String error = "createInstance()  [" + className + "] caught java.lang.IllegalAccessException=" + e;
-            throw new CfgException( GlobalErrIds.FT_MGR_ILLEGAL_ACCESS, error, e );
-        }
-
-        return target;
-    }
-
-
-    /**
-     * Find a file on the classloader and return as InputStream.
-     * @param name contains the name of the file resource.
-     * @return handle to the InputStream
-     * @throws CfgException in the event resource is not found on classloader.
-     */
-    public static InputStream resourceAsStream( String name ) throws CfgException
-    {
-        InputStream is = ClassUtil.class.getClassLoader().getResourceAsStream( name );
-
-        if ( is == null )
-        {
-            throw new CfgException( GlobalErrIds.FT_RESOURCE_NOT_FOUND, name );
-        }
-
-        return is;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/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 6f1fb98..898b7ea 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
@@ -27,6 +27,7 @@ import java.util.Set;
 import org.apache.directory.fortress.core.model.SDSet;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.model.UserRole;
+import org.apache.directory.fortress.core.model.Warning;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.directory.fortress.core.GlobalErrIds;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/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
deleted file mode 100755
index 4054366..0000000
--- a/src/main/java/org/apache/directory/fortress/core/rbac/PwMessage.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-package org.apache.directory.fortress.core.rbac;
-
-
-import java.util.List;
-
-
-/**
- * Interface is implemented by {@link org.apache.directory.fortress.core.model.Session} and prescribes methods used to return Fortress
- * password messages to the caller.
- * <p/>
-
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface PwMessage
-{
-    /**
-     * Return the {@link org.apache.directory.fortress.core.model.User#userId} from entity.
-     *
-     * @param userId maps to {@code uid} attribute on inetOrgPerson object class.
-     */
-    void setUserId( String userId );
-
-
-    /**
-     * Set the {@link org.apache.directory.fortress.core.model.User#userId} in entity.
-     *
-     * @return userId maps to {@code uid} attribute on inetOrgPerson object class.
-     */
-    String getUserId();
-
-
-    /**
-     * Contains the message that corresponds to password.  These messages map to {@link GlobalPwMsgIds#pwMsgs}
-     *
-     * @param message
-     */
-    void setMsg( String message );
-
-
-    /**
-     * Return the message that corresponds to last password check.
-     *
-     * @return message maps to {@link GlobalPwMsgIds#pwMsgs}
-     */
-    String getMsg();
-
-
-    /**
-     * If set to true the user's password check out good.
-     *
-     * @param isAuthenticated
-     */
-    void setAuthenticated( boolean isAuthenticated );
-
-
-    /**
-     * If set to true the user's password check out good.
-     *
-     * @return param 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.
-     */
-    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.
-     */
-    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}
-     */
-    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}
-     */
-    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.
-     */
-    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.
-     */
-    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.
-     */
-    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.
-     */
-    int getExpirationSeconds();
-}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/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 cbe1f0f..56ed76b 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,6 +20,8 @@
 package org.apache.directory.fortress.core.rbac;
 
 
+import org.apache.directory.fortress.core.model.PwMessage;
+
 /**
  * Interface is used to allow pluggable password policy interrogation.
  *

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
index 10e2bad..ad87145 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
@@ -49,11 +49,13 @@ import org.apache.directory.api.ldap.model.message.SearchScope;
 import org.apache.directory.fortress.core.model.Address;
 import org.apache.directory.fortress.core.model.AdminRole;
 import org.apache.directory.fortress.core.model.OrgUnit;
+import org.apache.directory.fortress.core.model.PwMessage;
 import org.apache.directory.fortress.core.model.Role;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.UserAdminRole;
 import org.apache.directory.fortress.core.model.UserRole;
+import org.apache.directory.fortress.core.model.Warning;
 import org.apache.directory.ldap.client.api.LdapConnection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/rbac/Warning.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/Warning.java b/src/main/java/org/apache/directory/fortress/core/rbac/Warning.java
deleted file mode 100644
index 94123a9..0000000
--- a/src/main/java/org/apache/directory/fortress/core/rbac/Warning.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-package org.apache.directory.fortress.core.rbac;
-
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import java.io.Serializable;
-
-/**
- * This class contains messages that map to warning that occur during role activation and password policy validation.
- * <p/>
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-/**
- * This entity is stored on {@link org.apache.directory.fortress.core.model.Session} and is used to pass warnings
- * that occur during role activation and password policy validation.
- * <p/>
- * Contains data from event that occurs during session initialization:
- * <p/>
- * <ul>
- * <li>  ------------------------------------------
- * <li> <code>id</code>
- * <li> <code>msg</code>
- * <li> <code>type</code>
- * <li> <code>name</code>
- * <li>  ------------------------------------------
- * </ul>
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-@XmlRootElement(name = "fortWarning")
-@XmlAccessorType( XmlAccessType.FIELD)
-@XmlType(name = "warning", propOrder =
-    {
-        "id",
-        "msg",
-        "type",
-        "name"
-    })
-public class Warning implements Serializable
-{
-    private static final long serialVersionUID = 1L;
-    private int id;
-    private String msg;
-    private String name;
-    private Type type;
-
-    public Warning()
-    {
-    }
-    
-
-    /**
-     *
-     * @param id
-     * @param msg
-     * @param type
-     */
-    public Warning( int id, String msg, Type type )
-    {
-        this.id = id;
-        this.msg = msg;
-        this.type = type;
-    }
-    
-
-    /**
-     *
-     * @param id
-     * @param msg
-     * @param type
-     * @param name
-     */
-    public Warning( int id, String msg, Type type, String name )
-    {
-        this.id = id;
-        this.msg = msg;
-        this.name = name;
-        this.type = type;
-    }
-    
-
-    /**
-     * Type determines if warning is of type Role or Password Policy.
-     */
-    @XmlType(name = "warnType")
-    @XmlEnum
-    public enum Type
-    {
-        /**
-         * Problem during role activation.
-         */
-        ROLE,
-
-        /**
-         * Problem during password policy validation.
-         */
-        PASSWORD
-    }
-    
-
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-    
-
-    public String getMsg()
-    {
-        return msg;
-    }
-    
-
-    public void setMsg( String msg )
-    {
-        this.msg = msg;
-    }
-    
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-    
-
-    public Type getType()
-    {
-        return type;
-    }
-    
-
-    public void setType( Type type )
-    {
-        this.type = type;
-    }
-
-
-    /**
-     * @see Object#toString()
-     */
-    public String toString()
-    {
-        StringBuilder sb = new StringBuilder();
-
-        sb.append( "Warning object: \n" );
-
-        sb.append( "    id :" ).append( id ).append( '\n' );
-        sb.append( "    name :" ).append( name ).append( '\n' );
-        sb.append( "    type :" ).append( type ).append( '\n' );
-        sb.append( "    msg :" ).append( msg ).append( '\n' );
-
-        return sb.toString();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/rest/AuditMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/AuditMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/AuditMgrRestImpl.java
index f4a9260..d73180a 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/AuditMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/AuditMgrRestImpl.java
@@ -59,7 +59,7 @@ import java.util.List;
  * <li> {@link org.apache.directory.fortress.core.AdminMgr}
  * <li> {@link org.apache.directory.fortress.core.AdminMgr}
  * <li> {@link org.apache.directory.fortress.core.DelAdminMgr}
- * <li> {@link org.apache.directory.fortress.core.cfg.ConfigMgr}
+ * <li> {@link org.apache.directory.fortress.core.ConfigMgr}
  * <li> {@link org.apache.directory.fortress.core.PwPolicyMgr}
  * </ul>
  * <h4>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/rest/ConfigMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/ConfigMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/ConfigMgrRestImpl.java
index 3e06efc..64ebce6 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/ConfigMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/ConfigMgrRestImpl.java
@@ -21,7 +21,7 @@ package org.apache.directory.fortress.core.rest;
 
 import org.apache.directory.fortress.core.GlobalErrIds;
 import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.cfg.ConfigMgr;
+import org.apache.directory.fortress.core.ConfigMgr;
 import org.apache.directory.fortress.core.model.Props;
 import org.apache.directory.fortress.core.util.attr.VUtil;
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/util/ClassUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/ClassUtil.java b/src/main/java/org/apache/directory/fortress/core/util/ClassUtil.java
new file mode 100755
index 0000000..98a98d3
--- /dev/null
+++ b/src/main/java/org/apache/directory/fortress/core/util/ClassUtil.java
@@ -0,0 +1,117 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core.util;
+
+
+import org.apache.directory.fortress.core.CfgException;
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.api.util.Strings;
+
+import java.io.InputStream;
+
+
+/**
+ * General purpose factory uses java reflection to instantiate new Manager object.
+ * </p>
+ * This class is called by the Manager factories:
+ * <ol>
+ * <li>{@link org.apache.directory.fortress.core.AccessMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.AdminMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.AuditMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.DelAccessMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.DelAdminMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.DelReviewMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.PwPolicyMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.ReviewMgrFactory}</li>
+ * <li>{@link org.apache.directory.fortress.core.ConfigMgrFactory}</li>
+ * </ol>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public final class ClassUtil
+{
+    /**
+     * Private constructor
+     *
+     */
+    private ClassUtil()
+    {
+    }
+
+    /**
+     * Given a valid class name call the default constructor through reflexion and return the reference to the caller.
+     * @param className contains fully qualified java class name to be instantiated.  Must have a public default constructor to be successful.
+     * @return reference to instantiated ManagerImpl object.
+     * @throws org.apache.directory.fortress.core.CfgException in the event of failure to instantiate.
+     *
+     */
+    public static Object createInstance( String className ) throws CfgException
+    {
+        Object target;
+
+        try
+        {
+            if ( Strings.isEmpty( className ) )
+            {
+                String error = "createInstance() null or empty classname";
+                throw new CfgException( GlobalErrIds.FT_MGR_CLASS_NAME_NULL, error );
+            }
+
+            target = Class.forName( className ).newInstance();
+        }
+        catch ( ClassNotFoundException e )
+        {
+            String error = "createInstance() className [" + className + "] caught java.lang.ClassNotFoundException="
+                + e;
+            throw new CfgException( GlobalErrIds.FT_MGR_CLASS_NOT_FOUND, error, e );
+        }
+        catch ( InstantiationException e )
+        {
+            String error = "createInstance()  [" + className + "] caught java.lang.InstantiationException=" + e;
+            throw new CfgException( GlobalErrIds.FT_MGR_INST_EXCEPTION, error, e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            String error = "createInstance()  [" + className + "] caught java.lang.IllegalAccessException=" + e;
+            throw new CfgException( GlobalErrIds.FT_MGR_ILLEGAL_ACCESS, error, e );
+        }
+
+        return target;
+    }
+
+
+    /**
+     * Find a file on the classloader and return as InputStream.
+     * @param name contains the name of the file resource.
+     * @return handle to the InputStream
+     * @throws CfgException in the event resource is not found on classloader.
+     */
+    public static InputStream resourceAsStream( String name ) throws CfgException
+    {
+        InputStream is = ClassUtil.class.getClassLoader().getResourceAsStream( name );
+
+        if ( is == null )
+        {
+            throw new CfgException( GlobalErrIds.FT_RESOURCE_NOT_FOUND, name );
+        }
+
+        return is;
+    }
+}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java b/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
index 5fbb809..c2c17db 100644
--- a/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
@@ -24,7 +24,7 @@ import org.apache.directory.fortress.core.CfgException;
 import org.apache.directory.fortress.core.CfgRuntimeException;
 import org.apache.directory.fortress.core.GlobalErrIds;
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/main/java/org/apache/directory/fortress/core/util/time/CUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/time/CUtil.java b/src/main/java/org/apache/directory/fortress/core/util/time/CUtil.java
index 0951708..917bcde 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/time/CUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/time/CUtil.java
@@ -26,10 +26,10 @@ import org.apache.directory.fortress.core.ObjectFactory;
 import org.apache.directory.fortress.core.cfg.Config;
 import org.apache.directory.fortress.core.SecurityException;
 import org.apache.directory.fortress.core.ValidationException;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.model.UserRole;
-import org.apache.directory.fortress.core.rbac.Warning;
+import org.apache.directory.fortress.core.model.Warning;
 import org.apache.directory.fortress.core.util.attr.VUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/test/java/org/apache/directory/fortress/core/ConfigMgrConsole.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/ConfigMgrConsole.java b/src/test/java/org/apache/directory/fortress/core/ConfigMgrConsole.java
index 7fc1347..992705a 100755
--- a/src/test/java/org/apache/directory/fortress/core/ConfigMgrConsole.java
+++ b/src/test/java/org/apache/directory/fortress/core/ConfigMgrConsole.java
@@ -19,8 +19,6 @@
  */
 package org.apache.directory.fortress.core;
 
-import org.apache.directory.fortress.core.cfg.ConfigMgr;
-import org.apache.directory.fortress.core.cfg.ConfigMgrFactory;
 import org.apache.directory.fortress.core.model.Session;
 
 import java.util.Enumeration;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/test/java/org/apache/directory/fortress/core/example/ExampleAdminMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/example/ExampleAdminMgrFactory.java b/src/test/java/org/apache/directory/fortress/core/example/ExampleAdminMgrFactory.java
index 0960634..0eb80a5 100755
--- a/src/test/java/org/apache/directory/fortress/core/example/ExampleAdminMgrFactory.java
+++ b/src/test/java/org/apache/directory/fortress/core/example/ExampleAdminMgrFactory.java
@@ -21,7 +21,7 @@ package org.apache.directory.fortress.core.example;
 
 import org.apache.directory.fortress.core.SecurityException;
 import org.apache.directory.fortress.core.cfg.Config;
-import org.apache.directory.fortress.core.rbac.ClassUtil;
+import org.apache.directory.fortress.core.util.ClassUtil;
 
 /**
  * Factory class used to instantiate the ExampleAdminMgrImpl.

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/55a182d0/src/test/java/org/apache/directory/fortress/core/rbac/FortressAntLoadTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/rbac/FortressAntLoadTest.java b/src/test/java/org/apache/directory/fortress/core/rbac/FortressAntLoadTest.java
index a686a1d..bea779d 100644
--- a/src/test/java/org/apache/directory/fortress/core/rbac/FortressAntLoadTest.java
+++ b/src/test/java/org/apache/directory/fortress/core/rbac/FortressAntLoadTest.java
@@ -34,6 +34,7 @@ import org.apache.directory.fortress.core.model.Role;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.UserRole;
+import org.apache.directory.fortress.core.model.Warning;
 import org.apache.tools.ant.Task;
 import org.junit.Test;
 import org.junit.runner.JUnitCore;


Mime
View raw message