diff options
Diffstat (limited to 'java/sca/modules')
2 files changed, 20 insertions, 18 deletions
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java index 2a36d4fd54..0a4df948e8 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java @@ -22,6 +22,7 @@ import javax.xml.stream.XMLInputFactory; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.monitor.Monitor; /** * URLArtifactProcessor that handles sca-contribution-generated.xml files. @@ -31,13 +32,15 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; public class ContributionGeneratedMetadataDocumentProcessor extends ContributionMetadataDocumentProcessor { public ContributionGeneratedMetadataDocumentProcessor(XMLInputFactory inputFactory, - StAXArtifactProcessor staxProcessor) { - super(inputFactory, staxProcessor); + StAXArtifactProcessor staxProcessor, + Monitor monitor) { + super(inputFactory, staxProcessor, monitor); } public ContributionGeneratedMetadataDocumentProcessor(FactoryExtensionPoint modelFactories, - StAXArtifactProcessor staxProcessor) { - super(modelFactories, staxProcessor); + StAXArtifactProcessor staxProcessor, + Monitor monitor) { + super(modelFactories, staxProcessor, monitor); } @Override diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java index 69cd29ea2e..68109b0f28 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java @@ -62,20 +62,6 @@ public class ContributionMetadataDocumentProcessor implements URLArtifactProcess this.staxProcessor = staxProcessor; } - /** - * Report a exception. - * - * @param problems - * @param message - * @param model - */ - private void error(Monitor monitor, String message, Object model, Exception ex) { - if (monitor != null) { - Problem problem = monitor.createProblem(this.getClass().getName(), "contribution-xml-validation-messages", Severity.ERROR, model, message, ex); - monitor.problem(problem); - } - } - public String getArtifactType() { return "/META-INF/sca-contribution.xml"; } @@ -122,4 +108,17 @@ public class ContributionMetadataDocumentProcessor implements URLArtifactProcess staxProcessor.resolve(contribution, resolver, context); } + /** + * Report a exception. + * + * @param problems + * @param message + * @param model + */ + private void error(String message, Object model, Exception ex) { + if (monitor != null) { + Problem problem = monitor.createProblem(this.getClass().getName(), "contribution-xml-validation-messages", Severity.ERROR, model, message, ex); + monitor.problem(problem); + } + } } |