> On Jun 1, 2015, at 10:07 AM, Emmanuel Lécharny <[email protected]> wrote: > > Do be clear : do what you want to do in a branch, and explain what > exactly you want to do : > > - I'll move entities (ie, User, Role, etc) classes into a > o.a.d.fortress.core.model package > - I'll move blah blah... > > That would be perfect for those who need to discuss what you are > suggesting !
I created a branch (1.0-RC41) and performed the following: 1. moved all entities classes from package org.apache.directory.fortress.core.rbac to org.apache.directory.fortress.core.model 2. moved all implementation classes from package org.apache.directory.fortress.core.rbac to org.apache.directory.fortress.core.impl Note - this change should have no impact to clients if they are using the Manager interfaces and factories in base package - org.apache.directory.fortress.core 3. eliminated unnecessary utilities like isNotNull. refactored code to use commons for these functions. 4. split utilities up by package usage. some utilities now reside in model package. 5. added a couple interfaces to utilities used by model package Now the Directory Tangle index has reduced to about 11%. Most of the issues found by SonarQube have been resolved. The impact to existing clients is minimal. Next steps are to notify the fortress users list about the change, merge into trunk. Instructions to upgrade to fortress 1.0.0: 1. Change package name of fortress entities. search and replace: import org.apache.directory.fortress.core.rbac with: import org.apache.directory.fortress.core.model 2. Change to use Apache Commons StringUtils (instead of fortress utility) to check for null or empty Strings in code. replace import org.apache.directory.fortress.core.util.attr.VUtil; with import org.apache.commons.collections.CollectionUtils; search and replace: VUtil.isNotNullOrEmpty, with: StringUtils.isNotNull 3. Change to use Apache Commons CollectionUtils (instead of fortress utility) to check for null or empty Collections in code. replace import org.apache.directory.fortress.core.util.attr.VUtil; with import org.apache.commons.collections.CollectionUtils; search and replace: VUtil.isNotNullOrEmpty, with: CollectionUtils.isNotEmpty 4. Always use factories for Manager construction. Do not construct manually Don’t do this: AdminMgr adminMgr = new org.apache.directory.fortress.core.impl.AdminMgrImpl(); Do this: AdminMgr adminMgr = AdminMgrFactory.createInstance(); Shawn [email protected]
