final Permission perm = PermissionAiderFactory.getPermission(owner, group, mode);
if(perm instanceof ACLPermission && listOfAces != null && !listOfAces.isEmpty()) {
final ACLPermission aclPermission = (ACLPermission)perm;
for(final Object listOfAcesItem : listOfAces) {
if(listOfAcesItem instanceof ACEAider) {
final ACEAider ace = (ACEAider)listOfAcesItem;
aclPermission.addACE(ace.getAccessType(), ace.getTarget(), ace.getWho(), ace.getMode());
}
}
}
return perm;
}