/**
 * Copyright 2015 Zalando SE
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.zalando.stups.fullstop.plugin;

import com.amazonaws.services.cloudtrail.processinglibrary.model.CloudTrailEvent;

/**
 * @author mrandi
 */
public class AmiPlugin implements FullstopPlugin{

    @Override
    public Object processEvent(CloudTrailEvent event) {
        return null;
    }

    @Override
    public boolean supports(CloudTrailEvent delimiter) {
        return false;
    }
}

@@ -645,81 +645,412 @@
 ort 
-com.amazonaws.services.cloudtrail.processinglibrary.model.CloudTrailEvent
+static org.slf4j.LoggerFactory.getLogger;%0A%0Aimport org.slf4j.Logger;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0A%0Aimport org.springframework.stereotype.Component;%0A%0Aimport org.zalando.stups.fullstop.aws.ClientProvider;%0A%0Aimport com.amazonaws.services.cloudtrail.processinglibrary.model.CloudTrailEvent;%0Aimport com.amazonaws.services.cloudtrail.processinglibrary.model.CloudTrailEventData
 ;%0A%0A/
@@ -1063,16 +1063,17 @@
 @author 
+ 
 mrandi%0A 
@@ -1075,16 +1075,27 @@
 ndi%0A */%0A
+@Component%0A
 public c
@@ -1138,56 +1138,447 @@
 ugin
+ 
 %7B%0A%0A    
-@Override%0A    public Object processEvent(
+private final Logger log = getLogger(getClass());%0A%0A    private static final String EC2_EVENTS = %22ec2.amazonaws.com%22;%0A    private static final String RUN = %22RunInstances%22;%0A%0A    private final ClientProvider clientProvider;%0A%0A    @Autowired%0A    public AmiPlugin(final ClientProvider clientProvider) %7B%0A        this.clientProvider = clientProvider;%0A    %7D%0A%0A    @Override%0A    public boolean supports(final CloudTrailEvent event) %7B%0A        
 Clou
@@ -1592,37 +1592,229 @@
 vent
+Data
  event
-) %7B%0A        return null
+Data = event.getEventData();%0A%0A        String eventSource = eventData.getEventSource();%0A        String eventName = eventData.getEventName();%0A%0A        return eventSource.equals(EC2_EVENTS) && eventName.equals(RUN)
 ;%0A  
@@ -1843,33 +1843,42 @@
  public 
-boolean supports(
+Object processEvent(final 
 CloudTra
@@ -1889,29 +1889,26 @@
 ent 
-delimiter
+event
 ) %7B%0A
+%0A
         
 retu
@@ -1907,20 +1907,103 @@
     
-return false
+// 1. get ami from event%0A        // 2. find out if this ami is whitelisted%0A%0A        return null
 ;%0A  

add some comments and the support filter