public Object execute(CommandContext commandContext) { if (userId == null) { throw new ActivitiException("userId is null"); } UserEntity user = (UserEntity) commandContext.getUserManager().findUserById(userId); if (user == null) { throw new ActivitiException("user " + userId + " doesn't exist"); } user.setPicture(picture); return null; }
public Boolean execute(CommandContext commandContext) { return commandContext.getUserManager().checkPassword(userId, password); }