org.hoteia.qalingo.app.cmssync.job.cmscontent.CmsContentItemProcessor.java Source code

Java tutorial

Introduction

Here is the source code for org.hoteia.qalingo.app.cmssync.job.cmscontent.CmsContentItemProcessor.java

Source

/**
 * Most of the code in the Qalingo project is copyrighted Hoteia and licensed
 * under the Apache License Version 2.0 (release version 0.8.0)
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *                   Copyright (c) Hoteia, 2012-2014
 * http://www.hoteia.com - http://twitter.com/hoteia - contact@hoteia.com
 *
 */
package org.hoteia.qalingo.app.cmssync.job.cmscontent;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.InitializingBean;

import org.hoteia.qalingo.core.batch.CommonProcessIndicatorItemWrapper;
import org.hoteia.qalingo.core.domain.CmsContent;

/**
 * 
 */
public class CmsContentItemProcessor<T> implements
        ItemProcessor<CommonProcessIndicatorItemWrapper<CmsContent, CmsContent>, CmsContent>, InitializingBean {

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

    public void afterPropertiesSet() throws Exception {
    }

    /**
     * Use the technical identifier to mark the input row as processed and
     * return unwrapped item.
     */
    public CmsContent process(CommonProcessIndicatorItemWrapper<CmsContent, CmsContent> wrapper) throws Exception {

        CmsContent sourceCmsContent = wrapper.getItem();

        return sourceCmsContent;
    }

}