Package org.beangle.webapp.avatar

Examples of org.beangle.webapp.avatar.Avatar


  protected AvatarBase avatarBase;

  public String uploadForm() {
    User user = getUser();
    Avatar avatar = avatarBase.getAvatar(user.getName());
    put("avatar", avatar);
    put("user", user);
    return forward();
  }
View Full Code Here


  protected AvatarBase avatarBase;

  public String index() throws IOException {
    String userName = getUsername();
    Avatar avatar = avatarBase.getAvatar(userName);
    if (null == avatar) {
      ServletActionContext.getResponse().getWriter().write(
          "without you avatar [" + userName + "]");
    } else {
      AvatarUtil.copyTo(avatar, ServletActionContext.getResponse());
View Full Code Here

    return null;
  }

  public String info() {
    User user = getUser();
    Avatar avatar = avatarBase.getAvatar(user.getName());
    put("avatar", avatar);
    put("user", user);
    return forward();
  }
View Full Code Here

      return null;
    } else {
      user = users.get(0);
    }

    Avatar avatar = avatarBase.getAvatar(user.getName());
    put("avatar", avatar);
    put("user", user);
    return forward();
  }
View Full Code Here

   * @throws IOException
   */
  public String index() throws IOException {
    String userName = get("user.name");
    if (StringUtils.isEmpty(userName)) { return null; }
    Avatar avatar = avatarBase.getAvatar(userName);
    if (null == avatar) {
      avatar = avatarBase.getDefaultAvatar();
    }
    AvatarUtil.copyTo(avatar, ServletActionContext.getResponse());
    return null;
View Full Code Here

    if (users.isEmpty()) {
      return null;
    } else {
      user = users.get(0);
    }
    Avatar avatar = avatarBase.getAvatar(user.getName());
    put("avatar", avatar);
    put("user", user);
    return forward();
  }
View Full Code Here

    }
    return contains;
  }

  public Avatar getAvatar(String name) {
    Avatar avatar = null;
    for (AvatarBase base : bases) {
      avatar = base.getAvatar(name);
      if (null != avatar) {
        break;
      }
View Full Code Here

TOP

Related Classes of org.beangle.webapp.avatar.Avatar

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.