@Test public void testExecuteAGroup() { Set<Long> recOrgCoordinatorIds = sut.execute(1L); assertEquals(3, recOrgCoordinatorIds.size()); assertTrue(recOrgCoordinatorIds.contains(Long.parseLong("42"))); assertTrue(recOrgCoordinatorIds.contains(Long.parseLong("142"))); assertTrue(recOrgCoordinatorIds.contains(Long.parseLong("98"))); }
@SuppressWarnings("unchecked") public Set<Long> execute(final Long inGroupId) { List<Long> groupId = new LinkedList(); groupId.add(inGroupId); List<DomainGroupModelView> groupReturn = groupMapper.execute(groupId); if (groupReturn.size() != 1) { return new HashSet<Long>(); } Set<Long> groupCoordinatorIds = new HashSet(groupCoordMapper.execute(inGroupId)); List<Long> adminIds = systemAdminIdsMapper.execute(null); groupCoordinatorIds.addAll(adminIds); return groupCoordinatorIds; }
GetAllPersonIdsWhoHaveGroupCoordinatorAccess implements CoordinatorAccessAuthorizer<Long, Long> { @SuppressWarnings("unchecked") public Set<Long> execute(final Long inGroupId) { List<Long> groupId = new LinkedList(); groupId.add(inGroupId); List<DomainGroupModelView> groupReturn = groupMapper.execute(groupId); if (groupReturn.size() != 1) { return new HashSet<Long>(); } Set<Long> groupCoordinatorIds = new HashSet(groupCoordMapper.execute(inGroupId)); List<Long> adminIds = systemAdminIdsMapper.execute(null); groupCoordinatorIds.addAll(adminIds); return groupCoordinatorIds; } }
GetAllPersonIdsWhoHaveGroupCoordinatorAccess implements CoordinatorAccessAuthorizer<Long, Long> { @SuppressWarnings("unchecked") public Set<Long> execute(final Long inGroupId) { List<Long> groupId = new LinkedList(); groupId.add(inGroupId); List<DomainGroupModelView> groupReturn = groupMapper.execute(groupId); if (groupReturn.size() != 1) { return new HashSet<Long>(); } Set<Long> groupCoordinatorIds = new HashSet(groupCoordMapper.execute(inGroupId)); List<Long> adminIds = systemAdminIdsMapper.execute(null); groupCoordinatorIds.addAll(adminIds); return groupCoordinatorIds; } GetAllPersonIdsWhoHaveGroupCoordinatorAccess(final DomainMapper<Long, List<Long>> inGroupCoordMapper,
            final DomainMapper<List<Long>, List<DomainGroupModelView>> inGroupMapper,
            final DomainMapper<Serializable, List<Long>> inSystemAdminIdsMapper,
            final DomainMapper<String, Long> inGetPersonIdFromAccountIdMapper); }
GetAllPersonIdsWhoHaveGroupCoordinatorAccess implements CoordinatorAccessAuthorizer<Long, Long> { @SuppressWarnings("unchecked") public Set<Long> execute(final Long inGroupId) { List<Long> groupId = new LinkedList(); groupId.add(inGroupId); List<DomainGroupModelView> groupReturn = groupMapper.execute(groupId); if (groupReturn.size() != 1) { return new HashSet<Long>(); } Set<Long> groupCoordinatorIds = new HashSet(groupCoordMapper.execute(inGroupId)); List<Long> adminIds = systemAdminIdsMapper.execute(null); groupCoordinatorIds.addAll(adminIds); return groupCoordinatorIds; } GetAllPersonIdsWhoHaveGroupCoordinatorAccess(final DomainMapper<Long, List<Long>> inGroupCoordMapper,
            final DomainMapper<List<Long>, List<DomainGroupModelView>> inGroupMapper,
            final DomainMapper<Serializable, List<Long>> inSystemAdminIdsMapper,
            final DomainMapper<String, Long> inGetPersonIdFromAccountIdMapper); @SuppressWarnings("unchecked") Set<Long> execute(final Long inGroupId); boolean hasGroupCoordinatorAccessRecursively(final Long inUserPersonId, final Long inGroupId); boolean hasGroupCoordinatorAccessRecursively(final String inUserPersonAccountId, final Long inGroupId); @Override Boolean hasCoordinatorAccessRecursively(final Long inPersonId, final Long inEntityId); }
GetAllPersonIdsWhoHaveGroupCoordinatorAccess implements CoordinatorAccessAuthorizer<Long, Long> { @SuppressWarnings("unchecked") public Set<Long> execute(final Long inGroupId) { List<Long> groupId = new LinkedList(); groupId.add(inGroupId); List<DomainGroupModelView> groupReturn = groupMapper.execute(groupId); if (groupReturn.size() != 1) { return new HashSet<Long>(); } Set<Long> groupCoordinatorIds = new HashSet(groupCoordMapper.execute(inGroupId)); List<Long> adminIds = systemAdminIdsMapper.execute(null); groupCoordinatorIds.addAll(adminIds); return groupCoordinatorIds; } GetAllPersonIdsWhoHaveGroupCoordinatorAccess(final DomainMapper<Long, List<Long>> inGroupCoordMapper,
            final DomainMapper<List<Long>, List<DomainGroupModelView>> inGroupMapper,
            final DomainMapper<Serializable, List<Long>> inSystemAdminIdsMapper,
            final DomainMapper<String, Long> inGetPersonIdFromAccountIdMapper); @SuppressWarnings("unchecked") Set<Long> execute(final Long inGroupId); boolean hasGroupCoordinatorAccessRecursively(final Long inUserPersonId, final Long inGroupId); boolean hasGroupCoordinatorAccessRecursively(final String inUserPersonAccountId, final Long inGroupId); @Override Boolean hasCoordinatorAccessRecursively(final Long inPersonId, final Long inEntityId);  }