summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/assembly/src/main
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-05-06 12:31:45 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-05-06 12:31:45 +0000
commit79ee3ef4b1e7014231af2627572b03c497063e3a (patch)
tree39a2948aeb4ad8be0c41891dc80f271d79ff57f7 /sca-java-2.x/trunk/modules/assembly/src/main
parent5d02eac6f0ecb65cf887b5870009aaa7e6bafd3f (diff)
TUSCANY-3530 - first raft of changes to turn on property type checking at deployment time. Required by ASM_5038 and ASM_5039. Still some TODOs including handling elements, composite properties, multiplicity and complex types derived from the component type.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@941695 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AbstractProperty.java16
-rw-r--r--sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java9
-rw-r--r--sca-java-2.x/trunk/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages.properties3
3 files changed, 28 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AbstractProperty.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AbstractProperty.java
index 6d2f665c0a..45fa05d66c 100644
--- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AbstractProperty.java
+++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AbstractProperty.java
@@ -132,4 +132,20 @@ public interface AbstractProperty extends Base, Extensible {
* @param dataType The data type
*/
void setDataType(DataType dataType);
+
+ /**
+ * Get the XML schema that represents the type if this property.
+ * Used during property value validation
+ *
+ * @return
+ */
+ Object getXSDDefinition();
+
+ /**
+ * Set the XML schema that represents the type if this property.
+ * Used during property value validation
+ *
+ * @param xsdDefintion
+ */
+ void setXSDDefinition(Object xsdDefintion);
}
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java
index a7c033d479..24dc20f815 100644
--- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java
+++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java
@@ -37,6 +37,7 @@ public class AbstractPropertyImpl extends ExtensibleImpl implements AbstractProp
protected boolean many;
protected boolean mustSupply;
protected DataType dataType;
+ protected Object xsdDefinition;
/**
* Constructs a new abstract property.
@@ -99,5 +100,13 @@ public class AbstractPropertyImpl extends ExtensibleImpl implements AbstractProp
public void setDataType(DataType dataType) {
this.dataType = dataType;
}
+
+ public Object getXSDDefinition() {
+ return xsdDefinition;
+ }
+
+ public void setXSDDefinition(Object xsdDefinition) {
+ this.xsdDefinition = xsdDefinition;
+ }
}
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages.properties b/sca-java-2.x/trunk/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages.properties
index 8e6b351ea4..c529a518d6 100644
--- a/sca-java-2.x/trunk/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages.properties
+++ b/sca-java-2.x/trunk/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages.properties
@@ -76,3 +76,6 @@ PropertXSDElementsDontMatch = [ASM_5036] The property component {0} property {1}
IntentNotSatisfied = The intent {0} associated with policy subject {1} has no matching policy set
URIFoundOnServiceSCABinding = [ASM90005] The SCA binding {0} on component {1} service {2} should not have a URI and the URI is currently set to {3}
CompositeReferencePromotesNonOverridableReference = [ASM50042] Composite reference promotes component reference with 1..1 multiplicity and nonOverridable flag set true: Composite = {0} Composite reference = {1} Component reference = {2}
+PropertyValueDoesNotMatchSimpleType = [ASM50027] The property {0} on component {1} has a value which does not match the simple type {2} with which it is associated
+PropertyValueDoesNotMatchComplexType = [ASM50038] The property {0} on component {1} has a value which does not match the complex type {2} with which it is associated. Validation reported {3}
+PropertyValueDoesNotMatchElement = [ASM50029] The property {0} on component {1} has a value which does not match the element {2} with which it is associated. Validation reported {3}