Package com.streamreduce.rest.dto.response

Examples of com.streamreduce.rest.dto.response.RoleResponseDTO


        dto.setVersion(sobaObject.getVersion());
        return dto;
    }

    protected RoleResponseDTO toDTO(Role role) {
        RoleResponseDTO dto = new RoleResponseDTO();
        dto.setDescription(role.getDescription());
        dto.setName(role.getName());
        dto.setPermissions(role.getPermissions());
        dto.setId(role.getId());
        return dto;
    }
View Full Code Here


        assertEquals(testUser.getId(), user.getId());
        assertTrue(baseline > 0);


        Set<RoleResponseDTO> roles = user.getRoles();
        RoleResponseDTO userRole = null;
        for (RoleResponseDTO role : roles) {
            if (role.getName().equals(Roles.USER_ROLE)) {
                userRole = role;
                break;
            }
        }
        assertNotNull(userRole);

        // remove user role
        makeRequest(getUrl() + "/" + user.getId() + "/roles/" + userRole.getId(), "DELETE", null, authToken);

        // get user again
        url = getUrl() + "/" + testUser.getUsername();
        user = jsonToObject(makeRequest(url, "GET", null, authToken), TypeFactory.defaultInstance().constructType(UserResponseDTO.class));
View Full Code Here

TOP

Related Classes of com.streamreduce.rest.dto.response.RoleResponseDTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.