From 7d34713fecd6b842bb4abd78f3bbc5bac6dad3bf Mon Sep 17 00:00:00 2001 From: slaws Date: Fri, 29 Aug 2008 08:31:14 +0000 Subject: Branch for 1.3.2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@690149 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/binding/http/HTTPBinding.java | 31 +++++++++++ .../sca/binding/http/HTTPBindingFactory.java | 35 ++++++++++++ .../binding/http/impl/HTTPBindingFactoryImpl.java | 36 ++++++++++++ .../sca/binding/http/impl/HTTPBindingImpl.java | 64 ++++++++++++++++++++++ ...che.tuscany.sca.binding.http.HTTPBindingFactory | 19 +++++++ ...ca.contribution.processor.StAXArtifactProcessor | 19 +++++++ 6 files changed, 204 insertions(+) create mode 100644 branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java create mode 100644 branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java create mode 100644 branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java create mode 100644 branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java create mode 100644 branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory create mode 100644 branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (limited to 'branches/sca-java-1.3.2/modules/binding-http/src') diff --git a/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java new file mode 100644 index 0000000000..6192b92dfe --- /dev/null +++ b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java @@ -0,0 +1,31 @@ +/* + * 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.http; + +import org.apache.tuscany.sca.assembly.Binding; + + +/** + * HTTP binding model. + * + * @version $Rev$ $Date$ +*/ +public interface HTTPBinding extends Binding { +} diff --git a/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java new file mode 100644 index 0000000000..370e4cdb67 --- /dev/null +++ b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.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.http; + +/** + * Factory for the HTTP binding model. + * + * @version $Rev$ $Date$ + */ +public interface HTTPBindingFactory { + + /** + * Creates a new HTTP binding. + * @return a new HTTP binding + */ + HTTPBinding createHTTPResourceBinding(); + +} diff --git a/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java new file mode 100644 index 0000000000..7e72b7dd85 --- /dev/null +++ b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.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.http.impl; + +import org.apache.tuscany.sca.binding.http.HTTPBinding; +import org.apache.tuscany.sca.binding.http.HTTPBindingFactory; + +/** + * Factory for the HTTP binding model. + * + * @version $Rev$ $Date$ + */ +public class HTTPBindingFactoryImpl implements HTTPBindingFactory { + + public HTTPBinding createHTTPResourceBinding() { + return new HTTPBindingImpl(); + } + +} diff --git a/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java new file mode 100644 index 0000000000..ced0d79887 --- /dev/null +++ b/branches/sca-java-1.3.2/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java @@ -0,0 +1,64 @@ +/* + * 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.http.impl; + +import org.apache.tuscany.sca.binding.http.HTTPBinding; + + +/** + * Implementation of the HTTP binding model. + * + * @version $Rev$ $Date$ + */ +class HTTPBindingImpl implements HTTPBinding { + + private String name; + private String uri; + + public String getName() { + return name; + } + + public String getURI() { + return uri; + } + + public void setName(String name) { + this.name = name; + } + + public void setURI(String uri) { + this.uri = uri; + } + + + public boolean isUnresolved() { + return false; + } + + public void setUnresolved(boolean unresolved) { + // The sample binding is always resolved + } + + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + +} diff --git a/branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory b/branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory new file mode 100644 index 0000000000..44da6b166c --- /dev/null +++ b/branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory @@ -0,0 +1,19 @@ +# 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. + +# Implementation class for model factory +org.apache.tuscany.sca.binding.http.impl.HTTPBindingFactoryImpl diff --git a/branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor new file mode 100644 index 0000000000..cc07784cb7 --- /dev/null +++ b/branches/sca-java-1.3.2/modules/binding-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -0,0 +1,19 @@ +# 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. + +# Implementation class for the artifact processor extension +org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#binding.http,model=org.apache.tuscany.sca.binding.http.HTTPBinding,factory=org.apache.tuscany.sca.binding.http.HTTPBindingFactory -- cgit v1.2.3