public Long createAclChangeSet() { return createAclChangeSetEntity(); }
public Authority getOrCreateAuthority(String name) { Authority entity = getAuthority(name); if (entity == null) { entity = createAuthority(name); } return entity; }
public Permission getOrCreatePermission(PermissionReference permissionReference) { Permission entity = getPermission(permissionReference); if (entity == null) { entity = createPermission(permissionReference); } return entity; }
public void addAclMembersToAcl(long aclId, List<Long> aceIds, int depth) { ParameterCheck.mandatory("aceIds", aceIds); List<AclMemberEntity> newMembers = new ArrayList<AclMemberEntity>(aceIds.size()); for (Long aceId : aceIds) { AclMemberEntity newMember = new AclMemberEntity(); newMember.setAclId(aclId); newMember.setAceId(aceId); newMember.setPos(depth); AclMemberEntity result = createAclMemberEntity(newMember); newMembers.add(result); } }
public Pair<Long, AuthorityEntity> createValue(AuthorityEntity value) { AuthorityEntity entity = createAuthorityEntity(value); return convertEntityToPair(entity); }
public Pair<Long, PermissionEntity> createValue(PermissionEntity value) { PermissionEntity entity = createPermissionEntity(value); return convertEntityToPair(entity); }
public Pair<Long, AclEntity> createValue(AclEntity value) { AclEntity entity = createAclEntity(value); return convertEntityToPair(entity); }
public Ace createAce(Permission permission, Authority authority, ACEType type, AccessStatus accessStatus) { ParameterCheck.mandatory("permission", permission); ParameterCheck.mandatory("authority", authority); ParameterCheck.mandatory("type", type); ParameterCheck.mandatory("accessStatus", accessStatus); AceEntity entity = new AceEntity(); entity.setApplies(type.getId()); // note: 'applies' stores the ACE type entity.setAllowed((accessStatus == AccessStatus.ALLOWED) ? true : false); entity.setAuthorityId(authority.getId()); entity.setPermissionId(permission.getId()); long aceId = createAceEntity(entity); entity.setVersion(0L); entity.setId(aceId); return entity; }
totalDeletedCount = deleteAceEntities(aceIds); int batchDeletedCount = deleteAceEntities(batchIds);
public Permission getOrCreatePermission(PermissionReference permissionReference) { Permission entity = getPermission(permissionReference); if (entity == null) { entity = createPermission(permissionReference); } return entity; }
public void addAclMembersToAcl(long aclId, List<Long> aceIds, int depth) { ParameterCheck.mandatory("aceIds", aceIds); List<AclMemberEntity> newMembers = new ArrayList<AclMemberEntity>(aceIds.size()); for (Long aceId : aceIds) { AclMemberEntity newMember = new AclMemberEntity(); newMember.setAclId(aclId); newMember.setAceId(aceId); newMember.setPos(depth); AclMemberEntity result = createAclMemberEntity(newMember); newMembers.add(result); } }
public Pair<Long, AuthorityEntity> createValue(AuthorityEntity value) { AuthorityEntity entity = createAuthorityEntity(value); return convertEntityToPair(entity); }
public Pair<Long, PermissionEntity> createValue(PermissionEntity value) { PermissionEntity entity = createPermissionEntity(value); return convertEntityToPair(entity); }
public Pair<Long, AclEntity> createValue(AclEntity value) { AclEntity entity = createAclEntity(value); return convertEntityToPair(entity); }
public Ace createAce(Permission permission, Authority authority, ACEType type, AccessStatus accessStatus) { ParameterCheck.mandatory("permission", permission); ParameterCheck.mandatory("authority", authority); ParameterCheck.mandatory("type", type); ParameterCheck.mandatory("accessStatus", accessStatus); AceEntity entity = new AceEntity(); entity.setApplies(type.getId()); // note: 'applies' stores the ACE type entity.setAllowed((accessStatus == AccessStatus.ALLOWED) ? true : false); entity.setAuthorityId(authority.getId()); entity.setPermissionId(permission.getId()); long aceId = createAceEntity(entity); entity.setVersion(0L); entity.setId(aceId); return entity; }
totalDeletedCount = deleteAceEntities(aceIds); int batchDeletedCount = deleteAceEntities(batchIds);
public Authority getOrCreateAuthority(String name) { Authority entity = getAuthority(name); if (entity == null) { entity = createAuthority(name); } return entity; }
public void addAclMembersToAcl(long aclId, List<Pair<Long, Integer>> aceIdsWithDepths) { ParameterCheck.mandatory("aceIdsWithDepths", aceIdsWithDepths); List<AclMemberEntity> newMembers = new ArrayList<AclMemberEntity>(aceIdsWithDepths.size()); for (Pair<Long,Integer> aceIdWithDepth : aceIdsWithDepths) { AclMemberEntity newMember = new AclMemberEntity(); newMember.setAclId(aclId); newMember.setAceId(aceIdWithDepth.getFirst()); newMember.setPos(aceIdWithDepth.getSecond()); AclMemberEntity result = createAclMemberEntity(newMember); newMembers.add(result); } }