@Test public void testGetRoles() throws Exception { final List<VoRole> roles = voRoleService.getAllRoles(); assertNotNull(roles); assertFalse(roles.isEmpty()); }
@Override public List<VoRole> getAllRoles() throws Exception { final List<RoleDTO> all = managementService.getRolesList(); if (!federationFacade.isCurrentUserSystemAdmin()) { final Iterator<RoleDTO> allIt = all.iterator(); while (allIt.hasNext()) { if ("ROLE_SMADMIN".equals(allIt.next().getCode())) { allIt.remove(); break; } } } return voAssemblySupport.assembleVos(VoRole.class, RoleDTO.class, all); }
VoRoleServiceImpl implements VoRoleService { @Override public List<VoRole> getAllRoles() throws Exception { final List<RoleDTO> all = managementService.getRolesList(); if (!federationFacade.isCurrentUserSystemAdmin()) { final Iterator<RoleDTO> allIt = all.iterator(); while (allIt.hasNext()) { if ("ROLE_SMADMIN".equals(allIt.next().getCode())) { allIt.remove(); break; } } } return voAssemblySupport.assembleVos(VoRole.class, RoleDTO.class, all); } }
VoRoleServiceImpl implements VoRoleService { @Override public List<VoRole> getAllRoles() throws Exception { final List<RoleDTO> all = managementService.getRolesList(); if (!federationFacade.isCurrentUserSystemAdmin()) { final Iterator<RoleDTO> allIt = all.iterator(); while (allIt.hasNext()) { if ("ROLE_SMADMIN".equals(allIt.next().getCode())) { allIt.remove(); break; } } } return voAssemblySupport.assembleVos(VoRole.class, RoleDTO.class, all); } VoRoleServiceImpl(final ManagementService managementService,
                             final FederationFacade federationFacade,
                             final VoAssemblySupport voAssemblySupport); }
VoRoleServiceImpl implements VoRoleService { @Override public List<VoRole> getAllRoles() throws Exception { final List<RoleDTO> all = managementService.getRolesList(); if (!federationFacade.isCurrentUserSystemAdmin()) { final Iterator<RoleDTO> allIt = all.iterator(); while (allIt.hasNext()) { if ("ROLE_SMADMIN".equals(allIt.next().getCode())) { allIt.remove(); break; } } } return voAssemblySupport.assembleVos(VoRole.class, RoleDTO.class, all); } VoRoleServiceImpl(final ManagementService managementService,
                             final FederationFacade federationFacade,
                             final VoAssemblySupport voAssemblySupport); @Override List<VoRole> getAllRoles(); @Override VoRole createRole(VoRole vo); @Override VoRole updateRole(VoRole vo); @Override void removeRole(String role); }
VoRoleServiceImpl implements VoRoleService { @Override public List<VoRole> getAllRoles() throws Exception { final List<RoleDTO> all = managementService.getRolesList(); if (!federationFacade.isCurrentUserSystemAdmin()) { final Iterator<RoleDTO> allIt = all.iterator(); while (allIt.hasNext()) { if ("ROLE_SMADMIN".equals(allIt.next().getCode())) { allIt.remove(); break; } } } return voAssemblySupport.assembleVos(VoRole.class, RoleDTO.class, all); } VoRoleServiceImpl(final ManagementService managementService,
                             final FederationFacade federationFacade,
                             final VoAssemblySupport voAssemblySupport); @Override List<VoRole> getAllRoles(); @Override VoRole createRole(VoRole vo); @Override VoRole updateRole(VoRole vo); @Override void removeRole(String role);  }