Hello,

For the past few weeks bugs and issues related to code quality in the fortress 
sub-project have been fixed.  Much of the work has taken place in a branch as 
discussed by this issue:
https://issues.apache.org/jira/browse/FC-109.

A significant portion of the cleanup work involved refactoring packages to 
eliminate dependency cycles.  Unfortunately, this will cause existing fortress 
dependent programs to no longer compile with the latest fortress core source.  
This breakage was not taken lightly.  We pride ourselves on maintaining a 
stable api, one that does not change, or at least when it does, there is a very 
good reason, and it has been well documented.  But, because we are still 
relatively early in the adoption cycle of this project, and that a GA release 
is imminent, it’s now or never.

Once the merger of branch (containing sonarqube changes) occurs back to trunk 
(sometime in the next 24 hours), your current fortress programs will break.  
Fortunately the required changes are superficial, related to package names, and 
not code semantics.  Below are the steps to get your existing fortress 
dependent program back to using the latest code.  It is likely you will only 
need to do #1.  Let us know if you have questions or problems with this upgrade.

Instructions to upgrade to latest fortress-core source:

A. Changes to Dependent Program Code:

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

(note: 2 & 3 above only need to change if using the ‘VUtil.isNotNullOrEmpty' 
apis inside your code.)

4. 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();

B. Changes to Data (properties and permissions):

5. properties
Change to ‘ftProps’ attribute in ou=Config node (cn=DEFAULT, ou=Config, 
dc=example,dc=com):
temporal.validator.dsd:org.apache.directory.fortress.core.impl.DSDChecker

6. ARBAC manager permissions. Change entrydn to the following:
ftObjNm=org.apache.directory.fortress.core.impl.AdminMgrImpl, ou=AdminPerms, 
ou=ARBAC, dc=example,dc=com
ftObjNm=org.apache.directory.fortress.core.impl.AuditMgrImpl, ou=AdminPerms, 
ou=ARBAC, dc=example,dc=com
ftObjNm=org.apache.directory.fortress.core.impl.DelAdminMgrImpl, ou=AdminPerms, 
ou=ARBAC, dc=example,dc=com
ftObjNm=org.apache.directory.fortress.core.impl.DelReviewMgrImpl, 
ou=AdminPerms, ou=ARBAC, dc=example,dc=com
ftObjNm=org.apache.directory.fortress.core.impl.PwPolicyMgrImpl, ou=AdminPerms, 
ou=ARBAC, dc=example,dc=com
org.apache.directory.fortress.core.impl.ReviewMgrImpl

Shawn
[email protected]



Reply via email to