summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-07-16 04:07:55 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-07-16 04:07:55 +0000
commita6a65ad2db2b466494a1526d2266931fc3c5fa76 (patch)
tree705677f6446508eed112b05095d0bcc6e3c3e325 /java/sca/modules
parent6d4696612dc9c701a40be66c446f99f5ff6bbacc (diff)
Turn SimpleTypeMapper into a utility so that the implementation-bepl can use it
Fix the OSGi MF git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@794517 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java4
-rw-r--r--java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/SimpleTypeMapper.java23
-rw-r--r--java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/SimpleTypeMapperImpl.java6
-rw-r--r--java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/SimpleJavaDataBinding.java9
-rw-r--r--java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/XML2JavaBeanTransformer.java4
-rw-r--r--java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanXMLStreamReaderImpl.java7
-rw-r--r--java/sca/modules/databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.SimpleTypeMapper17
-rw-r--r--java/sca/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF4
-rw-r--r--java/sca/modules/implementation-bpel-runtime/pom.xml153
-rw-r--r--java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/TuscanyProcessConfImpl.java10
-rw-r--r--java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java11
11 files changed, 76 insertions, 172 deletions
diff --git a/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java b/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java
index 03ee5c9dbd..58c8bdc175 100644
--- a/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java
+++ b/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java
@@ -40,6 +40,7 @@ import javax.xml.bind.annotation.XmlSchema;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
+import org.apache.tuscany.sca.databinding.SimpleTypeMapper;
import org.apache.tuscany.sca.databinding.TransformationContext;
import org.apache.tuscany.sca.databinding.TransformationException;
import org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl;
@@ -61,6 +62,7 @@ public final class JAXBContextHelper {
// public static final String JAXB_CONTEXT_PATH = "jaxb.contextPath";
private static final JAXBContextCache cache = new JAXBContextCache();
+ private static final SimpleTypeMapper SIMPLE_TYPE_MAPPER = new SimpleTypeMapperImpl();
private JAXBContextHelper() {
}
@@ -344,7 +346,7 @@ public final class JAXBContextHelper {
}
if (type == Object.class && dataType.getLogical() instanceof XMLType) {
XMLType xType = (XMLType)dataType.getLogical();
- Class javaType = SimpleTypeMapperImpl.getJavaType(xType.getTypeName());
+ Class javaType = SIMPLE_TYPE_MAPPER.getJavaType(xType.getTypeName());
if (javaType != null) {
type = javaType;
}
diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/SimpleTypeMapper.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/SimpleTypeMapper.java
index 4e6d130aa9..ece8027c29 100644
--- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/SimpleTypeMapper.java
+++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/SimpleTypeMapper.java
@@ -21,6 +21,8 @@ package org.apache.tuscany.sca.databinding;
import javax.xml.namespace.QName;
+import org.apache.tuscany.sca.interfacedef.util.TypeInfo;
+
/**
* Type Mapper between XML schema simple data types and java objects
*
@@ -43,4 +45,25 @@ public interface SimpleTypeMapper {
* @return The XML lexical representation
*/
String toXMLLiteral(QName simpleType, Object obj, TransformationContext context);
+
+ /**
+ * Get the java type for a simple xml type
+ * @param xmlType
+ * @return
+ */
+ Class<?> getJavaType(QName xmlType);
+
+ /**
+ * Get the xml type for a java type
+ * @param javaType
+ * @return
+ */
+ TypeInfo getXMLType(Class<?> javaType);
+
+ /**
+ * Check if an xml type is a simple type
+ * @param xmlType
+ * @return
+ */
+ boolean isSimpleXSDType(QName xmlType);
}
diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/SimpleTypeMapperImpl.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/SimpleTypeMapperImpl.java
index 32a2313f59..9ffa950f1a 100644
--- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/SimpleTypeMapperImpl.java
+++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/SimpleTypeMapperImpl.java
@@ -229,7 +229,7 @@ public class SimpleTypeMapperImpl extends XSDDataTypeConverter implements Simple
}
}
- public static Class getJavaType(QName xmlType) {
+ public Class<?> getJavaType(QName xmlType) {
if (xmlType != null && URI_2001_SCHEMA_XSD.equals(xmlType.getNamespaceURI())) {
return XML2JAVA.get(xmlType.getLocalPart());
} else {
@@ -237,7 +237,7 @@ public class SimpleTypeMapperImpl extends XSDDataTypeConverter implements Simple
}
}
- public static TypeInfo getXMLType(Class javaType) {
+ public TypeInfo getXMLType(Class javaType) {
return XSD_SIMPLE_TYPES.get(JAVA2XML.get(javaType));
}
@@ -390,7 +390,7 @@ public class SimpleTypeMapperImpl extends XSDDataTypeConverter implements Simple
return obj.toString();
}
- public static boolean isSimpleXSDType(QName typeName) {
+ public boolean isSimpleXSDType(QName typeName) {
if (typeName == null) {
return false;
}
diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/SimpleJavaDataBinding.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/SimpleJavaDataBinding.java
index 61a2189c72..b8b97d4425 100644
--- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/SimpleJavaDataBinding.java
+++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/SimpleJavaDataBinding.java
@@ -22,6 +22,8 @@ package org.apache.tuscany.sca.databinding.javabeans;
import javax.xml.namespace.QName;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.databinding.SimpleTypeMapper;
import org.apache.tuscany.sca.databinding.impl.BaseDataBinding;
import org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl;
import org.apache.tuscany.sca.databinding.xml.XMLStringDataBinding;
@@ -37,9 +39,12 @@ import org.apache.tuscany.sca.interfacedef.util.XMLType;
*/
public class SimpleJavaDataBinding extends BaseDataBinding {
public static final String NAME = "java:simpleType";
+ private SimpleTypeMapper simpleTypeMapper = new SimpleTypeMapperImpl();
- public SimpleJavaDataBinding() {
+ public SimpleJavaDataBinding(ExtensionPointRegistry registry) {
super(NAME, Object.class);
+// UtilityExtensionPoint utilityExtensionPoint = registry.getExtensionPoint(UtilityExtensionPoint.class);
+// this.simpleTypeMapper = utilityExtensionPoint.getUtility(SimpleTypeMapper.class);
}
@Override
@@ -68,7 +73,7 @@ public class SimpleJavaDataBinding extends BaseDataBinding {
if (logical instanceof XMLType) {
elementName = ((XMLType)logical).getElementName();
}
- TypeInfo typeInfo = SimpleTypeMapperImpl.getXMLType(cls);
+ TypeInfo typeInfo = simpleTypeMapper.getXMLType(cls);
type.setLogical(new XMLType(elementName, typeInfo == null ? null : typeInfo.getQName()));
return true;
} else {
diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/XML2JavaBeanTransformer.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/XML2JavaBeanTransformer.java
index 01dd8fe963..b441340c38 100644
--- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/XML2JavaBeanTransformer.java
+++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/XML2JavaBeanTransformer.java
@@ -70,7 +70,7 @@ public abstract class XML2JavaBeanTransformer<T> extends BaseTransformer<T, Obje
}
public Object toJavaObject(QName xmlType, T xmlElement, TransformationContext context) {
- if (xmlType != null && SimpleTypeMapperImpl.isSimpleXSDType(xmlType)) {
+ if (xmlType != null && mapper.isSimpleXSDType(xmlType)) {
return mapper.toJavaObject(xmlType, getText(xmlElement), context);
} else {
Class<?> javaType = (Class<?>)context.getTargetDataType().getPhysical();
@@ -82,7 +82,7 @@ public abstract class XML2JavaBeanTransformer<T> extends BaseTransformer<T, Obje
private <L> L createJavaObject(T element, Class<L> javaType, TransformationContext context)
throws XML2JavaMapperException {
if (isTextOnly(element)) {
- return (L) mapper.toJavaObject(SimpleTypeMapperImpl.getXMLType(javaType).getQName(),
+ return (L) mapper.toJavaObject(mapper.getXMLType(javaType).getQName(),
getText(element),
context);
} else {
diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanXMLStreamReaderImpl.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanXMLStreamReaderImpl.java
index 3423d3e3b0..7a130eb2af 100644
--- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanXMLStreamReaderImpl.java
+++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/BeanXMLStreamReaderImpl.java
@@ -37,6 +37,7 @@ import java.util.Map;
import javax.xml.namespace.QName;
+import org.apache.tuscany.sca.databinding.SimpleTypeMapper;
import org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl;
import org.apache.tuscany.sca.interfacedef.util.TypeInfo;
@@ -52,7 +53,7 @@ public class BeanXMLStreamReaderImpl extends XmlTreeStreamReaderImpl {
public static class BeanXmlNodeImpl extends SimpleXmlNodeImpl implements XmlNode {
private static final Object[] NULL = null;
- private static final SimpleTypeMapperImpl MAPPER = new SimpleTypeMapperImpl();
+ private static final SimpleTypeMapper MAPPER = new SimpleTypeMapperImpl();
public BeanXmlNodeImpl(Object bean) {
super(getName(bean == null ? null : bean.getClass()), bean);
@@ -63,14 +64,14 @@ public class BeanXMLStreamReaderImpl extends XmlTreeStreamReaderImpl {
}
private static boolean isSimpleType(Class<?> javaType) {
- return SimpleTypeMapperImpl.getXMLType(javaType) != null;
+ return MAPPER.getXMLType(javaType) != null;
}
private static String getStringValue(Object o) {
if (o == null) {
return null;
}
- TypeInfo info = SimpleTypeMapperImpl.getXMLType(o.getClass());
+ TypeInfo info = MAPPER.getXMLType(o.getClass());
if (info != null) {
return MAPPER.toXMLLiteral(info.getQName(), o, null);
} else {
diff --git a/java/sca/modules/databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.SimpleTypeMapper b/java/sca/modules/databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.SimpleTypeMapper
new file mode 100644
index 0000000000..e3580154b0
--- /dev/null
+++ b/java/sca/modules/databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.SimpleTypeMapper
@@ -0,0 +1,17 @@
+# 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.
+org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl \ No newline at end of file
diff --git a/java/sca/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF b/java/sca/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF
index 339bfc5552..fe4e10184d 100644
--- a/java/sca/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF
+++ b/java/sca/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF
@@ -40,6 +40,8 @@ Import-Package: javax.resource.spi,
org.apache.ode.utils,
org.apache.tuscany.sca.assembly;version="2.0",
org.apache.tuscany.sca.core;version="2.0",
+ org.apache.tuscany.sca.databinding;version="2.0",
+ org.apache.tuscany.sca.databinding.impl;version="2.0",
org.apache.tuscany.sca.databinding.xml;version="2.0",
org.apache.tuscany.sca.implementation.bpel;version="2.0",
org.apache.tuscany.sca.interfacedef;version="2.0",
@@ -48,7 +50,7 @@ Import-Package: javax.resource.spi,
org.apache.tuscany.sca.policy;version="2.0.0",
org.apache.tuscany.sca.provider;version="2.0",
org.apache.tuscany.sca.runtime;version="2.0",
- org.eclipse.core.runtime;common="split",
+ org.eclipse.core.runtime;common=split,
org.oasisopen.sca.annotation;version="2.0",
org.w3c.dom;resolution:=optional
Bundle-SymbolicName: org.apache.tuscany.sca.implementation.bpel.ode
diff --git a/java/sca/modules/implementation-bpel-runtime/pom.xml b/java/sca/modules/implementation-bpel-runtime/pom.xml
index 452d4c0559..122896976d 100644
--- a/java/sca/modules/implementation-bpel-runtime/pom.xml
+++ b/java/sca/modules/implementation-bpel-runtime/pom.xml
@@ -177,7 +177,7 @@
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>common</artifactId>
- <version>3.4.0-v20080421-2006</version>
+ <version>3.5.0-v20090520-1800</version>
</dependency>
<!-- ODE Dependencies -->
@@ -428,17 +428,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <!-- http://jira.codehaus.org/browse/SUREFIRE-322 -->
- <version>2.3.1</version>
- <configuration>
- <useFile>false</useFile>
- <trimStackTrace>false</trimStackTrace>
- <useSystemClassLoader>true</useSystemClassLoader>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
@@ -461,146 +450,6 @@
</artifactItems>
</configuration>
</execution>
- <execution>
- <!--
- Copy the set of dependency JARs that MUST be included within the implementation-bpel-runtime
- JAR for OSGi purposes. These JARs are placed in the Bundle-Classpath in the MANIFEST.MF of
- the JAR so that any required classes from them are all loaded by the classloader for the
- implementation-bpel-runtime bundle
- -->
- <id>copy</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-agents</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-api</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-compiler</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-dao</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-epr</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-obj</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-runtime</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-schemas</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-bpel-store</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-dao-hibernate</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-dao-jpa</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-jacob</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-jacob-ap</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-scheduler-simple</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-utils</artifactId>
- <version>1.3.2</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.geronimo.components</groupId>
- <artifactId>geronimo-connector</artifactId>
- <version>2.0.1</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jta_1.1_spec</artifactId>
- <version>1.1</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.geronimo.components</groupId>
- <artifactId>geronimo-transaction</artifactId>
- <version>2.0.1</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- <type>jar</type>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
- <overWriteReleases>true</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
</executions>
</plugin>
diff --git a/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/TuscanyProcessConfImpl.java b/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/TuscanyProcessConfImpl.java
index 97ee7ca5b1..89f3ad9568 100644
--- a/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/TuscanyProcessConfImpl.java
+++ b/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/TuscanyProcessConfImpl.java
@@ -56,14 +56,15 @@ import org.apache.ode.bpel.iapi.Endpoint;
import org.apache.ode.bpel.iapi.EndpointReference;
import org.apache.ode.bpel.iapi.ProcessConf;
import org.apache.ode.bpel.iapi.ProcessState;
-import org.apache.ode.bpel.iapi.ProcessConf.CLEANUP_CATEGORY;
+import org.apache.tuscany.sca.assembly.Base;
import org.apache.tuscany.sca.assembly.ComponentProperty;
import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.databinding.SimpleTypeMapper;
+import org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl;
import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -90,7 +91,8 @@ public class TuscanyProcessConfImpl implements ProcessConf {
// Marks whether the BPEL file was rewritten (eg for initializer statements)
private boolean rewritten = false;
- private final String TUSCANY_NAMESPACE = "http://tuscany.apache.org";
+ private final SimpleTypeMapper mapper = new SimpleTypeMapperImpl();
+ private final String TUSCANY_NAMESPACE = Base.SCA11_TUSCANY_NS;
/**
* Constructor for the ProcessConf implementation
@@ -495,7 +497,7 @@ public class TuscanyProcessConfImpl implements ProcessConf {
// <assign><copy><from><literal>value</literal></from><to variable="variableName"/></copy></assign>
QName type = property.getXSDType();
if( type != null ) {
- if( SimpleTypeMapperImpl.isSimpleXSDType( type ) ) {
+ if( mapper.isSimpleXSDType( type ) ) {
// Simple types
String NS_URI = bpelDOM.getDocumentElement().getNamespaceURI();
String valueText = getPropertyValueText( property.getValue() );
diff --git a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java
index 57d6d199ea..e681af7217 100644
--- a/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java
+++ b/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/JavaPropertyValueObjectFactory.java
@@ -52,10 +52,13 @@ import org.w3c.dom.NodeList;
*/
public class JavaPropertyValueObjectFactory implements PropertyValueFactory {
private Mediator mediator = null;
+ private SimpleTypeMapper simpleTypeMapper;
private boolean isSimpleType;
public JavaPropertyValueObjectFactory(ExtensionPointRegistry registry) {
- this.mediator = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Mediator.class);
+ UtilityExtensionPoint utilityExtensionPoint = registry.getExtensionPoint(UtilityExtensionPoint.class);
+ this.mediator = utilityExtensionPoint.getUtility(Mediator.class);
+ this.simpleTypeMapper = utilityExtensionPoint.getUtility(SimpleTypeMapper.class);
}
public JavaPropertyValueObjectFactory(Mediator mediator) {
@@ -130,7 +133,7 @@ public class JavaPropertyValueObjectFactory implements PropertyValueFactory {
new XMLType(null, this.property.getXSDType()));
TypeInfo typeInfo = null;
if (this.property.getXSDType() != null) {
- if (SimpleTypeMapperImpl.isSimpleXSDType(this.property.getXSDType())) {
+ if (simpleTypeMapper.isSimpleXSDType(this.property.getXSDType())) {
typeInfo = new TypeInfo(property.getXSDType(), true, null);
} else {
typeInfo = new TypeInfo(property.getXSDType(), false, null);
@@ -264,9 +267,9 @@ public class JavaPropertyValueObjectFactory implements PropertyValueFactory {
* @param property
* @return
*/
- private static boolean isSimpleType(Property property) {
+ private boolean isSimpleType(Property property) {
if (property.getXSDType() != null) {
- return SimpleTypeMapperImpl.isSimpleXSDType(property.getXSDType());
+ return simpleTypeMapper.isSimpleXSDType(property.getXSDType());
} else {
if (property instanceof Document) {
Document doc = (Document)property;