Examples of UserRequest


Examples of domain.UserRequest

    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String requestedStr = request.getParameter("clientrequested");
        if (requestedStr == null || requestedStr.isEmpty()) {
            return new ModelAndView("redirect:/operator/request/index.htm");
        }
        UserRequest requested = null;
        try {
            requested = CH.get(getDao(), UserRequest.class, requestedStr);
        } catch (Exception ex) {
        }
        if (requested == null) {
            return new ModelAndView("redirect:/operator/request/index.htm");
        }

        Client client = new Client();
        client.setSurname(getDirectoryItem(Surname.class, requested.getSurname()));
        client.setName(getDirectoryItem(Name.class, requested.getName()));
        client.setPatronymic(getDirectoryItem(Patronymic.class, requested.getPatronymic()));
        client.setBorn(requested.getBornDate());
        client.setSex(requested.getSex());
        client.setTelephones(requested.getPhoneNumber());
        client.setAddressID(requested.getAddress().getId());
        client.setAddressCashe(requested.getAddress().getAsStringCashe());
        client.setDistrict(requested.getDistrict());
        getDao().save((EntityWithId)client);

        UserClient userClient = new UserClient();
        userClient.setUserClientPK(new UserClientPK(getUserInfo().getLogin(), client.getId()));
        userClient.setClient(client);
        userClient.setUserLogin(requested.getRequesterLogin());
        getDao().save(userClient);

        getDao().delete(requested);

        return new ModelAndView("redirect:/operator/client.htm?client=" + client.getId());
View Full Code Here

Examples of gaetest.shared.TestRequestFactory.UserRequest

        // Then, we send the input to the server.
        sendButton.setEnabled(false);
        textToServerLabel.setText(textToServer);
        serverResponseLabel.setText("");
        UserRequest userContext = requests.userRequest();
        UserProxy user = userContext.create(UserProxy.class);
        user.setName(textToServer);
        userContext.save(user).fire(new Receiver<Long>() {

          @Override
          public void onSuccess(Long response) {
//            String result = response.toString();
            dialogBox.setText("Remote Procedure Call");
View Full Code Here

Examples of gaetest.shared.TestRequestFactory.UserRequest

        // Then, we send the input to the server.
        sendButton.setEnabled(false);
        textToServerLabel.setText(textToServer);
        serverResponseLabel.setText("");
        UserRequest userContext = requests.userRequest();
        UserProxy user = userContext.create(UserProxy.class);
        user.setName(textToServer);
        userContext.save(user).fire(new Receiver<Long>() {

          @Override
          public void onSuccess(Long response) {
//            String result = response.toString();
            dialogBox.setText("Remote Procedure Call");
View Full Code Here

Examples of org.apache.ambari.server.controller.UserRequest

  public RequestStatus updateResources(Request request, Predicate predicate)
    throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
    final Set<UserRequest> requests = new HashSet<UserRequest>();

    for (Map<String, Object> propertyMap : getPropertyMaps(request.getProperties().iterator().next(), predicate)) {
      UserRequest req = getRequest(propertyMap);

      requests.add(req);
    }

    modifyResources(new Command<Void>() {
View Full Code Here

Examples of org.apache.ambari.server.controller.UserRequest

  public RequestStatus deleteResources(Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
    final Set<UserRequest> requests = new HashSet<UserRequest>();

    for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
      UserRequest req = getRequest(propertyMap);

      requests.add(req);
    }

    modifyResources(new Command<Void>() {
View Full Code Here

Examples of org.apache.ambari.server.controller.UserRequest

    return pkPropertyIds;
  }

  private UserRequest getRequest(Map<String, Object> properties) {
    if (properties == null) {
      return new UserRequest(null);
    }

    UserRequest request = new UserRequest ((String) properties.get(USER_USERNAME_PROPERTY_ID));

    request.setPassword((String) properties.get(USER_PASSWORD_PROPERTY_ID));
    request.setOldPassword((String) properties.get(USER_OLD_PASSWORD_PROPERTY_ID));

    // TODO - support array/sets directly out of the request
    if (null != properties.get(USER_ROLES_PROPERTY_ID)) {
      HashSet<String> roles = new HashSet<String>();

      Collections.addAll(roles, ((String) properties.get(USER_ROLES_PROPERTY_ID)).split(","));

      request.setRoles(roles);
    }

    return request;
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.UserRequest

  public static class UserRequestSetMatcher extends HashSet<UserRequest> implements IArgumentMatcher {

    private final UserRequest userRequest;

    public UserRequestSetMatcher(String name) {
      this.userRequest = new UserRequest(name);
      add(this.userRequest);
    }
View Full Code Here

Examples of org.apache.ambari.server.controller.UserRequest

  public static class UserRequestSetMatcher extends HashSet<UserRequest> implements IArgumentMatcher {

    private final UserRequest userRequest;

    public UserRequestSetMatcher(String name) {
      this.userRequest = new UserRequest(name);
      add(this.userRequest);
    }
View Full Code Here

Examples of org.apache.ambari.server.controller.UserRequest

  public RequestStatus updateResources(Request request, Predicate predicate)
    throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
    final Set<UserRequest> requests = new HashSet<UserRequest>();

    for (Map<String, Object> propertyMap : getPropertyMaps(request.getProperties().iterator().next(), predicate)) {
      UserRequest req = getRequest(propertyMap);

      requests.add(req);
    }

    modifyResources(new Command<Void>() {
View Full Code Here

Examples of org.apache.ambari.server.controller.UserRequest

  public RequestStatus deleteResources(Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
    final Set<UserRequest> requests = new HashSet<UserRequest>();

    for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
      UserRequest req = getRequest(propertyMap);

      requests.add(req);
    }

    modifyResources(new Command<Void>() {
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.