001package org.andromda.core.common;
002
003import java.io.File;
004
005/**
006 * Interface for all PostProcessor
007 * @author Plushnikov Michail
008 */
009public interface PostProcessor
010{
011    /**
012     * Determines if this file should be postprocessed in current postprocessor
013     * @param pFile file for postprocessing
014     * @return true if postprocessing should be done, false sonst
015     */
016    public boolean acceptFile(File pFile);
017
018    /**
019     * Postprocess the source
020     * @param pSource the Source for postprocessing
021     * @param pPreviousData the Source of existing file, may be null or empty
022     * @return postprocessed source
023     * @throws Exception on errors occurred
024     */
025    public String postProcess(String pSource, String pPreviousData) throws Exception;
026}