package com.l7tech.server.event;

import com.l7tech.objectmodel.Goid;
import com.l7tech.policy.Policy;
import org.springframework.context.ApplicationEvent;

public abstract class PolicyCacheEvent extends ApplicationEvent {
   private final Policy policy;
   static final long serialVersionUID = -6822791927764024498L;

   public Policy getPolicy() {
      return this.policy;
   }

   private PolicyCacheEvent(Object var1, Policy var2) {
      super(var1);
      this.policy = var2;
   }

   public static class Deleted extends PolicyCacheEvent {
      static final long serialVersionUID = 2029895278532743555L;

      public Deleted(Object var1, Policy var2) {
         super(var1, var2);
      }
   }

   public static class Invalid extends PolicyCacheEvent {
      private final Goid policyId;
      private final Exception exception;
      static final long serialVersionUID = -8001784004408754966L;

      public Invalid(Object var1, Goid var2, Exception var3) {
         super(var1, null);
         this.policyId = var2;
         this.exception = var3;
      }

      public Goid getPolicyId() {
         return this.policyId;
      }

      public Exception getException() {
         return this.exception;
      }
   }

   public static class Reset extends PolicyCacheEvent {
      static final long serialVersionUID = -3117955541872448408L;

      public Reset(Object var1) {
         super(var1, null);
      }
   }

   public static class Started extends PolicyCacheEvent {
      static final long serialVersionUID = -6929803723654742758L;

      public Started(Object var1) {
         super(var1, null);
      }
   }

   public static class Updated extends PolicyCacheEvent {
      static final long serialVersionUID = -8653115275541950755L;

      public Updated(Object var1, Policy var2) {
         super(var1, var2);
      }
   }
}
