package org.exoplatform.cs.service.subscription;

import org.exoplatform.container.component.BaseComponentPlugin;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ObjectParameter;

/**
 * Created by IntelliJ IDEA.
 * User: ali
 * Date: 28/12/16
 * Time: 16:45
 */
public class SubscriptionPlugin extends BaseComponentPlugin {

  private SubscriptionConfig subscriptionConfig;

  public SubscriptionConfig getSubscriptionConfig() {
    return subscriptionConfig;
  }

  public void setSubscriptionConfig(SubscriptionConfig subscriptionConfig) {
    this.subscriptionConfig = subscriptionConfig;
  }

  public SubscriptionPlugin(InitParams params) {
    ObjectParameter param = params.getObjectParam("subscription");

    if (param != null) {
      subscriptionConfig = (SubscriptionConfig) param.getObject();
    }
  }
}
