Java Code Examples for com.alibaba.dubbo.registry.common.domain.User#setUsername()

The following examples show how to use com.alibaba.dubbo.registry.common.domain.User#setUsername() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Infos.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public boolean update(Map<String, Object> context) {
    User user = new User();
    user.setId(currentUser.getId());
    user.setUsername(currentUser.getUsername());
    user.setOperatorAddress(operatorAddress);
    user.setName((String) context.get("name"));
    user.setDepartment((String) context.get("department"));
    user.setEmail((String) context.get("email"));
    user.setPhone((String) context.get("phone"));
    user.setAlitalk((String) context.get("alitalk"));
    user.setLocale((String) context.get("locale"));
    userDAO.modifyUser(user);
    context.put("redirect", "../" + getClass().getSimpleName().toLowerCase());
    return true;
}
 
Example 2
Source File: Passwds.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public boolean create(Map<String, Object> context) {
    User user = new User();
    user.setOperator(operator);
    user.setOperatorAddress(operatorAddress);
    user.setPassword((String) context.get("newPassword"));
    user.setUsername(operator);

    boolean sucess = userDAO.updatePassword(user, (String) context.get("oldPassword"));
    if (!sucess)
        context.put("message", getMessage("passwd.oldwrong"));
    return sucess;
}
 
Example 3
Source File: Infos.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
public boolean update(Map<String, Object> context) {
    User user = new User();
    user.setId(currentUser.getId());
    user.setUsername(currentUser.getUsername());
    user.setOperatorAddress(operatorAddress);
    user.setName((String) context.get("name"));
    user.setDepartment((String) context.get("department"));
    user.setEmail((String) context.get("email"));
    user.setPhone((String) context.get("phone"));
    user.setAlitalk((String) context.get("alitalk"));
    user.setLocale((String) context.get("locale"));
    userDAO.modifyUser(user);
    context.put("redirect", "../" + getClass().getSimpleName().toLowerCase());
    return true;
}
 
Example 4
Source File: Passwds.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
public boolean create(Map<String, Object> context) {
    User user = new User();
    user.setOperator(operator);
    user.setOperatorAddress(operatorAddress);
    user.setPassword((String) context.get("newPassword"));
    user.setUsername(operator);

    boolean sucess = userDAO.updatePassword(user, (String) context.get("oldPassword"));
    if (!sucess)
        context.put("message", getMessage("passwd.oldwrong"));
    return sucess;
}
 
Example 5
Source File: Infos.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
public boolean update(Map<String, Object> context) {
    User user = new User();
    user.setId(currentUser.getId());
    user.setUsername(currentUser.getUsername());
    user.setOperatorAddress(operatorAddress);
    user.setName((String) context.get("name"));
    user.setDepartment((String) context.get("department"));
    user.setEmail((String) context.get("email"));
    user.setPhone((String) context.get("phone"));
    user.setAlitalk((String) context.get("alitalk"));
    user.setLocale((String) context.get("locale"));
    userDAO.modifyUser(user);
    context.put("redirect", "../" + getClass().getSimpleName().toLowerCase());
    return true;
}
 
Example 6
Source File: Passwds.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
public boolean create(Map<String, Object> context) {
    User user = new User();
    user.setOperator(operator);
    user.setOperatorAddress(operatorAddress);
    user.setPassword((String) context.get("newPassword"));
    user.setUsername(operator);

    boolean sucess = userDAO.updatePassword(user, (String) context.get("oldPassword"));
    if (!sucess)
        context.put("message", getMessage("passwd.oldwrong"));
    return sucess;
}
 
Example 7
Source File: Infos.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public boolean update(Map<String, Object> context) {
    User user = new User();
    user.setId(currentUser.getId());
    user.setUsername(currentUser.getUsername());
    user.setOperatorAddress(operatorAddress);
    user.setName((String) context.get("name"));
    user.setDepartment((String) context.get("department"));
    user.setEmail((String) context.get("email"));
    user.setPhone((String) context.get("phone"));
    user.setAlitalk((String) context.get("alitalk"));
    user.setLocale((String) context.get("locale"));
    userDAO.modifyUser(user);
    context.put("redirect", "../" + getClass().getSimpleName().toLowerCase());
    return true;
}
 
Example 8
Source File: Passwds.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public boolean create(Map<String, Object> context) {
    User user = new User();
    user.setOperator(operator);
    user.setOperatorAddress(operatorAddress);
    user.setPassword((String) context.get("newPassword"));
    user.setUsername(operator);

    boolean sucess = userDAO.updatePassword(user, (String) context.get("oldPassword"));
    if (!sucess)
        context.put("message", getMessage("passwd.oldwrong"));
    return sucess;
}
 
Example 9
Source File: Infos.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public boolean update(Map<String, Object> context) {
    User user = new User();
    user.setId(currentUser.getId());
    user.setUsername(currentUser.getUsername());
    user.setOperatorAddress(operatorAddress);
    user.setName((String) context.get("name"));
    user.setDepartment((String) context.get("department"));
    user.setEmail((String) context.get("email"));
    user.setPhone((String) context.get("phone"));
    user.setAlitalk((String) context.get("alitalk"));
    user.setLocale((String) context.get("locale"));
    userDAO.modifyUser(user);
    context.put("redirect", "../" + getClass().getSimpleName().toLowerCase());
    return true;
}
 
Example 10
Source File: Passwds.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public boolean create(Map<String, Object> context) {
    User user = new User();
    user.setOperator(operator);
    user.setOperatorAddress(operatorAddress);
    user.setPassword((String) context.get("newPassword"));
    user.setUsername(operator);

    boolean sucess = userDAO.updatePassword(user, (String) context.get("oldPassword"));
    if (!sucess)
        context.put("message", getMessage("passwd.oldwrong"));
    return sucess;
}