Examples of NewsletterConfig


Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

public class NewsletterConfigAction extends AbstractNewsletterConfigAction implements INewsletterConfigAction {

  @Override
  public String edit() {
    try {
      NewsletterConfig config = this.getNewsletterManager().getNewsletterConfig();
      this.setNewsletterConfig(config);
      this.valueForm(config);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "edit");
      return FAILURE;
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

  }

  @Override
  public String entryConfig() {
    try {
      NewsletterConfig config = this.getNewsletterConfig();
      if (config==null) {
        config = this.getNewsletterManager().getNewsletterConfig();
        this.setNewsletterConfig(config);
      }
      this.valueForm(config);
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

        this.addFieldError("categoryCode", this.getText("error.category.not.valid"));
      } else if (mappedCategories.contains(category)) {
        this.addFieldError("categoryCode", this.getText("error.category.already.used"));
      }
      if (this.hasFieldErrors()) return INPUT;
      NewsletterConfig config = this.getNewsletterConfig();
      config.getSubscriptions().put(category, attribute);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "addCategoryMapping");
      return FAILURE;
    }
    return SUCCESS;
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

  @Override
  public String removeCategoryMapping() {
    this.updateConfigOnSession();
    try {
      String category = this.getCategoryCode();
      NewsletterConfig config = this.getNewsletterConfig();
      config.getSubscriptions().remove(category);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "removeCategoryMapping");
      return FAILURE;
    }
    return SUCCESS;
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

  @Override
  public String removeContentType() {
    this.updateConfigOnSession();
    try {
      NewsletterConfig config = this.getNewsletterConfig();
      config.getContentTypes().remove(this.getContentTypeCode());
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "removeContentType");
      return FAILURE;
    }
    return SUCCESS;
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

    this.setStartSchedulerMinute(startScheduler.get(Calendar.MINUTE));
    this.setAlsoHtml(config.isAlsoHtml());
  }

  protected void updateConfigOnSession() {
    NewsletterConfig config = this.getNewsletterConfig();
    config.setActive(this.getActiveService());
    Calendar startScheduler = Calendar.getInstance();
    startScheduler.setTime(config.getStartScheduler());
    startScheduler.set(Calendar.HOUR_OF_DAY, this.getStartSchedulerHour());
    startScheduler.set(Calendar.MINUTE, this.getStartSchedulerMinute());
    config.setStartScheduler(startScheduler.getTime());
    config.setAlsoHtml(this.getAlsoHtml());
  }
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

   * @param content Il contenuto per cui si vuole gestire la newsletter.
   * @return true se l'accesso è consentito, false in caso contrario.
   * @throws ApsSystemException
   */
  private boolean isContentAllowed(Content content) throws ApsSystemException {
    NewsletterConfig newsletterConfig = this.getNewsletterManager().getNewsletterConfig();
    NewsletterContentType contentType = newsletterConfig.getContentType(content.getTypeCode());
    if (contentType != null) {
      if (this.getNewsletterManager().getNewsletterConfig().getAllContentsAttributeName() != null) {
        return true;
      }
      Set<Object> categories = newsletterConfig.getSubscriptions().keySet();
      for (Category category : content.getCategories()) {
        if (this.isContained(category, categories)) {
          return true;
        }
      }
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

  public void setStartSchedulerMinute(Integer startSchedulerMinute) {
    this._startSchedulerMinute = startSchedulerMinute;
  }

  private Integer getStartSchedulerField(int field) {
    NewsletterConfig config = this.getNewsletterConfig();
    Calendar startScheduler = Calendar.getInstance();
    startScheduler.setTime(config.getStartScheduler());
    return startScheduler.get(field);
  }
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

public class ContentTypeConfigAction extends AbstractNewsletterConfigAction implements IContentTypeConfigAction {
 
  @Override
  public String addContentTypeConfig() {
    try {
      NewsletterConfig config = this.getNewsletterConfig();
      config.addContentType(this.getNewsletterContentType());
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "addContentTypeConfig");
      return FAILURE;
    }
    return SUCCESS;
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterConfig

    return (delay%3600000) / 60000;
  }
 
  public long getStartTimeDelay() {
    if (this._startTimeDelay==-1) {
      NewsletterConfig config = this.getNewsletterManager().getNewsletterConfig();
      this._startTimeDelay = config.getNextTaskTime().getTime() - new Date().getTime();
    }
    return this._startTimeDelay;
  }
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.