IAclHolder aclHolder = (IAclHolder) object;
Set<Map.Entry<IPermissionRecipient, IPermissionMask>> mapEntrySet = permissionsMap.entrySet();
ArrayList<IPentahoAclEntry> aclList = new ArrayList<IPentahoAclEntry>();
for ( Entry<IPermissionRecipient, IPermissionMask> mapEntry : mapEntrySet ) {
PentahoAclEntry pentahoAclEntry = new PentahoAclEntry();
IPermissionRecipient permissionRecipient = mapEntry.getKey();
if ( permissionRecipient instanceof SimpleRole ) {
pentahoAclEntry.setRecipient( new GrantedAuthorityImpl( permissionRecipient.getName() ) );
} else {
pentahoAclEntry.setRecipient( permissionRecipient.getName() );
}
pentahoAclEntry.addPermission( mapEntry.getValue().getMask() );
aclList.add( pentahoAclEntry );
}
// HibernateUtil.beginTransaction(); - This is now handled in the RepositoryFile