diff options
Diffstat (limited to 'branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace')
5 files changed, 0 insertions, 198 deletions
diff --git a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/SCANamespaceHandlerResolver.java b/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/SCANamespaceHandlerResolver.java deleted file mode 100644 index 75e00007f6..0000000000 --- a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/SCANamespaceHandlerResolver.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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.implementation.spring.namespace; - -import org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver; -import org.springframework.beans.factory.xml.NamespaceHandler; - -/** - * Overrides the default Spring namespace resolver to automatically register - * {@link ScaNamespaceHandler} instead of requiring a value to be supplied in a - * Spring configuration - * - * @version $Rev$ $Date$ - */ -public class SCANamespaceHandlerResolver extends DefaultNamespaceHandlerResolver { - private static final String SCA_NAMESPACE = "http://www.springframework.org/schema/sca"; - - private ScaNamespaceHandler handler; - - public SCANamespaceHandlerResolver(ClassLoader classLoader) { - super(classLoader); - handler = new ScaNamespaceHandler(/*componentType*/); - } - - public SCANamespaceHandlerResolver(String handlerMappingsLocation, ClassLoader classLoader) { - super(classLoader, handlerMappingsLocation); - handler = new ScaNamespaceHandler(/*componentType*/); - } - - @Override - public NamespaceHandler resolve(String namespaceUri) { - if (SCA_NAMESPACE.equals(namespaceUri)) { - return handler; - } - return super.resolve(namespaceUri); - } -} diff --git a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaNamespaceHandler.java b/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaNamespaceHandler.java deleted file mode 100644 index f136e45b87..0000000000 --- a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaNamespaceHandler.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2002-2006 the original author or authors. - * - * Licensed 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.implementation.spring.namespace; - -import org.springframework.beans.factory.xml.NamespaceHandlerSupport; - -/** - * Handler for the <sca:> namespace in an application context - * - * @version $Rev$ $Date$ - */ -public class ScaNamespaceHandler extends NamespaceHandlerSupport { - - public ScaNamespaceHandler() { - init(); - } - - public final void init() { - registerBeanDefinitionParser("reference", new ScaReferenceBeanDefinitionParser()); - registerBeanDefinitionParser("service", new ScaServiceBeanDefinitionParser()); - registerBeanDefinitionParser("property", new ScaPropertyBeanDefinitionParser()); - } - -} diff --git a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaPropertyBeanDefinitionParser.java b/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaPropertyBeanDefinitionParser.java deleted file mode 100644 index 5b1064d8d8..0000000000 --- a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaPropertyBeanDefinitionParser.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2002-2006 the original author or authors. - * - * Licensed 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.implementation.spring.namespace; - -import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.factory.xml.BeanDefinitionParser; -import org.springframework.beans.factory.xml.ParserContext; -import org.w3c.dom.Element; - -/** - * Parser for the <sca:reference> element - * @version $Rev$ $Date$ - */ -public class ScaPropertyBeanDefinitionParser implements BeanDefinitionParser { - - public BeanDefinition parse(Element element, ParserContext parserContext) { - // do nothing, this is handled by Tuscany - return null; - } - -} diff --git a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaReferenceBeanDefinitionParser.java b/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaReferenceBeanDefinitionParser.java deleted file mode 100644 index fac02760c9..0000000000 --- a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaReferenceBeanDefinitionParser.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2002-2006 the original author or authors. - * - * Licensed 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.implementation.spring.namespace; - -import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.factory.xml.BeanDefinitionParser; -import org.springframework.beans.factory.xml.ParserContext; -import org.w3c.dom.Element; - -/** - * Parser for the <sca:reference> element - * - * @version $Rev$ $Date$ - */ -public class ScaReferenceBeanDefinitionParser implements BeanDefinitionParser { - - public BeanDefinition parse(Element element, ParserContext parserContext) { - // do nothing, this is handled by Tuscany - return null; - } - -} diff --git a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaServiceBeanDefinitionParser.java b/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaServiceBeanDefinitionParser.java deleted file mode 100644 index 3020dca8bc..0000000000 --- a/branches/sca-java-2.0-M4/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/namespace/ScaServiceBeanDefinitionParser.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2002-2006 the original author or authors. - * - * Licensed 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.implementation.spring.namespace; - -import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.factory.xml.BeanDefinitionParser; -import org.springframework.beans.factory.xml.ParserContext; -import org.w3c.dom.Element; - -/** - * Parser for the <sca:service/> element - * - * @version $Rev$ $Date$ - */ -public class ScaServiceBeanDefinitionParser implements BeanDefinitionParser { - - public BeanDefinition parse(Element element, ParserContext parserContext) { - // do nothing, handled by Tuscany - return null; - } - -} |