summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java6
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java2
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Messages.java27
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java2
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/Messages.java27
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ExtensionTypeProcessor.java2
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentProcessor.java4
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/Messages.java27
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java4
-rw-r--r--java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/assembly/xml/assembly-xml-validation-messages.properties (renamed from java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties)0
-rw-r--r--java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/definitions/xml/definitions-xml-validation-messages.properties (renamed from java/sca/modules/assembly-xml/src/main/resources/definitions-xml-validation-messages.properties)0
-rw-r--r--java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/policy/xml/policy-xml-validation-messages.properties (renamed from java/sca/modules/assembly-xml/src/main/resources/policy-xml-validation-messages.properties)0
-rw-r--r--java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/policy/header/JMSHeaderPolicyProcessor.java5
13 files changed, 94 insertions, 12 deletions
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
index 4ab1f0c072..e8c555b3c4 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
@@ -154,7 +154,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor {
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "assembly-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.WARNING,
model,
message,
@@ -174,7 +174,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor {
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "assembly-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.ERROR,
model,
message,
@@ -194,7 +194,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor {
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "assembly-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.ERROR,
model,
message,
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
index b9c6516a68..e9a617b3b6 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
@@ -54,7 +54,7 @@ public class CompositeModelResolver implements ModelResolver {
if (old != null) {
Monitor.error(monitor,
this,
- "assembly-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
"DuplicateCompositeName",
composite.getName().toString(),
contribution.getLocation());
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Messages.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Messages.java
new file mode 100644
index 0000000000..320c4eae62
--- /dev/null
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Messages.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.assembly.xml;
+
+/**
+ * Constants for resource bundle names
+ */
+public interface Messages {
+ String RESOURCE_BUNDLE = "org.apache.tuscany.sca.assembly.xml.assembly-xml-validation-messages";
+}
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java
index 3691212960..cfda3dbebc 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java
@@ -85,7 +85,7 @@ public class DefinitionsDocumentProcessor implements URLArtifactProcessor<Defini
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "definitions-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.ERROR,
model,
message,
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/Messages.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/Messages.java
new file mode 100644
index 0000000000..38cc4a9de2
--- /dev/null
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/Messages.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.definitions.xml;
+
+/**
+ * Constants for resource bundle names
+ */
+public interface Messages {
+ String RESOURCE_BUNDLE = "org.apache.tuscany.sca.definitions.xml.definitions-xml-validation-messages";
+}
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ExtensionTypeProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ExtensionTypeProcessor.java
index f437b5d599..27f2c93971 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ExtensionTypeProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ExtensionTypeProcessor.java
@@ -75,7 +75,7 @@ abstract class ExtensionTypeProcessor extends BaseStAXArtifactProcessor implemen
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "policy-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.ERROR,
model,
message,
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentProcessor.java
index a6f5bb58ea..2a0d2f6111 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentProcessor.java
@@ -80,7 +80,7 @@ public class IntentProcessor extends BaseStAXArtifactProcessor implements StAXAr
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "policy-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.ERROR,
model,
message,
@@ -93,7 +93,7 @@ public class IntentProcessor extends BaseStAXArtifactProcessor implements StAXAr
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "policy-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.WARNING,
model,
message,
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/Messages.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/Messages.java
new file mode 100644
index 0000000000..ee8b5274cc
--- /dev/null
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/Messages.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.xml;
+
+/**
+ * Constants for resource bundle names
+ */
+public interface Messages {
+ String RESOURCE_BUNDLE = "org.apache.tuscany.sca.policy.xml.policy-xml-validation-messages";
+}
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
index a6ee5efde6..1003889edc 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
@@ -100,7 +100,7 @@ public class PolicySetProcessor extends BaseStAXArtifactProcessor implements StA
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "policy-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.ERROR,
model,
message,
@@ -120,7 +120,7 @@ public class PolicySetProcessor extends BaseStAXArtifactProcessor implements StA
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
- "policy-xml-validation-messages",
+ Messages.RESOURCE_BUNDLE,
Severity.ERROR,
model,
message,
diff --git a/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/assembly/xml/assembly-xml-validation-messages.properties
index fe29a3be28..fe29a3be28 100644
--- a/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties
+++ b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/assembly/xml/assembly-xml-validation-messages.properties
diff --git a/java/sca/modules/assembly-xml/src/main/resources/definitions-xml-validation-messages.properties b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/definitions/xml/definitions-xml-validation-messages.properties
index 857887ec3f..857887ec3f 100644
--- a/java/sca/modules/assembly-xml/src/main/resources/definitions-xml-validation-messages.properties
+++ b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/definitions/xml/definitions-xml-validation-messages.properties
diff --git a/java/sca/modules/assembly-xml/src/main/resources/policy-xml-validation-messages.properties b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/policy/xml/policy-xml-validation-messages.properties
index d092b5959a..d092b5959a 100644
--- a/java/sca/modules/assembly-xml/src/main/resources/policy-xml-validation-messages.properties
+++ b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/policy/xml/policy-xml-validation-messages.properties
diff --git a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/policy/header/JMSHeaderPolicyProcessor.java b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/policy/header/JMSHeaderPolicyProcessor.java
index bfa67efa72..fc60c33470 100644
--- a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/policy/header/JMSHeaderPolicyProcessor.java
+++ b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/policy/header/JMSHeaderPolicyProcessor.java
@@ -27,6 +27,7 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.assembly.xml.Messages;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
@@ -63,7 +64,7 @@ public class JMSHeaderPolicyProcessor extends BaseStAXArtifactProcessor implemen
*/
protected void warning(String message, Object model, String... messageParameters) {
if (monitor != null){
- Problem problem = monitor.createProblem(this.getClass().getName(), "assembly-xml-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
+ Problem problem = monitor.createProblem(this.getClass().getName(), Messages.RESOURCE_BUNDLE, Severity.WARNING, model, message, (Object[])messageParameters);
monitor.problem(problem);
}
}
@@ -77,7 +78,7 @@ public class JMSHeaderPolicyProcessor extends BaseStAXArtifactProcessor implemen
*/
protected void error(String message, Object model, Object... messageParameters) {
if (monitor != null) {
- Problem problem = monitor.createProblem(this.getClass().getName(), "assembly-xml-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+ Problem problem = monitor.createProblem(this.getClass().getName(), Messages.RESOURCE_BUNDLE, Severity.ERROR, model, message, (Object[])messageParameters);
monitor.problem(problem);
}
}