Package com.agiletec.plugins.jpavatar.aps.system.services.avatar

Examples of com.agiletec.plugins.jpavatar.aps.system.services.avatar.AvatarConfig


    this.initAction(NS, "save");
    return this.executeAction();
  }
 
  protected void setAvatarStyle(String style) throws ApsSystemException {
    AvatarConfig config = _avatarManager.getConfig();
    config.setStyle(style);
    this._avatarManager.updateConfig(config);
  }
View Full Code Here


   * @param xml The xml containing the configuration.
   * @return The service configuration.
   * @throws ApsSystemException In case of parsing errors.
   */
  public AvatarConfig extractConfig(String xml) throws ApsSystemException {
    AvatarConfig config = new AvatarConfig();
    Element root = this.getRootElement(xml);
    Element styleElem = root.getChild(STYLE_ELEM);
    String style = null;
    if (styleElem != null) {
      style = styleElem.getText();
    }
   
    if (StringUtils.isBlank(style) || !ArrayUtils.contains(AvatarConfig.STYLES, style)) {
      style = AvatarConfig.STYLE_LOCAL;
    }
   
    config.setStyle(style);
    return config;
  }
View Full Code Here

public class AvatarConfigAction extends BaseAction {

  public String edit() {
    try {
      AvatarConfig config = this.getAvatarManager().getConfig();
      this.setAvatarConfig(config);

    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "edit");
      return FAILURE;
View Full Code Here

    return SUCCESS;
  }
 
  public String save() {
    try {
      AvatarConfig config = this.getAvatarConfig();
      this.getAvatarManager().updateConfig(config);
      this.addActionMessage(this.getText("message.config.savedConfirm"));
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "save");
      return FAILURE;
View Full Code Here

*/
public class UserAvatarAction extends org.entando.entando.apsadmin.common.UserAvatarAction {
 
  @Override
  public String returnAvatarStream() {
    AvatarConfig config = this.getAvatarManager().getConfig();
    String stype = config.getStyle();
    if (null == stype || AvatarConfig.STYLE_GRAVATAR.equals(stype)) {
      return super.returnAvatarStream();
    }
    try {
      String url = this.getAvatarManager().getAvatarUrl(this.getUsername());
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpavatar.aps.system.services.avatar.AvatarConfig

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.