Commit cc1019a2 authored by Brian Long's avatar Brian Long
Browse files

added normalizeFile() method

parent 330eab9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public class ApsAppJsonNormalizer implements ApsFileNormalizer {
	}
	
	@Override
	public void transformFile(File file, String modelName, Long modelId) throws IOException {
	public void normalizeFile(File file, String modelName) throws IOException {
		this.logger.debug("Normalizing App JSON file: {}", file);

		boolean changed = false;
+15 −0
Original line number Diff line number Diff line
@@ -30,4 +30,19 @@ import com.inteligr8.maven.aps.modeling.crawler.ApsFileTransformer;
 */
public interface ApsFileNormalizer extends ApsFileTransformer {
	
	@Override
	default void transformFile(File file, String modelName, Long modelId) throws IOException {
		this.normalizeFile(file, modelName);
	}
	
	/**
	 * This method normalizes the specified file which should be referred to
	 * with the specified name.
	 * 
	 * @param file A model file.
	 * @param modelName The model name.
	 * @throws IOException An I/O related exception has occurred during normalization.
	 */
	void normalizeFile(File file, String modelName) throws IOException;

}
+2 −2
Original line number Diff line number Diff line
@@ -32,9 +32,9 @@ public class ApsFormJsonNormalizer implements ApsFileNormalizer {
	private final Logger logger = LoggerFactory.getLogger(ApsFormJsonNormalizer.class);
	
	@Override
	public void transformFile(File file, String modelName, Long modelId) throws IOException {
	public void normalizeFile(File file, String modelName) throws IOException {
		this.logger.debug("Normalizing Form JSON file: {}", file);
		this.logger.trace("Nothing to normalize: {}", file);
		this.logger.trace("Nothing to normalize: {}", modelName);
	}

}
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public class ApsProcessBpmnNormalizer implements ApsFileNormalizer {
	private final Logger logger = LoggerFactory.getLogger(ApsProcessBpmnNormalizer.class);
	
	@Override
	public void transformFile(File file, String modelName, Long modelId) throws IOException {
	public void normalizeFile(File file, String modelName) throws IOException {
		this.logger.debug("Normalizing Process BPMN file: {}", file);
		
		boolean changed = false;
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public class ApsProcessJsonNormalizer implements ApsFileNormalizer {
	}
	
	@Override
	public void transformFile(File file, String modelName, Long modelId) throws IOException {
	public void normalizeFile(File file, String modelName) throws IOException {
		this.logger.debug("Normalizing Process JSON file: {}", file);
		
		if (!this.enableSorting)