Package com.abiquo.server.core.enterprise

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


    *      http://community.abiquo.com/display/ABI20/UserResource#UserResource-
    *      Retrieveauser</a>
    * @return User with the given id or <code>null</code> if it does not exist.
    */
   public User getUser(final Integer id) {
      UserDto user = context.getApi().getEnterpriseApi().getUser(target, id);
      return wrap(context, User.class, user);
   }
View Full Code Here


    *      http://community.abiquo.com/display/ABI20/UserResource#UserResource-
    *      Retrieveauser</a>
    * @return User with the given id or <code>null</code> if it does not exist.
    */
   public User getUser(final Integer id) {
      UserDto user = context.getApi().getEnterpriseApi().getUser(target, id);
      return wrap(context, User.class, user);
   }
View Full Code Here

         this.authType = authType;
         return this;
      }

      public User build() {
         UserDto dto = new UserDto();
         dto.setActive(active);
         dto.setAuthType(authType);
         dto.setDescription(description);
         dto.setEmail(email);
         dto.setLocale(locale);
         dto.setName(name);
         dto.setNick(nick);
         dto.setPassword(password);
         dto.setSurname(surname);
         User user = new User(context, dto);
         user.enterprise = enterprise;
         user.role = role;

         return user;
View Full Code Here

      buffer.append("</user>");
      return buffer.toString();
   }

   public static UserDto userPost() {
      UserDto user = new UserDto();
      user.setName("Aberahama");
      user.setSurname("Johanson");
      user.setDescription("A hawaian user");
      user.setEmail("abe.joha@aloha.com");
      user.setNick("abejo");
      user.setAuthType("ABIQUO");
      user.setLocale("en_US");
      user.setActive(true);
      user.setPassword("c69a39bd64ffb77ea7ee3369dce742f3");
      user.addLink(new RESTLink("role", "http://localhost/api/admin/roles/1"));
      return user;
   }
View Full Code Here

      buffer.append("</user>");
      return buffer.toString();
   }

   public static UserDto userPut() {
      UserDto user = userPost();
      user.setId(1);
      user.addLink(new RESTLink("edit", "http://localhost/api/admin/enterprises/1/users/1"));
      user.addLink(new RESTLink("enterprise", "http://localhost/api/admin/enterprises/1"));
      user.addLink(new RESTLink("virtualmachines",
            "http://localhost/api/admin/enterprises/1/users/1/action/virtualmachines"));
      return user;
   }
View Full Code Here

      buffer.append("</user>");
      return buffer.toString();
   }

   public static UserDto userPost() {
      UserDto user = new UserDto();
      user.setName("Aberahama");
      user.setSurname("Johanson");
      user.setDescription("A hawaian user");
      user.setEmail("abe.joha@aloha.com");
      user.setNick("abejo");
      user.setAuthType("ABIQUO");
      user.setLocale("en_US");
      user.setActive(true);
      user.setPassword("c69a39bd64ffb77ea7ee3369dce742f3");
      user.addLink(new RESTLink("role", "http://localhost/api/admin/roles/1"));
      return user;
   }
View Full Code Here

      buffer.append("</user>");
      return buffer.toString();
   }

   public static UserDto userPut() {
      UserDto user = userPost();
      user.setId(1);
      user.addLink(new RESTLink("edit", "http://localhost/api/admin/enterprises/1/users/1"));
      user.addLink(new RESTLink("enterprise", "http://localhost/api/admin/enterprises/1"));
      user.addLink(new RESTLink("virtualmachines",
            "http://localhost/api/admin/enterprises/1/users/1/action/virtualmachines"));
      return user;
   }
View Full Code Here

      String username = env.user.getName();
      env.user.setName("Manolo");
      env.user.update();

      // Recover the updated user
      UserDto updated = env.enterpriseApi.getUser(env.enterprise.unwrap(), env.user.getId());

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

      env.user.setName(username);
      env.user.update();
   }
View Full Code Here

      checkFilters(request);
   }

   public void testCreateUser() throws SecurityException, NoSuchMethodException, IOException {
      EnterpriseDto enterprise = EnterpriseResources.enterprisePut();
      UserDto user = EnterpriseResources.userPost();

      Invokable<?, ?> method = method(EnterpriseApi.class, "createUser", EnterpriseDto.class, UserDto.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(enterprise, user)));
View Full Code Here

      buffer.append("</user>");
      return buffer.toString();
   }

   public static UserDto userPost() {
      UserDto user = new UserDto();
      user.setName("Aberahama");
      user.setSurname("Johanson");
      user.setDescription("A hawaian user");
      user.setEmail("abe.joha@aloha.com");
      user.setNick("abejo");
      user.setAuthType("ABIQUO");
      user.setLocale("en_US");
      user.setActive(true);
      user.setPassword("c69a39bd64ffb77ea7ee3369dce742f3");
      user.addLink(new RESTLink("role", "http://localhost/api/admin/roles/1"));
      return user;
   }
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.enterprise.UserDto

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.