diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-29 06:44:22 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-29 06:44:22 +0000 |
commit | fcef778b4fb5b4ee7d828c1e9cfb62af2d48d869 (patch) | |
tree | 3037a45c5b4fec2e94c20da66a695951dd7b8584 /branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca | |
parent | b732557ce29c5cc982957861dfb698a66d4a3e18 (diff) |
Fixed monitor module to avoid having to export monitor implementation classes. Removed dependencies on monitor-logging.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@700000 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
2 files changed, 6 insertions, 6 deletions
diff --git a/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java b/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java index 9375cb917f..02d23dbed7 100644 --- a/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java +++ b/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java @@ -48,7 +48,6 @@ import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamReader; -import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.service.ContributionRepository; import org.apache.tuscany.sca.contribution.service.util.FileHelper; @@ -56,6 +55,7 @@ import org.apache.tuscany.sca.contribution.service.util.IOHelper; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; +import org.apache.tuscany.sca.monitor.impl.ProblemImpl; /** * The default implementation of ContributionRepository @@ -84,7 +84,7 @@ public class ContributionRepositoryImpl implements ContributionRepository { */ protected void warning(String message, Object model, String... messageParameters) { if (monitor != null){ - Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-impl-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters); + Problem problem = monitor.createProblem(this.getClass().getName(), "contribution-impl-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters); monitor.problem(problem); } } @@ -98,7 +98,7 @@ public class ContributionRepositoryImpl implements ContributionRepository { */ protected void error(String message, Object model, Object... messageParameters) { if (monitor != null) { - Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters); + Problem problem = monitor.createProblem(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters); monitor.problem(problem); } } @@ -112,7 +112,7 @@ public class ContributionRepositoryImpl implements ContributionRepository { */ protected void error(String message, Object model, Exception ex) { if (monitor != null) { - Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, ex); + Problem problem = monitor.createProblem(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, ex); monitor.problem(problem); } } diff --git a/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java b/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java index 7b8b12ca9d..78f227f0da 100644 --- a/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java +++ b/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java @@ -37,7 +37,6 @@ import javax.xml.stream.XMLStreamException; import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.ContributionFactory; @@ -62,6 +61,7 @@ import org.apache.tuscany.sca.policy.PolicySet; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; +import org.apache.tuscany.sca.monitor.impl.ProblemImpl; /** * Service interface that manages artifacts contributed to a Tuscany runtime. @@ -171,7 +171,7 @@ public class ContributionServiceImpl implements ContributionService { */ private void error(String message, Object model, Object... messageParameters) { if (monitor != null) { - Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters); + Problem problem = monitor.createProblem(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters); monitor.problem(problem); } } |