package lan.dk.podcastserver.scheduled;

import lan.dk.podcastserver.business.update.UpdatePodcastBusiness;
import lan.dk.podcastserver.manager.ItemDownloadManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by kevin on 26/12/2013.
 */
@Component
public class UpdateScheduled {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    private @Resource UpdatePodcastBusiness updatePodcastBusiness;
    private @Resource ItemDownloadManager IDM;

    @Scheduled(cron="${podcastserver.update-and-download.refresh.cron:0 0 * * * *}")
    public void updateAndDownloadPodcast() {
        logger.info(">>> Beginning of the update <<<");
        updatePodcastBusiness.updatePodcast();
        IDM.launchDownload();
        logger.info(">>> End of the update <<<");
    }
}

@@ -169,56 +169,135 @@
 ort 
-org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory
+lombok.RequiredArgsConstructor;%0Aimport lombok.extern.slf4j.Slf4j;%0Aimport org.springframework.beans.factory.annotation.Autowired
 ;%0Aim
@@ -408,43 +408,8 @@
 t;%0A%0A
-import javax.annotation.Resource;%0A%0A
 /**%0A
@@ -447,16 +447,23 @@
 13.%0A */%0A
+@Slf4j%0A
 @Compone
@@ -469,138 +469,107 @@
 ent%0A
-public class UpdateScheduled %7B%0A%0A    private final Logger logger = LoggerFactory.getLogger(this.getClass());%0A%0A    private @Resource
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))%0Apublic class UpdateScheduled %7B%0A%0A    final
  Upd
@@ -618,25 +618,13 @@
     
-private @Resource
+final
  Ite
@@ -779,35 +779,32 @@
 () %7B%0A        log
-ger
 .info(%22%3E%3E%3E Begin
@@ -917,19 +917,16 @@
      log
-ger
 .info(%22%3E

refactor to use lombok for constructor