added normalizeFile() method

This commit is contained in:
Brian Long 2022-10-10 22:17:52 -04:00
parent 330eab9cf1
commit cc1019a22e
5 changed files with 20 additions and 5 deletions

View File

@ -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;

View File

@ -29,5 +29,20 @@ import com.inteligr8.maven.aps.modeling.crawler.ApsFileTransformer;
* has changed.
*/
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;
}

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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)