You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/04/01 10:51:43 UTC

svn commit: r524561 - in /incubator/tuscany/java/sca: idl-java/src/main/java/org/apache/tuscany/idl/ idl-java/src/main/java/org/apache/tuscany/idl/java/ idl-java/src/main/java/org/apache/tuscany/idl/java/impl/ idl-java/src/main/java/org/apache/tuscany/...

Author: jsdelfino
Date: Sun Apr  1 01:51:42 2007
New Revision: 524561

URL: http://svn.apache.org/viewvc?view=rev&rev=524561
Log:
Refactored idl-java and idl-wsdl packages

Added:
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaFactory.java   (with props)
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaInterface.java   (with props)
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/DefaultJavaFactory.java   (with props)
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/JavaInterfaceImpl.java   (with props)
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java   (with props)
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java   (with props)
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java   (with props)
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java   (with props)
Removed:
    incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/idl-wsdl/src/test/java/org/apache/tuscany/sca/

Added: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaFactory.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaFactory.java (added)
+++ incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaFactory.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,34 @@
+/*
+ * 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.idl.java;
+
+/**
+ * Factory for the Java model
+ *
+ *  @version $Rev$ $Date$
+ */
+public interface JavaFactory {
+
+	/**
+	 * Creates a new Java interface.
+	 * @return
+	 */
+	JavaInterface createJavaInterface();
+
+}

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaInterface.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaInterface.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaInterface.java (added)
+++ incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaInterface.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,54 @@
+/*
+ * 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.idl.java;
+
+import org.apache.tuscany.sca.idl.Interface;
+
+/**
+ * Represents a Java interface.
+ *
+ *  @version $Rev$ $Date$
+ */
+public interface JavaInterface extends Interface {
+	
+	/**
+	 * Returns the name of the Java interface class.
+	 * @return the name of the Java interface class
+	 */
+	String getName();
+	
+	/**
+	 * Sets the name of the Java interface class.
+	 * @param className the name of the Java interface class
+	 */
+	void setName(String className);
+	
+	/**
+	 * Returns the Java interface class.
+	 * @return the Java interface class
+	 */
+	Class<?> getJavaClass();
+
+	/**
+	 * Sets the Java interface class.
+	 * @param javaClass the Java interface class
+	 */
+	void setJavaClass(Class<?> javaClass);
+	
+}

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/JavaInterface.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/DefaultJavaFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/DefaultJavaFactory.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/DefaultJavaFactory.java (added)
+++ incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/DefaultJavaFactory.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.idl.java.impl;
+
+import org.apache.tuscany.idl.java.JavaFactory;
+import org.apache.tuscany.idl.java.JavaInterface;
+
+/**
+ * A factory for the Java model.
+ */
+public class DefaultJavaFactory implements JavaFactory {
+	
+	public DefaultJavaFactory() {
+	}
+
+	public JavaInterface createJavaInterface() {
+		return new JavaInterfaceImpl();
+	}
+
+}

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/DefaultJavaFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/DefaultJavaFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/JavaInterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/JavaInterfaceImpl.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/JavaInterfaceImpl.java (added)
+++ incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/JavaInterfaceImpl.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,55 @@
+/*
+ * 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.idl.java.impl;
+
+import org.apache.tuscany.idl.java.JavaInterface;
+import org.apache.tuscany.sca.idl.impl.InterfaceImpl;
+
+/**
+ * Represents a Java interface.
+ *
+ *  @version $Rev$ $Date$
+ */
+public class JavaInterfaceImpl extends InterfaceImpl implements JavaInterface {
+	
+	private String className;
+	private Class<?> javaClass;
+
+	public String getName() {
+		if (isUnresolved())
+			return className;
+		else
+			return javaClass.getName();
+	}
+
+	public void setName(String className) {
+		if (!isUnresolved())
+			throw new IllegalStateException();
+		this.className = className;
+	}
+	
+	public Class<?> getJavaClass() {
+		return javaClass;
+	}
+	
+	public void setJavaClass(Class<?> javaClass) {
+		this.javaClass = javaClass;
+	}
+
+}

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/JavaInterfaceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-java/src/main/java/org/apache/tuscany/idl/java/impl/JavaInterfaceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java (added)
+++ incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,34 @@
+/*
+ * 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.idl;
+
+/**
+ * Factory for the WSDL model.
+ *
+ *  @version $Rev$ $Date$
+ */
+public interface WSDLFactory {
+	
+	/**
+	 * Creates a new WSDL interface.
+	 * @return a new WSDL interface
+	 */
+	WSDLInterface createWSDLInterface();
+
+}

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java (added)
+++ incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,57 @@
+/*
+ * 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.idl;
+
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.idl.Interface;
+
+/**
+ * Represents a WSDL interface.
+ *
+ *  @version $Rev$ $Date$
+ */
+public interface WSDLInterface extends Interface {
+	
+	/**
+	 * Returns the name of the WSDL interface.
+	 * @return the name of the WSDL interface
+	 */
+	QName getName();
+	
+	/**
+	 * Sets the name of the WSDL interface.
+	 * @param className the name of the WSDL interface
+	 */
+	void setName(QName interfaceName);
+	
+	/**
+	 * Returns the WSDL interface portType.
+	 * @return the WSDL interface portType
+	 */
+	PortType getPortType();
+	
+	/**
+	 * Sets the WSDL interface portType
+	 * @param portType the WSDL interface portType
+	 */
+	void setPortType(PortType portType);
+	
+}

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java (added)
+++ incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.idl.wsdl.impl;
+
+import org.apache.tuscany.idl.WSDLFactory;
+import org.apache.tuscany.idl.WSDLInterface;
+
+/**
+ * A factory for the WSDL model.
+ *
+ *  @version $Rev$ $Date$
+ */
+public class DefaultWSDLFactory implements WSDLFactory {
+	
+	public WSDLInterface createWSDLInterface() {
+		return new WSDLInterfaceImpl();
+	}
+
+}

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java?view=auto&rev=524561
==============================================================================
--- incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java (added)
+++ incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java Sun Apr  1 01:51:42 2007
@@ -0,0 +1,62 @@
+/*
+ * 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.idl.wsdl.impl;
+
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.idl.WSDLInterface;
+import org.apache.tuscany.sca.idl.impl.InterfaceImpl;
+
+/**
+ * Represents a WSDL interface.
+ *
+ *  @version $Rev$ $Date$
+ */
+public class WSDLInterfaceImpl extends InterfaceImpl implements WSDLInterface {
+	
+	private QName interfaceName;
+	private PortType portType;
+
+	public WSDLInterfaceImpl() {
+		setRemotable(true);
+	}
+	
+	public QName getName() {
+		if (isUnresolved())
+			return interfaceName;
+		else
+			return portType.getQName();
+	}
+
+	public void setName(QName interfaceName) {
+		if (!isUnresolved())
+			throw new IllegalStateException();
+		this.interfaceName = interfaceName;
+	}
+	
+	public PortType getPortType() {
+		return portType;
+	}
+	
+	public void setPortType(PortType portType) {
+		this.portType = portType;
+	}
+	
+}

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org