[jboss-cvs] JBossAS SVN: r75430 - in projects/microcontainer/trunk: kernel/src/main/org/jboss/beans/metadata/plugins and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 7 05:43:23 EDT 2008
Author: alesj
Date: 2008-07-07 05:43:22 -0400 (Mon, 07 Jul 2008)
New Revision: 75430
Removed:
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java
Modified:
projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/spi/ErrorHandlingMode.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/AbstractNamedAliasMetaData.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/AbstractConfigureAction.java
projects/microcontainer/trunk/spring-int/src/tests/org/jboss/test/spring/test/DescribeSpringTestCase.java
Log:
[JBMICROCONT-264]; remove bean factory schema code.
Modified: projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/spi/ErrorHandlingMode.java
===================================================================
--- projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/spi/ErrorHandlingMode.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/spi/ErrorHandlingMode.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -21,8 +21,6 @@
*/
package org.jboss.dependency.spi;
-import java.util.Arrays;
-
import org.jboss.xb.annotations.JBossXmlEnum;
/**
@@ -35,16 +33,5 @@
{
DISCARD, // The default as before
MANUAL, // Handle contexts in error yourself
- CHECKED; // As MANUAL but RuntimeExceptions, Errors lead to a DISCARD
-
- // TODO - remove after 219
- public static ErrorHandlingMode getInstance(String type)
- {
- for(ErrorHandlingMode mode : values())
- {
- if (mode.toString().equalsIgnoreCase(type))
- return mode;
- }
- throw new IllegalArgumentException("No such error handling mode: " + type + ", available: " + Arrays.toString(values()));
- }
+ CHECKED // As MANUAL but RuntimeExceptions, Errors lead to a DISCARD
}
Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/AbstractNamedAliasMetaData.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/AbstractNamedAliasMetaData.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/AbstractNamedAliasMetaData.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -21,10 +21,9 @@
*/
package org.jboss.beans.metadata.plugins;
-import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
-import org.jboss.beans.metadata.spi.MetaDataVisitor;
import org.jboss.beans.metadata.spi.NamedAliasMetaData;
import org.jboss.util.JBossStringBuilder;
@@ -66,12 +65,6 @@
this.name = name;
}
- public void initialVisit(MetaDataVisitor visitor)
- {
- // todo
- super.initialVisit(visitor);
- }
-
public void toString(JBossStringBuilder buffer)
{
buffer.append("name=").append(name).append(" ");
Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/AbstractConfigureAction.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/AbstractConfigureAction.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/dependency/AbstractConfigureAction.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -42,10 +42,6 @@
return ConfigureKernelControllerContextAware.class;
}
- //TODO remove this?
- //In case the class is EXACTLY KernelControllerContextAware, we call it from here,
- //required for KernelControllerContextAwareTestCase and KernelControllerContextAwareXMLTestCase
-
/**
* Execute KCCA install.
*
Deleted: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -1,47 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.deployment.xml;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanFactoryConstructorInterecptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 71101 $
- */
-public class BeanFactoryConstructorInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanFactoryConstructorInterceptor INTERCEPTOR = new BeanFactoryConstructorInterceptor();
-
- @SuppressWarnings("deprecation")
- public void add(Object parent, Object child, QName name)
- {
- org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData bean = (org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData) parent;
- AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) child;
- bean.setBeanConstructor(constructor);
- }
-}
Deleted: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -1,48 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.deployment.xml;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanFactoryCreateInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 71101 $
- */
-public class BeanFactoryCreateInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanFactoryCreateInterceptor INTERCEPTOR = new BeanFactoryCreateInterceptor();
-
- @SuppressWarnings("deprecation")
- public void add(Object parent, Object child, QName name)
- {
- org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData bean = (org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData) parent;
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
- lifecycle.setType("create");
- bean.setBeanCreate(lifecycle);
- }
-}
Deleted: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -1,102 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.deployment.xml;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.info.spi.BeanAccessMode;
-import org.jboss.beans.metadata.spi.ConstructorMetaData;
-import org.jboss.beans.metadata.spi.PropertyMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.dependency.spi.ControllerMode;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * BeanFactoryHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 71101 $
- */
-public class BeanFactoryHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final BeanFactoryHandler HANDLER = new BeanFactoryHandler();
-
- @SuppressWarnings("deprecation")
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData();
- }
-
- @SuppressWarnings("deprecation")
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData bean = (org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- bean.setName(attrs.getValue(i));
- else if ("class".equals(localName))
- bean.setBeanClass(attrs.getValue(i));
- else if ("factoryClass".equals(localName))
- bean.setFactoryClass(attrs.getValue(i));
- else if ("mode".equals(localName))
- bean.setMode(ControllerMode.getInstance(attrs.getValue(i)));
- else if ("access-mode".equals(localName))
- {
- BeanAccessMode mode = BeanAccessMode.STANDARD;
- if ("fields".equalsIgnoreCase(localName))
- mode = BeanAccessMode.FIELDS;
- else if ("all".equalsIgnoreCase(localName))
- mode = BeanAccessMode.ALL;
- bean.setAccessMode(mode);
- }
- }
- }
-
- @SuppressWarnings("deprecation")
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData bean = (org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData) o;
- if (bean.getBeanClass() == null)
- {
- PropertyMetaData property = bean.getProperty("constructor");
- if (property == null)
- throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
- ValueMetaData value = property.getValue();
- if (value == null)
- throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
- ConstructorMetaData constructor = (ConstructorMetaData) value.getUnderlyingValue();
- if (constructor == null)
- throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
- if (constructor.getFactoryMethod() == null)
- throw new IllegalArgumentException("BeanFactory should have a class attribute or the constructor element should have a factoryMethod attribute.");
- if (constructor.getFactory() == null && constructor.getFactoryClass() == null)
- throw new IllegalArgumentException("BeanFactory should have a class attribute or the constructor element should have a either a factoryClass attribute or a factory element.");
- }
- return bean;
- }
-}
Deleted: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -1,48 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.deployment.xml;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanFactoryPropertyInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 71101 $
- */
-public class BeanFactoryPropertyInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanFactoryPropertyInterceptor INTERCEPTOR = new BeanFactoryPropertyInterceptor();
-
- @Deprecated
- @SuppressWarnings("deprecation")
- public void add(Object parent, Object child, QName name)
- {
- org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData bean = (org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData) parent;
- AbstractPropertyMetaData property = (AbstractPropertyMetaData) child;
- bean.addBeanProperty(property);
- }
-}
Deleted: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -1,48 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.deployment.xml;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanFactoryStartInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 71101 $
- */
-public class BeanFactoryStartInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanFactoryStartInterceptor INTERCEPTOR = new BeanFactoryStartInterceptor();
-
- @SuppressWarnings("deprecation")
- public void add(Object parent, Object child, QName name)
- {
- org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData bean = (org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData) parent;
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
- lifecycle.setType("start");
- bean.setBeanStart(lifecycle);
- }
-}
Deleted: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -1,105 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.deployment.xml;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.api.model.AutowireType;
-import org.jboss.beans.metadata.spi.ConstructorMetaData;
-import org.jboss.beans.info.spi.BeanAccessMode;
-import org.jboss.dependency.spi.ControllerMode;
-import org.jboss.dependency.spi.ErrorHandlingMode;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * BeanHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 71354 $
- */
-public class BeanHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final BeanHandler HANDLER = new BeanHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractBeanMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- bean.setName(attrs.getValue(i));
- else if ("class".equals(localName))
- bean.setBean(attrs.getValue(i));
- else if ("mode".equals(localName))
- bean.setMode(ControllerMode.getInstance(attrs.getValue(i)));
- else if ("access-mode".equals(localName))
- {
- BeanAccessMode mode = BeanAccessMode.STANDARD;
- if ("fields".equalsIgnoreCase(localName))
- mode = BeanAccessMode.FIELDS;
- else if ("all".equalsIgnoreCase(localName))
- mode = BeanAccessMode.ALL;
- bean.setAccessMode(mode);
- }
- else if ("error-handling".equals(localName))
- bean.setErrorHandlingMode(ErrorHandlingMode.getInstance(localName));
- else if ("parent".equals(localName))
- bean.setParent(attrs.getValue(i));
- else if ("abstract".equals(localName))
- bean.setAbstract(Boolean.parseBoolean(attrs.getValue(i)));
- else if ("autowire-type".equals(localName))
- bean.setAutowireType(AutowireType.getInstance(attrs.getValue(i)));
- else if ("autowire-candidate".equals(localName))
- bean.setAutowireCandidate(Boolean.parseBoolean(attrs.getValue(i)));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) o;
- if (bean.getBean() == null && bean.isAbstract() == false && bean.getParent() == null)
- {
- ConstructorMetaData constructor = bean.getConstructor();
- if (constructor == null)
- throw new IllegalArgumentException("Bean should have a class attribute or a constructor element.");
- if (constructor.getFactoryMethod() == null)
- {
- if (constructor.getValue() == null)
- throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have either a factoryMethod attribute or embedded value.");
- }
- else if (constructor.getFactory() == null && constructor.getFactoryClass() == null)
- throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have one of a factoryClass attribute or a factory element, or embedded value.");
- }
- return bean;
- }
-}
Modified: projects/microcontainer/trunk/spring-int/src/tests/org/jboss/test/spring/test/DescribeSpringTestCase.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/tests/org/jboss/test/spring/test/DescribeSpringTestCase.java 2008-07-07 08:58:41 UTC (rev 75429)
+++ projects/microcontainer/trunk/spring-int/src/tests/org/jboss/test/spring/test/DescribeSpringTestCase.java 2008-07-07 09:43:22 UTC (rev 75430)
@@ -29,7 +29,6 @@
*/
public class DescribeSpringTestCase extends TempSpringSchemaTest
{
-
public DescribeSpringTestCase(String name)
{
super(name);
@@ -51,5 +50,4 @@
// todo - test descriptions
System.out.println("simpleBean = " + simpleBeanMD);
}
-
}
More information about the jboss-cvs-commits
mailing list