directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject [53/75] [abbrv] directory-fortress-core git commit: FC-103 - move vutil back to util package. move org and suffix to impl package. make package private.
Date Tue, 09 Jun 2015 03:15:59 GMT
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java b/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
deleted file mode 100755
index d0422ef..0000000
--- a/src/main/java/org/apache/directory/fortress/core/ldap/container/OrganizationalUnitP.java
+++ /dev/null
@@ -1,146 +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.ldap.container;
-
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.model.OrganizationalUnit;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.GlobalIds;
-import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.ValidationException;
-import org.apache.directory.fortress.core.model.VUtil;
-
-
-/**
- * Process module for the container node used for grouping  related nodes within Fortress directory structure. The organizational unit represents
- * the middle nodes that act as containers for other nodes, i.e. ou=People container which groups Users.
- * The organizational unit data is passed using {@link org.apache.directory.fortress.core.model.OrganizationalUnit} class.  This class does perform simple data validations.
- * The {@link org.apache.directory.fortress.core.ant.FortressAntTask#addContainers()} method calls the {@link #add} from this class during initial base loads.
- * Removal {@link org.apache.directory.fortress.core.ant.FortressAntTask#deleteContainers()} is performed during regression tests and should never
- * be executed targeting enabled production directory system datasets.<BR>
- * This class will accept {@link org.apache.directory.fortress.core.model.OrganizationalUnit}, and forward on to it's corresponding DAO class {@link OrganizationalUnitDAO} for add/delete of container.
- * <p>
- * Class will throw {@link SecurityException} to caller in the event of security policy, data constraint violation or system
- * error internal to DAO object. This class will forward DAO exceptions (
- * {@link org.apache.directory.fortress.core.CreateException},,{@link org.apache.directory.fortress.core.RemoveException}),
- *  or {@link org.apache.directory.fortress.core.ValidationException} as {@link org.apache.directory.fortress.core.SecurityException}s with appropriate
- *  error id from {@link org.apache.directory.fortress.core.GlobalErrIds}.
- * <p>
- * <font size="3" color="red">
- * The {@link #delete} method in this class is destructive as it will remove all nodes below the container using recursive delete function.<BR>
- * Extreme care should be taken during execution to ensure target dn is correct and permanent removal of data is intended.  There is no
- * 'undo' for this operation.
- * </font>
- * <p/>
- * Simple error mapping is performed in {@link #validate} class.
- * <p/>
- * This class is thread safe.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class OrganizationalUnitP
-{
-    private static final String CLS_NM = OrganizationalUnitP.class.getName();
-    private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
-
-
-    /**
-     * Add a new container to the Directory Information Tree (DIT).  After added the
-     * node will be inserted after suffix, i.e. ou=NewContainerName, dc=companyName, dc=com.
-     *
-     * @param orgUnit contains the ou name and description for target node.
-     * @throws org.apache.directory.fortress.core.SecurityException in the event node already present, {@link GlobalErrIds#CNTR_CREATE_FAILED}, validation, {@link GlobalErrIds#CNTR_NAME_NULL}, {@link org.apache.directory.fortress.core.GlobalErrIds#CNTR_NAME_INVLD} or system error.
-     */
-    public final void add( OrganizationalUnit orgUnit )
-        throws SecurityException
-    {
-        validate( orgUnit );
-        OrganizationalUnitDAO oDao = new OrganizationalUnitDAO();
-        oDao.create( orgUnit );
-    }
-
-
-    /**
-     * Remove a container from the Directory Information Tree (DIT).  After this operation the
-     * node will be removed after suffix.
-     *
-     * <p>
-     * <font size="4" color="red">
-     * The {@link #delete} method in this class is destructive as it will remove all nodes below the container using recursive delete function.<BR>
-     * Extreme care should be taken during execution to ensure target dn is correct and permanent removal of data is intended.  There is no
-     * 'undo' for this operation.
-     * </font>
-     * <p/>
-     *
-     * @param orgUnit contains the ou name of container targeted for removal.
-     * @throws org.apache.directory.fortress.core.SecurityException in the event node not present, {@link org.apache.directory.fortress.core.GlobalErrIds#CNTR_DELETE_FAILED}, validation, {@link org.apache.directory.fortress.core.GlobalErrIds#CNTR_NAME_NULL}, {@link org.apache.directory.fortress.core.GlobalErrIds#CNTR_NAME_INVLD} or system error.
-     */
-    public final void delete( OrganizationalUnit orgUnit )
-        throws SecurityException
-    {
-        OrganizationalUnitDAO oDao = new OrganizationalUnitDAO();
-        oDao.remove( orgUnit );
-    }
-
-
-    /**
-     * Method will perform simple validations to ensure the integrity of the {@link OrganizationalUnit} entity targeted for insertion
-     * or deletion in directory.
-     *
-     * @param entity contains the enum type to validate
-     * @throws SecurityException thrown in the event the attribute is null.
-     */
-    private void validate( OrganizationalUnit entity )
-        throws SecurityException
-    {
-        if ( entity.getName().length() > GlobalIds.OU_LEN )
-        {
-            String name = entity.getName();
-            String error = "validate name [" + name + "] invalid length [" + entity.getName().length() + "]";
-            LOG.warn( error );
-            throw new ValidationException( GlobalErrIds.CNTR_NAME_INVLD, error );
-        }
-        
-        if ( !StringUtils.isNotEmpty( entity.getName() ) )
-        {
-            String error = "validate name validation failed, null or empty value";
-            LOG.warn( error );
-            throw new ValidationException( GlobalErrIds.CNTR_NAME_NULL, error );
-        }
-        
-        if ( entity.getParent() != null && entity.getParent().length() > GlobalIds.OU_LEN )
-        {
-            String name = entity.getName();
-            String error = "validate parent [" + name + "] invalid length [" + entity.getName().length()
-                + "]";
-            LOG.warn( error );
-            throw new ValidationException( GlobalErrIds.CNTR_PARENT_INVLD, error );
-        }
-        
-        if ( StringUtils.isNotEmpty( entity.getDescription() ) )
-        {
-            VUtil.description( entity.getDescription() );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/ldap/container/package.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/container/package.html b/src/main/java/org/apache/directory/fortress/core/ldap/container/package.html
deleted file mode 100755
index 3f386af..0000000
--- a/src/main/java/org/apache/directory/fortress/core/ldap/container/package.html
+++ /dev/null
@@ -1,36 +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.
- *
--->
-<html>
-   <head>
-      <title>Package Documentation for org.apache.directory.fortress.ldap.container</title>
-   </head>
-   <body>
-      <p>
-         This package contains APIs to perform CRUD on fortress container objects in ldap.
-      </p>
-      <p>
-         The <b>org.apache.directory.fortress.ldap.container</b> package provides apis to add and
-          remove ldap <b>OrganizationalUnit</b> entries.  These entries are called 'containers'
-          and are used to organize related fortress nodes.  An example container is <b>ou=People</b> which will be placed as a
-          child node of the directory's ldap suffix, i.e. <b>dc=example,dc=com</b>.  The container is used to store subentries, i.e. <b>inetOrgPerson</b>.
-          These container APIs are used by buildup/teardown processes.
-      </p>
-   </body>
-</html>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/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
deleted file mode 100644
index bd45a25..0000000
--- a/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixDAO.java
+++ /dev/null
@@ -1,180 +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.ldap.suffix;
-
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.directory.api.ldap.model.constants.SchemaConstants;
-import org.apache.directory.api.ldap.model.cursor.CursorException;
-import org.apache.directory.api.ldap.model.entry.DefaultEntry;
-import org.apache.directory.api.ldap.model.entry.Entry;
-import org.apache.directory.api.ldap.model.exception.LdapException;
-import org.apache.directory.fortress.core.model.Suffix;
-import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.fortress.core.ldap.ApacheDsDataProvider;
-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.RemoveException;
-
-
-/**
- * This class contains the Suffix node for OpenLDAP Directory Information Tree.
- * <br />The domain component object class is 'dcObject' <br />
- * <p/>
- * dcObject Auxiliary Object Class is used to store basic attributes like domain component names and description.
- * <ul>
- * <li>  ------------------------------------------
- * <li> <code># RFC 2247</code>
- * <li> <code>objectclass ( 1.3.6.1.4.1.1466.344 NAME 'dcObject'</code>
- * <li> <code>SUP top AUXILIARY MUST dc )</code>
- * <li>  ------------------------------------------
- * </ul>
- * <p/>
- * Following wikipedia excerpt describes usage of this object <a href="http://http://en.wikipedia.org/wiki/LDAP/">Wikipedia LDAP</a>
- * <font size="2" color="blue">
- * <blockquote>
- * <h3>
- * Naming structure
- * </h3>
- * Since an LDAP server can return referrals to other servers for requests the server itself will not/can not serve, a naming structure for LDAP entries is needed so one can find a server holding a given DN. Since such a structure already exists in the Domain name system (DNS), servers' top level names often mimic DNS names, as they do in X.500.
- * If an organization has domain name example.org, its top level LDAP entry will typically have the DN dc=example,dc=org (where dc means domain component). If the LDAP server is also named ldap.example.org, the organization's top level LDAP URL becomes ldap://ldap.example.org/dc=example,dc=org.
- * Below the top level, the entry names will typically reflect the organization's internal structure or needs rather than DNS names.
- * </blockquote>
- * </font>
- * <p/>
- * This class is thread safe.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-final class SuffixDAO extends ApacheDsDataProvider
-{
-    private static final String CLS_NM = SuffixDAO.class.getName();
-    private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
-    private static final String[] SUFFIX_OBJ_CLASS =
-        {
-            SchemaConstants.DC_OBJECT_OC, SchemaConstants.ORGANIZATION_OC
-    };
-
-
-    /**
-     * Package private default constructor.
-     */
-    SuffixDAO()
-    {
-    }
-
-
-    /**
-     * @param se
-     * @throws org.apache.directory.fortress.core.CreateException
-     */
-    void create( Suffix se )
-        throws CreateException
-    {
-        LdapConnection ld = null;
-        String nodeDn = getDn( se );
-        try
-        {
-            LOG.info( "create suffix dn [{}]", nodeDn );
-            Entry myEntry = new DefaultEntry( nodeDn );
-            myEntry.add( SchemaConstants.OBJECT_CLASS_AT, SUFFIX_OBJ_CLASS );
-            myEntry.add( SchemaConstants.DC_AT, se.getName() );
-            myEntry.add( SchemaConstants.O_AT, se.getDescription() );
-
-            ld = getAdminConnection();
-            add( ld, myEntry );
-        }
-        catch ( LdapException e )
-        {
-            String error = "create container node dn [" + nodeDn + "] caught LDAPException="
-                + e.getMessage();
-            throw new CreateException( GlobalErrIds.SUFX_CREATE_FAILED, error, e );
-        }
-        finally
-        {
-            closeAdminConnection( ld );
-        }
-    }
-
-
-    /**
-     * <p/>
-     * <font size="4" color="red">
-     * This method is destructive as it will remove all nodes below the suffix using recursive delete function.<BR>
-     * Extreme care should be taken during execution to ensure target directory is correct and permanent removal of data is intended.  There is no
-     * 'undo' for this operation.
-     * </font>
-     * <p/>
-     *
-     * @param se
-     * @throws org.apache.directory.fortress.core.RemoveException
-     */
-    void remove( Suffix se )
-        throws RemoveException
-    {
-        LdapConnection ld = null;
-        String nodeDn = getDn( se );
-        LOG.info( "remove suffix dn [{}]", nodeDn );
-        try
-        {
-            ld = getAdminConnection();
-            deleteRecursive( ld, nodeDn );
-        }
-        catch ( CursorException e )
-        {
-            String error = "remove suffix node dn [" + nodeDn + "] caught CursorException="
-                + e.getMessage();
-            throw new RemoveException( GlobalErrIds.SUFX_DELETE_FAILED, error, e );
-        }
-        catch ( LdapException e )
-        {
-            String error = "remove suffix node dn [" + nodeDn + "] caught LDAPException="
-                + e.getMessage();
-            throw new RemoveException( GlobalErrIds.SUFX_DELETE_FAILED, error, e );
-        }
-        finally
-        {
-            closeAdminConnection( ld );
-        }
-    }
-
-
-    /**
-     *
-     * @param se
-     * @return
-     */
-    private String getDn( Suffix se )
-    {
-        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 ( StringUtils.isNotEmpty( se.getDc2() ) && !se.getDc2().equals( "${suffix.dc2}" ) )
-        {
-            dn += "," + SchemaConstants.DC_AT + "=" + se.getDc2();
-        }
-
-        LOG.debug( "suffix={}", dn );
-
-        return dn;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixP.java b/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixP.java
deleted file mode 100755
index 9b1f537..0000000
--- a/src/main/java/org/apache/directory/fortress/core/ldap/suffix/SuffixP.java
+++ /dev/null
@@ -1,148 +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.ldap.suffix;
-
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.ValidationException;
-import org.apache.directory.fortress.core.model.Suffix;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.GlobalIds;
-import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.model.VUtil;
-
-
-/**
- * Process module for the suffix or root node of Fortress directory structure. The suffix represents the topmost node in a directory information
- * tree.  For example dc=companyName,dc=com.  The suffix data is passed using {@link org.apache.directory.fortress.core.model.Suffix} class.  This class does perform simple data validations.
- * The {@link org.apache.directory.fortress.core.ant.FortressAntTask#addSuffixes()} method calls the {@link #add} from this class during initial base loads.
- * Removal {@link org.apache.directory.fortress.core.ant.FortressAntTask#deleteSuffixes()} is performed during regression tests and should never
- * be executed targeting production directory systems.<BR>
- * This class will accept {@link org.apache.directory.fortress.core.model.Suffix}, and forward on to it's corresponding DAO class {@link SuffixDAO} for add/delete of suffix.
- * <p>
- * Class will throw {@link org.apache.directory.fortress.core.SecurityException} to caller in the event of security policy, data constraint violation or system
- * error internal to DAO object. This class will forward DAO exceptions ({@link org.apache.directory.fortress.core.FinderException},
- * {@link org.apache.directory.fortress.core.CreateException},{@link org.apache.directory.fortress.core.UpdateException},{@link org.apache.directory.fortress.core.RemoveException}),
- *  or {@link org.apache.directory.fortress.core.ValidationException} as {@link org.apache.directory.fortress.core.SecurityException}s with appropriate
- * error id from {@link GlobalErrIds}.
- * <p>
- * <font size="3" color="red">
- * The {@link #delete} method in this class is destructive as it will remove all nodes below the suffix using recursive delete function.<BR>
- * Extreme care should be taken during execution to ensure target dn is correct and permanent removal of data is intended.  There is no
- * 'undo' for this operation.
- * </font>
- * <p/>
- * Simple error mapping is performed in {@link #validate} class.
- * <p/>
- * This class is thread safe.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class SuffixP
-{
-    private static final String CLS_NM = SuffixP.class.getName();
-    private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
-
-
-    /**
-     * Add a new suffix to the Directory Information Tree (DIT).  After added the
-     * node will be listed in domain component format, i.e. dc=companyName, dc=com, or dc=orgName, dc=org.
-     *
-     * @param suffix contains the dc name and top level dc for target node.
-     * @throws org.apache.directory.fortress.core.SecurityException in event of validation or system error.
-     */
-    public final void add( Suffix suffix )
-        throws SecurityException
-    {
-        validate( suffix );
-        SuffixDAO sDao = new SuffixDAO();
-        sDao.create( suffix );
-    }
-
-
-    /**
-     * Remove the suffix along with descendant nodes.  This is a destructive method which will remove all DIT nodes under
-     * the specified.
-     * <p/>
-     * <font size="2" color="red">
-     * This method is destructive and will remove all nodes below.<BR>
-     * Extreme care should be taken during execution to ensure target dn is correct and permanent removal of data is intended.  There is no
-     * 'undo' for this operation.
-     * </font>
-     * <p/>
-     *
-     * @param suffix contains the dc name and top level dc for target node.
-     * @throws SecurityException in event of validation or system error.
-     */
-    public final void delete( Suffix suffix )
-        throws SecurityException
-    {
-        validate( suffix );
-        SuffixDAO sDao = new SuffixDAO();
-        sDao.remove( suffix );
-    }
-
-
-    /**
-     * Method will perform simple validations to ensure the integrity of the {@link Suffix} entity targeted for insertion
-     * or deletion in directory.
-     *
-     * @param entity contains the enum type to validate
-     * @throws org.apache.directory.fortress.core.SecurityException thrown in the event the attribute is null.
-     */
-    private void validate( Suffix entity )
-        throws SecurityException
-    {
-        if ( entity.getName().length() > GlobalIds.OU_LEN )
-        {
-            String name = entity.getName();
-            String error = "validate name [" + name + "] invalid length [" + entity.getName().length() + "]";
-            LOG.warn( error );
-            throw new ValidationException( GlobalErrIds.SUFX_NAME_INVLD, error );
-        }
-        if ( !StringUtils.isNotEmpty( entity.getName() ) )
-        {
-            String error = "validate name validation failed, null or empty value";
-            LOG.warn( error );
-            throw new ValidationException( GlobalErrIds.SUFX_NAME_NULL, error );
-        }
-        if ( entity.getDc().length() > GlobalIds.OU_LEN )
-        {
-            String name = entity.getName();
-            String error = "validate dc [" + name + "] invalid length [" + entity.getName().length() + "]";
-            LOG.warn( error );
-            throw new ValidationException( GlobalErrIds.SUFX_DCTOP_INVLD, error );
-        }
-        if ( !StringUtils.isNotEmpty( entity.getDc() ) )
-        {
-            String error = "validate dc validation failed, null or empty value";
-            LOG.warn( error );
-            throw new ValidationException( GlobalErrIds.SUFX_DCTOP_NULL, error );
-        }
-        VUtil.safeText( entity.getDescription(), GlobalIds.DESC_LEN );
-        if ( StringUtils.isNotEmpty( entity.getDescription() ) )
-        {
-            VUtil.description( entity.getDescription() );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/ldap/suffix/package.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/suffix/package.html b/src/main/java/org/apache/directory/fortress/core/ldap/suffix/package.html
deleted file mode 100755
index a5d398c..0000000
--- a/src/main/java/org/apache/directory/fortress/core/ldap/suffix/package.html
+++ /dev/null
@@ -1,38 +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.
- *
--->
-<html>
-   <head>
-      <title>Package Documentation for org.apache.directory.fortress.ldap.suffix</title>
-   </head>
-   <body>
-      <p>
-         This package contains APIs to perform create and teardown the ldap suffix node.
-      </p>
-      <p>
-         Care must be taken when performing the delete api as it is destructive and will attempt to
-          recursively remove all nodes below the suffix.  This delete is not intended as safe for
-          teardown on large, production data sets.  The delete is safe for teardown of smaller directory as in initial base loads and/or regression
-          testing operations.
-          The <b>org.apache.directory.fortress.ldap.suffix</b> package provides apis to add and remove suffix node, <b>dcObject</b>.
-          The suffix node is also called 'root' or 'baseDn' and is the uppermost node within a particular Directory Information Tree.
-          Example of valid suffix nodes is <b>dc=example,dc=com</b>.  The container nodes will be located as direct descendants of the suffix.
-      </p>
-   </body>
-</html>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/model/RegExUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/model/RegExUtil.java b/src/main/java/org/apache/directory/fortress/core/model/RegExUtil.java
deleted file mode 100755
index 8aba97e..0000000
--- a/src/main/java/org/apache/directory/fortress/core/model/RegExUtil.java
+++ /dev/null
@@ -1,87 +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.model;
-
-
-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.ValidationException;
-import org.apache.directory.fortress.core.util.Config;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-/**
- *  Regular expression utilities to perform data validations on Fortress attributes.  These utils use the standard
- * java regular expression library.
- *
- * @author     Shawn McKinney
- */
-final class RegExUtil
-{
-    private static final String CLS_NM = RegExUtil.class.getName();
-    private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
-    private static final String SAFE_TEXT_PATTERN_STRING = Config.getProperty( GlobalIds.REG_EX_SAFE_TEXT );
-    private static Pattern safeTextPattern;
-    
-    static 
-    {
-        if ( ( SAFE_TEXT_PATTERN_STRING != null ) && ( SAFE_TEXT_PATTERN_STRING.length() != 0 ) )
-        {
-            safeTextPattern = Pattern.compile( SAFE_TEXT_PATTERN_STRING );
-        }
-    }
-
-    /**
-     * Private constructor
-     *
-     */
-    private RegExUtil()
-    {
-    }
-
-    /**
-     *  Perform safe text validation on character string.
-     *
-     * @param  value Contains the string to check.
-     * @exception org.apache.directory.fortress.core.ValidationException  In the event the data validation fails.
-     */
-    public static void safeText( String value ) throws ValidationException
-    {
-        if ( Strings.isEmpty( SAFE_TEXT_PATTERN_STRING ) )
-        {
-            LOG.debug( "safeText can't find safeText regular expression pattern.  Check your Fortress cfg" );
-        }
-        else
-        {
-            Matcher safeTextMatcher = safeTextPattern.matcher( value );
-            
-            if ( !safeTextMatcher.find() )
-            {
-                String error = "safeText has detected invalid value [" + value + "]";
-                throw new ValidationException( GlobalErrIds.CONST_INVLD_TEXT, error );
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/model/VUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/model/VUtil.java b/src/main/java/org/apache/directory/fortress/core/model/VUtil.java
deleted file mode 100755
index 93b6855..0000000
--- a/src/main/java/org/apache/directory/fortress/core/model/VUtil.java
+++ /dev/null
@@ -1,605 +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.model;
-
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.ObjUtil;
-import org.slf4j.LoggerFactory;
-import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.GlobalIds;
-import org.apache.directory.fortress.core.ValidationException;
-import org.apache.directory.fortress.core.util.Config;
-
-
-/**
- * This class contains simple data validation utilities.  The data validations include null, length
- * and simple reasonability checking.  All utilities will throw {@link ValidationException} for failures.
- */
-public final class VUtil
-{
-    private static final String CLS_NM = VUtil.class.getName();
-    private static final org.slf4j.Logger LOG = LoggerFactory.getLogger( CLS_NM );
-    private static int maximumFieldLen = 130;
-    private static final String VALIDATE_LENGTH = "field.length";
-
-    static
-    {
-        String lengthProp = Config.getProperty( VALIDATE_LENGTH );
-        try
-        {
-            if ( lengthProp != null )
-            {
-                Integer len = Integer.valueOf( lengthProp );
-                maximumFieldLen = len;
-            }
-        }
-        catch ( java.lang.NumberFormatException nfe )
-        {
-            //ignore
-        }
-    }
-
-    private static final int MAXIMUM_FIELD_LEN = maximumFieldLen;
-    private static final int maxFieldLength = MAXIMUM_FIELD_LEN;
-    private static final int TIME_LEN = 4;
-    private static final int DATE_LEN = 8;
-    private static final int DAYMASK_LEN = 7;
-    private static final String TIME_FORMAT = "HHmm";
-    private static final String DATE_FORMAT = "yyyyMMdd";
-    private static final char SUNDAY = '1';
-    private static final char SATURDAY = '7';
-    private static final SimpleDateFormat TIME_FORMATER = new SimpleDateFormat( TIME_FORMAT );
-    private static final SimpleDateFormat DATE_FORMATER = new SimpleDateFormat( DATE_FORMAT );
-
-    static
-    {
-        String lengthProp = Config.getProperty( VALIDATE_LENGTH );
-
-        if ( lengthProp != null )
-        {
-            maximumFieldLen = Integer.parseInt( lengthProp );
-        }
-
-        TIME_FORMATER.setLenient( false );
-        DATE_FORMATER.setLenient( false );
-    }
-
-    /**
-     * Private constructor
-     *
-     */
-    private VUtil()
-    {
-    }
-
-    /**
-     * Simple length check on orgunit that uses {@link org.apache.directory.fortress.core.GlobalIds#OU_LEN}.
-     *
-     * @param orgUnitId contains the ou name.
-     * @throws ValidationException in the event of failure, {@link org.apache.directory.fortress.core.GlobalErrIds#ORG_LEN_INVLD}.
-     */
-    public static void orgUnit( String orgUnitId ) throws ValidationException
-    {
-        if ( !StringUtils.isNotEmpty( orgUnitId ) )
-        {
-            String error = "orgUnit is null";
-            throw new ValidationException( GlobalErrIds.ORG_NULL, error );
-        }
-        int length = orgUnitId.length();
-
-        if ( length > maxFieldLength )
-        {
-            String error = "orgUnit value [" + orgUnitId + "] invalid length [" + length + "]";
-            throw new ValidationException( GlobalErrIds.ORG_LEN_INVLD, error );
-        }
-    }
-
-
-    /**
-     * Simple length check on User password that uses {@link org.apache.directory.fortress.core.GlobalIds#PASSWORD_LEN}.
-     * @param password contains the User's password.
-     * @throws ValidationException in the event of failure, {@link org.apache.directory.fortress.core.GlobalErrIds#USER_PW_INVLD_LEN}.
-     */
-    public static void password( char[] password ) throws ValidationException
-    {
-        int length = password.length;
-
-        if ( length > GlobalIds.PASSWORD_LEN )
-        {
-            String error = "password invalid length [" + length + "]";
-            throw new ValidationException( GlobalErrIds.USER_PW_INVLD_LEN, error );
-        }
-    }
-
-
-    /**
-     * Simple length check and safe text validation on description field that uses {@link org.apache.directory.fortress.core.GlobalIds#DESC_LEN}.
-     *
-     * @param value contains the entity description.
-     * @throws org.apache.directory.fortress.core.ValidationException
-     *          in the event of failure, {@link org.apache.directory.fortress.core.GlobalErrIds#CONST_DESC_LEN_INVLD}.
-     */
-    public static void description( String value ) throws ValidationException
-    {
-        int length = value.length();
-
-        if ( length > GlobalIds.DESC_LEN )
-        {
-            String error = "description value [" + value + "] invalid length [" + length + "]";
-            throw new ValidationException( GlobalErrIds.CONST_DESC_LEN_INVLD, error );
-        }
-
-        RegExUtil.safeText( value );
-    }
-
-
-    /**
-     * Perform a simple length and safe text validation.
-     *
-     * @param value contains the attribute to check.
-     * @param validLen contains the length to use.
-     * @throws ValidationException in the event of length {@link org.apache.directory.fortress.core.GlobalErrIds#CONST_INVLD_FIELD_LEN} or regex failure.
-     */
-    public static void safeText( String value, int validLen ) throws ValidationException
-    {
-        if ( !StringUtils.isNotEmpty( value ) )
-        {
-            String error = "safeText null value";
-            throw new ValidationException( GlobalErrIds.CONST_NULL_TEXT, error );
-        }
-
-        int length = value.length();
-
-        if ( length > validLen )
-        {
-            String error = "safeText value [" + value + "] invalid length [" + length + "]";
-            throw new ValidationException( GlobalErrIds.CONST_INVLD_FIELD_LEN, error );
-        }
-
-        RegExUtil.safeText( value );
-    }
-
-
-    /**
-     * Simple null, {@link org.apache.directory.fortress.core.GlobalErrIds#USER_ID_NULL}, and length checks, {@link org.apache.directory.fortress.core.GlobalErrIds#CONST_INVLD_FIELD_LEN}, on userId.
-     *
-     * @param userId contains the userId, maps to {@link org.apache.directory.fortress.core.model.User#userId}.
-     * @throws ValidationException in the event of failure, {@link GlobalErrIds#CONST_INVLD_FIELD_LEN}.
-     */
-    public static void userId( String userId ) throws ValidationException
-    {
-        if ( !StringUtils.isNotEmpty( userId ) )
-        {
-            String error = "userId validation failed, null or empty value";
-            throw new ValidationException( GlobalErrIds.USER_ID_NULL, error );
-        }
-
-        int length = userId.length();
-
-        if ( length > GlobalIds.USERID_LEN )
-        {
-            String error = "safeText value [" + userId + "] invalid length [" + length + "]";
-            throw new ValidationException( GlobalErrIds.CONST_INVLD_FIELD_LEN, error );
-        }
-    }
-
-
-    /**
-     * Perform simple length and safe text validations on collection of name-value pairs.
-     *
-     * @param props contains name-value pairs in {@code name:value} format.
-     * @throws ValidationException in the event of failure.
-     */
-    public static void properties( Properties props ) throws ValidationException
-    {
-        if ( ObjUtil.isNotNullOrEmpty( props ) )
-        {
-            for ( Enumeration<?> e = props.propertyNames(); e.hasMoreElements(); )
-            {
-                String key = ( String ) e.nextElement();
-                String val = props.getProperty( key );
-                safeText( key, GlobalIds.PROP_LEN );
-                safeText( val, GlobalIds.PROP_LEN );
-            }
-        }
-    }
-
-
-    /**
-     * Perform simple reasonability check on contraint timeout value.
-     *
-     * @param timeout must be greater than 0 and less than max value for {@link Integer#MAX_VALUE}
-     * @throws org.apache.directory.fortress.core.ValidationException
-     *          in the event value falls out of range.
-     */
-    public static void timeout( Integer timeout ) throws ValidationException
-    {
-        if ( ( timeout < 0 ) || ( timeout >= Integer.MAX_VALUE ) )
-        {
-            String error = "timeout - invalid timeout value [" + timeout + "]";
-            throw new ValidationException( GlobalErrIds.CONST_TIMEOUT_INVLD, error );
-        }
-    }
-
-
-    /**
-     * Perform simple reasonability check on contraint beginTime value.
-     *
-     * @param beginTime if set, must be equal to {@link #TIME_LEN}.
-     * @throws org.apache.directory.fortress.core.ValidationException
-     *          in the event value falls out of range.
-     */
-    public static void beginTime( String beginTime ) throws ValidationException
-    {
-        if ( ( beginTime != null ) && ( beginTime.length() == TIME_LEN ) )
-        {
-            if ( checkTime( beginTime ) )
-            {
-                String error = "beginTime - invalid beginTime value [" + beginTime + "]";
-                throw new ValidationException( GlobalErrIds.CONST_BEGINTIME_INVLD, error );
-            }
-        }
-        else
-        {
-            String error = "beginTime - null or invalid length (must be 4) for beginTime value";
-            throw new ValidationException( GlobalErrIds.CONST_BEGINTIME_LEN_ERR, error );
-        }
-    }
-
-
-    /**
-     * Perform simple reasonability check on contraint endTime value.
-     * @param endTime if set, must be equal to {@link #TIME_LEN}.
-     * @throws ValidationException in the event value falls out of range.
-     */
-    public static void endTime( String endTime ) throws ValidationException
-    {
-        if ( ( endTime != null ) && ( endTime.length() == TIME_LEN ) )
-        {
-            if ( checkTime( endTime ) )
-            {
-                String error = "endTime - invalid endTime value [" + endTime + "]";
-                throw new ValidationException( GlobalErrIds.CONST_ENDTIME_INVLD, error );
-            }
-        }
-        else
-        {
-            String error = "endTime - null or invalid length (must be 4) for endTime value";
-            throw new ValidationException( GlobalErrIds.CONST_ENDTIME_LEN_ERR, error );
-        }
-    }
-
-
-    /**
-     * Perform simple reasonability check on contraint beginDate value.
-     * @param beginDate if set, must be equal to {@link #DATE_LEN}.
-     * @throws ValidationException in the event value falls out of range.
-     */
-    public static void beginDate( String beginDate )
-        throws ValidationException
-    {
-        if ( StringUtils.isNotEmpty( beginDate ) )
-        {
-            if ( ( beginDate.compareToIgnoreCase( GlobalIds.NONE ) != 0 ) &&
-                ( ( beginDate.length() != DATE_LEN ) || checkDate( beginDate ) ) )
-            {
-                String error = "beginDate - invalid beginDate value [" + beginDate + "]";
-                throw new ValidationException( GlobalErrIds.CONST_BEGINDATE_INVLD, error );
-            }
-        }
-        else
-        {
-            String error = "beginDate - null or empty beginDate value";
-            throw new ValidationException( GlobalErrIds.CONST_BEGINDATE_NULL, error );
-        }
-    }
-
-
-    /**
-     * Perform simple reasonability check on contraint endDate value.
-     * @param endDate if set, must be equal to {@link #DATE_LEN}.
-     * @throws ValidationException in the event value falls out of range.
-     */
-    public static void endDate( String endDate ) throws ValidationException
-    {
-        if ( StringUtils.isNotEmpty( endDate ) )
-        {
-            if ( endDate.compareToIgnoreCase( GlobalIds.NONE ) != 0 )
-            {
-                if ( endDate.length() != DATE_LEN || checkDate( endDate ) )
-                {
-                    String error = "endDate - invalid endDate value [" + endDate + "]";
-                    throw new ValidationException( GlobalErrIds.CONST_ENDDATE_INVLD, error );
-                }
-            }
-        }
-        else
-        {
-            String error = "endDate - null or empty endDate value";
-            throw new ValidationException( GlobalErrIds.CONST_ENDDATE_NULL, error );
-        }
-    }
-
-
-    /**
-     * Perform simple reasonability check on contraint dayMask value.
-     * @param dayMask if set, will be validated.
-     * @throws ValidationException in the event value falls out of range.
-     */
-    public static void dayMask( String dayMask ) throws ValidationException
-    {
-        if ( StringUtils.isNotEmpty( dayMask ) )
-        {
-            if ( dayMask.compareToIgnoreCase( GlobalIds.ALL ) != 0 )
-            {
-                if ( dayMask.length() > DAYMASK_LEN || checkMask( dayMask ) )
-                {
-                    String error = "dayMask - invalid dayMask value [" + dayMask + "]";
-                    throw new ValidationException( GlobalErrIds.CONST_DAYMASK_INVLD, error );
-                }
-            }
-        }
-        else
-        {
-            String error = "dayMask - null or empty dayMask value";
-            throw new ValidationException( GlobalErrIds.CONST_DAYMASK_NULL, error );
-        }
-    }
-
-
-    /**
-     * @param time
-     * @return boolean
-     */
-    private static boolean checkTime( String time )
-    {
-        try
-        {
-            synchronized ( TIME_FORMATER )
-            {
-                TIME_FORMATER.parse( time );
-                return false;
-            }
-        }
-        catch ( ParseException pe )
-        {
-            String error = "checkTime - time [" + time + "] failed validation with ParseException=" + pe;
-            LOG.warn( error );
-            return true;
-        }
-    }
-
-
-    /**
-     * @param date
-     * @return boolean
-     */
-    private static boolean checkDate( String date )
-    {
-        try
-        {
-            synchronized ( DATE_FORMATER )
-            {
-                DATE_FORMATER.parse( date );
-                return false;
-            }
-        }
-        catch ( ParseException pe )
-        {
-            String error = "checkDate - date [" + date + "] failed validation with ParseException=" + pe;
-            LOG.warn( error );
-
-            return true;
-        }
-    }
-
-
-    /**
-     * @param mask
-     * @return boolean
-     */
-    private static boolean checkMask( String mask )
-    {
-        for ( char c : mask.toCharArray() )
-        {
-            if ( ( c < SUNDAY ) || ( c > SATURDAY ) )
-            {
-                String error = "checkMask - mask [" + mask + "] failed validation";
-                LOG.warn( error );
-
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-
-    /**
-     * Method will throw exception with supplied error id and object.method name if object reference is null.
-     *
-     * @param obj       contains the reference to check.
-     * @param errorCode contains the error id to use if null.
-     * @param method contains the method name of caller.
-     * @throws ValidationException in the event object is null.
-     */
-    public static void assertNotNull( Object obj, int errorCode, String method )
-        throws ValidationException
-    {
-        if ( obj == null )
-        {
-            String error = "assertContext detected null entity for method [" + method + "], error code ["
-                + errorCode + "]";
-            throw new ValidationException( errorCode, error );
-        }
-    }
-
-
-    /**
-     * Method will throw exception with supplied error id and object.method name if string reference is null or empty.
-     *
-     * @param value     contains the reference to check.
-     * @param errorCode contains the error id to use if null.
-     * @param method contains the method name of caller.
-     * @throws ValidationException in the event supplied string is null or empty.
-     */
-    public static void assertNotNullOrEmpty( String value, int errorCode, String method )
-        throws ValidationException
-    {
-        if ( !StringUtils.isNotEmpty( value ) )
-        {
-            String error = "assertContext detected null entity for method [" + method + "], error code ["
-                + errorCode + "]";
-            throw new ValidationException( errorCode, error );
-        }
-    }
-
-
-    /**
-     * Method will throw exception with supplied error id and object.method name if string reference is null or empty.
-     *
-     * @param value     contains the reference to check.
-     * @param errorCode contains the error id to use if null.
-     * @param method contains the method name of caller.
-     * @throws ValidationException in the event supplied string is null or empty.
-     */
-    public static void assertNotNullOrEmpty( char[] value, int errorCode, String method )
-        throws ValidationException
-    {
-        if ( !ObjUtil.isNotNullOrEmpty( value ) )
-        {
-            String error = "assertContext detected null entity for method [" + method + "], error code ["
-                + errorCode + "]";
-            throw new ValidationException( errorCode, error );
-        }
-    }
-
-
-/*
-    */
-/**
-     * Method will return true if string array reference is not null or empty.
-     *
-     * @param value contains the reference to string array.
-     * @return boolean if validation succeeds.
-     *//*
-
-    public static boolean isNotNullOrEmpty( String[] value )
-    {
-        return ( value != null ) && ( value.length > 0 );
-    }
-
-
-    */
-/**
-     * Method will return true if string reference is not null or empty.
-     *
-     * @param value contains the reference to string.
-     * @return boolean if validation succeeds.
-     *//*
-
-    public static boolean isNotNullOrEmpty( char[] value )
-    {
-        return ( value != null ) && ( value.length > 0 );
-    }
-
-
-    */
-/**
-     * Method will return true if list is not null or empty.
-     *
-     * @param list contains the reference to list.
-     * @return boolean if validation succeeds.
-     *//*
-
-    public static boolean isNotNullOrEmpty( Collection<?> list )
-    {
-        return ( list != null ) && ( list.size() > 0 );
-    }
-
-
-    */
-/**
-     * Method will return true if props is not null or empty.
-     *
-     * @param props contains the reference to props.
-     * @return boolean if validation succeeds.
-     *//*
-
-    public static boolean isNotNullOrEmpty( Properties props )
-    {
-        return ( props != null ) && ( props.size() > 0 );
-    }
-
-
-    */
-/**
-     * Method will return true if input is not null or empty.
-     *
-     * @param iVal contains the reference to Integer variable.
-     * @return boolean if validation succeeds.
-     *//*
-
-    public static boolean isNotNullOrEmpty( Integer iVal )
-    {
-        return ( iVal != null );
-    }
-
-
-    */
-/**
-     * Method will return true if input is not null or empty.
-     *
-     * @param bVal contains the reference to Boolean variable.
-     * @return boolean if validation succeeds.
-     *//*
-
-    public static boolean isNotNullOrEmpty( Boolean bVal )
-    {
-        return ( bVal != null );
-    }
-
-
-    */
-/**
-     * Method will return true if byte array reference is not null or empty.
-     *
-     * @param value contains the reference to byte array.
-     * @return boolean if validation succeeds.
-     *//*
-
-    public static boolean isNotNullOrEmpty( byte[] value )
-    {
-        boolean result = false;
-        if ( value != null && value.length > 0 )
-        {
-            result = true;
-        }
-        return result;
-    }
-*/
-}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/rest/AccessMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/AccessMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/AccessMgrRestImpl.java
index 1137b6b..c59755b 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/AccessMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/AccessMgrRestImpl.java
@@ -30,7 +30,7 @@ import org.apache.directory.fortress.core.model.Permission;
 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.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 import java.util.List;
 import java.util.Set;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/rest/AdminMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/AdminMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/AdminMgrRestImpl.java
index bbd68ff..382ce4d 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/AdminMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/AdminMgrRestImpl.java
@@ -34,7 +34,7 @@ import org.apache.directory.fortress.core.model.SDSet;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.UserRole;
 import org.apache.directory.fortress.core.impl.Manageable;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/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 ca62f90..0e86603 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
@@ -29,7 +29,7 @@ import org.apache.directory.fortress.core.model.FortResponse;
 import org.apache.directory.fortress.core.impl.Manageable;
 import org.apache.directory.fortress.core.model.Mod;
 import org.apache.directory.fortress.core.model.UserAudit;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 import java.util.ArrayList;
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/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 c14ac17..d1a0b79 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
@@ -25,7 +25,7 @@ import org.apache.directory.fortress.core.ConfigMgr;
 import org.apache.directory.fortress.core.model.FortRequest;
 import org.apache.directory.fortress.core.model.FortResponse;
 import org.apache.directory.fortress.core.model.Props;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 import java.util.Properties;
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/rest/DelAccessMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/DelAccessMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/DelAccessMgrRestImpl.java
index d1582b7..22da01a 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/DelAccessMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/DelAccessMgrRestImpl.java
@@ -30,7 +30,7 @@ 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.Role;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 import org.apache.directory.fortress.core.SecurityException;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/rest/DelAdminMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/DelAdminMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/DelAdminMgrRestImpl.java
index 9bea3a7..5be7d81 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/DelAdminMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/DelAdminMgrRestImpl.java
@@ -34,7 +34,7 @@ import org.apache.directory.fortress.core.model.Permission;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.UserAdminRole;
 import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/rest/DelReviewMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/DelReviewMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/DelReviewMgrRestImpl.java
index f10482d..bf21936 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/DelReviewMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/DelReviewMgrRestImpl.java
@@ -29,7 +29,7 @@ import org.apache.directory.fortress.core.impl.Manageable;
 import org.apache.directory.fortress.core.model.OrgUnit;
 import org.apache.directory.fortress.core.model.UserAdminRole;
 import org.apache.directory.fortress.core.model.User;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 import java.util.ArrayList;
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/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 e45c571..19eb5d1 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
@@ -27,7 +27,7 @@ import org.apache.directory.fortress.core.model.FortRequest;
 import org.apache.directory.fortress.core.model.FortResponse;
 import org.apache.directory.fortress.core.impl.Manageable;
 import org.apache.directory.fortress.core.model.PwPolicy;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 import java.util.List;
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/rest/ReviewMgrRestImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/ReviewMgrRestImpl.java b/src/main/java/org/apache/directory/fortress/core/rest/ReviewMgrRestImpl.java
index bda0d26..4ea350d 100755
--- a/src/main/java/org/apache/directory/fortress/core/rest/ReviewMgrRestImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/ReviewMgrRestImpl.java
@@ -32,7 +32,7 @@ import org.apache.directory.fortress.core.model.Role;
 import org.apache.directory.fortress.core.model.SDSet;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.UserRole;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 
 import java.util.ArrayList;
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java b/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java
new file mode 100755
index 0000000..db57530
--- /dev/null
+++ b/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java
@@ -0,0 +1,86 @@
+/*
+ *   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.api.util.Strings;
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.GlobalIds;
+import org.apache.directory.fortress.core.ValidationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+/**
+ *  Regular expression utilities to perform data validations on Fortress attributes.  These utils use the standard
+ * java regular expression library.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+final class RegExUtil
+{
+    private static final String CLS_NM = RegExUtil.class.getName();
+    private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
+    private static final String SAFE_TEXT_PATTERN_STRING = Config.getProperty( GlobalIds.REG_EX_SAFE_TEXT );
+    private static Pattern safeTextPattern;
+    
+    static 
+    {
+        if ( ( SAFE_TEXT_PATTERN_STRING != null ) && ( SAFE_TEXT_PATTERN_STRING.length() != 0 ) )
+        {
+            safeTextPattern = Pattern.compile( SAFE_TEXT_PATTERN_STRING );
+        }
+    }
+
+    /**
+     * Private constructor
+     *
+     */
+    private RegExUtil()
+    {
+    }
+
+    /**
+     *  Perform safe text validation on character string.
+     *
+     * @param  value Contains the string to check.
+     * @exception org.apache.directory.fortress.core.ValidationException  In the event the data validation fails.
+     */
+    static void safeText( String value ) throws ValidationException
+    {
+        if ( Strings.isEmpty( SAFE_TEXT_PATTERN_STRING ) )
+        {
+            LOG.debug( "safeText can't find safeText regular expression pattern.  Check your Fortress cfg" );
+        }
+        else
+        {
+            Matcher safeTextMatcher = safeTextPattern.matcher( value );
+            
+            if ( !safeTextMatcher.find() )
+            {
+                String error = "safeText has detected invalid value [" + value + "]";
+                throw new ValidationException( GlobalErrIds.CONST_INVLD_TEXT, error );
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/main/java/org/apache/directory/fortress/core/util/VUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/VUtil.java b/src/main/java/org/apache/directory/fortress/core/util/VUtil.java
new file mode 100755
index 0000000..849c67e
--- /dev/null
+++ b/src/main/java/org/apache/directory/fortress/core/util/VUtil.java
@@ -0,0 +1,602 @@
+/*
+ *   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 java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.LoggerFactory;
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.GlobalIds;
+import org.apache.directory.fortress.core.ValidationException;
+
+
+/**
+ * This class contains simple data validation utilities.  The data validations include null, length
+ * and simple reasonability checking.  All utilities will throw {@link ValidationException} for failures.
+ */
+public final class VUtil
+{
+    private static final String CLS_NM = VUtil.class.getName();
+    private static final org.slf4j.Logger LOG = LoggerFactory.getLogger( CLS_NM );
+    private static int maximumFieldLen = 130;
+    private static final String VALIDATE_LENGTH = "field.length";
+
+    static
+    {
+        String lengthProp = Config.getProperty( VALIDATE_LENGTH );
+        try
+        {
+            if ( lengthProp != null )
+            {
+                Integer len = Integer.valueOf( lengthProp );
+                maximumFieldLen = len;
+            }
+        }
+        catch ( java.lang.NumberFormatException nfe )
+        {
+            //ignore
+        }
+    }
+
+    private static final int MAXIMUM_FIELD_LEN = maximumFieldLen;
+    private static final int maxFieldLength = MAXIMUM_FIELD_LEN;
+    private static final int TIME_LEN = 4;
+    private static final int DATE_LEN = 8;
+    private static final int DAYMASK_LEN = 7;
+    private static final String TIME_FORMAT = "HHmm";
+    private static final String DATE_FORMAT = "yyyyMMdd";
+    private static final char SUNDAY = '1';
+    private static final char SATURDAY = '7';
+    private static final SimpleDateFormat TIME_FORMATER = new SimpleDateFormat( TIME_FORMAT );
+    private static final SimpleDateFormat DATE_FORMATER = new SimpleDateFormat( DATE_FORMAT );
+
+    static
+    {
+        String lengthProp = Config.getProperty( VALIDATE_LENGTH );
+
+        if ( lengthProp != null )
+        {
+            maximumFieldLen = Integer.parseInt( lengthProp );
+        }
+
+        TIME_FORMATER.setLenient( false );
+        DATE_FORMATER.setLenient( false );
+    }
+
+    /**
+     * Private constructor
+     *
+     */
+    private VUtil()
+    {
+    }
+
+    /**
+     * Simple length check on orgunit that uses {@link org.apache.directory.fortress.core.GlobalIds#OU_LEN}.
+     *
+     * @param orgUnitId contains the ou name.
+     * @throws ValidationException in the event of failure, {@link org.apache.directory.fortress.core.GlobalErrIds#ORG_LEN_INVLD}.
+     */
+    public static void orgUnit( String orgUnitId ) throws ValidationException
+    {
+        if ( !StringUtils.isNotEmpty( orgUnitId ) )
+        {
+            String error = "orgUnit is null";
+            throw new ValidationException( GlobalErrIds.ORG_NULL, error );
+        }
+        int length = orgUnitId.length();
+
+        if ( length > maxFieldLength )
+        {
+            String error = "orgUnit value [" + orgUnitId + "] invalid length [" + length + "]";
+            throw new ValidationException( GlobalErrIds.ORG_LEN_INVLD, error );
+        }
+    }
+
+
+    /**
+     * Simple length check on User password that uses {@link org.apache.directory.fortress.core.GlobalIds#PASSWORD_LEN}.
+     * @param password contains the User's password.
+     * @throws ValidationException in the event of failure, {@link org.apache.directory.fortress.core.GlobalErrIds#USER_PW_INVLD_LEN}.
+     */
+    public static void password( char[] password ) throws ValidationException
+    {
+        int length = password.length;
+
+        if ( length > GlobalIds.PASSWORD_LEN )
+        {
+            String error = "password invalid length [" + length + "]";
+            throw new ValidationException( GlobalErrIds.USER_PW_INVLD_LEN, error );
+        }
+    }
+
+
+    /**
+     * Simple length check and safe text validation on description field that uses {@link org.apache.directory.fortress.core.GlobalIds#DESC_LEN}.
+     *
+     * @param value contains the entity description.
+     * @throws org.apache.directory.fortress.core.ValidationException
+     *          in the event of failure, {@link org.apache.directory.fortress.core.GlobalErrIds#CONST_DESC_LEN_INVLD}.
+     */
+    public static void description( String value ) throws ValidationException
+    {
+        int length = value.length();
+
+        if ( length > GlobalIds.DESC_LEN )
+        {
+            String error = "description value [" + value + "] invalid length [" + length + "]";
+            throw new ValidationException( GlobalErrIds.CONST_DESC_LEN_INVLD, error );
+        }
+
+        RegExUtil.safeText( value );
+    }
+
+
+    /**
+     * Perform a simple length and safe text validation.
+     *
+     * @param value contains the attribute to check.
+     * @param validLen contains the length to use.
+     * @throws ValidationException in the event of length {@link org.apache.directory.fortress.core.GlobalErrIds#CONST_INVLD_FIELD_LEN} or regex failure.
+     */
+    public static void safeText( String value, int validLen ) throws ValidationException
+    {
+        if ( !StringUtils.isNotEmpty( value ) )
+        {
+            String error = "safeText null value";
+            throw new ValidationException( GlobalErrIds.CONST_NULL_TEXT, error );
+        }
+
+        int length = value.length();
+
+        if ( length > validLen )
+        {
+            String error = "safeText value [" + value + "] invalid length [" + length + "]";
+            throw new ValidationException( GlobalErrIds.CONST_INVLD_FIELD_LEN, error );
+        }
+
+        RegExUtil.safeText( value );
+    }
+
+
+    /**
+     * Simple null, {@link org.apache.directory.fortress.core.GlobalErrIds#USER_ID_NULL}, and length checks, {@link org.apache.directory.fortress.core.GlobalErrIds#CONST_INVLD_FIELD_LEN}, on userId.
+     *
+     * @param userId contains the userId, maps to {@link org.apache.directory.fortress.core.model.User#userId}.
+     * @throws ValidationException in the event of failure, {@link GlobalErrIds#CONST_INVLD_FIELD_LEN}.
+     */
+    public static void userId( String userId ) throws ValidationException
+    {
+        if ( !StringUtils.isNotEmpty( userId ) )
+        {
+            String error = "userId validation failed, null or empty value";
+            throw new ValidationException( GlobalErrIds.USER_ID_NULL, error );
+        }
+
+        int length = userId.length();
+
+        if ( length > GlobalIds.USERID_LEN )
+        {
+            String error = "safeText value [" + userId + "] invalid length [" + length + "]";
+            throw new ValidationException( GlobalErrIds.CONST_INVLD_FIELD_LEN, error );
+        }
+    }
+
+
+    /**
+     * Perform simple length and safe text validations on collection of name-value pairs.
+     *
+     * @param props contains name-value pairs in {@code name:value} format.
+     * @throws ValidationException in the event of failure.
+     */
+    public static void properties( Properties props ) throws ValidationException
+    {
+        if ( ObjUtil.isNotNullOrEmpty( props ) )
+        {
+            for ( Enumeration<?> e = props.propertyNames(); e.hasMoreElements(); )
+            {
+                String key = ( String ) e.nextElement();
+                String val = props.getProperty( key );
+                safeText( key, GlobalIds.PROP_LEN );
+                safeText( val, GlobalIds.PROP_LEN );
+            }
+        }
+    }
+
+
+    /**
+     * Perform simple reasonability check on contraint timeout value.
+     *
+     * @param timeout must be greater than 0 and less than max value for {@link Integer#MAX_VALUE}
+     * @throws org.apache.directory.fortress.core.ValidationException
+     *          in the event value falls out of range.
+     */
+    public static void timeout( Integer timeout ) throws ValidationException
+    {
+        if ( ( timeout < 0 ) || ( timeout >= Integer.MAX_VALUE ) )
+        {
+            String error = "timeout - invalid timeout value [" + timeout + "]";
+            throw new ValidationException( GlobalErrIds.CONST_TIMEOUT_INVLD, error );
+        }
+    }
+
+
+    /**
+     * Perform simple reasonability check on contraint beginTime value.
+     *
+     * @param beginTime if set, must be equal to {@link #TIME_LEN}.
+     * @throws org.apache.directory.fortress.core.ValidationException
+     *          in the event value falls out of range.
+     */
+    public static void beginTime( String beginTime ) throws ValidationException
+    {
+        if ( ( beginTime != null ) && ( beginTime.length() == TIME_LEN ) )
+        {
+            if ( checkTime( beginTime ) )
+            {
+                String error = "beginTime - invalid beginTime value [" + beginTime + "]";
+                throw new ValidationException( GlobalErrIds.CONST_BEGINTIME_INVLD, error );
+            }
+        }
+        else
+        {
+            String error = "beginTime - null or invalid length (must be 4) for beginTime value";
+            throw new ValidationException( GlobalErrIds.CONST_BEGINTIME_LEN_ERR, error );
+        }
+    }
+
+
+    /**
+     * Perform simple reasonability check on contraint endTime value.
+     * @param endTime if set, must be equal to {@link #TIME_LEN}.
+     * @throws ValidationException in the event value falls out of range.
+     */
+    public static void endTime( String endTime ) throws ValidationException
+    {
+        if ( ( endTime != null ) && ( endTime.length() == TIME_LEN ) )
+        {
+            if ( checkTime( endTime ) )
+            {
+                String error = "endTime - invalid endTime value [" + endTime + "]";
+                throw new ValidationException( GlobalErrIds.CONST_ENDTIME_INVLD, error );
+            }
+        }
+        else
+        {
+            String error = "endTime - null or invalid length (must be 4) for endTime value";
+            throw new ValidationException( GlobalErrIds.CONST_ENDTIME_LEN_ERR, error );
+        }
+    }
+
+
+    /**
+     * Perform simple reasonability check on contraint beginDate value.
+     * @param beginDate if set, must be equal to {@link #DATE_LEN}.
+     * @throws ValidationException in the event value falls out of range.
+     */
+    public static void beginDate( String beginDate )
+        throws ValidationException
+    {
+        if ( StringUtils.isNotEmpty( beginDate ) )
+        {
+            if ( ( beginDate.compareToIgnoreCase( GlobalIds.NONE ) != 0 ) &&
+                ( ( beginDate.length() != DATE_LEN ) || checkDate( beginDate ) ) )
+            {
+                String error = "beginDate - invalid beginDate value [" + beginDate + "]";
+                throw new ValidationException( GlobalErrIds.CONST_BEGINDATE_INVLD, error );
+            }
+        }
+        else
+        {
+            String error = "beginDate - null or empty beginDate value";
+            throw new ValidationException( GlobalErrIds.CONST_BEGINDATE_NULL, error );
+        }
+    }
+
+
+    /**
+     * Perform simple reasonability check on contraint endDate value.
+     * @param endDate if set, must be equal to {@link #DATE_LEN}.
+     * @throws ValidationException in the event value falls out of range.
+     */
+    public static void endDate( String endDate ) throws ValidationException
+    {
+        if ( StringUtils.isNotEmpty( endDate ) )
+        {
+            if ( endDate.compareToIgnoreCase( GlobalIds.NONE ) != 0 )
+            {
+                if ( endDate.length() != DATE_LEN || checkDate( endDate ) )
+                {
+                    String error = "endDate - invalid endDate value [" + endDate + "]";
+                    throw new ValidationException( GlobalErrIds.CONST_ENDDATE_INVLD, error );
+                }
+            }
+        }
+        else
+        {
+            String error = "endDate - null or empty endDate value";
+            throw new ValidationException( GlobalErrIds.CONST_ENDDATE_NULL, error );
+        }
+    }
+
+
+    /**
+     * Perform simple reasonability check on contraint dayMask value.
+     * @param dayMask if set, will be validated.
+     * @throws ValidationException in the event value falls out of range.
+     */
+    public static void dayMask( String dayMask ) throws ValidationException
+    {
+        if ( StringUtils.isNotEmpty( dayMask ) )
+        {
+            if ( dayMask.compareToIgnoreCase( GlobalIds.ALL ) != 0 )
+            {
+                if ( dayMask.length() > DAYMASK_LEN || checkMask( dayMask ) )
+                {
+                    String error = "dayMask - invalid dayMask value [" + dayMask + "]";
+                    throw new ValidationException( GlobalErrIds.CONST_DAYMASK_INVLD, error );
+                }
+            }
+        }
+        else
+        {
+            String error = "dayMask - null or empty dayMask value";
+            throw new ValidationException( GlobalErrIds.CONST_DAYMASK_NULL, error );
+        }
+    }
+
+
+    /**
+     * @param time
+     * @return boolean
+     */
+    private static boolean checkTime( String time )
+    {
+        try
+        {
+            synchronized ( TIME_FORMATER )
+            {
+                TIME_FORMATER.parse( time );
+                return false;
+            }
+        }
+        catch ( ParseException pe )
+        {
+            String error = "checkTime - time [" + time + "] failed validation with ParseException=" + pe;
+            LOG.warn( error );
+            return true;
+        }
+    }
+
+
+    /**
+     * @param date
+     * @return boolean
+     */
+    private static boolean checkDate( String date )
+    {
+        try
+        {
+            synchronized ( DATE_FORMATER )
+            {
+                DATE_FORMATER.parse( date );
+                return false;
+            }
+        }
+        catch ( ParseException pe )
+        {
+            String error = "checkDate - date [" + date + "] failed validation with ParseException=" + pe;
+            LOG.warn( error );
+
+            return true;
+        }
+    }
+
+
+    /**
+     * @param mask
+     * @return boolean
+     */
+    private static boolean checkMask( String mask )
+    {
+        for ( char c : mask.toCharArray() )
+        {
+            if ( ( c < SUNDAY ) || ( c > SATURDAY ) )
+            {
+                String error = "checkMask - mask [" + mask + "] failed validation";
+                LOG.warn( error );
+
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+
+    /**
+     * Method will throw exception with supplied error id and object.method name if object reference is null.
+     *
+     * @param obj       contains the reference to check.
+     * @param errorCode contains the error id to use if null.
+     * @param method contains the method name of caller.
+     * @throws ValidationException in the event object is null.
+     */
+    public static void assertNotNull( Object obj, int errorCode, String method )
+        throws ValidationException
+    {
+        if ( obj == null )
+        {
+            String error = "assertContext detected null entity for method [" + method + "], error code ["
+                + errorCode + "]";
+            throw new ValidationException( errorCode, error );
+        }
+    }
+
+
+    /**
+     * Method will throw exception with supplied error id and object.method name if string reference is null or empty.
+     *
+     * @param value     contains the reference to check.
+     * @param errorCode contains the error id to use if null.
+     * @param method contains the method name of caller.
+     * @throws ValidationException in the event supplied string is null or empty.
+     */
+    public static void assertNotNullOrEmpty( String value, int errorCode, String method )
+        throws ValidationException
+    {
+        if ( !StringUtils.isNotEmpty( value ) )
+        {
+            String error = "assertContext detected null entity for method [" + method + "], error code ["
+                + errorCode + "]";
+            throw new ValidationException( errorCode, error );
+        }
+    }
+
+
+    /**
+     * Method will throw exception with supplied error id and object.method name if string reference is null or empty.
+     *
+     * @param value     contains the reference to check.
+     * @param errorCode contains the error id to use if null.
+     * @param method contains the method name of caller.
+     * @throws ValidationException in the event supplied string is null or empty.
+     */
+    public static void assertNotNullOrEmpty( char[] value, int errorCode, String method )
+        throws ValidationException
+    {
+        if ( !ObjUtil.isNotNullOrEmpty( value ) )
+        {
+            String error = "assertContext detected null entity for method [" + method + "], error code ["
+                + errorCode + "]";
+            throw new ValidationException( errorCode, error );
+        }
+    }
+
+
+/*
+    */
+/**
+     * Method will return true if string array reference is not null or empty.
+     *
+     * @param value contains the reference to string array.
+     * @return boolean if validation succeeds.
+     *//*
+
+    public static boolean isNotNullOrEmpty( String[] value )
+    {
+        return ( value != null ) && ( value.length > 0 );
+    }
+
+
+    */
+/**
+     * Method will return true if string reference is not null or empty.
+     *
+     * @param value contains the reference to string.
+     * @return boolean if validation succeeds.
+     *//*
+
+    public static boolean isNotNullOrEmpty( char[] value )
+    {
+        return ( value != null ) && ( value.length > 0 );
+    }
+
+
+    */
+/**
+     * Method will return true if list is not null or empty.
+     *
+     * @param list contains the reference to list.
+     * @return boolean if validation succeeds.
+     *//*
+
+    public static boolean isNotNullOrEmpty( Collection<?> list )
+    {
+        return ( list != null ) && ( list.size() > 0 );
+    }
+
+
+    */
+/**
+     * Method will return true if props is not null or empty.
+     *
+     * @param props contains the reference to props.
+     * @return boolean if validation succeeds.
+     *//*
+
+    public static boolean isNotNullOrEmpty( Properties props )
+    {
+        return ( props != null ) && ( props.size() > 0 );
+    }
+
+
+    */
+/**
+     * Method will return true if input is not null or empty.
+     *
+     * @param iVal contains the reference to Integer variable.
+     * @return boolean if validation succeeds.
+     *//*
+
+    public static boolean isNotNullOrEmpty( Integer iVal )
+    {
+        return ( iVal != null );
+    }
+
+
+    */
+/**
+     * Method will return true if input is not null or empty.
+     *
+     * @param bVal contains the reference to Boolean variable.
+     * @return boolean if validation succeeds.
+     *//*
+
+    public static boolean isNotNullOrEmpty( Boolean bVal )
+    {
+        return ( bVal != null );
+    }
+
+
+    */
+/**
+     * Method will return true if byte array reference is not null or empty.
+     *
+     * @param value contains the reference to byte array.
+     * @return boolean if validation succeeds.
+     *//*
+
+    public static boolean isNotNullOrEmpty( byte[] value )
+    {
+        boolean result = false;
+        if ( value != null && value.length > 0 )
+        {
+            result = true;
+        }
+        return result;
+    }
+*/
+}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/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 ac278b0..87170d3 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
@@ -31,7 +31,7 @@ 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.model.Warning;
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 import org.apache.directory.fortress.core.util.ObjUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/test/java/org/apache/directory/fortress/core/AccelMgrConsole.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/AccelMgrConsole.java b/src/test/java/org/apache/directory/fortress/core/AccelMgrConsole.java
index f231229..5e1a3df 100644
--- a/src/test/java/org/apache/directory/fortress/core/AccelMgrConsole.java
+++ b/src/test/java/org/apache/directory/fortress/core/AccelMgrConsole.java
@@ -27,7 +27,7 @@ import org.apache.directory.fortress.core.model.UserRole;
 
 import java.util.List;
 
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4e66ed1b/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java b/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java
index e5cf5d8..dc8c59c 100755
--- a/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java
+++ b/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java
@@ -31,7 +31,7 @@ import java.util.Comparator;
 import java.util.Enumeration;
 import java.util.List;
 
-import org.apache.directory.fortress.core.model.VUtil;
+import org.apache.directory.fortress.core.util.VUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 


Mime
View raw message