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.setDisplayName((String) properties.get(USER_DISPLAY_NAME_PROPERTY_ID));
    request.setLocalUserName((String) properties.get(USER_LOCAL_USERNAME_PROPERTY_ID));

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

    if (null != properties.get(USER_ACTIVE_PROPERTY_ID)) {
      request.setActive(Boolean.valueOf(properties.get(USER_ACTIVE_PROPERTY_ID).toString()));
    }

    if (null != properties.get(USER_ADMIN_PROPERTY_ID)) {
      request.setAdmin(Boolean.valueOf(properties.get(USER_ADMIN_PROPERTY_ID).toString()));
    }

    if (null != properties.get(USER_CONSECUTIVE_FAILURES_PROPERTY_ID)) {
      request.setConsecutiveFailures(Integer.parseInt(properties.get(USER_CONSECUTIVE_FAILURES_PROPERTY_ID).toString()));
    }

    return request;
  }
ResourcePredicateEvaluator implementation. If property type is User/user_name,
we do a case insensitive comparison so that we can return the retrieved
username when it differs only in case with respect to the requested username.

@param predicate the predicate
@param resource  the resource
@return
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java