package com.boissinot.jenkins.csvexporter.service.integration;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.integration.annotation.Header;
import org.springframework.integration.annotation.ServiceActivator;

/**
 * @author Gregory Boissinot
 */
public class SkippedJobsLogger {

    private static Logger logger = LoggerFactory.getLogger(SkippedJobsLogger.class);

    @ServiceActivator
    public void log(@Header("JOB_NAME") String skippedJobName) {
        logger.info(String.format("Skipping '%s'", skippedJobName));
    }
}

@@ -57,16 +57,83 @@
 ation;%0A%0A
+import com.boissinot.jenkins.csvexporter.domain.JobMessageHeaders;%0A
 import o
@@ -519,17 +519,41 @@
 der(
-%22
+JobMessageHeaders.HEADER_
 JOB_NAME
 %22) S
@@ -548,17 +548,16 @@
 JOB_NAME
-%22
 ) String

Move to constant