Examples of RoleDTO


Examples of com.abiquo.server.core.enterprise.RoleDto

      return wrap(context, Role.class, result.getCollection());
   }

   @Override
   public Role getRole(final Integer roleId) {
      RoleDto role = context.getApi().getAdminApi().getRole(roleId);
      return wrap(context, Role.class, role);
   }
View Full Code Here

Examples of com.abiquo.server.core.enterprise.RoleDto

   }

   // Children access

   public Role getRole() {
      RoleDto role = context.getApi().getAdminApi().getRole(target);
      return wrap(context, Role.class, role);
   }
View Full Code Here

Examples of com.abiquo.server.core.enterprise.RoleDto

      role.setName("UPDATED_ROLE");
      role.update();

      // Recover the updated role
      RoleDto updated = env.adminApi.getRole(role.getId());

      assertEquals(updated.getName(), "UPDATED_ROLE");

      role.delete();
   }
View Full Code Here

Examples of com.abiquo.server.core.enterprise.RoleDto

   }

   // Children access

   public Role getRole() {
      RoleDto role = context.getApi().getAdminApi().getRole(target);
      return wrap(context, Role.class, role);
   }
View Full Code Here

Examples of com.abiquo.server.core.enterprise.RoleDto

         this.blocked = blocked;
         return this;
      }

      public Role build() {
         RoleDto dto = new RoleDto();
         dto.setName(name);
         dto.setBlocked(blocked);
         Role role = new Role(context, dto);

         return role;
      }
View Full Code Here

Examples of com.abiquo.server.core.enterprise.RoleDto

      return getFirst(listRoles(filter), null);
   }

   @Override
   public Role getRole(final Integer roleId) {
      RoleDto role = context.getApi().getAdminApi().getRole(roleId);
      return wrap(context, Role.class, role);
   }
View Full Code Here

Examples of com.mossle.auth.support.RoleDTO

        return roleDtos;
    }

    public RoleDTO convertRoleDto(Role role, boolean useScope) {
        RoleDTO roleDto = new RoleDTO();
        roleDto.setId(role.getId());

        if (useScope) {
            roleDto.setName(role.getName() + "("
                    + scopeConnector.findById(role.getScopeId()).getName()
                    + ")");
        } else {
            roleDto.setName(role.getName());
        }

        roleDto.setScopeId(role.getScopeId());

        return roleDto;
    }
View Full Code Here

Examples of com.mossle.auth.support.RoleDTO

                    break;
                }
            }

            if (existedRole == null) {
                RoleDTO roleDto = new RoleDTO();
                roleDto.setName(roleDef.getName());
                roleDto.setScopeId(scopeDto.getId());
                roleDto.setStatus("added");
                roleDtos.add(roleDto);
            } else {
                RoleDTO roleDto = new RoleDTO();
                roleDto.setName(roleDef.getName());
                roleDto.setId(existedRole.getId());
                roleDto.setScopeId(scopeDto.getId());
                roleDto.setStatus("existed");
                roleDtos.add(roleDto);
            }
        }

        for (Role role : roles) {
            boolean existed = false;

            for (ScopeDTO scopeDto : scopeDtos) {
                if (role.getScopeId().equals(scopeDto.getId())) {
                    existed = true;

                    break;
                }
            }

            if (!existed) {
                RoleDTO roleDto = new RoleDTO();
                roleDto.setName(roleDef.getName());
                roleDto.setId(role.getId());
                roleDto.setScopeId(role.getScopeId());
                roleDto.setStatus("removed");
                roleDtos.add(roleDto);
            }
        }

        model.addAttribute("roleDts", roleDtos);
View Full Code Here

Examples of org.springside.examples.miniservice.ws.dto.RoleDTO

    UserDTO userDTO = new UserDTO();
    userDTO.setLoginName(user.getLoginName());
    userDTO.setName(user.getName());
    userDTO.setEmail(user.getEmail());

    RoleDTO roleDTO = new RoleDTO();
    roleDTO.setId(1L);
    userDTO.getRoleList().add(roleDTO);

    CreateUserResult result = userWebService.createUser(userDTO);

    assertEquals(WSResult.SUCCESS, result.getCode());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.