added normalizeFile() method
This commit is contained in:
parent
330eab9cf1
commit
cc1019a22e
src/main/java/com/inteligr8/maven/aps/modeling/normalizer
@ -56,7 +56,7 @@ public class ApsAppJsonNormalizer implements ApsFileNormalizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
this.logger.debug("Normalizing App JSON file: {}", file);
|
||||||
|
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
@ -29,5 +29,20 @@ import com.inteligr8.maven.aps.modeling.crawler.ApsFileTransformer;
|
|||||||
* has changed.
|
* has changed.
|
||||||
*/
|
*/
|
||||||
public interface ApsFileNormalizer extends 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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,9 +32,9 @@ public class ApsFormJsonNormalizer implements ApsFileNormalizer {
|
|||||||
private final Logger logger = LoggerFactory.getLogger(ApsFormJsonNormalizer.class);
|
private final Logger logger = LoggerFactory.getLogger(ApsFormJsonNormalizer.class);
|
||||||
|
|
||||||
@Override
|
@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.debug("Normalizing Form JSON file: {}", file);
|
||||||
this.logger.trace("Nothing to normalize: {}", file);
|
this.logger.trace("Nothing to normalize: {}", modelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public class ApsProcessBpmnNormalizer implements ApsFileNormalizer {
|
|||||||
private final Logger logger = LoggerFactory.getLogger(ApsProcessBpmnNormalizer.class);
|
private final Logger logger = LoggerFactory.getLogger(ApsProcessBpmnNormalizer.class);
|
||||||
|
|
||||||
@Override
|
@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);
|
this.logger.debug("Normalizing Process BPMN file: {}", file);
|
||||||
|
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
@ -55,7 +55,7 @@ public class ApsProcessJsonNormalizer implements ApsFileNormalizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
this.logger.debug("Normalizing Process JSON file: {}", file);
|
||||||
|
|
||||||
if (!this.enableSorting)
|
if (!this.enableSorting)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user