Examples of IUserRegConfig


Examples of com.agiletec.plugins.jpuserreg.aps.system.services.userreg.model.IUserRegConfig

      String xml = configManager.getConfigItem(JpUserRegSystemConstants.USER_REG_CONFIG_ITEM);
      if (xml == null) {
        throw new ApsSystemException("Configuration Item not found: " + JpUserRegSystemConstants.USER_REG_CONFIG_ITEM);
      }
      UserRegConfigDOM userRegConfigDom = new UserRegConfigDOM();
      IUserRegConfig config = userRegConfigDom.extractConfig(xml);
      this.setUserRegConfig(config);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "loadConfigs");
      throw new ApsSystemException("Error in init", t);
    }
View Full Code Here

Examples of com.agiletec.plugins.jpuserreg.aps.system.services.userreg.model.IUserRegConfig

    }
    return value;
  }

  private void sendAlertRegProfile(IUserProfile profile, String token) throws ApsSystemException {
    IUserRegConfig config = this.getConfig();
    String activationPageCode = config.getActivationPageCode();
    Map<String, String> params = this.prepareMailParams(profile, token, activationPageCode);
    this.sendAlert(config.getActivationTemplates(), params, profile);
  }
View Full Code Here

Examples of com.agiletec.plugins.jpuserreg.aps.system.services.userreg.model.IUserRegConfig

    Map<String, String> params = this.prepareMailParams(profile, token, activationPageCode);
    this.sendAlert(config.getActivationTemplates(), params, profile);
  }

  private void sendAlertReactivateUser(String userName, IUserProfile profile, String token) throws ApsSystemException {
    IUserRegConfig config = this.getConfig();
    String reactivationPageCode = config.getReactivationPageCode();
    Map<String, String> params = this.prepareMailParams(profile, token, reactivationPageCode);
    this.sendAlert(config.getReactivationTemplates(), params, profile);
  }
View Full Code Here

Examples of com.agiletec.plugins.jpuserreg.aps.system.services.userreg.model.IUserRegConfig

    Map<String, String> params = this.prepareMailParams(profile, token, reactivationPageCode);
    this.sendAlert(config.getReactivationTemplates(), params, profile);
  }

  private void sendAlert(Map<String, Template> templates, Map<String, String> params, IUserProfile profile) throws ApsSystemException {
    IUserRegConfig config = this.getConfig();
   
    String[] eMail = { this.getFieldValue(profile, SystemConstants.USER_PROFILE_ATTRIBUTE_ROLE_MAIL) };
    Template template = null;
    String langCode = this.getFieldValue(profile, JpUserRegSystemConstants.ATTRIBUTE_ROLE_LANGUAGE);
    if (langCode!=null) {
      template = templates.get(langCode);
    }
    if (template==null) {
      template = templates.get(this.getLangManager().getDefaultLang().getCode());
    }
    String subject = template.getSubject();
    String text = this.replaceParams(template.getBody(), params);
    this.getMailManager().sendMail(text, subject, eMail, null, null, config.getEMailSenderCode());
  }
View Full Code Here

Examples of com.agiletec.plugins.jpuserreg.aps.system.services.userreg.model.IUserRegConfig

  @Override
  public void validate() {
    super.validate();
    try {
      IUserRegConfig config = this.getConfig();
      this.checkTemplates(config.getActivationTemplates(), "config.activationTemplates");
      this.checkTemplates(config.getReactivationTemplates(), "config.reactivationTemplates");
      this.checkAuthorities(config.getRoles(), (IApsAuthorityManager) this.getRoleManager(), "config.roles");
      this.checkAuthorities(config.getGroups(), (IApsAuthorityManager) this.getGroupManager(), "config.groups");
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "validate", "Error during validation");
      this.addActionError(this.getText("jpuserreg.errors.genericError"));
    }
  }
View Full Code Here

Examples of com.agiletec.plugins.jpuserreg.aps.system.services.userreg.model.IUserRegConfig

  }

  @Override
  public String edit() {
    try {
      IUserRegConfig config = this.getUserRegManager().getUserRegConfig();
      this.setConfig(config);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "edit");
      return FAILURE;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.