From f59fca36e7538cafbd6032003c7b06d64862a2bf Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 19 Jul 2010 02:50:53 +0000 Subject: Branch to experiment with dynamic component interfaces and implementations. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@965346 13f79535-47bb-0310-9956-ffa450edef68 --- .../jaxrs/JAXRSOperationSelector.java | 43 +++++++++++++++++++++ .../jaxrs/JAXRSOperationSelectorFactory.java | 35 +++++++++++++++++ .../impl/JAXRSOperationSelectorFactoryImpl.java | 36 +++++++++++++++++ .../jaxrs/impl/JAXRSOperationSelectorImpl.java | 45 ++++++++++++++++++++++ .../rpc/RPCOperationSelector.java | 43 +++++++++++++++++++++ .../rpc/RPCOperationSelectorFactory.java | 35 +++++++++++++++++ .../rpc/impl/RPCOperationSelectorFactoryImpl.java | 36 +++++++++++++++++ .../rpc/impl/RPCOperationSelectorImpl.java | 45 ++++++++++++++++++++++ 8 files changed, 318 insertions(+) create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelector.java create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelectorFactory.java create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorFactoryImpl.java create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorImpl.java create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java create mode 100644 sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java (limited to 'sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector') diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelector.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelector.java new file mode 100644 index 0000000000..aea3dce7ae --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelector.java @@ -0,0 +1,43 @@ +/* + * 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.binding.rest.operationselector.jaxrs; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.assembly.OperationSelector; +import org.apache.tuscany.sca.assembly.xml.Constants; + +/** + * JAX_RS Operation Selector model + * + * @version $Rev$ $Date$ + */ +public interface JAXRSOperationSelector extends OperationSelector { + /** + * QName representing the REST JAX_RS Operation Selector extension + */ + public static final QName REST_OPERATION_SELECTOR_JAXRS_QNAME = new QName(Constants.SCA11_TUSCANY_NS, "operationSelector.jaxrs"); + + /** + * Return the QName identifying the operation selector + * @return the QName identifying the operation selector + */ + QName getSchemaName(); +} diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelectorFactory.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelectorFactory.java new file mode 100644 index 0000000000..bdd3eca740 --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/JAXRSOperationSelectorFactory.java @@ -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.sca.binding.rest.operationselector.jaxrs; + + +/** + * JAX-RS Operation Selector model factory + * + * @version $Rev$ $Date$ + */ +public interface JAXRSOperationSelectorFactory { + + /** + * Create a new JAX-RS Operation Selector + * @return + */ + JAXRSOperationSelector createJAXRSOperationSelector(); +} diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorFactoryImpl.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorFactoryImpl.java new file mode 100644 index 0000000000..c47087e660 --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorFactoryImpl.java @@ -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.sca.binding.rest.operationselector.jaxrs.impl; + +import org.apache.tuscany.sca.binding.rest.operationselector.jaxrs.JAXRSOperationSelector; +import org.apache.tuscany.sca.binding.rest.operationselector.jaxrs.JAXRSOperationSelectorFactory; + +/** + * JAX-RS Operation Selector model factory implementation + * + * @version $Rev$ $Date$ + */ +public class JAXRSOperationSelectorFactoryImpl implements JAXRSOperationSelectorFactory { + + public JAXRSOperationSelector createJAXRSOperationSelector() { + return new JAXRSOperationSelectorImpl(); + } + +} diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorImpl.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorImpl.java new file mode 100644 index 0000000000..ef214c3642 --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/impl/JAXRSOperationSelectorImpl.java @@ -0,0 +1,45 @@ +/* + * 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.binding.rest.operationselector.jaxrs.impl; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.binding.rest.operationselector.jaxrs.JAXRSOperationSelector; + + +/** + * JAX-RS Operation Selector model implementation + * + * @version $Rev$ $Date$ + */ +public class JAXRSOperationSelectorImpl implements JAXRSOperationSelector { + + public QName getSchemaName() { + return JAXRSOperationSelector.REST_OPERATION_SELECTOR_JAXRS_QNAME; + } + + public boolean isUnresolved() { + return false; + } + + public void setUnresolved(boolean unresolved) { + + } +} diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java new file mode 100644 index 0000000000..7730a1e75e --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java @@ -0,0 +1,43 @@ +/* + * 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.binding.rest.operationselector.rpc; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.assembly.OperationSelector; +import org.apache.tuscany.sca.assembly.xml.Constants; + +/** + * RPC Operation Selector model + * + * @version $Rev$ $Date$ + */ +public interface RPCOperationSelector extends OperationSelector { + /** + * QName representing the RPC Operation Selector extension + */ + public static final QName REST_OPERATION_SELECTOR_RPC_QNAME = new QName(Constants.SCA11_TUSCANY_NS, "operationSelector.rpc"); + + /** + * Return the QName identifying the operation selector + * @return the QName identifying the operation selector + */ + QName getSchemaName(); +} diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java new file mode 100644 index 0000000000..27a56c374d --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java @@ -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.sca.binding.rest.operationselector.rpc; + + +/** + * RPC Operation Selector model factory + * + * @version $Rev$ $Date$ + */ +public interface RPCOperationSelectorFactory { + + /** + * Create a new RPC Operation Selector + * @return + */ + RPCOperationSelector createRPCOperationSelector(); +} diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java new file mode 100644 index 0000000000..9e67f35bc0 --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java @@ -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.sca.binding.rest.operationselector.rpc.impl; + +import org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelector; +import org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelectorFactory; + +/** + * RPC Operation Selector model factory implementation + * + * @version $Rev$ $Date$ + */ +public class RPCOperationSelectorFactoryImpl implements RPCOperationSelectorFactory { + + public RPCOperationSelector createRPCOperationSelector() { + return new RPCOperationSelectorImpl(); + } + +} diff --git a/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java new file mode 100644 index 0000000000..bca8218f8d --- /dev/null +++ b/sandbox/sebastien/java/dynamic/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java @@ -0,0 +1,45 @@ +/* + * 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.binding.rest.operationselector.rpc.impl; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelector; + + +/** + * RPC Operation Selector model implementation + * + * @version $Rev$ $Date$ + */ +public class RPCOperationSelectorImpl implements RPCOperationSelector { + + public QName getSchemaName() { + return RPCOperationSelector.REST_OPERATION_SELECTOR_RPC_QNAME; + } + + public boolean isUnresolved() { + return false; + } + + public void setUnresolved(boolean unresolved) { + + } +} -- cgit v1.2.3