[jboss-cvs] JBossAS SVN: r75424 - in projects/microcontainer/trunk: spring-int/src/main/org/jboss and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 7 04:16:42 EDT 2008
Author: alesj
Date: 2008-07-07 04:16:41 -0400 (Mon, 07 Jul 2008)
New Revision: 75424
Added:
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java
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
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java
projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/package.html
Removed:
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAnnotationInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallCallbackInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBinding20.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBindingHelper.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaInitializer20.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSuppliesInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallCallbackInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingWildcardHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackAnnotationsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CollectionHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorAnnotationsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAnnotationInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallAnnotationsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallParametersInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleAnnotationsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterAnnotationsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyAnnotationsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyBindingInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBinding.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBindingHelper.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaInitializer.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyScopeInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyAnnotationsInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ScopeHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/package.html
Log:
[JBMICROCONT-264]; remove old schema binding from kernel
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,53 +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.AbstractAliasMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * AliasCharactersHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class AliasCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final AliasCharactersHandler HANDLER = new AliasCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qname, ElementBinding element, Object owner, Object value)
- {
- AbstractAliasMetaData alias = (AbstractAliasMetaData) owner;
- alias.setAliasValue(value);
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,60 +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.AbstractAliasMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * AliasHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class AliasHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final AliasHandler HANDLER = new AliasHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractAliasMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractAliasMetaData alias = (AbstractAliasMetaData) o;
- if (alias.getAliasValue() == null)
- {
- throw new IllegalArgumentException("Empty <alias/> content");
- }
- return alias;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,53 +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.AbstractAnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * AnnotationCharactersHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class AnnotationCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final AnnotationCharactersHandler HANDLER = new AnnotationCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qname, ElementBinding element, Object owner, Object value)
- {
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) owner;
- annotation.setAnnotation((String)value);
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/AnnotationHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,74 +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.AbstractAnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * AnnotationHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class AnnotationHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final AnnotationHandler HANDLER = new AnnotationHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractAnnotationMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("replace".equals(localName))
- annotation.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
- }
-
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) o;
- if (annotation.getAnnotation() == null || annotation.getAnnotation().length() == 0)
- {
- throw new IllegalArgumentException("Empty <annotation/> content");
- }
- if (!annotation.getAnnotation().startsWith("@"))
- {
- throw new IllegalArgumentException("<annotation/> content must be a fully qualified annotation type name prefixed with '@'");
- }
-
- return annotation;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,54 +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 java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.spi.AliasMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanAliasInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class BeanAliasInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanAliasInterceptor INTERCEPTOR = new BeanAliasInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AliasMetaData alias = (AliasMetaData) child;
- Set<Object> aliases = bean.getAliases();
- if (aliases == null)
- {
- aliases = new HashSet<Object>();
- bean.setAliases(aliases);
- }
- aliases.add(alias.getAliasValue());
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAnnotationInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAnnotationInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAnnotationInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanAnnotationInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanAnnotationInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanAnnotationInterceptor INTERCEPTOR = new BeanAnnotationInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = bean.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- bean.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractClassLoaderMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanClassLoaderInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanClassLoaderInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanClassLoaderInterceptor INTERCEPTOR = new BeanClassLoaderInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractClassLoaderMetaData classloader = (AbstractClassLoaderMetaData) child;
- bean.setClassLoader(classloader);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanConstructorInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanConstructorInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanConstructorInterceptor INTERCEPTOR = new BeanConstructorInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) child;
- bean.setConstructor(constructor);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractDemandMetaData;
-import org.jboss.beans.metadata.spi.DemandMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanDemandsInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanDemandsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanDemandsInterceptor INTERCEPTOR = new BeanDemandsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractDemandMetaData demand = (AbstractDemandMetaData) child;
- Set<DemandMetaData> demands = bean.getDemands();
- if (demands == null)
- {
- demands = new HashSet<DemandMetaData>();
- bean.setDemands(demands);
- }
- demands.add(demand);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractDependencyMetaData;
-import org.jboss.beans.metadata.spi.DependencyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanDependsInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanDependsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanDependsInterceptor INTERCEPTOR = new BeanDependsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractDependencyMetaData dependency = (AbstractDependencyMetaData) child;
- Set<DependencyMetaData> depends = bean.getDepends();
- if (depends == null)
- {
- depends = new HashSet<DependencyMetaData>();
- bean.setDepends(depends);
- }
- depends.add(dependency);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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$
- */
-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/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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$
- */
-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/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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$
- */
-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/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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$
- */
-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/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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$
- */
-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/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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$
- */
-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;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallCallbackInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallCallbackInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallCallbackInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,55 +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 java.util.ArrayList;
-import java.util.List;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractCallbackMetaData;
-import org.jboss.beans.metadata.spi.CallbackMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanInstallInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class BeanInstallCallbackInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanInstallCallbackInterceptor INTERCEPTOR = new BeanInstallCallbackInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractCallbackMetaData callback = (AbstractCallbackMetaData) child;
- List<CallbackMetaData> callbacks = bean.getInstallCallbacks();
- if (callbacks == null)
- {
- callbacks = new ArrayList<CallbackMetaData>();
- bean.setInstallCallbacks(callbacks);
- }
- callbacks.add(callback);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanInstallInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
-import org.jboss.beans.metadata.spi.InstallMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanInstallInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanInstallInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanInstallInterceptor INTERCEPTOR = new BeanInstallInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractInstallMetaData install = (AbstractInstallMetaData) child;
- List<InstallMetaData> installs = bean.getInstalls();
- if (installs == null)
- {
- installs = new ArrayList<InstallMetaData>();
- bean.setInstalls(installs);
- }
- installs.add(install);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.spi.PropertyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanPropertyInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanPropertyInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanPropertyInterceptor INTERCEPTOR = new BeanPropertyInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractPropertyMetaData property = (AbstractPropertyMetaData) child;
- Set<PropertyMetaData> properties = bean.getProperties();
- if (properties == null)
- {
- properties = new HashSet<PropertyMetaData>();
- bean.setProperties(properties);
- }
- properties.add(property);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBinding20.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBinding20.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBinding20.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,415 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * The POJO schema binding.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanSchemaBinding20
-{
- /** The namespace */
- public static final String BEAN_DEPLOYER_NS = "urn:jboss:bean-deployer:2.0";
-
- /** The deployment binding */
- public static final QName deploymentTypeQName = new QName(BEAN_DEPLOYER_NS, "deploymentType");
-
- /** The named alias binding */
- public static final QName namedAliasTypeQName = new QName(BEAN_DEPLOYER_NS, "namedAliasType");
-
- /** The bean binding */
- public static final QName beanTypeQName = new QName(BEAN_DEPLOYER_NS, "beanType");
-
- /** The bean element name */
- public static final QName beanQName = new QName(BEAN_DEPLOYER_NS, "bean");
-
- /** The beanfactory binding */
- public static final QName beanFactoryTypeQName = new QName(BEAN_DEPLOYER_NS, "beanfactoryType");
-
- /** The beanfactory element name */
- public static final QName beanFactoryQName = new QName(BEAN_DEPLOYER_NS, "beanfactory");
-
- /** The lazy binding */
- public static final QName lazyTypeQName = new QName(BEAN_DEPLOYER_NS, "lazyType");
-
- /** The lazy element name */
- public static final QName lazyQName = new QName(BEAN_DEPLOYER_NS, "lazy");
-
- /** The interface binding */
- public static final QName interfaceTypeQName = new QName(BEAN_DEPLOYER_NS, "interfaceType");
-
- /** The interface element name */
- public static final QName interfaceQName = new QName(BEAN_DEPLOYER_NS, "interface");
-
- /** The alias binding */
- public static final QName aliasTypeQName = new QName(BEAN_DEPLOYER_NS, "aliasType");
-
- /** The alias element name */
- public static final QName aliasQName = new QName(BEAN_DEPLOYER_NS, "alias");
-
- /** The annotation binding */
- public static final QName annotationTypeQName = new QName(BEAN_DEPLOYER_NS, "annotationType");
-
- /** The annotation element name */
- public static final QName annotationQName = new QName(BEAN_DEPLOYER_NS, "annotation");
-
- /** The attribute element name */
- public static final QName attributeQName = new QName(BEAN_DEPLOYER_NS, "attribute");
-
- /** The classloader binding */
- public static final QName classloaderTypeQName = new QName(BEAN_DEPLOYER_NS, "classloaderType");
-
- /** The classloader element name */
- public static final QName classloaderQName = new QName(BEAN_DEPLOYER_NS, "classloader");
-
- /** The constructor binding */
- public static final QName constructorTypeQName = new QName(BEAN_DEPLOYER_NS, "constructorType");
-
- /** The constructor element name */
- public static final QName constructorQName = new QName(BEAN_DEPLOYER_NS, "constructor");
-
- /** The factory element name */
- public static final QName factoryQName = new QName(BEAN_DEPLOYER_NS, "factory");
-
- /** The parameter binding */
- public static final QName parameterTypeQName = new QName(BEAN_DEPLOYER_NS, "parameterType");
-
- /** The parameter element name */
- public static final QName parameterQName = new QName(BEAN_DEPLOYER_NS, "parameter");
-
- /** The lifecycle binding */
- public static final QName lifecycleTypeQName = new QName(BEAN_DEPLOYER_NS, "lifecycleType");
-
- /** The create element name */
- public static final QName createQName = new QName(BEAN_DEPLOYER_NS, "create");
-
- /** The start element name */
- public static final QName startQName = new QName(BEAN_DEPLOYER_NS, "start");
-
- /** The stop element name */
- public static final QName stopQName = new QName(BEAN_DEPLOYER_NS, "stop");
-
- /** The destroy element name */
- public static final QName destroyQName = new QName(BEAN_DEPLOYER_NS, "destroy");
-
- /** The install binding */
- public static final QName installTypeQName = new QName(BEAN_DEPLOYER_NS, "installType");
-
- /** The install callback binding */
- public static final QName installCallbackTypeQName = new QName(BEAN_DEPLOYER_NS, "installCallbackType");
-
- /** The uninstall callback binding */
- public static final QName uninstallCallbackTypeQName = new QName(BEAN_DEPLOYER_NS, "uninstallCallbackType");
-
- /** The install element name */
- public static final QName installQName = new QName(BEAN_DEPLOYER_NS, "install");
-
- /** The uninstall element name */
- public static final QName uninstallQName = new QName(BEAN_DEPLOYER_NS, "uninstall");
-
- /** The install callback element name */
- public static final QName installCallbackQName = new QName(BEAN_DEPLOYER_NS, "incallback");
-
- /** The uninstall callback element name */
- public static final QName uninstallCallbackQName = new QName(BEAN_DEPLOYER_NS, "uncallback");
-
- /** The property binding */
- public static final QName propertyTypeQName = new QName(BEAN_DEPLOYER_NS, "propertyType");
-
- /** The property element name */
- public static final QName propertyQName = new QName(BEAN_DEPLOYER_NS, "property");
-
- /** The depends binding */
- public static final QName dependsTypeQName = new QName(BEAN_DEPLOYER_NS, "dependsType");
-
- /** The depends element name */
- public static final QName dependsQName = new QName(BEAN_DEPLOYER_NS, "depends");
-
- /** The demand binding */
- public static final QName demandTypeQName = new QName(BEAN_DEPLOYER_NS, "demandType");
-
- /** The demand element name */
- public static final QName demandQName = new QName(BEAN_DEPLOYER_NS, "demand");
-
- /** The supply binding */
- public static final QName supplyTypeQName = new QName(BEAN_DEPLOYER_NS, "supplyType");
-
- /** The supply element name */
- public static final QName supplyQName = new QName(BEAN_DEPLOYER_NS, "supply");
-
- /** The dependency binding */
- public static final QName dependencyTypeQName = new QName(BEAN_DEPLOYER_NS, "dependencyType");
-
- /** The dependency binding */
- public static final QName injectionTypeQName = new QName(BEAN_DEPLOYER_NS, "injectionType");
-
- /** The value-factory binding */
- public static final QName valueFactoryTypeQName = new QName(BEAN_DEPLOYER_NS, "valueFactoryType");
-
- /** The factory binding */
- public static final QName factoryTypeQName = new QName(BEAN_DEPLOYER_NS, "factoryType");
-
- /** The inject element name */
- public static final QName injectQName = new QName(BEAN_DEPLOYER_NS, "inject");
-
- /** The value-factory element name */
- public static final QName valueFactoryQName = new QName(BEAN_DEPLOYER_NS, "value-factory");
-
- /** The plain value binding */
- public static final QName plainValueTypeQName = new QName(BEAN_DEPLOYER_NS, "plainValueType");
-
- /** The value binding */
- public static final QName valueTypeQName = new QName(BEAN_DEPLOYER_NS, "valueType");
-
- /** The value element name */
- public static final QName valueQName = new QName(BEAN_DEPLOYER_NS, "value");
-
- /** The null element name */
- public static final QName nullQName = new QName(BEAN_DEPLOYER_NS, "null");
-
- /** The this element name */
- public static final QName thisQName = new QName(BEAN_DEPLOYER_NS, "this");
-
- /** The collection binding */
- public static final QName collectionTypeQName = new QName(BEAN_DEPLOYER_NS, "collectionType");
-
- /** The collection element name */
- public static final QName collectionQName = new QName(BEAN_DEPLOYER_NS, "collection");
-
- /** The list binding */
- public static final QName listTypeQName = new QName(BEAN_DEPLOYER_NS, "listType");
-
- /** The list element name */
- public static final QName listQName = new QName(BEAN_DEPLOYER_NS, "list");
-
- /** The set binding */
- public static final QName setTypeQName = new QName(BEAN_DEPLOYER_NS, "setType");
-
- /** The set element name */
- public static final QName setQName = new QName(BEAN_DEPLOYER_NS, "set");
-
- /** The array binding */
- public static final QName arrayTypeQName = new QName(BEAN_DEPLOYER_NS, "arrayType");
-
- /** The array element name */
- public static final QName arrayQName = new QName(BEAN_DEPLOYER_NS, "array");
-
- /** The map binding */
- public static final QName mapTypeQName = new QName(BEAN_DEPLOYER_NS, "mapType");
-
- /** The map element name */
- public static final QName mapQName = new QName(BEAN_DEPLOYER_NS, "map");
-
- /** The entry binding */
- public static final QName entryTypeQName = new QName(BEAN_DEPLOYER_NS, "entryType");
-
- /** The entry element name */
- public static final QName entryQName = new QName(BEAN_DEPLOYER_NS, "entry");
-
- /** The key element name */
- public static final QName keyQName = new QName(BEAN_DEPLOYER_NS, "key");
-
- /**
- * Initialize the schema binding
- *
- * @param schemaBinding the schema binding
- */
- public static void init(SchemaBinding schemaBinding)
- {
- // ignore XB property replacement
- schemaBinding.setReplacePropertyRefs(false);
- // init
- initDeployment(schemaBinding);
- initBean(schemaBinding);
- initBeanFactory(schemaBinding);
- initLazy(schemaBinding);
- initArtifacts(schemaBinding);
- }
-
- /**
- * Initialize deployment part of the schema binding
- *
- * @param schemaBinding the schema binding
- */
- public static void initDeployment(SchemaBinding schemaBinding)
- {
- // deployment binding
- TypeBinding deploymentType = schemaBinding.getType(deploymentTypeQName);
- BeanSchemaBindingHelper.initDeploymentHandlers(deploymentType);
- }
-
- /**
- * Initialize bean part of the schema binding
- *
- * @param schemaBinding the schema binding
- */
- public static void initBean(SchemaBinding schemaBinding)
- {
- // bean binding
- TypeBinding beanType = schemaBinding.getType(beanTypeQName);
- BeanSchemaBindingHelper.initBeanHandlers(beanType);
- }
-
- /**
- * Initialize bean factory part of the schema binding
- *
- * @param schemaBinding the schema binding
- */
- public static void initBeanFactory(SchemaBinding schemaBinding)
- {
- // beanfactory binding
- TypeBinding beanFactoryType = schemaBinding.getType(beanFactoryTypeQName);
- BeanSchemaBindingHelper.initBeanFactoryHandlers(beanFactoryType);
- }
-
- /**
- * Initialize lazy part of the schema binding
- *
- * @param schemaBinding the schema binding
- */
- public static void initLazy(SchemaBinding schemaBinding)
- {
- // lazy binding
- TypeBinding beanFactoryType = schemaBinding.getType(lazyTypeQName);
- BeanSchemaBindingHelper.initLazyHandlers(beanFactoryType);
- }
-
- /**
- * Initialize other parts of the schema binding
- *
- * @param schemaBinding the schema binding
- */
- public static void initArtifacts(SchemaBinding schemaBinding)
- {
- // classloader binding
- TypeBinding classloaderType = schemaBinding.getType(classloaderTypeQName);
- BeanSchemaBindingHelper.initClassLoaderHandlers(classloaderType);
-
- // constructor binding
- TypeBinding constructorType = schemaBinding.getType(constructorTypeQName);
- BeanSchemaBindingHelper.initConstructorHandlers(constructorType);
-
- // parameter binding
- TypeBinding parameterType = schemaBinding.getType(parameterTypeQName);
- BeanSchemaBindingHelper.initParameterHandlers(parameterType);
-
- // lifecycle binding
- TypeBinding lifecycleType = schemaBinding.getType(lifecycleTypeQName);
- BeanSchemaBindingHelper.initLifecycleHandlers(lifecycleType);
-
- // named alias binding
- TypeBinding namedAliasType = schemaBinding.getType(namedAliasTypeQName);
- BeanSchemaBindingHelper.initNamedAliasHandlers(namedAliasType);
-
- // interface binding
- TypeBinding interfaceType = schemaBinding.getType(interfaceTypeQName);
- BeanSchemaBindingHelper.initInterfaceHandlers(interfaceType);
-
- // alias binding
- TypeBinding aliasType = schemaBinding.getType(aliasTypeQName);
- BeanSchemaBindingHelper.initAliasHandlers(aliasType);
-
- // annotation binding
- TypeBinding annotationType = schemaBinding.getType(annotationTypeQName);
- BeanSchemaBindingHelper.initAnnotationHandlers(annotationType);
-
- // install binding
- TypeBinding installType = schemaBinding.getType(installTypeQName);
- BeanSchemaBindingHelper.initInstallHandlers(installType);
-
- // install callback binding
- TypeBinding incallbackType = schemaBinding.getType(installCallbackTypeQName);
- BeanSchemaBindingHelper.initCallbackHandlers(incallbackType);
-
- // uninstall callback binding
- TypeBinding uncallbackType = schemaBinding.getType(uninstallCallbackTypeQName);
- BeanSchemaBindingHelper.initCallbackHandlers(uncallbackType);
-
- // property binding
- TypeBinding propertyType = schemaBinding.getType(propertyTypeQName);
- BeanSchemaBindingHelper.initPropertyHandlers(propertyType);
-
- // dependency binding
- TypeBinding dependsType = schemaBinding.getType(dependsTypeQName);
- BeanSchemaBindingHelper.initDependsHandlers(dependsType);
-
- // demand binding
- TypeBinding demandType = schemaBinding.getType(demandTypeQName);
- BeanSchemaBindingHelper.initDemandHandlers(demandType);
-
- // supply binding
- TypeBinding supplyType = schemaBinding.getType(supplyTypeQName);
- BeanSchemaBindingHelper.initSupplyHandlers(supplyType);
-
- // dependency binding
- TypeBinding dependencyType = schemaBinding.getType(dependencyTypeQName);
- BeanSchemaBindingHelper.initDependencyHandlers(dependencyType);
-
- // injection binding
- TypeBinding injectionType = schemaBinding.getType(injectionTypeQName);
- BeanSchemaBindingHelper.initInjectionHandlers(injectionType);
-
- // value-factory binding
- TypeBinding valueFactoryType = schemaBinding.getType(valueFactoryTypeQName);
- BeanSchemaBindingHelper.initValueFactoryHandlers(valueFactoryType);
-
- // factory binding
- TypeBinding factoryType = schemaBinding.getType(factoryTypeQName);
- BeanSchemaBindingHelper.initFactoryHandlers(factoryType);
-
- // value binding
- TypeBinding plainValueType = schemaBinding.getType(plainValueTypeQName);
- BeanSchemaBindingHelper.initPlainValueHandlers(plainValueType);
-
- // value binding
- TypeBinding valueType = schemaBinding.getType(valueTypeQName);
- BeanSchemaBindingHelper.initValueHandlers(valueType);
-
- // collection binding
- BeanSchemaBindingHelper.configureCollection(schemaBinding, collectionTypeQName);
-
- // list binding
- BeanSchemaBindingHelper.configureCollection(schemaBinding, listTypeQName);
-
- // set binding
- BeanSchemaBindingHelper.configureCollection(schemaBinding, setTypeQName);
-
- // array binding
- BeanSchemaBindingHelper.configureCollection(schemaBinding, arrayTypeQName);
-
- // map binding
- TypeBinding mapType = schemaBinding.getType(mapTypeQName);
- BeanSchemaBindingHelper.initMapHandlers(mapType);
-
- // entry binding
- TypeBinding entryType = schemaBinding.getType(entryTypeQName);
- BeanSchemaBindingHelper.initEntryHandlers(entryType);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBindingHelper.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBindingHelper.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaBindingHelper.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,573 +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.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
-
-/**
- * BeanSchemaBindingHelper.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanSchemaBindingHelper
-{
- /**
- * Initialize the handlers for the deployment type
- *
- * @param deploymentType the deployment type
- */
- public static void initDeploymentHandlers(TypeBinding deploymentType)
- {
- deploymentType.setHandler(DeploymentHandler.HANDLER);
-
- // deployment has annotations
- deploymentType.pushInterceptor(BeanSchemaBinding20.annotationQName, DeploymentAnnotationInterceptor.INTERCEPTOR);
-
- // deployment has a classloader
- deploymentType.pushInterceptor(BeanSchemaBinding20.classloaderQName, DeploymentClassLoaderInterceptor.INTERCEPTOR);
-
- // bean has a create
- deploymentType.pushInterceptor(BeanSchemaBinding20.createQName, LifecycleCreateInterceptor.INTERCEPTOR);
-
- // bean has a start
- deploymentType.pushInterceptor(BeanSchemaBinding20.startQName, LifecycleStartInterceptor.INTERCEPTOR);
-
- // bean has a stop
- deploymentType.pushInterceptor(BeanSchemaBinding20.stopQName, LifecycleStopInterceptor.INTERCEPTOR);
-
- // bean has a destroy
- deploymentType.pushInterceptor(BeanSchemaBinding20.destroyQName, LifecycleDestroyInterceptor.INTERCEPTOR);
-
- // deployment has a list aliases
- deploymentType.pushInterceptor(BeanSchemaBinding20.aliasQName, DeploymentAliasInterceptor.INTERCEPTOR);
-
- // deployment has a list beans
- deploymentType.pushInterceptor(BeanSchemaBinding20.beanQName, DeploymentBeanInterceptor.INTERCEPTOR);
-
- // deployment has a list beanfactorys
- deploymentType.pushInterceptor(BeanSchemaBinding20.beanFactoryQName, DeploymentBeanInterceptor.INTERCEPTOR);
-
- // deployment has a list lazys
- deploymentType.pushInterceptor(BeanSchemaBinding20.lazyQName, DeploymentBeanInterceptor.INTERCEPTOR);
-
- // Deployment can take wildcards
- deploymentType.getWildcard().setWildcardHandler(DeploymentWildcardHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the bean type
- *
- * @param beanType the bean type
- */
- public static void initBeanHandlers(TypeBinding beanType)
- {
- beanType.setHandler(BeanHandler.HANDLER);
-
- // bean has a classloader
- beanType.pushInterceptor(BeanSchemaBinding20.classloaderQName, BeanClassLoaderInterceptor.INTERCEPTOR);
-
- // bean has a constructor
- beanType.pushInterceptor(BeanSchemaBinding20.constructorQName, BeanConstructorInterceptor.INTERCEPTOR);
-
- // bean has properties
- beanType.pushInterceptor(BeanSchemaBinding20.propertyQName, BeanPropertyInterceptor.INTERCEPTOR);
-
- // bean has a create
- beanType.pushInterceptor(BeanSchemaBinding20.createQName, LifecycleCreateInterceptor.INTERCEPTOR);
-
- // bean has a start
- beanType.pushInterceptor(BeanSchemaBinding20.startQName, LifecycleStartInterceptor.INTERCEPTOR);
-
- // bean has a stop
- beanType.pushInterceptor(BeanSchemaBinding20.stopQName, LifecycleStopInterceptor.INTERCEPTOR);
-
- // bean has a destroy
- beanType.pushInterceptor(BeanSchemaBinding20.destroyQName, LifecycleDestroyInterceptor.INTERCEPTOR);
-
- // bean has aliases
- beanType.pushInterceptor(BeanSchemaBinding20.aliasQName, BeanAliasInterceptor.INTERCEPTOR);
-
- // bean has annotations
- beanType.pushInterceptor(BeanSchemaBinding20.annotationQName, BeanAnnotationInterceptor.INTERCEPTOR);
-
- // bean has installs
- beanType.pushInterceptor(BeanSchemaBinding20.installQName, BeanInstallInterceptor.INTERCEPTOR);
-
- // bean has uninstalls
- beanType.pushInterceptor(BeanSchemaBinding20.uninstallQName, BeanUninstallInterceptor.INTERCEPTOR);
-
- // bean has installs
- beanType.pushInterceptor(BeanSchemaBinding20.installCallbackQName, BeanInstallCallbackInterceptor.INTERCEPTOR);
-
- // bean has uninstalls
- beanType.pushInterceptor(BeanSchemaBinding20.uninstallCallbackQName, BeanUninstallCallbackInterceptor.INTERCEPTOR);
-
- // bean has depends
- beanType.pushInterceptor(BeanSchemaBinding20.dependsQName, BeanDependsInterceptor.INTERCEPTOR);
-
- // bean has demands
- beanType.pushInterceptor(BeanSchemaBinding20.demandQName, BeanDemandsInterceptor.INTERCEPTOR);
-
- // bean has supplies
- beanType.pushInterceptor(BeanSchemaBinding20.supplyQName, BeanSuppliesInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the bean factory type
- *
- * @param beanFactoryType the bean factory type
- */
- public static void initBeanFactoryHandlers(TypeBinding beanFactoryType)
- {
- beanFactoryType.setHandler(BeanFactoryHandler.HANDLER);
-
- // bean factory has aliases
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.aliasQName, BeanAliasInterceptor.INTERCEPTOR);
-
- // bean factory has a classloader
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.classloaderQName, BeanClassLoaderInterceptor.INTERCEPTOR);
-
- // bean factory has a constructor
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.constructorQName, BeanFactoryConstructorInterceptor.INTERCEPTOR);
-
- // bean factory has properties
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.propertyQName, BeanFactoryPropertyInterceptor.INTERCEPTOR);
-
- // bean factory has a create
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.createQName, BeanFactoryCreateInterceptor.INTERCEPTOR);
-
- // bean factory has a start
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.startQName, BeanFactoryStartInterceptor.INTERCEPTOR);
-
- // bean factory has installs
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.installQName, BeanInstallInterceptor.INTERCEPTOR);
-
- // bean factory has uninstalls
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.uninstallQName, BeanUninstallInterceptor.INTERCEPTOR);
-
-/*
- // bean has installs
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.installCallbackQName, BeanInstallCallbackInterceptor.INTERCEPTOR);
-
- // bean has uninstalls
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.uninstallCallbackQName, BeanUninstallCallbackInterceptor.INTERCEPTOR);
-*/
-
- // bean factory has depends
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.dependsQName, BeanDependsInterceptor.INTERCEPTOR);
-
- // bean factory has demands
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.demandQName, BeanDemandsInterceptor.INTERCEPTOR);
-
- // bean factory has supplies
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.supplyQName, BeanSuppliesInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the lazy type
- *
- * @param beanFactoryType the lazy type
- */
- public static void initLazyHandlers(TypeBinding beanFactoryType)
- {
- beanFactoryType.setHandler(LazyHandler.HANDLER);
-
- // lazy has interfaces
- beanFactoryType.pushInterceptor(BeanSchemaBinding20.interfaceQName, LazyInterfaceInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the classloader type
- *
- * @param classloaderType the classloader type
- */
- public static void initClassLoaderHandlers(TypeBinding classloaderType)
- {
- classloaderType.setHandler(ClassLoaderHandler.HANDLER);
-
- configureValueBindings(classloaderType);
- }
-
- /**
- * Initialize the handlers for the constructor type
- *
- * @param constructorType the constructor type
- */
- public static void initConstructorHandlers(TypeBinding constructorType)
- {
- constructorType.setHandler(ConstructorHandler.HANDLER);
-
- // constructor has annotations
- constructorType.pushInterceptor(BeanSchemaBinding20.annotationQName, ConstructorAnnotationsInterceptor.INTERCEPTOR);
-
- // constructor has a factory
- constructorType.pushInterceptor(BeanSchemaBinding20.factoryQName, ConstructorFactoryInterceptor.INTERCEPTOR);
-
- // constructor has parameters
- constructorType.pushInterceptor(BeanSchemaBinding20.parameterQName, ConstructorParametersInterceptor.INTERCEPTOR);
-
- configureValueBindings(constructorType);
- }
-
- /**
- * Initialize the handlers for the property type
- *
- * @param propertyType the property type
- */
- public static void initPropertyHandlers(TypeBinding propertyType)
- {
- propertyType.setHandler(PropertyHandler.HANDLER);
-
- // property has annotations
- propertyType.pushInterceptor(BeanSchemaBinding20.annotationQName, PropertyAnnotationsInterceptor.INTERCEPTOR);
-
- // property can take characters
- propertyType.setSimpleType(PropertyCharactersHandler.HANDLER);
-
- configureValueBindings(propertyType);
- }
-
- /**
- * Initialize the handlers for the parameter type
- *
- * @param parameterType the parameter type
- */
- public static void initParameterHandlers(TypeBinding parameterType)
- {
- parameterType.setHandler(ParameterHandler.HANDLER);
-
- // parameter has annotations
- parameterType.pushInterceptor(BeanSchemaBinding20.annotationQName, ParameterAnnotationsInterceptor.INTERCEPTOR);
-
- // parameter can take characters
- parameterType.setSimpleType(ParameterCharactersHandler.HANDLER);
-
- configureValueBindings(parameterType);
- }
-
- /**
- * Initialize the handlers for the lifecycle type
- *
- * @param lifecycleType the lifecycle type
- */
- public static void initLifecycleHandlers(TypeBinding lifecycleType)
- {
- lifecycleType.setHandler(LifecycleHandler.HANDLER);
-
- // lifecycle has annotations
- lifecycleType.pushInterceptor(BeanSchemaBinding20.annotationQName, LifecycleAnnotationsInterceptor.INTERCEPTOR);
-
- // lifecycle has parameters
- lifecycleType.pushInterceptor(BeanSchemaBinding20.parameterQName, LifecycleParametersInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the install type
- *
- * @param installType the install type
- */
- public static void initInstallHandlers(TypeBinding installType)
- {
- installType.setHandler(InstallHandler.HANDLER);
-
- // install has annotations
- installType.pushInterceptor(BeanSchemaBinding20.annotationQName, InstallAnnotationsInterceptor.INTERCEPTOR);
-
- // install has parameters
- installType.pushInterceptor(BeanSchemaBinding20.parameterQName, InstallParametersInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the callback type
- *
- * @param installType the install type
- */
- public static void initCallbackHandlers(TypeBinding installType)
- {
- installType.setHandler(CallbackHandler.HANDLER);
-
- // install has annotations
- installType.pushInterceptor(BeanSchemaBinding20.annotationQName, CallbackAnnotationsInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the named alias type
- *
- * @param aliasType the named alias type
- */
- public static void initNamedAliasHandlers(TypeBinding aliasType)
- {
- aliasType.setHandler(NamedAliasHandler.NAMED_ALIAS_HANDLER);
-
- // alias can take characters
- aliasType.setSimpleType(AliasCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the interface type
- *
- * @param interfaceType the interface type
- */
- public static void initInterfaceHandlers(TypeBinding interfaceType)
- {
- interfaceType.setHandler(ClassHandler.HANDLER);
-
- // interface can take characters
- interfaceType.setSimpleType(ClassCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the alias type
- *
- * @param aliasType the alias type
- */
- public static void initAliasHandlers(TypeBinding aliasType)
- {
- aliasType.setHandler(AliasHandler.HANDLER);
-
- // alias can take characters
- aliasType.setSimpleType(AliasCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the annotation type
- *
- * @param annotationType the annotation type
- */
- public static void initAnnotationHandlers(TypeBinding annotationType)
- {
- annotationType.setHandler(AnnotationHandler.HANDLER);
-
- // annotation can take characters
- annotationType.setSimpleType(AnnotationCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the depends type
- *
- * @param dependsType the depends type
- */
- public static void initDependsHandlers(TypeBinding dependsType)
- {
- dependsType.setHandler(DependsHandler.HANDLER);
-
- // depends can take characters
- dependsType.setSimpleType(DependsCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the demands type
- *
- * @param demandType the demand type
- */
- public static void initDemandHandlers(TypeBinding demandType)
- {
- demandType.setHandler(DemandHandler.HANDLER);
-
- // demand can take characters
- demandType.setSimpleType(DemandCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the supply type
- *
- * @param supplyType the supply type
- */
- public static void initSupplyHandlers(TypeBinding supplyType)
- {
- supplyType.setHandler(SupplyHandler.HANDLER);
-
- // supply can take characters
- supplyType.setSimpleType(SupplyCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the dependency type
- *
- * @param dependencyType the dependency type
- */
- public static void initDependencyHandlers(TypeBinding dependencyType)
- {
- dependencyType.setHandler(DependencyHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the injection type
- *
- * @param dependencyType the dependency type
- */
- public static void initInjectionHandlers(TypeBinding dependencyType)
- {
- dependencyType.setHandler(InjectionHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the value factory type
- *
- * @param valueFactoryType the dependency type
- */
- public static void initValueFactoryHandlers(TypeBinding valueFactoryType)
- {
- valueFactoryType.setHandler(ValueFactoryHandler.HANDLER);
-
- // value-factory has parameters
- valueFactoryType.pushInterceptor(BeanSchemaBinding20.parameterQName, ValueFactoryParametersInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the factory type
- *
- * @param factoryType the factory type
- */
- public static void initFactoryHandlers(TypeBinding factoryType)
- {
- factoryType.setHandler(FactoryHandler.HANDLER);
-
- // factory has a wildcard
- factoryType.getWildcard().setWildcardHandler(FactoryWildcardHandler.WILDCARD);
- }
-
- /**
- * Initialize the handlers for the plain value type
- *
- * @param plainValueType the plain value type
- */
- public static void initPlainValueHandlers(TypeBinding plainValueType)
- {
- plainValueType.setHandler(PlainValueHandler.HANDLER);
-
- // plain value can take characters
- plainValueType.setSimpleType(PlainValueCharactersHandler.HANDLER);
- }
-
- /**
- * Initialize the handlers for the value type
- *
- * @param valueType the value type
- */
- public static void initValueHandlers(TypeBinding valueType)
- {
- valueType.setHandler(ValueHandler.HANDLER);
-
- // value can take characters
- valueType.setSimpleType(ValueCharactersHandler.HANDLER);
-
- configureValueBindings(valueType);
- }
-
- /**
- * Initialize the handlers for the map type
- *
- * @param mapType the map type
- */
- public static void initMapHandlers(TypeBinding mapType)
- {
- mapType.setHandler(MapHandler.HANDLER);
-
- // entry has an entry
- mapType.pushInterceptor(BeanSchemaBinding20.entryQName, MapEntryInterceptor.INTERCEPTOR);
- }
-
- /**
- * Initialize the handlers for the map entry type
- *
- * @param entryType the map entry type
- */
- public static void initEntryHandlers(TypeBinding entryType)
- {
- entryType.setHandler(EntryHandler.HANDLER);
-
- // entry has a key
- entryType.pushInterceptor(BeanSchemaBinding20.keyQName, EntryKeyInterceptor.INTERCEPTOR);
-
- // entry has value
- entryType.pushInterceptor(BeanSchemaBinding20.valueQName, EntryValueInterceptor.INTERCEPTOR);
- }
-
- /**
- * Configure a collection.
- *
- * @param schemaBinding the schemabinding
- * @param qname the name of the type
- */
- public static void configureCollection(SchemaBinding schemaBinding, QName qname)
- {
- TypeBinding collectionType = schemaBinding.getType(qname);
- collectionType.setHandler(CollectionHandler.HANDLER);
- configureValueBindings(collectionType);
- }
-
- /**
- * Configure value bindings
- *
- * @param typeBinding the type binding
- */
- public static void configureValueBindings(TypeBinding typeBinding)
- {
- // type has bean
- typeBinding.pushInterceptor(BeanSchemaBinding20.beanQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type has lazy
- typeBinding.pushInterceptor(BeanSchemaBinding20.lazyQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type has values
- typeBinding.pushInterceptor(BeanSchemaBinding20.valueQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type has injections
- typeBinding.pushInterceptor(BeanSchemaBinding20.injectQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type has value-factories
- typeBinding.pushInterceptor(BeanSchemaBinding20.valueFactoryQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type can take a collection
- typeBinding.pushInterceptor(BeanSchemaBinding20.collectionQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type can take a list
- typeBinding.pushInterceptor(BeanSchemaBinding20.listQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type can take a set
- typeBinding.pushInterceptor(BeanSchemaBinding20.setQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type can take an array
- typeBinding.pushInterceptor(BeanSchemaBinding20.arrayQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type can take a map
- typeBinding.pushInterceptor(BeanSchemaBinding20.mapQName, ValueMetaDataElementInterceptor.VALUES);
-
- // type has a null
- typeBinding.pushInterceptor(BeanSchemaBinding20.nullQName, NullValueElementInterceptor.NULLVALUES);
-
- // type has a this
- typeBinding.pushInterceptor(BeanSchemaBinding20.thisQName, ThisValueElementInterceptor.THISVALUES);
-
- // type has wildcard
- WildcardBinding wcb = typeBinding.getWildcard();
- if (wcb == null)
- throw new IllegalStateException("Missing wildcard binding for type: " + typeBinding.getQName());
- wcb.setWildcardHandler(ValueWildcardHandler.WILDCARD);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaInitializer20.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaInitializer20.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSchemaInitializer20.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,40 +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 org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingInitializer;
-
-/**
- * BeanSchemaInitializer.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanSchemaInitializer20 implements SchemaBindingInitializer
-{
- public SchemaBinding init(SchemaBinding schema)
- {
- BeanSchemaBinding20.init(schema);
- return schema;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSuppliesInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSuppliesInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanSuppliesInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractSupplyMetaData;
-import org.jboss.beans.metadata.spi.SupplyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanSuppliesInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanSuppliesInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanSuppliesInterceptor INTERCEPTOR = new BeanSuppliesInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractSupplyMetaData supply = (AbstractSupplyMetaData) child;
- Set<SupplyMetaData> supplies = bean.getSupplies();
- if (supplies == null)
- {
- supplies = new HashSet<SupplyMetaData>();
- bean.setSupplies(supplies);
- }
- supplies.add(supply);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallCallbackInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallCallbackInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallCallbackInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,55 +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 java.util.ArrayList;
-import java.util.List;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractCallbackMetaData;
-import org.jboss.beans.metadata.spi.CallbackMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanInstallInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class BeanUninstallCallbackInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanUninstallCallbackInterceptor INTERCEPTOR = new BeanUninstallCallbackInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractCallbackMetaData callback = (AbstractCallbackMetaData) child;
- List<CallbackMetaData> callbacks = bean.getUninstallCallbacks();
- if (callbacks == null)
- {
- callbacks = new ArrayList<CallbackMetaData>();
- bean.setUninstallCallbacks(callbacks);
- }
- callbacks.add(callback);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BeanUninstallInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
-import org.jboss.beans.metadata.spi.InstallMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * BeanUninstallInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class BeanUninstallInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final BeanUninstallInterceptor INTERCEPTOR = new BeanUninstallInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
- AbstractInstallMetaData uninstall = (AbstractInstallMetaData) child;
- List<InstallMetaData> uninstalls = bean.getUninstalls();
- if (uninstalls == null)
- {
- uninstalls = new ArrayList<InstallMetaData>();
- bean.setUninstalls(uninstalls);
- }
- uninstalls.add(uninstall);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,46 +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.StringValueMetaData;
-import org.jboss.beans.metadata.plugins.policy.AbstractBindingMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * BindingCharactersHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class BindingCharactersHandler extends StringValueCharactersHandler
-{
- /** The interceptor */
- public static final BindingCharactersHandler HANDLER = new BindingCharactersHandler();
-
- public void setValue(QName qName, ElementBinding element, Object owner, Object value)
- {
- AbstractBindingMetaData binding = (AbstractBindingMetaData) owner;
- StringValueMetaData svmd = (StringValueMetaData) value;
- setStringValue(binding, svmd);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,74 +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.policy.AbstractBindingMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * BindingHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class BindingHandler extends DefaultElementHandler
-{
- /** The binding handler */
- public static final BindingHandler HANDLER = new BindingHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractBindingMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractBindingMetaData binding = (AbstractBindingMetaData)o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- binding.setName(attrs.getValue(i));
- else if ("class".equals(localName))
- binding.setType(attrs.getValue(i));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractBindingMetaData binding = (AbstractBindingMetaData)o;
-
- if (binding.getValue() == null)
- throw new IllegalArgumentException("Binding must have a non-null value:" + binding);
-
- if (binding.getName() == null)
- {
- // TODO name aware - introduce NameAware interface
- }
-
- return binding;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingWildcardHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingWildcardHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/BindingWildcardHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,50 +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.AbstractValueMetaData;
-import org.jboss.beans.metadata.plugins.policy.AbstractBindingMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * BindingWildcardHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class BindingWildcardHandler extends DefaultWildcardHandler
-{
- /** The handler */
- public static final BindingWildcardHandler WILDCARD = new BindingWildcardHandler();
-
- public void setParent(Object parent, Object o, QName elementName, ElementBinding element, ElementBinding parentElement)
- {
- AbstractBindingMetaData binding = (AbstractBindingMetaData) parent;
- if (o instanceof ValueMetaData)
- binding.setValue((ValueMetaData)o);
- else
- binding.setValue(new AbstractValueMetaData(o));
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackAnnotationsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackAnnotationsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackAnnotationsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,55 +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 java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractCallbackMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * CallbackAnnotationsInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class CallbackAnnotationsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final CallbackAnnotationsInterceptor INTERCEPTOR = new CallbackAnnotationsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractCallbackMetaData callbackMetaData = (AbstractCallbackMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = callbackMetaData.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- callbackMetaData.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CallbackHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,83 +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.AbstractCallbackMetaData;
-import org.jboss.beans.metadata.plugins.InstallCallbackMetaData;
-import org.jboss.beans.metadata.plugins.UninstallCallbackMetaData;
-import org.jboss.dependency.spi.Cardinality;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * CallbackHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class CallbackHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final CallbackHandler HANDLER = new CallbackHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- QName qname = element.getQName();
- boolean isInstall = qname.getLocalPart().startsWith("in");
- return isInstall ? new InstallCallbackMetaData() : new UninstallCallbackMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractCallbackMetaData callbackMetaData = (AbstractCallbackMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("property".equals(localName))
- callbackMetaData.setProperty(attrs.getValue(i));
- else if ("method".equals(localName))
- callbackMetaData.setMethodName(attrs.getValue(i));
- else if ("state".equals(localName))
- callbackMetaData.setDependentState(new ControllerState(attrs.getValue(i)));
- else if ("whenRequired".equals(localName))
- callbackMetaData.setState(new ControllerState(attrs.getValue(i)));
- else if ("signature".equals(localName))
- callbackMetaData.setSignature(attrs.getValue(i));
- else if ("cardinality".equals(localName))
- callbackMetaData.setCardinality(Cardinality.toCardinality(attrs.getValue(i)));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractCallbackMetaData callbackMetaData = (AbstractCallbackMetaData) o;
- if (callbackMetaData.getMethodName() == null && callbackMetaData.getProperty() == null)
- throw new IllegalArgumentException("Install/uninstall callback should have method or property attribute.");
- if (callbackMetaData.getMethodName() != null && callbackMetaData.getProperty() != null)
- throw new IllegalArgumentException("Install/uninstall callback should have exactly one of method or property attribute.");
- return callbackMetaData;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,52 +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.AbstractClassMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * ClassCharactersHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class ClassCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final ClassCharactersHandler HANDLER = new ClassCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qname, ElementBinding element, Object owner, Object value)
- {
- AbstractClassMetaData clazz = (AbstractClassMetaData) owner;
- clazz.setClassName((String)value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,54 +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.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.beans.metadata.spi.ClassMetaData;
-import org.jboss.beans.metadata.plugins.AbstractClassMetaData;
-
-/**
- * ClassHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class ClassHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final ClassHandler HANDLER = new ClassHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractClassMetaData();
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- ClassMetaData classMetaData = (ClassMetaData) o;
- String name = classMetaData.getClassName();
- if (name == null || name.trim().length() == 0)
- throw new IllegalArgumentException("Null or empty class/interface.");
- return classMetaData;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,59 +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.AbstractClassLoaderMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * ClassLoaderHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ClassLoaderHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final ClassLoaderHandler HANDLER = new ClassLoaderHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractClassLoaderMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractClassLoaderMetaData classLoader = (AbstractClassLoaderMetaData) o;
- if (classLoader.getClassLoader() == null)
- throw new IllegalArgumentException("ClassLoader should have a nested value.");
- return classLoader;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CollectionHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CollectionHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/CollectionHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,72 +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.AbstractArrayMetaData;
-import org.jboss.beans.metadata.plugins.AbstractCollectionMetaData;
-import org.jboss.beans.metadata.plugins.AbstractListMetaData;
-import org.jboss.beans.metadata.plugins.AbstractSetMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * CollectionHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class CollectionHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final CollectionHandler HANDLER = new CollectionHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- if (BeanSchemaBinding20.collectionQName.equals(name))
- return new AbstractCollectionMetaData();
- else if (BeanSchemaBinding20.listQName.equals(name))
- return new AbstractListMetaData();
- else if (BeanSchemaBinding20.setQName.equals(name))
- return new AbstractSetMetaData();
- else if (BeanSchemaBinding20.arrayQName.equals(name))
- return new AbstractArrayMetaData();
- else
- throw new IllegalArgumentException("Unknown collection qname=" + name);
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractCollectionMetaData collection = (AbstractCollectionMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("class".equals(localName))
- collection.setType(attrs.getValue(i));
- else if ("elementClass".equals(localName))
- collection.setElementType(attrs.getValue(i));
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorAnnotationsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorAnnotationsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorAnnotationsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ConstructorAnnotationsInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ConstructorAnnotationsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final ConstructorAnnotationsInterceptor INTERCEPTOR = new ConstructorAnnotationsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = constructor.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- constructor.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.beans.metadata.plugins.AbstractValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ConstructorFactoryInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ConstructorFactoryInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final ConstructorFactoryInterceptor INTERCEPTOR = new ConstructorFactoryInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) parent;
- AbstractValueMetaData value = (AbstractValueMetaData) child;
- constructor.setFactory(value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,69 +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.AbstractConstructorMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * ConstructorHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ConstructorHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final ConstructorHandler HANDLER = new ConstructorHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractConstructorMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("factoryClass".equals(localName))
- constructor.setFactoryClass(attrs.getValue(i));
- else if ("factoryMethod".equals(localName))
- constructor.setFactoryMethod(attrs.getValue(i));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) o;
- if (constructor.getFactory() != null || constructor.getFactoryClass() != null)
- if (constructor.getFactoryMethod() == null)
- throw new IllegalArgumentException("Constructor needs a factoryMethod attribute when there is a factoryClass attribute or factory element.");
- return constructor;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,58 +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 java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.spi.ParameterMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ConstructorParametersInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ConstructorParametersInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final ConstructorParametersInterceptor INTERCEPTOR = new ConstructorParametersInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) parent;
- AbstractParameterMetaData parameter = (AbstractParameterMetaData) child;
- List<ParameterMetaData> parameters = constructor.getParameters();
- if (parameters == null)
- {
- parameters = new ArrayList<ParameterMetaData>();
- constructor.setParameters(parameters);
- }
- parameter.setIndex(parameters.size());
- parameters.add(parameter);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,53 +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.AbstractDemandMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * DemandCharactersHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DemandCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final DemandCharactersHandler HANDLER = new DemandCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qname, ElementBinding element, Object owner, Object value)
- {
- AbstractDemandMetaData demand = (AbstractDemandMetaData) owner;
- demand.setDemand(value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,70 +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.AbstractDemandMetaData;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * DemandHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DemandHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final DemandHandler HANDLER = new DemandHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractDemandMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractDemandMetaData demand = (AbstractDemandMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("state".equals(localName))
- demand.setWhenRequired(new ControllerState(attrs.getValue(i)));
- else if ("transformer".equals(localName))
- demand.setTransformer(attrs.getValue(i));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractDemandMetaData x = (AbstractDemandMetaData) o;
- String name = (String) x.getDemand();
- if (name == null || name.trim().length() == 0)
- throw new IllegalArgumentException("Null or empty demand.");
- return o;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,74 +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.AbstractDependencyValueMetaData;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * DependencyHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DependencyHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final DependencyHandler HANDLER = new DependencyHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractDependencyValueMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractDependencyValueMetaData dependency = (AbstractDependencyValueMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("bean".equals(localName))
- dependency.setValue(attrs.getValue(i));
- else if ("property".equals(localName))
- dependency.setProperty(attrs.getValue(i));
- else if ("state".equals(localName))
- dependency.setDependentState(new ControllerState(attrs.getValue(i)));
- else if ("whenRequired".equals(localName))
- dependency.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractDependencyValueMetaData x = (AbstractDependencyValueMetaData) o;
- String name = (String) x.getUnderlyingValue();
- if (name == null || name.trim().length() == 0)
- throw new IllegalArgumentException("Null or empty bean in injection.");
- return o;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,54 +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.AbstractDependencyMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * DependsCharactersHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DependsCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final DependsCharactersHandler HANDLER = new DependsCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qname, ElementBinding element, Object owner, Object value)
- {
- AbstractDependencyMetaData depends = (AbstractDependencyMetaData) owner;
- depends.setDependency(value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,60 +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.AbstractDependencyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * DependsHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DependsHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final DependsHandler HANDLER = new DependsHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractDependencyMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractDependencyMetaData x = (AbstractDependencyMetaData) o;
- String name = (String) x.getDependency();
- if (name == null || name.trim().length() == 0)
- throw new IllegalArgumentException("Null or empty dependency.");
- return o;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,54 +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 java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.spi.NamedAliasMetaData;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * DeploymentAliasInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class DeploymentAliasInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final DeploymentAliasInterceptor INTERCEPTOR = new DeploymentAliasInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
- NamedAliasMetaData alias = (NamedAliasMetaData) child;
- Set<NamedAliasMetaData> aliases = deployment.getAliases();
- if (aliases == null)
- {
- aliases = new HashSet<NamedAliasMetaData>();
- deployment.setAliases(aliases);
- }
- aliases.add(alias);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAnnotationInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAnnotationInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAnnotationInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,55 +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 java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * DeploymentAnnotationInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class DeploymentAnnotationInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final DeploymentAnnotationInterceptor INTERCEPTOR = new DeploymentAnnotationInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = deployment.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- deployment.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * DeploymentBeanInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DeploymentBeanInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final DeploymentBeanInterceptor INTERCEPTOR = new DeploymentBeanInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
- AbstractBeanMetaData bean = (AbstractBeanMetaData) child;
- List<BeanMetaDataFactory> beans = deployment.getBeanFactories();
- if (beans == null)
- {
- beans = new ArrayList<BeanMetaDataFactory>();
- deployment.setBeanFactories(beans);
- }
- beans.add(bean);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.List;
-import java.util.ArrayList;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractClassLoaderMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * DeploymentClassLoaderInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DeploymentClassLoaderInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final DeploymentClassLoaderInterceptor INTERCEPTOR = new DeploymentClassLoaderInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
- AbstractClassLoaderMetaData classloader = (AbstractClassLoaderMetaData) child;
- deployment.setClassLoader(classloader);
- // add classloaders as value beans
- List<BeanMetaDataFactory> beans = deployment.getBeanFactories();
- if (beans == null)
- {
- beans = new ArrayList<BeanMetaDataFactory>();
- deployment.setBeanFactories(beans);
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,64 +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.dependency.spi.ControllerMode;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * DeploymentHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DeploymentHandler extends DefaultElementHandler
-{
- /** The deployment handler */
- public static final DeploymentHandler HANDLER = new DeploymentHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractKernelDeployment();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractKernelDeployment deployment = (AbstractKernelDeployment)o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- deployment.setName(attrs.getValue(i));
- else if ("scoped".equals(localName))
- deployment.setScoped(Boolean.parseBoolean(attrs.getValue(i)));
- else if ("mode".equals(localName))
- deployment.setMode(ControllerMode.getInstance(attrs.getValue(i)));
- }
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,59 +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 java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * DeploymentWildcardHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DeploymentWildcardHandler extends DefaultWildcardHandler
-{
- /** The handler */
- public static final DeploymentWildcardHandler HANDLER = new DeploymentWildcardHandler();
-
- public void setParent(Object parent, Object o, QName elementName, ElementBinding element, ElementBinding parentElement)
- {
- AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
- if (o == null || o instanceof BeanMetaDataFactory == false)
- throw new IllegalArgumentException(o + " is not an instance of BeanMetaDataFactory for element " + element.getQName());
- BeanMetaDataFactory bean = (BeanMetaDataFactory) o;
- List<BeanMetaDataFactory> beans = deployment.getBeanFactories();
- if (beans == null)
- {
- beans = new ArrayList<BeanMetaDataFactory>();
- deployment.setBeanFactories(beans);
- }
- beans.add(bean);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,44 +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.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * EntryHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class EntryHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final EntryHandler HANDLER = new EntryHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new MapEntry();
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,44 +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.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * EntryKeyInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class EntryKeyInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final EntryKeyInterceptor INTERCEPTOR = new EntryKeyInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- MapEntry entry = (MapEntry) parent;
- entry.key = child;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,44 +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.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * EntryValueInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class EntryValueInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final EntryValueInterceptor INTERCEPTOR = new EntryValueInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- MapEntry entry = (MapEntry) parent;
- entry.value = child;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,77 +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.AbstractDependencyValueMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * FactoryHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class FactoryHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final FactoryHandler HANDLER = new FactoryHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new Holder(new AbstractDependencyValueMetaData());
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- Holder value = (Holder) o;
- AbstractDependencyValueMetaData dependency = (AbstractDependencyValueMetaData) value.getValue();
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("bean".equals(localName))
- dependency.setValue(attrs.getValue(i));
- else if ("property".equals(localName))
- dependency.setProperty(attrs.getValue(i));
- else if ("state".equals(localName))
- dependency.setDependentState(new ControllerState(attrs.getValue(i)));
- else if ("whenRequired".equals(localName))
- dependency.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- Holder holder = (Holder) o;
- ValueMetaData value = (ValueMetaData) holder.getValue();
-
- if (value == null || value.getUnderlyingValue() == null)
- throw new IllegalArgumentException("Factory should have a bean attribute or nested element.");
- return value;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,49 +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.AbstractValueMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * FactoryWildcardHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class FactoryWildcardHandler extends DefaultWildcardHandler
-{
- /** The handler */
- public static final FactoryWildcardHandler WILDCARD = new FactoryWildcardHandler();
-
- public void setParent(Object parent, Object o, QName elementName, ElementBinding element, ElementBinding parentElement)
- {
- Holder holder = (Holder) parent;
- if (o instanceof ValueMetaData == false)
- o = new AbstractValueMetaData(o);
- holder.setValue(o);
- }
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,52 +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;
-
-/**
- * Holder.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-class Holder
-{
- private Object object;
-
- public Holder()
- {
- }
-
- public Holder(Object object)
- {
- this.object = object;
- }
-
- public Object getValue()
- {
- return object;
- }
-
- public void setValue(Object object)
- {
- this.object = object;
- }
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,64 +0,0 @@
-/*
- *
- */
-
-package org.jboss.kernel.plugins.deployment.xml;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.api.model.InjectOption;
-import org.jboss.beans.metadata.api.model.FromContext;
-import org.jboss.beans.metadata.api.model.AutowireType;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * DependencyHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 43106 $
- */
-public class InjectionHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final InjectionHandler HANDLER = new InjectionHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- AbstractInjectionValueMetaData vmd = new AbstractInjectionValueMetaData();
- if (parent instanceof AbstractPropertyMetaData)
- {
- AbstractPropertyMetaData x = (AbstractPropertyMetaData) parent;
- vmd.setPropertyMetaData(x);
- }
- return vmd;
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractInjectionValueMetaData injection = (AbstractInjectionValueMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("bean".equals(localName))
- injection.setValue(attrs.getValue(i));
- else if ("property".equals(localName))
- injection.setProperty(attrs.getValue(i));
- else if ("state".equals(localName))
- injection.setDependentState(new ControllerState(attrs.getValue(i)));
- else if ("whenRequired".equals(localName))
- injection.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
- else if ("type".equals(localName))
- injection.setInjectionType(AutowireType.getInstance(attrs.getValue(i)));
- else if ("option".equals(localName))
- injection.setInjectionOption(InjectOption.getInstance(attrs.getValue(i)));
- else if ("fromContext".equals(localName))
- injection.setFromContext(FromContext.getInstance(attrs.getValue(i)));
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallAnnotationsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallAnnotationsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallAnnotationsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * InstallAnnotationsInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class InstallAnnotationsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final InstallAnnotationsInterceptor INTERCEPTOR = new InstallAnnotationsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractInstallMetaData install = (AbstractInstallMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = install.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- install.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,73 +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.AbstractInstallMetaData;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * InstallHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class InstallHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final InstallHandler HANDLER = new InstallHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractInstallMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractInstallMetaData install = (AbstractInstallMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("bean".equals(localName))
- install.setBean(attrs.getValue(i));
- else if ("method".equals(localName))
- install.setMethodName(attrs.getValue(i));
- else if ("state".equals(localName))
- install.setDependentState(new ControllerState(attrs.getValue(i)));
- else if ("whenRequired".equals(localName))
- install.setState(new ControllerState(attrs.getValue(i)));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractInstallMetaData install = (AbstractInstallMetaData) o;
- if (install.getMethodName() == null)
- throw new IllegalArgumentException("Install/uninstall should have method attribute.");
- return install;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallParametersInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallParametersInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/InstallParametersInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,58 +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 java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.spi.ParameterMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * InstallParametersInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class InstallParametersInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final InstallParametersInterceptor INTERCEPTOR = new InstallParametersInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractInstallMetaData install = (AbstractInstallMetaData) parent;
- AbstractParameterMetaData parameter = (AbstractParameterMetaData) child;
- List<ParameterMetaData> parameters = install.getParameters();
- if (parameters == null)
- {
- parameters = new ArrayList<ParameterMetaData>();
- install.setParameters(parameters);
- }
- parameter.setIndex(parameters.size());
- parameters.add(parameter);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,69 +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.AbstractLazyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * LazyHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class LazyHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final LazyHandler HANDLER = new LazyHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractLazyMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractLazyMetaData lazy = (AbstractLazyMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- lazy.setName(attrs.getValue(i));
- else if ("bean".equals(localName))
- lazy.setBeanName(attrs.getValue(i));
- else if ("exposeClass".equals(localName))
- lazy.setExposeClass(Boolean.parseBoolean(attrs.getValue(i)));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractLazyMetaData lazy = (AbstractLazyMetaData) o;
- if (lazy.getBeanName() == null)
- throw new IllegalArgumentException("Bean name must be set!");
- return lazy;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,54 +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 java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractLazyMetaData;
-import org.jboss.beans.metadata.spi.ClassMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * LazyInterfaceInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class LazyInterfaceInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final LazyInterfaceInterceptor INTERCEPTOR = new LazyInterfaceInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractLazyMetaData lazy = (AbstractLazyMetaData) parent;
- ClassMetaData intface = (ClassMetaData) child;
- Set<String> interfaces = lazy.getInterfaces();
- if (interfaces == null)
- {
- interfaces = new HashSet<String>();
- lazy.setInterfaces(interfaces);
- }
- interfaces.add(intface.getClassName());
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleAnnotationsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleAnnotationsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleAnnotationsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * LifecycleAnnotationsInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class LifecycleAnnotationsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final LifecycleAnnotationsInterceptor INTERCEPTOR = new LifecycleAnnotationsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = lifecycle.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- lifecycle.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.AbstractLifecycleMetaData;
-import org.jboss.beans.metadata.plugins.MutableLifecycleHolder;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * LifecycleCreateInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class LifecycleCreateInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final LifecycleCreateInterceptor INTERCEPTOR = new LifecycleCreateInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
- lifecycle.setType("create");
- holder.setCreate(lifecycle);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.AbstractLifecycleMetaData;
-import org.jboss.beans.metadata.plugins.MutableLifecycleHolder;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * LifecycleDestroyInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class LifecycleDestroyInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final LifecycleDestroyInterceptor INTERCEPTOR = new LifecycleDestroyInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
- lifecycle.setType("destroy");
- holder.setDestroy(lifecycle);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,60 +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.AbstractLifecycleMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * LifecycleHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class LifecycleHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final LifecycleHandler HANDLER = new LifecycleHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractLifecycleMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("method".equals(localName))
- lifecycle.setMethodName(attrs.getValue(i));
- else if ("ignored".equals(localName))
- lifecycle.setIgnored(Boolean.parseBoolean(attrs.getValue(i)));
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,58 +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 java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.spi.ParameterMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ConstructorParametersInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class LifecycleParametersInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final LifecycleParametersInterceptor INTERCEPTOR = new LifecycleParametersInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) parent;
- AbstractParameterMetaData parameter = (AbstractParameterMetaData) child;
- List<ParameterMetaData> parameters = lifecycle.getParameters();
- if (parameters == null)
- {
- parameters = new ArrayList<ParameterMetaData>();
- lifecycle.setParameters(parameters);
- }
- parameter.setIndex(parameters.size());
- parameters.add(parameter);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.AbstractLifecycleMetaData;
-import org.jboss.beans.metadata.plugins.MutableLifecycleHolder;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * LifecycleStartInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class LifecycleStartInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final LifecycleStartInterceptor INTERCEPTOR = new LifecycleStartInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
- lifecycle.setType("start");
- holder.setStart(lifecycle);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.AbstractLifecycleMetaData;
-import org.jboss.beans.metadata.plugins.MutableLifecycleHolder;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * LifecycleStopInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class LifecycleStopInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final LifecycleStopInterceptor INTERCEPTOR = new LifecycleStopInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
- AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
- lifecycle.setType("stop");
- holder.setStop(lifecycle);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,34 +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;
-
-/**
- * MapEntry.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-class MapEntry
-{
- public Object key;
- public Object value;
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,54 +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.AbstractMapMetaData;
-import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
-import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * MapEntryInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class MapEntryInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final MapEntryInterceptor INTERCEPTOR = new MapEntryInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractMapMetaData map = (AbstractMapMetaData) parent;
- MapEntry entry = (MapEntry) child;
- AbstractValueMetaData entryKey = (AbstractValueMetaData) entry.key;
- if (entryKey == null)
- throw new IllegalArgumentException("No key in map entry");
- AbstractValueMetaData entryValue = (AbstractValueMetaData) entry.value;
- if (entryValue == null)
- throw new IllegalArgumentException("No value in map entry");
- map.put((MetaDataVisitorNode) entryKey.getValue(), (MetaDataVisitorNode) entryValue.getValue());
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,62 +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.AbstractMapMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * MapHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class MapHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final MapHandler HANDLER = new MapHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractMapMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractMapMetaData map = (AbstractMapMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("class".equals(localName))
- map.setType(attrs.getValue(i));
- else if ("keyClass".equals(localName))
- map.setKeyType(attrs.getValue(i));
- else if ("valueClass".equals(localName))
- map.setValueType(attrs.getValue(i));
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,70 +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.AbstractNamedAliasMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * The named alias handler.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class NamedAliasHandler extends AliasHandler
-{
- /**
- * The alias handler
- */
- public static final NamedAliasHandler NAMED_ALIAS_HANDLER = new NamedAliasHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractNamedAliasMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractNamedAliasMetaData alias = (AbstractNamedAliasMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- alias.setName(attrs.getValue(i));
- else if ("alias".equals(localName))
- alias.setAliasValue(attrs.getValue(i));
- }
- super.attributes(o, elementName, element, attrs, nsCtx);
- }
-
- public Object endElement(Object object, QName qName, ElementBinding elementBinding)
- {
- AbstractNamedAliasMetaData alias = (AbstractNamedAliasMetaData)object;
- if (alias.getName() == null)
- throw new IllegalArgumentException("Missing name: " + alias);
- return super.endElement(object, qName, elementBinding);
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,41 +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 org.jboss.beans.metadata.plugins.AbstractValueMetaData;
-
-/**
- * NullValueElementInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class NullValueElementInterceptor extends ValueElementInterceptor
-{
- /** The null handler */
- public static final NullValueElementInterceptor NULLVALUES = new NullValueElementInterceptor();
-
- public AbstractValueMetaData getValue()
- {
- return new AbstractValueMetaData();
- }
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterAnnotationsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterAnnotationsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterAnnotationsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ParameterAnnotationsInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ParameterAnnotationsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final ParameterAnnotationsInterceptor INTERCEPTOR = new ParameterAnnotationsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractParameterMetaData parameter = (AbstractParameterMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = parameter.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- parameter.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,46 +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.AbstractParameterMetaData;
-import org.jboss.beans.metadata.plugins.StringValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * ParameterCharactersHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ParameterCharactersHandler extends StringValueCharactersHandler
-{
- /** The interceptor */
- public static final ParameterCharactersHandler HANDLER = new ParameterCharactersHandler();
-
- public void setValue(QName qName, ElementBinding element, Object owner, Object value)
- {
- AbstractParameterMetaData parameter = (AbstractParameterMetaData) owner;
- setStringValue(parameter, (StringValueMetaData)value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,78 +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.AbstractParameterMetaData;
-import org.jboss.beans.metadata.plugins.StringValueMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * CollectionHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ParameterHandler extends DefaultElementHandler
-{
- /**
- * The handler
- */
- public static final ParameterHandler HANDLER = new ParameterHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractParameterMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractParameterMetaData parameter = (AbstractParameterMetaData)o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("class".equals(localName))
- parameter.setType(attrs.getValue(i));
- else if ("replace".equals(localName) || "trim".equals(localName))
- {
- ValueMetaData vmd = parameter.getValue();
- StringValueMetaData stringValueMetaData;
- if (vmd != null && vmd instanceof StringValueMetaData)
- stringValueMetaData = (StringValueMetaData)vmd;
- else
- {
- stringValueMetaData = new StringValueMetaData();
- parameter.setValue(stringValueMetaData);
- }
- if ("replace".equals(localName))
- stringValueMetaData.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
- else if ("trim".equals(localName))
- stringValueMetaData.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
- }
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,53 +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.StringValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * PlainValueCharactersHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class PlainValueCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final PlainValueCharactersHandler HANDLER = new PlainValueCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qName, ElementBinding element, Object owner, Object value)
- {
- StringValueMetaData valueMetaData = (StringValueMetaData) owner;
- valueMetaData.setValue(value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,62 +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.StringValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * PlainValueHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class PlainValueHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final PlainValueHandler HANDLER = new PlainValueHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new StringValueMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- StringValueMetaData value = (StringValueMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("class".equals(localName))
- value.setType(attrs.getValue(i));
- else if ("replace".equals(localName))
- value.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
- else if ("trim".equals(localName))
- value.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyAnnotationsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyAnnotationsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyAnnotationsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,55 +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 java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.policy.AbstractPolicyMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * PolicyAnnotationsInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class PolicyAnnotationsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final PolicyAnnotationsInterceptor INTERCEPTOR = new PolicyAnnotationsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractPolicyMetaData policy = (AbstractPolicyMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = policy.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- policy.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyBindingInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyBindingInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyBindingInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,55 +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 java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.policy.AbstractBindingMetaData;
-import org.jboss.beans.metadata.plugins.policy.AbstractPolicyMetaData;
-import org.jboss.beans.metadata.spi.policy.BindingMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * PolicyBindingInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class PolicyBindingInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final PolicyBindingInterceptor INTERCEPTOR = new PolicyBindingInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractPolicyMetaData policy = (AbstractPolicyMetaData) parent;
- AbstractBindingMetaData binding = (AbstractBindingMetaData) child;
- Set<BindingMetaData> bindings = policy.getBindings();
- if (bindings == null)
- {
- bindings = new HashSet<BindingMetaData>();
- policy.setBindings(bindings);
- }
- bindings.add(binding);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,60 +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.policy.AbstractPolicyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * PolicyHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class PolicyHandler extends DefaultElementHandler
-{
- /** The policy handler */
- public static final PolicyHandler HANDLER = new PolicyHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractPolicyMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractPolicyMetaData policy = (AbstractPolicyMetaData)o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- policy.setName(attrs.getValue(i));
- else if ("extends".equals(localName))
- policy.setExtends(attrs.getValue(i));
- }
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBinding.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBinding.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBinding.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,79 +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.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * The policy schema binding.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class PolicySchemaBinding
-{
- /** The namespace */
- public static final String POLICY_NS = "urn:jboss:policy:1.0";
-
- /** The policy binding */
- public static final QName policyTypeQName = new QName(POLICY_NS, "policyType");
-
- /** The scope binding */
- public static final QName scopeTypeQName = new QName(POLICY_NS, "scopeType");
-
- /** The scope element name */
- public static final QName scopeQName = new QName(POLICY_NS, "scope");
-
- /** The binding binding */
- public static final QName bindingTypeQName = new QName(POLICY_NS, "bindingType");
-
- /** The binding element name */
- public static final QName bindingQName = new QName(POLICY_NS, "binding");
-
- /** The annotation element name */
- public static final QName annotationQName = new QName(BeanSchemaBinding20.BEAN_DEPLOYER_NS, "annotation");
-
- /**
- * Initialize the schema binding
- *
- * @param schemaBinding the schema binding
- */
- public static void init(SchemaBinding schemaBinding)
- {
- // ignore XB property replacement
- schemaBinding.setReplacePropertyRefs(false);
- // init
- TypeBinding policyType = schemaBinding.getType(policyTypeQName);
- PolicySchemaBindingHelper.initPolicyHandlers(policyType);
-
- TypeBinding scopeType = schemaBinding.getType(scopeTypeQName);
- PolicySchemaBindingHelper.initScopeHandlers(scopeType);
-
- TypeBinding bindingsType = schemaBinding.getType(bindingTypeQName);
- PolicySchemaBindingHelper.initBindingHandlers(bindingsType);
-
- BeanSchemaBinding20.initArtifacts(schemaBinding);
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBindingHelper.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBindingHelper.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaBindingHelper.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,65 +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 org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
-
-/**
- * PolicySchemaBindingHelper.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class PolicySchemaBindingHelper
-{
- public static void initPolicyHandlers(TypeBinding policyType)
- {
- policyType.setHandler(PolicyHandler.HANDLER);
- // interceptors
- policyType.pushInterceptor(PolicySchemaBinding.scopeQName, PolicyScopeInterceptor.INTERCEPTOR);
- policyType.pushInterceptor(PolicySchemaBinding.annotationQName, PolicyAnnotationsInterceptor.INTERCEPTOR);
- policyType.pushInterceptor(PolicySchemaBinding.bindingQName, PolicyBindingInterceptor.INTERCEPTOR);
- }
-
- public static void initScopeHandlers(TypeBinding scopeType)
- {
- scopeType.setHandler(ScopeHandler.HANDLER);
- }
-
- public static void initAnnotationHandlers(TypeBinding annotationType)
- {
- annotationType.setHandler(AnnotationHandler.HANDLER);
- }
-
- public static void initBindingHandlers(TypeBinding bindingType)
- {
- bindingType.setHandler(BindingHandler.HANDLER);
- BeanSchemaBindingHelper.configureValueBindings(bindingType);
- // binding can take characters
- bindingType.setSimpleType(BindingCharactersHandler.HANDLER);
- // type has wildcard
- WildcardBinding wcb = bindingType.getWildcard();
- if (wcb == null)
- throw new IllegalStateException("Missing wildcard binding for type: " + bindingType.getQName());
- wcb.setWildcardHandler(BindingWildcardHandler.WILDCARD);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaInitializer.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaInitializer.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicySchemaInitializer.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,37 +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 org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingInitializer;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class PolicySchemaInitializer implements SchemaBindingInitializer
-{
- public SchemaBinding init(SchemaBinding schema)
- {
- PolicySchemaBinding.init(schema);
- return schema;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyScopeInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyScopeInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PolicyScopeInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,46 +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.policy.AbstractPolicyMetaData;
-import org.jboss.beans.metadata.plugins.policy.AbstractScopeMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * PolicyScopeInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class PolicyScopeInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final PolicyScopeInterceptor INTERCEPTOR = new PolicyScopeInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractPolicyMetaData policy = (AbstractPolicyMetaData) parent;
- AbstractScopeMetaData scope = (AbstractScopeMetaData) child;
- policy.setScope(scope);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,65 +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 javax.xml.namespace.NamespaceContext;
-
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * PropertyHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class PropHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final PropHandler HANDLER = new PropHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new MapEntry();
- }
-
- public void attributes(Object object, QName qName, ElementBinding eb, Attributes attrs, NamespaceContext nc)
- {
- MapEntry entry = (MapEntry) object;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("key".equals(localName))
- entry.key = attrs.getValue(i);
- }
- }
-
- public Object endElement(Object object, QName qName, ElementBinding elementBinding)
- {
- MapEntry entry = (MapEntry) object;
- if (entry.key == null)
- throw new IllegalArgumentException("Missing key attribute: " + elementBinding);
- return entry;
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,45 +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.AbstractPropertiesMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * PropertyHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class PropertiesHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final PropertiesHandler HANDLER = new PropertiesHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractPropertiesMetaData();
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyAnnotationsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyAnnotationsInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyAnnotationsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,57 +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 java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * PropertyAnnotationsInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class PropertyAnnotationsInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final PropertyAnnotationsInterceptor INTERCEPTOR = new PropertyAnnotationsInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractPropertyMetaData property = (AbstractPropertyMetaData) parent;
- AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
- Set<AnnotationMetaData> annotations = property.getAnnotations();
- if (annotations == null)
- {
- annotations = new HashSet<AnnotationMetaData>();
- property.setAnnotations(annotations);
- }
- annotations.add(annotation);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -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.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.plugins.StringValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * PropertyCharactersHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class PropertyCharactersHandler extends StringValueCharactersHandler
-{
- /** The interceptor */
- public static final PropertyCharactersHandler HANDLER = new PropertyCharactersHandler();
-
- public void setValue(QName qName, ElementBinding element, Object owner, Object value)
- {
- AbstractPropertyMetaData property = (AbstractPropertyMetaData) owner;
- StringValueMetaData svmd = (StringValueMetaData) value;
- setStringValue(property, svmd);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,91 +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.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.plugins.StringValueMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * PropertyHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class PropertyHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final PropertyHandler HANDLER = new PropertyHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractPropertyMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractPropertyMetaData property = (AbstractPropertyMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("name".equals(localName))
- property.setName(attrs.getValue(i));
- else if ("preinstantiate".equals(localName))
- property.setPreInstantiate(Boolean.parseBoolean(attrs.getValue(i)));
- else if ("class".equals(localName) || "replace".equals(localName) || "trim".equals(localName))
- {
- StringValueMetaData svmd;
- ValueMetaData vmd = property.getValue();
- if (vmd == null || vmd instanceof StringValueMetaData == false)
- {
- svmd = new StringValueMetaData();
- property.setValue(svmd);
- }
- else
- {
- svmd = (StringValueMetaData)vmd;
- }
- if ("class".equals(localName))
- svmd.setType(attrs.getValue(i));
- else if ("replace".equals(localName))
- svmd.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
- else if ("trim".equals(localName))
- svmd.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
- }
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractPropertyMetaData x = (AbstractPropertyMetaData) o;
- String name = x.getName();
- if (name == null || name.trim().length() == 0)
- throw new IllegalArgumentException("Null or empty property name.");
- return o;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ScopeHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ScopeHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ScopeHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,76 +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.policy.AbstractScopeMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * ScopeHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class ScopeHandler extends DefaultElementHandler
-{
- /**
- * The scope handler
- */
- public static final ScopeHandler HANDLER = new ScopeHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractScopeMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractScopeMetaData scope = (AbstractScopeMetaData)o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("level".equals(localName))
- scope.setLevel(attrs.getValue(i));
- else if ("qualifier".equals(localName))
- scope.setQualifier(attrs.getValue(i));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractScopeMetaData scopeMetaData = (AbstractScopeMetaData)o;
- String scope = scopeMetaData.getScope();
- if (scope != null && scope.length() > 0)
- {
- if (scope.startsWith("@") == false)
- {
- throw new IllegalArgumentException("<scope/> content must be a fully qualified annotation type name prefixed with '@'");
- }
- }
- return scopeMetaData;
- }
-
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,62 +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.StringValueMetaData;
-import org.jboss.beans.metadata.plugins.ValueMetaDataAware;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * Abstract StringValueMetaData helper.
- * Looks for previous value on the ValueMetaDataAware.
- * If the previous value is StringValueMD it applies its
- * property values to the new StringValueMetaData instance.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public abstract class StringValueCharactersHandler extends CharactersHandler
-{
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return new StringValueMetaData(value);
- }
-
- protected void setStringValue(ValueMetaDataAware vmda, StringValueMetaData svmd)
- {
- ValueMetaData vmd = vmda.getValue();
- if (vmd != null && vmd instanceof StringValueMetaData)
- {
- StringValueMetaData previous = (StringValueMetaData) vmd;
- svmd.setReplace(previous.isReplace());
- svmd.setTrim(previous.isTrim());
- String type = previous.getType();
- if (type != null)
- svmd.setType(type);
- }
- vmda.setValue(svmd);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,53 +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.AbstractSupplyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * SupplyCharactersHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class SupplyCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final SupplyCharactersHandler HANDLER = new SupplyCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qName, ElementBinding element, Object owner, Object value)
- {
- AbstractSupplyMetaData supply = (AbstractSupplyMetaData) owner;
- supply.setSupply(value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/SupplyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,66 +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 javax.xml.namespace.NamespaceContext;
-
-import org.jboss.beans.metadata.plugins.AbstractSupplyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * SupplyHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class SupplyHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final SupplyHandler HANDLER = new SupplyHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractSupplyMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractSupplyMetaData supply = (AbstractSupplyMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- if ("class".equals(attrs.getLocalName(i)))
- supply.setType(attrs.getValue(i));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractSupplyMetaData x = (AbstractSupplyMetaData) o;
- Object supply = x.getSupply();
- if (supply == null || supply.toString().length() == 0)
- throw new IllegalArgumentException("Null or empty supply.");
- return o;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,42 +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 org.jboss.beans.metadata.plugins.AbstractValueMetaData;
-import org.jboss.beans.metadata.plugins.ThisValueMetaData;
-
-/**
- * ThisValueElementInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ThisValueElementInterceptor extends ValueElementInterceptor
-{
- /** The this handler */
- public static final ThisValueElementInterceptor THISVALUES = new ThisValueElementInterceptor();
-
- public AbstractValueMetaData getValue()
- {
- return new ThisValueMetaData();
- }
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,55 +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.AbstractValueMetaData;
-import org.jboss.beans.metadata.plugins.StringValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-/**
- * ValueCharactersHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ValueCharactersHandler extends CharactersHandler
-{
- /** The interceptor */
- public static final ValueCharactersHandler HANDLER = new ValueCharactersHandler();
-
- public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
- {
- return value;
- }
-
- public void setValue(QName qName, ElementBinding element, Object owner, Object value)
- {
- AbstractValueMetaData valueMetaData = (AbstractValueMetaData) owner;
- StringValueMetaData string = (StringValueMetaData) valueMetaData.getValue();
- string.setValue(value);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,71 +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.AbstractClassLoaderMetaData;
-import org.jboss.beans.metadata.plugins.AbstractCollectionMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ValueElementInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public abstract class ValueElementInterceptor extends DefaultElementInterceptor
-{
- public void add(Object parent, Object child, QName name)
- {
- if (parent instanceof AbstractCollectionMetaData)
- {
- AbstractCollectionMetaData collection = (AbstractCollectionMetaData) parent;
- collection.add(getValue());
- }
- else if (parent instanceof AbstractParameterMetaData)
- {
- AbstractParameterMetaData valueMetaData = (AbstractParameterMetaData) parent;
- valueMetaData.setValue(getValue());
- }
- else if (parent instanceof AbstractPropertyMetaData)
- {
- AbstractPropertyMetaData valueMetaData = (AbstractPropertyMetaData) parent;
- valueMetaData.setValue(getValue());
- }
- else if (parent instanceof AbstractClassLoaderMetaData)
- {
- AbstractClassLoaderMetaData valueMetaData = (AbstractClassLoaderMetaData) parent;
- valueMetaData.setClassLoader(getValue());
- }
- else
- {
- AbstractValueMetaData valueMetaData = (AbstractValueMetaData) parent;
- valueMetaData.setValue(getValue());
- }
- }
-
- public abstract AbstractValueMetaData getValue();
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,89 +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 java.util.List;
-import java.util.ArrayList;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractValueFactoryMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.spi.ParameterMetaData;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * ValueFactoryHandler.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class ValueFactoryHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final ValueFactoryHandler HANDLER = new ValueFactoryHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractValueFactoryMetaData();
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractValueFactoryMetaData valueFactory = (AbstractValueFactoryMetaData) o;
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("bean".equals(localName))
- valueFactory.setValue(attrs.getValue(i));
- else if ("method".equals(localName))
- valueFactory.setMethod(attrs.getValue(i));
- else if ("state".equals(localName))
- valueFactory.setDependentState(new ControllerState(attrs.getValue(i)));
- else if ("whenRequired".equals(localName))
- valueFactory.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
- else if ("parameter".equals(localName))
- valueFactory.setParameter(attrs.getValue(i));
- else if ("default".equals(localName))
- valueFactory.setDefaultValue(attrs.getValue(i));
- }
- }
-
- public Object endElement(Object o, QName qName, ElementBinding element)
- {
- AbstractValueFactoryMetaData vf = (AbstractValueFactoryMetaData)o;
- if (vf.getUnderlyingValue() == null || vf.getMethod() == null)
- throw new IllegalArgumentException("Bean or method cannot null: " + vf);
- if (vf.getParameter() != null && vf.getParameters() != null)
- throw new IllegalArgumentException("Both parameter and parameters cannot be set: " + vf);
- if (vf.getParameter() != null)
- {
- List<ParameterMetaData> parameters = new ArrayList<ParameterMetaData>();
- parameters.add(new AbstractParameterMetaData(String.class.getName(), vf.getParameter()));
- vf.setParameters(parameters);
- vf.setParameter(null);
- }
- return vf;
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,56 +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 java.util.ArrayList;
-import java.util.List;
-import javax.xml.namespace.QName;
-
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.plugins.AbstractValueFactoryMetaData;
-import org.jboss.beans.metadata.spi.ParameterMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ValueFactoryParametersInterceptor.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class ValueFactoryParametersInterceptor extends DefaultElementInterceptor
-{
- /** The interceptor */
- public static final ValueFactoryParametersInterceptor INTERCEPTOR = new ValueFactoryParametersInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- AbstractValueFactoryMetaData factoryMetaData = (AbstractValueFactoryMetaData) parent;
- AbstractParameterMetaData parameter = (AbstractParameterMetaData) child;
- List<ParameterMetaData> parameters = factoryMetaData.getParameters();
- if (parameters == null)
- {
- parameters = new ArrayList<ParameterMetaData>();
- factoryMetaData.setParameters(parameters);
- }
- parameter.setIndex(parameters.size());
- parameters.add(parameter);
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,64 +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.AbstractValueMetaData;
-import org.jboss.beans.metadata.plugins.StringValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.xml.sax.Attributes;
-
-/**
- * ValueHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ValueHandler extends DefaultElementHandler
-{
- /** The handler */
- public static final ValueHandler HANDLER = new ValueHandler();
-
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AbstractValueMetaData(new StringValueMetaData());
- }
-
- public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
- {
- AbstractValueMetaData value = (AbstractValueMetaData) o;
- StringValueMetaData string = (StringValueMetaData) value.getValue();
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- String localName = attrs.getLocalName(i);
- if ("class".equals(localName))
- string.setType(attrs.getValue(i));
- else if ("replace".equals(localName))
- string.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
- else if ("trim".equals(localName))
- string.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
- }
- }
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,92 +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.AbstractClassLoaderMetaData;
-import org.jboss.beans.metadata.plugins.AbstractCollectionMetaData;
-import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
-import org.jboss.beans.metadata.plugins.policy.AbstractBindingMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
-
-/**
- * ValueMetaDataElementInterceptor.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ValueMetaDataElementInterceptor extends DefaultElementInterceptor
-{
- /** The value handler */
- public static ValueMetaDataElementInterceptor VALUES = new ValueMetaDataElementInterceptor();
-
- public void add(Object parent, Object child, QName name)
- {
- if (parent instanceof AbstractCollectionMetaData)
- {
- AbstractCollectionMetaData collection = (AbstractCollectionMetaData) parent;
- ValueMetaData value = (ValueMetaData) child;
- collection.add(value);
- }
- else if (parent instanceof AbstractParameterMetaData)
- {
- AbstractParameterMetaData valueMetaData = (AbstractParameterMetaData) parent;
- ValueMetaData value = (ValueMetaData) child;
- valueMetaData.setValue(value);
- }
- else if (parent instanceof AbstractPropertyMetaData)
- {
- AbstractPropertyMetaData valueMetaData = (AbstractPropertyMetaData) parent;
- ValueMetaData value = (ValueMetaData) child;
- valueMetaData.setValue(value);
- }
- else if (parent instanceof AbstractClassLoaderMetaData)
- {
- AbstractClassLoaderMetaData valueMetaData = (AbstractClassLoaderMetaData) parent;
- ValueMetaData value = (ValueMetaData) child;
- valueMetaData.setClassLoader(value);
- }
- else if (parent instanceof AbstractConstructorMetaData)
- {
- AbstractConstructorMetaData valueMetaData = (AbstractConstructorMetaData) parent;
- ValueMetaData value = (ValueMetaData) child;
- valueMetaData.setValue(value);
- }
- else if (parent instanceof AbstractBindingMetaData)
- {
- AbstractBindingMetaData valueMetaData = (AbstractBindingMetaData) parent;
- ValueMetaData value = (ValueMetaData) child;
- valueMetaData.setValue(value);
- }
- else
- {
- AbstractValueMetaData valueMetaData = (AbstractValueMetaData) parent;
- ValueMetaData value = (ValueMetaData) child;
- valueMetaData.setValue(value);
- }
- }
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,74 +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.AbstractClassLoaderMetaData;
-import org.jboss.beans.metadata.plugins.AbstractCollectionMetaData;
-import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
-import org.jboss.beans.metadata.plugins.ValueMetaDataAware;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-
-/**
- * ValueWildcardHandler.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class ValueWildcardHandler extends DefaultWildcardHandler
-{
- /** The value wildcard handler */
- public static final ValueWildcardHandler WILDCARD = new ValueWildcardHandler();
-
- public void setParent(Object parent, Object o, QName elementName, ElementBinding element, ElementBinding parentElement)
- {
- ValueMetaData value;
- if (o instanceof ValueMetaData)
- value = (ValueMetaData) o;
- else
- value = new AbstractValueMetaData(o);
-
- if (parent instanceof ValueMetaDataAware)
- {
- ValueMetaDataAware valueMetaDataAware = (ValueMetaDataAware) parent;
- valueMetaDataAware.setValue(value);
- }
- else if (parent instanceof AbstractCollectionMetaData)
- {
- AbstractCollectionMetaData collection = (AbstractCollectionMetaData) parent;
- collection.add(value);
- }
- else if (parent instanceof AbstractClassLoaderMetaData)
- {
- AbstractClassLoaderMetaData valueMetaData = (AbstractClassLoaderMetaData) parent;
- valueMetaData.setClassLoader(value);
- }
- else
- {
- AbstractValueMetaData valueMetaData = (AbstractValueMetaData) parent;
- valueMetaData.setValue(value);
- }
- }
-}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/package.html
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/package.html 2008-07-07 07:39:34 UTC (rev 75423)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/xml/package.html 2008-07-07 08:16:41 UTC (rev 75424)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <!-- $Id$ -->
- <!--
-
- JBoss: The OpenSource J2EE WebOS
-
- Distributable under LGPL license.
- See terms of license at gnu.org.
-
- -->
- </head>
-
- <body bgcolor="white">
- <p>Kernel plugins, an xml deployment implementation.
-
- <h2>Package Specification</h2>
- <ul>
- <li><a href="javascript: alert('not available')">Not Available</a>
- </ul>
-
- <h2>Related Documentation</h2>
- <ul>
- <li><a href="javascript: alert('not available')">Not Available</a>
- </ul>
-
- <h2>Package Status</h2>
- <ul>
- <li><font color="red"><b>ALPHA</b></font>
- </ul>
-
- <h2>Todo</h2>
- <ul>
- <li>???
- </ul>
-
- <!-- Put @see and @since tags down here. -->
-
- </body>
-</html>
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,53 @@
+/*
+* 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.AbstractAliasMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * AliasCharactersHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AliasCharactersHandler extends CharactersHandler
+{
+ /** The interceptor */
+ public static final AliasCharactersHandler HANDLER = new AliasCharactersHandler();
+
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
+ {
+ AbstractAliasMetaData alias = (AbstractAliasMetaData) owner;
+ alias.setAliasValue(value);
+ }
+
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/AliasHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,60 @@
+/*
+* 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.AbstractAliasMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * AliasHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AliasHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final AliasHandler HANDLER = new AliasHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractAliasMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractAliasMetaData alias = (AbstractAliasMetaData) o;
+ if (alias.getAliasValue() == null)
+ {
+ throw new IllegalArgumentException("Empty <alias/> content");
+ }
+ return alias;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanAliasInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,54 @@
+/*
+* 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 java.util.HashSet;
+import java.util.Set;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.spi.AliasMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * BeanAliasInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class BeanAliasInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final BeanAliasInterceptor INTERCEPTOR = new BeanAliasInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
+ AliasMetaData alias = (AliasMetaData) child;
+ Set<Object> aliases = bean.getAliases();
+ if (aliases == null)
+ {
+ aliases = new HashSet<Object>();
+ bean.setAliases(aliases);
+ }
+ aliases.add(alias.getAliasValue());
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanClassLoaderInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractClassLoaderMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * BeanClassLoaderInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43013 $
+ */
+public class BeanClassLoaderInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final BeanClassLoaderInterceptor INTERCEPTOR = new BeanClassLoaderInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
+ AbstractClassLoaderMetaData classloader = (AbstractClassLoaderMetaData) child;
+ bean.setClassLoader(classloader);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanConstructorInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * BeanConstructorInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43013 $
+ */
+public class BeanConstructorInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final BeanConstructorInterceptor INTERCEPTOR = new BeanConstructorInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
+ AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) child;
+ bean.setConstructor(constructor);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDemandsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,57 @@
+/*
+* 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 java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractDemandMetaData;
+import org.jboss.beans.metadata.spi.DemandMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * BeanDemandsInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 45764 $
+ */
+public class BeanDemandsInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final BeanDemandsInterceptor INTERCEPTOR = new BeanDemandsInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
+ AbstractDemandMetaData demand = (AbstractDemandMetaData) child;
+ Set<DemandMetaData> demands = bean.getDemands();
+ if (demands == null)
+ {
+ demands = new HashSet<DemandMetaData>();
+ bean.setDemands(demands);
+ }
+ demands.add(demand);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanDependsInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,57 @@
+/*
+* 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 java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractDependencyMetaData;
+import org.jboss.beans.metadata.spi.DependencyMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * BeanDependsInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 55527 $
+ */
+public class BeanDependsInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final BeanDependsInterceptor INTERCEPTOR = new BeanDependsInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
+ AbstractDependencyMetaData dependency = (AbstractDependencyMetaData) child;
+ Set<DependencyMetaData> depends = bean.getDepends();
+ if (depends == null)
+ {
+ depends = new HashSet<DependencyMetaData>();
+ bean.setDepends(depends);
+ }
+ depends.add(dependency);
+ }
+}
Added: 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 (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryConstructorInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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);
+ }
+}
Added: 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 (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryCreateInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,48 @@
+/*
+* 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);
+ }
+}
Added: 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 (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,102 @@
+/*
+* 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;
+ }
+}
Added: 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 (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryPropertyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,48 @@
+/*
+* 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);
+ }
+}
Added: 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 (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanFactoryStartInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,48 @@
+/*
+* 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);
+ }
+}
Added: 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 (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,105 @@
+/*
+* 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;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/BeanPropertyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,57 @@
+/*
+* 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 java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.spi.PropertyMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * BeanPropertyInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 45764 $
+ */
+public class BeanPropertyInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final BeanPropertyInterceptor INTERCEPTOR = new BeanPropertyInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData bean = (AbstractBeanMetaData) parent;
+ AbstractPropertyMetaData property = (AbstractPropertyMetaData) child;
+ Set<PropertyMetaData> properties = bean.getProperties();
+ if (properties == null)
+ {
+ properties = new HashSet<PropertyMetaData>();
+ bean.setProperties(properties);
+ }
+ properties.add(property);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,52 @@
+/*
+* 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.AbstractClassMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * ClassCharactersHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ClassCharactersHandler extends CharactersHandler
+{
+ /** The interceptor */
+ public static final ClassCharactersHandler HANDLER = new ClassCharactersHandler();
+
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
+ {
+ AbstractClassMetaData clazz = (AbstractClassMetaData) owner;
+ clazz.setClassName((String)value);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,54 @@
+/*
+* 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.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.beans.metadata.spi.ClassMetaData;
+import org.jboss.beans.metadata.plugins.AbstractClassMetaData;
+
+/**
+ * ClassHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ClassHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final ClassHandler HANDLER = new ClassHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractClassMetaData();
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ ClassMetaData classMetaData = (ClassMetaData) o;
+ String name = classMetaData.getClassName();
+ if (name == null || name.trim().length() == 0)
+ throw new IllegalArgumentException("Null or empty class/interface.");
+ return classMetaData;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ClassLoaderHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,59 @@
+/*
+* 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.AbstractClassLoaderMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * ClassLoaderHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43020 $
+ */
+public class ClassLoaderHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final ClassLoaderHandler HANDLER = new ClassLoaderHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractClassLoaderMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractClassLoaderMetaData classLoader = (AbstractClassLoaderMetaData) o;
+ if (classLoader.getClassLoader() == null)
+ throw new IllegalArgumentException("ClassLoader should have a nested value.");
+ return classLoader;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorFactoryInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * ConstructorFactoryInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43020 $
+ */
+public class ConstructorFactoryInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final ConstructorFactoryInterceptor INTERCEPTOR = new ConstructorFactoryInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) parent;
+ AbstractValueMetaData value = (AbstractValueMetaData) child;
+ constructor.setFactory(value);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,69 @@
+/*
+* 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.AbstractConstructorMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * ConstructorHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43020 $
+ */
+public class ConstructorHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final ConstructorHandler HANDLER = new ConstructorHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractConstructorMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("factoryClass".equals(localName))
+ constructor.setFactoryClass(attrs.getValue(i));
+ else if ("factoryMethod".equals(localName))
+ constructor.setFactoryMethod(attrs.getValue(i));
+ }
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) o;
+ if (constructor.getFactory() != null || constructor.getFactoryClass() != null)
+ if (constructor.getFactoryMethod() == null)
+ throw new IllegalArgumentException("Constructor needs a factoryMethod attribute when there is a factoryClass attribute or factory element.");
+ return constructor;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ConstructorParametersInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,58 @@
+/*
+* 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 java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.spi.ParameterMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * ConstructorParametersInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56022 $
+ */
+public class ConstructorParametersInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final ConstructorParametersInterceptor INTERCEPTOR = new ConstructorParametersInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) parent;
+ AbstractParameterMetaData parameter = (AbstractParameterMetaData) child;
+ List<ParameterMetaData> parameters = constructor.getParameters();
+ if (parameters == null)
+ {
+ parameters = new ArrayList<ParameterMetaData>();
+ constructor.setParameters(parameters);
+ }
+ parameter.setIndex(parameters.size());
+ parameters.add(parameter);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,53 @@
+/*
+* 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.AbstractDemandMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * DemandCharactersHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43105 $
+ */
+public class DemandCharactersHandler extends CharactersHandler
+{
+ /** The interceptor */
+ public static final DemandCharactersHandler HANDLER = new DemandCharactersHandler();
+
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
+ {
+ AbstractDemandMetaData demand = (AbstractDemandMetaData) owner;
+ demand.setDemand(value);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DemandHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,70 @@
+/*
+* 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.AbstractDemandMetaData;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * DemandHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 66536 $
+ */
+public class DemandHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final DemandHandler HANDLER = new DemandHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractDemandMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractDemandMetaData demand = (AbstractDemandMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("state".equals(localName))
+ demand.setWhenRequired(new ControllerState(attrs.getValue(i)));
+ else if ("transformer".equals(localName))
+ demand.setTransformer(attrs.getValue(i));
+ }
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractDemandMetaData x = (AbstractDemandMetaData) o;
+ String name = (String) x.getDemand();
+ if (name == null || name.trim().length() == 0)
+ throw new IllegalArgumentException("Null or empty demand.");
+ return o;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependencyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,74 @@
+/*
+* 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.AbstractDependencyValueMetaData;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * DependencyHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56471 $
+ */
+public class DependencyHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final DependencyHandler HANDLER = new DependencyHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractDependencyValueMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractDependencyValueMetaData dependency = (AbstractDependencyValueMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("bean".equals(localName))
+ dependency.setValue(attrs.getValue(i));
+ else if ("property".equals(localName))
+ dependency.setProperty(attrs.getValue(i));
+ else if ("state".equals(localName))
+ dependency.setDependentState(new ControllerState(attrs.getValue(i)));
+ else if ("whenRequired".equals(localName))
+ dependency.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
+ }
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractDependencyValueMetaData x = (AbstractDependencyValueMetaData) o;
+ String name = (String) x.getUnderlyingValue();
+ if (name == null || name.trim().length() == 0)
+ throw new IllegalArgumentException("Null or empty bean in injection.");
+ return o;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,54 @@
+/*
+* 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.AbstractDependencyMetaData;
+import org.jboss.xb.binding.metadata.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * DependsCharactersHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43104 $
+ */
+public class DependsCharactersHandler extends CharactersHandler
+{
+ /** The interceptor */
+ public static final DependsCharactersHandler HANDLER = new DependsCharactersHandler();
+
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
+ {
+ AbstractDependencyMetaData depends = (AbstractDependencyMetaData) owner;
+ depends.setDependency(value);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DependsHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,60 @@
+/*
+* 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.AbstractDependencyMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * DependsHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43104 $
+ */
+public class DependsHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final DependsHandler HANDLER = new DependsHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractDependencyMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractDependencyMetaData x = (AbstractDependencyMetaData) o;
+ String name = (String) x.getDependency();
+ if (name == null || name.trim().length() == 0)
+ throw new IllegalArgumentException("Null or empty dependency.");
+ return o;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentAliasInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,54 @@
+/*
+* 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 java.util.HashSet;
+import java.util.Set;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.spi.NamedAliasMetaData;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * DeploymentAliasInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class DeploymentAliasInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final DeploymentAliasInterceptor INTERCEPTOR = new DeploymentAliasInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
+ NamedAliasMetaData alias = (NamedAliasMetaData) child;
+ Set<NamedAliasMetaData> aliases = deployment.getAliases();
+ if (aliases == null)
+ {
+ aliases = new HashSet<NamedAliasMetaData>();
+ deployment.setAliases(aliases);
+ }
+ aliases.add(alias);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentBeanInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,57 @@
+/*
+* 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 java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * DeploymentBeanInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 45764 $
+ */
+public class DeploymentBeanInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final DeploymentBeanInterceptor INTERCEPTOR = new DeploymentBeanInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
+ AbstractBeanMetaData bean = (AbstractBeanMetaData) child;
+ List<BeanMetaDataFactory> beans = deployment.getBeanFactories();
+ if (beans == null)
+ {
+ beans = new ArrayList<BeanMetaDataFactory>();
+ deployment.setBeanFactories(beans);
+ }
+ beans.add(bean);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentClassLoaderInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,57 @@
+/*
+* 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 java.util.List;
+import java.util.ArrayList;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractClassLoaderMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * DeploymentClassLoaderInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 70494 $
+ */
+public class DeploymentClassLoaderInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final DeploymentClassLoaderInterceptor INTERCEPTOR = new DeploymentClassLoaderInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
+ AbstractClassLoaderMetaData classloader = (AbstractClassLoaderMetaData) child;
+ deployment.setClassLoader(classloader);
+ // add classloaders as value beans
+ List<BeanMetaDataFactory> beans = deployment.getBeanFactories();
+ if (beans == null)
+ {
+ beans = new ArrayList<BeanMetaDataFactory>();
+ deployment.setBeanFactories(beans);
+ }
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,64 @@
+/*
+* 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.dependency.spi.ControllerMode;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * DeploymentHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 70559 $
+ */
+public class DeploymentHandler extends DefaultElementHandler
+{
+ /** The deployment handler */
+ public static final DeploymentHandler HANDLER = new DeploymentHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractKernelDeployment();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractKernelDeployment deployment = (AbstractKernelDeployment)o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ deployment.setName(attrs.getValue(i));
+ else if ("scoped".equals(localName))
+ deployment.setScoped(Boolean.parseBoolean(attrs.getValue(i)));
+ else if ("mode".equals(localName))
+ deployment.setMode(ControllerMode.getInstance(attrs.getValue(i)));
+ }
+ }
+
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/DeploymentWildcardHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,59 @@
+/*
+* 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 java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+
+/**
+ * DeploymentWildcardHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 45764 $
+ */
+public class DeploymentWildcardHandler extends DefaultWildcardHandler
+{
+ /** The handler */
+ public static final DeploymentWildcardHandler HANDLER = new DeploymentWildcardHandler();
+
+ public void setParent(Object parent, Object o, QName elementName, ElementBinding element, ElementBinding parentElement)
+ {
+ AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
+ if (o == null || o instanceof BeanMetaDataFactory == false)
+ throw new IllegalArgumentException(o + " is not an instance of BeanMetaDataFactory for element " + element.getQName());
+ BeanMetaDataFactory bean = (BeanMetaDataFactory) o;
+ List<BeanMetaDataFactory> beans = deployment.getBeanFactories();
+ if (beans == null)
+ {
+ beans = new ArrayList<BeanMetaDataFactory>();
+ deployment.setBeanFactories(beans);
+ }
+ beans.add(bean);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+
+/**
+ * EntryHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43110 $
+ */
+public class EntryHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final EntryHandler HANDLER = new EntryHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new MapEntry();
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryKeyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * EntryKeyInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59020 $
+ */
+public class EntryKeyInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final EntryKeyInterceptor INTERCEPTOR = new EntryKeyInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ MapEntry entry = (MapEntry) parent;
+ entry.key = child;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/EntryValueInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * EntryValueInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59020 $
+ */
+public class EntryValueInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final EntryValueInterceptor INTERCEPTOR = new EntryValueInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ MapEntry entry = (MapEntry) parent;
+ entry.value = child;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,77 @@
+/*
+* 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.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * FactoryHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56471 $
+ */
+public class FactoryHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final FactoryHandler HANDLER = new FactoryHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new Holder(new AbstractDependencyValueMetaData());
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ Holder value = (Holder) o;
+ AbstractDependencyValueMetaData dependency = (AbstractDependencyValueMetaData) value.getValue();
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("bean".equals(localName))
+ dependency.setValue(attrs.getValue(i));
+ else if ("property".equals(localName))
+ dependency.setProperty(attrs.getValue(i));
+ else if ("state".equals(localName))
+ dependency.setDependentState(new ControllerState(attrs.getValue(i)));
+ else if ("whenRequired".equals(localName))
+ dependency.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
+ }
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ Holder holder = (Holder) o;
+ ValueMetaData value = (ValueMetaData) holder.getValue();
+
+ if (value == null || value.getUnderlyingValue() == null)
+ throw new IllegalArgumentException("Factory should have a bean attribute or nested element.");
+ return value;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/FactoryWildcardHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,49 @@
+/*
+* 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.AbstractValueMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+
+/**
+ * FactoryWildcardHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43107 $
+ */
+public class FactoryWildcardHandler extends DefaultWildcardHandler
+{
+ /** The handler */
+ public static final FactoryWildcardHandler WILDCARD = new FactoryWildcardHandler();
+
+ public void setParent(Object parent, Object o, QName elementName, ElementBinding element, ElementBinding parentElement)
+ {
+ Holder holder = (Holder) parent;
+ if (o instanceof ValueMetaData == false)
+ o = new AbstractValueMetaData(o);
+ holder.setValue(o);
+ }
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/Holder.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,52 @@
+/*
+* 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;
+
+/**
+ * Holder.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43107 $
+ */
+class Holder
+{
+ private Object object;
+
+ public Holder()
+ {
+ }
+
+ public Holder(Object object)
+ {
+ this.object = object;
+ }
+
+ public Object getValue()
+ {
+ return object;
+ }
+
+ public void setValue(Object object)
+ {
+ this.object = object;
+ }
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/InjectionHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,64 @@
+/*
+ *
+ */
+
+package org.jboss.kernel.plugins.deployment.xml;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.api.model.InjectOption;
+import org.jboss.beans.metadata.api.model.FromContext;
+import org.jboss.beans.metadata.api.model.AutowireType;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * DependencyHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43106 $
+ */
+public class InjectionHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final InjectionHandler HANDLER = new InjectionHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ AbstractInjectionValueMetaData vmd = new AbstractInjectionValueMetaData();
+ if (parent instanceof AbstractPropertyMetaData)
+ {
+ AbstractPropertyMetaData x = (AbstractPropertyMetaData) parent;
+ vmd.setPropertyMetaData(x);
+ }
+ return vmd;
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractInjectionValueMetaData injection = (AbstractInjectionValueMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("bean".equals(localName))
+ injection.setValue(attrs.getValue(i));
+ else if ("property".equals(localName))
+ injection.setProperty(attrs.getValue(i));
+ else if ("state".equals(localName))
+ injection.setDependentState(new ControllerState(attrs.getValue(i)));
+ else if ("whenRequired".equals(localName))
+ injection.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
+ else if ("type".equals(localName))
+ injection.setInjectionType(AutowireType.getInstance(attrs.getValue(i)));
+ else if ("option".equals(localName))
+ injection.setInjectionOption(InjectOption.getInstance(attrs.getValue(i)));
+ else if ("fromContext".equals(localName))
+ injection.setFromContext(FromContext.getInstance(attrs.getValue(i)));
+ }
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,69 @@
+/*
+* 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.AbstractLazyMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * LazyHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class LazyHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final LazyHandler HANDLER = new LazyHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractLazyMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractLazyMetaData lazy = (AbstractLazyMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ lazy.setName(attrs.getValue(i));
+ else if ("bean".equals(localName))
+ lazy.setBeanName(attrs.getValue(i));
+ else if ("exposeClass".equals(localName))
+ lazy.setExposeClass(Boolean.parseBoolean(attrs.getValue(i)));
+ }
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractLazyMetaData lazy = (AbstractLazyMetaData) o;
+ if (lazy.getBeanName() == null)
+ throw new IllegalArgumentException("Bean name must be set!");
+ return lazy;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LazyInterfaceInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,54 @@
+/*
+* 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 java.util.HashSet;
+import java.util.Set;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractLazyMetaData;
+import org.jboss.beans.metadata.spi.ClassMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * LazyInterfaceInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class LazyInterfaceInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final LazyInterfaceInterceptor INTERCEPTOR = new LazyInterfaceInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractLazyMetaData lazy = (AbstractLazyMetaData) parent;
+ ClassMetaData intface = (ClassMetaData) child;
+ Set<String> interfaces = lazy.getInterfaces();
+ if (interfaces == null)
+ {
+ interfaces = new HashSet<String>();
+ lazy.setInterfaces(interfaces);
+ }
+ interfaces.add(intface.getClassName());
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleCreateInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.beans.metadata.plugins.MutableLifecycleHolder;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * LifecycleCreateInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class LifecycleCreateInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final LifecycleCreateInterceptor INTERCEPTOR = new LifecycleCreateInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
+ AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
+ lifecycle.setType("create");
+ holder.setCreate(lifecycle);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleDestroyInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.beans.metadata.plugins.MutableLifecycleHolder;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * LifecycleDestroyInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class LifecycleDestroyInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final LifecycleDestroyInterceptor INTERCEPTOR = new LifecycleDestroyInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
+ AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
+ lifecycle.setType("destroy");
+ holder.setDestroy(lifecycle);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,60 @@
+/*
+* 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.AbstractLifecycleMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * LifecycleHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 63037 $
+ */
+public class LifecycleHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final LifecycleHandler HANDLER = new LifecycleHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractLifecycleMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("method".equals(localName))
+ lifecycle.setMethodName(attrs.getValue(i));
+ else if ("ignored".equals(localName))
+ lifecycle.setIgnored(Boolean.parseBoolean(attrs.getValue(i)));
+ }
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleParametersInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,58 @@
+/*
+* 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 java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.spi.ParameterMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * ConstructorParametersInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56022 $
+ */
+public class LifecycleParametersInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final LifecycleParametersInterceptor INTERCEPTOR = new LifecycleParametersInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) parent;
+ AbstractParameterMetaData parameter = (AbstractParameterMetaData) child;
+ List<ParameterMetaData> parameters = lifecycle.getParameters();
+ if (parameters == null)
+ {
+ parameters = new ArrayList<ParameterMetaData>();
+ lifecycle.setParameters(parameters);
+ }
+ parameter.setIndex(parameters.size());
+ parameters.add(parameter);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStartInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.beans.metadata.plugins.MutableLifecycleHolder;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * LifecycleStartInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class LifecycleStartInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final LifecycleStartInterceptor INTERCEPTOR = new LifecycleStartInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
+ AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
+ lifecycle.setType("start");
+ holder.setStart(lifecycle);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/LifecycleStopInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.beans.metadata.plugins.MutableLifecycleHolder;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * LifecycleStopInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class LifecycleStopInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final LifecycleStopInterceptor INTERCEPTOR = new LifecycleStopInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ MutableLifecycleHolder holder = (MutableLifecycleHolder) parent;
+ AbstractLifecycleMetaData lifecycle = (AbstractLifecycleMetaData) child;
+ lifecycle.setType("stop");
+ holder.setStop(lifecycle);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntry.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,34 @@
+/*
+* 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;
+
+/**
+ * MapEntry.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43110 $
+ */
+class MapEntry
+{
+ public Object key;
+ public Object value;
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapEntryInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,54 @@
+/*
+* 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.AbstractMapMetaData;
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * MapEntryInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 45764 $
+ */
+public class MapEntryInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final MapEntryInterceptor INTERCEPTOR = new MapEntryInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractMapMetaData map = (AbstractMapMetaData) parent;
+ MapEntry entry = (MapEntry) child;
+ AbstractValueMetaData entryKey = (AbstractValueMetaData) entry.key;
+ if (entryKey == null)
+ throw new IllegalArgumentException("No key in map entry");
+ AbstractValueMetaData entryValue = (AbstractValueMetaData) entry.value;
+ if (entryValue == null)
+ throw new IllegalArgumentException("No value in map entry");
+ map.put((MetaDataVisitorNode) entryKey.getValue(), (MetaDataVisitorNode) entryValue.getValue());
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/MapHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,62 @@
+/*
+* 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.AbstractMapMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * MapHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59000 $
+ */
+public class MapHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final MapHandler HANDLER = new MapHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractMapMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractMapMetaData map = (AbstractMapMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("class".equals(localName))
+ map.setType(attrs.getValue(i));
+ else if ("keyClass".equals(localName))
+ map.setKeyType(attrs.getValue(i));
+ else if ("valueClass".equals(localName))
+ map.setValueType(attrs.getValue(i));
+ }
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NamedAliasHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,70 @@
+/*
+* 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.AbstractNamedAliasMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * The named alias handler.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class NamedAliasHandler extends AliasHandler
+{
+ /**
+ * The alias handler
+ */
+ public static final NamedAliasHandler NAMED_ALIAS_HANDLER = new NamedAliasHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractNamedAliasMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractNamedAliasMetaData alias = (AbstractNamedAliasMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ alias.setName(attrs.getValue(i));
+ else if ("alias".equals(localName))
+ alias.setAliasValue(attrs.getValue(i));
+ }
+ super.attributes(o, elementName, element, attrs, nsCtx);
+ }
+
+ public Object endElement(Object object, QName qName, ElementBinding elementBinding)
+ {
+ AbstractNamedAliasMetaData alias = (AbstractNamedAliasMetaData)object;
+ if (alias.getName() == null)
+ throw new IllegalArgumentException("Missing name: " + alias);
+ return super.endElement(object, qName, elementBinding);
+ }
+
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/NullValueElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,41 @@
+/*
+* 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 org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+
+/**
+ * NullValueElementInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43008 $
+ */
+public class NullValueElementInterceptor extends ValueElementInterceptor
+{
+ /** The null handler */
+ public static final NullValueElementInterceptor NULLVALUES = new NullValueElementInterceptor();
+
+ public AbstractValueMetaData getValue()
+ {
+ return new AbstractValueMetaData();
+ }
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,46 @@
+/*
+* 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.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.StringValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+
+/**
+ * ParameterCharactersHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60019 $
+ */
+public class ParameterCharactersHandler extends StringValueCharactersHandler
+{
+ /** The interceptor */
+ public static final ParameterCharactersHandler HANDLER = new ParameterCharactersHandler();
+
+ public void setValue(QName qName, ElementBinding element, Object owner, Object value)
+ {
+ AbstractParameterMetaData parameter = (AbstractParameterMetaData) owner;
+ setStringValue(parameter, (StringValueMetaData)value);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ParameterHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,78 @@
+/*
+* 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.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.StringValueMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * CollectionHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 65585 $
+ */
+public class ParameterHandler extends DefaultElementHandler
+{
+ /**
+ * The handler
+ */
+ public static final ParameterHandler HANDLER = new ParameterHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractParameterMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractParameterMetaData parameter = (AbstractParameterMetaData)o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("class".equals(localName))
+ parameter.setType(attrs.getValue(i));
+ else if ("replace".equals(localName) || "trim".equals(localName))
+ {
+ ValueMetaData vmd = parameter.getValue();
+ StringValueMetaData stringValueMetaData;
+ if (vmd != null && vmd instanceof StringValueMetaData)
+ stringValueMetaData = (StringValueMetaData)vmd;
+ else
+ {
+ stringValueMetaData = new StringValueMetaData();
+ parameter.setValue(stringValueMetaData);
+ }
+ if ("replace".equals(localName))
+ stringValueMetaData.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
+ else if ("trim".equals(localName))
+ stringValueMetaData.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
+ }
+ }
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,53 @@
+/*
+* 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.StringValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * PlainValueCharactersHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43108 $
+ */
+public class PlainValueCharactersHandler extends CharactersHandler
+{
+ /** The interceptor */
+ public static final PlainValueCharactersHandler HANDLER = new PlainValueCharactersHandler();
+
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ public void setValue(QName qName, ElementBinding element, Object owner, Object value)
+ {
+ StringValueMetaData valueMetaData = (StringValueMetaData) owner;
+ valueMetaData.setValue(value);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PlainValueHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,62 @@
+/*
+* 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.StringValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * PlainValueHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 65585 $
+ */
+public class PlainValueHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final PlainValueHandler HANDLER = new PlainValueHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new StringValueMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ StringValueMetaData value = (StringValueMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("class".equals(localName))
+ value.setType(attrs.getValue(i));
+ else if ("replace".equals(localName))
+ value.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
+ else if ("trim".equals(localName))
+ value.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
+ }
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,65 @@
+/*
+* 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 javax.xml.namespace.NamespaceContext;
+
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * PropertyHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PropHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final PropHandler HANDLER = new PropHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new MapEntry();
+ }
+
+ public void attributes(Object object, QName qName, ElementBinding eb, Attributes attrs, NamespaceContext nc)
+ {
+ MapEntry entry = (MapEntry) object;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("key".equals(localName))
+ entry.key = attrs.getValue(i);
+ }
+ }
+
+ public Object endElement(Object object, QName qName, ElementBinding elementBinding)
+ {
+ MapEntry entry = (MapEntry) object;
+ if (entry.key == null)
+ throw new IllegalArgumentException("Missing key attribute: " + elementBinding);
+ return entry;
+ }
+
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertiesHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,45 @@
+/*
+* 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.AbstractPropertiesMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+
+/**
+ * PropertyHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PropertiesHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final PropertiesHandler HANDLER = new PropertiesHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractPropertiesMetaData();
+ }
+
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,47 @@
+/*
+* 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.beans.metadata.plugins.StringValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+
+/**
+ * PropertyCharactersHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60019 $
+ */
+public class PropertyCharactersHandler extends StringValueCharactersHandler
+{
+ /** The interceptor */
+ public static final PropertyCharactersHandler HANDLER = new PropertyCharactersHandler();
+
+ public void setValue(QName qName, ElementBinding element, Object owner, Object value)
+ {
+ AbstractPropertyMetaData property = (AbstractPropertyMetaData) owner;
+ StringValueMetaData svmd = (StringValueMetaData) value;
+ setStringValue(property, svmd);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/PropertyHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,91 @@
+/*
+* 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.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.plugins.StringValueMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * PropertyHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 65585 $
+ */
+public class PropertyHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final PropertyHandler HANDLER = new PropertyHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractPropertyMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractPropertyMetaData property = (AbstractPropertyMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ property.setName(attrs.getValue(i));
+ else if ("preinstantiate".equals(localName))
+ property.setPreInstantiate(Boolean.parseBoolean(attrs.getValue(i)));
+ else if ("class".equals(localName) || "replace".equals(localName) || "trim".equals(localName))
+ {
+ StringValueMetaData svmd;
+ ValueMetaData vmd = property.getValue();
+ if (vmd == null || vmd instanceof StringValueMetaData == false)
+ {
+ svmd = new StringValueMetaData();
+ property.setValue(svmd);
+ }
+ else
+ {
+ svmd = (StringValueMetaData)vmd;
+ }
+ if ("class".equals(localName))
+ svmd.setType(attrs.getValue(i));
+ else if ("replace".equals(localName))
+ svmd.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
+ else if ("trim".equals(localName))
+ svmd.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
+ }
+ }
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractPropertyMetaData x = (AbstractPropertyMetaData) o;
+ String name = x.getName();
+ if (name == null || name.trim().length() == 0)
+ throw new IllegalArgumentException("Null or empty property name.");
+ return o;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/StringValueCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,62 @@
+/*
+* 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.StringValueMetaData;
+import org.jboss.beans.metadata.plugins.ValueMetaDataAware;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * Abstract StringValueMetaData helper.
+ * Looks for previous value on the ValueMetaDataAware.
+ * If the previous value is StringValueMD it applies its
+ * property values to the new StringValueMetaData instance.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public abstract class StringValueCharactersHandler extends CharactersHandler
+{
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return new StringValueMetaData(value);
+ }
+
+ protected void setStringValue(ValueMetaDataAware vmda, StringValueMetaData svmd)
+ {
+ ValueMetaData vmd = vmda.getValue();
+ if (vmd != null && vmd instanceof StringValueMetaData)
+ {
+ StringValueMetaData previous = (StringValueMetaData) vmd;
+ svmd.setReplace(previous.isReplace());
+ svmd.setTrim(previous.isTrim());
+ String type = previous.getType();
+ if (type != null)
+ svmd.setType(type);
+ }
+ vmda.setValue(svmd);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ThisValueElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,42 @@
+/*
+* 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 org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.beans.metadata.plugins.ThisValueMetaData;
+
+/**
+ * ThisValueElementInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43008 $
+ */
+public class ThisValueElementInterceptor extends ValueElementInterceptor
+{
+ /** The this handler */
+ public static final ThisValueElementInterceptor THISVALUES = new ThisValueElementInterceptor();
+
+ public AbstractValueMetaData getValue()
+ {
+ return new ThisValueMetaData();
+ }
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueCharactersHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,55 @@
+/*
+* 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.AbstractValueMetaData;
+import org.jboss.beans.metadata.plugins.StringValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * ValueCharactersHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43109 $
+ */
+public class ValueCharactersHandler extends CharactersHandler
+{
+ /** The interceptor */
+ public static final ValueCharactersHandler HANDLER = new ValueCharactersHandler();
+
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ public void setValue(QName qName, ElementBinding element, Object owner, Object value)
+ {
+ AbstractValueMetaData valueMetaData = (AbstractValueMetaData) owner;
+ StringValueMetaData string = (StringValueMetaData) valueMetaData.getValue();
+ string.setValue(value);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,71 @@
+/*
+* 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.AbstractClassLoaderMetaData;
+import org.jboss.beans.metadata.plugins.AbstractCollectionMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * ValueElementInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 43008 $
+ */
+public abstract class ValueElementInterceptor extends DefaultElementInterceptor
+{
+ public void add(Object parent, Object child, QName name)
+ {
+ if (parent instanceof AbstractCollectionMetaData)
+ {
+ AbstractCollectionMetaData collection = (AbstractCollectionMetaData) parent;
+ collection.add(getValue());
+ }
+ else if (parent instanceof AbstractParameterMetaData)
+ {
+ AbstractParameterMetaData valueMetaData = (AbstractParameterMetaData) parent;
+ valueMetaData.setValue(getValue());
+ }
+ else if (parent instanceof AbstractPropertyMetaData)
+ {
+ AbstractPropertyMetaData valueMetaData = (AbstractPropertyMetaData) parent;
+ valueMetaData.setValue(getValue());
+ }
+ else if (parent instanceof AbstractClassLoaderMetaData)
+ {
+ AbstractClassLoaderMetaData valueMetaData = (AbstractClassLoaderMetaData) parent;
+ valueMetaData.setClassLoader(getValue());
+ }
+ else
+ {
+ AbstractValueMetaData valueMetaData = (AbstractValueMetaData) parent;
+ valueMetaData.setValue(getValue());
+ }
+ }
+
+ public abstract AbstractValueMetaData getValue();
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,89 @@
+/*
+* 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 java.util.List;
+import java.util.ArrayList;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractValueFactoryMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.spi.ParameterMetaData;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * ValueFactoryHandler.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ValueFactoryHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final ValueFactoryHandler HANDLER = new ValueFactoryHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractValueFactoryMetaData();
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractValueFactoryMetaData valueFactory = (AbstractValueFactoryMetaData) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("bean".equals(localName))
+ valueFactory.setValue(attrs.getValue(i));
+ else if ("method".equals(localName))
+ valueFactory.setMethod(attrs.getValue(i));
+ else if ("state".equals(localName))
+ valueFactory.setDependentState(new ControllerState(attrs.getValue(i)));
+ else if ("whenRequired".equals(localName))
+ valueFactory.setWhenRequiredState(new ControllerState(attrs.getValue(i)));
+ else if ("parameter".equals(localName))
+ valueFactory.setParameter(attrs.getValue(i));
+ else if ("default".equals(localName))
+ valueFactory.setDefaultValue(attrs.getValue(i));
+ }
+ }
+
+ public Object endElement(Object o, QName qName, ElementBinding element)
+ {
+ AbstractValueFactoryMetaData vf = (AbstractValueFactoryMetaData)o;
+ if (vf.getUnderlyingValue() == null || vf.getMethod() == null)
+ throw new IllegalArgumentException("Bean or method cannot null: " + vf);
+ if (vf.getParameter() != null && vf.getParameters() != null)
+ throw new IllegalArgumentException("Both parameter and parameters cannot be set: " + vf);
+ if (vf.getParameter() != null)
+ {
+ List<ParameterMetaData> parameters = new ArrayList<ParameterMetaData>();
+ parameters.add(new AbstractParameterMetaData(String.class.getName(), vf.getParameter()));
+ vf.setParameters(parameters);
+ vf.setParameter(null);
+ }
+ return vf;
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueFactoryParametersInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,56 @@
+/*
+* 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 java.util.ArrayList;
+import java.util.List;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.AbstractValueFactoryMetaData;
+import org.jboss.beans.metadata.spi.ParameterMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * ValueFactoryParametersInterceptor.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ValueFactoryParametersInterceptor extends DefaultElementInterceptor
+{
+ /** The interceptor */
+ public static final ValueFactoryParametersInterceptor INTERCEPTOR = new ValueFactoryParametersInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractValueFactoryMetaData factoryMetaData = (AbstractValueFactoryMetaData) parent;
+ AbstractParameterMetaData parameter = (AbstractParameterMetaData) child;
+ List<ParameterMetaData> parameters = factoryMetaData.getParameters();
+ if (parameters == null)
+ {
+ parameters = new ArrayList<ParameterMetaData>();
+ factoryMetaData.setParameters(parameters);
+ }
+ parameter.setIndex(parameters.size());
+ parameters.add(parameter);
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,64 @@
+/*
+* 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.AbstractValueMetaData;
+import org.jboss.beans.metadata.plugins.StringValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * ValueHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 65585 $
+ */
+public class ValueHandler extends DefaultElementHandler
+{
+ /** The handler */
+ public static final ValueHandler HANDLER = new ValueHandler();
+
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractValueMetaData(new StringValueMetaData());
+ }
+
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractValueMetaData value = (AbstractValueMetaData) o;
+ StringValueMetaData string = (StringValueMetaData) value.getValue();
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("class".equals(localName))
+ string.setType(attrs.getValue(i));
+ else if ("replace".equals(localName))
+ string.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
+ else if ("trim".equals(localName))
+ string.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
+ }
+ }
+}
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueMetaDataElementInterceptor.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,92 @@
+/*
+* 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.AbstractClassLoaderMetaData;
+import org.jboss.beans.metadata.plugins.AbstractCollectionMetaData;
+import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.beans.metadata.plugins.policy.AbstractBindingMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * ValueMetaDataElementInterceptor.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 68656 $
+ */
+public class ValueMetaDataElementInterceptor extends DefaultElementInterceptor
+{
+ /** The value handler */
+ public static ValueMetaDataElementInterceptor VALUES = new ValueMetaDataElementInterceptor();
+
+ public void add(Object parent, Object child, QName name)
+ {
+ if (parent instanceof AbstractCollectionMetaData)
+ {
+ AbstractCollectionMetaData collection = (AbstractCollectionMetaData) parent;
+ ValueMetaData value = (ValueMetaData) child;
+ collection.add(value);
+ }
+ else if (parent instanceof AbstractParameterMetaData)
+ {
+ AbstractParameterMetaData valueMetaData = (AbstractParameterMetaData) parent;
+ ValueMetaData value = (ValueMetaData) child;
+ valueMetaData.setValue(value);
+ }
+ else if (parent instanceof AbstractPropertyMetaData)
+ {
+ AbstractPropertyMetaData valueMetaData = (AbstractPropertyMetaData) parent;
+ ValueMetaData value = (ValueMetaData) child;
+ valueMetaData.setValue(value);
+ }
+ else if (parent instanceof AbstractClassLoaderMetaData)
+ {
+ AbstractClassLoaderMetaData valueMetaData = (AbstractClassLoaderMetaData) parent;
+ ValueMetaData value = (ValueMetaData) child;
+ valueMetaData.setClassLoader(value);
+ }
+ else if (parent instanceof AbstractConstructorMetaData)
+ {
+ AbstractConstructorMetaData valueMetaData = (AbstractConstructorMetaData) parent;
+ ValueMetaData value = (ValueMetaData) child;
+ valueMetaData.setValue(value);
+ }
+ else if (parent instanceof AbstractBindingMetaData)
+ {
+ AbstractBindingMetaData valueMetaData = (AbstractBindingMetaData) parent;
+ ValueMetaData value = (ValueMetaData) child;
+ valueMetaData.setValue(value);
+ }
+ else
+ {
+ AbstractValueMetaData valueMetaData = (AbstractValueMetaData) parent;
+ ValueMetaData value = (ValueMetaData) child;
+ valueMetaData.setValue(value);
+ }
+ }
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/ValueWildcardHandler.java 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,74 @@
+/*
+* 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.AbstractClassLoaderMetaData;
+import org.jboss.beans.metadata.plugins.AbstractCollectionMetaData;
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.beans.metadata.plugins.ValueMetaDataAware;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+
+/**
+ * ValueWildcardHandler.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60405 $
+ */
+public class ValueWildcardHandler extends DefaultWildcardHandler
+{
+ /** The value wildcard handler */
+ public static final ValueWildcardHandler WILDCARD = new ValueWildcardHandler();
+
+ public void setParent(Object parent, Object o, QName elementName, ElementBinding element, ElementBinding parentElement)
+ {
+ ValueMetaData value;
+ if (o instanceof ValueMetaData)
+ value = (ValueMetaData) o;
+ else
+ value = new AbstractValueMetaData(o);
+
+ if (parent instanceof ValueMetaDataAware)
+ {
+ ValueMetaDataAware valueMetaDataAware = (ValueMetaDataAware) parent;
+ valueMetaDataAware.setValue(value);
+ }
+ else if (parent instanceof AbstractCollectionMetaData)
+ {
+ AbstractCollectionMetaData collection = (AbstractCollectionMetaData) parent;
+ collection.add(value);
+ }
+ else if (parent instanceof AbstractClassLoaderMetaData)
+ {
+ AbstractClassLoaderMetaData valueMetaData = (AbstractClassLoaderMetaData) parent;
+ valueMetaData.setClassLoader(value);
+ }
+ else
+ {
+ AbstractValueMetaData valueMetaData = (AbstractValueMetaData) parent;
+ valueMetaData.setValue(value);
+ }
+ }
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/package.html
===================================================================
--- projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/package.html (rev 0)
+++ projects/microcontainer/trunk/spring-int/src/main/org/jboss/kernel/plugins/deployment/xml/package.html 2008-07-07 08:16:41 UTC (rev 75424)
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <!-- $Id: package.html 26228 2004-11-29 23:37:38Z ejort $ -->
+ <!--
+
+ JBoss: The OpenSource J2EE WebOS
+
+ Distributable under LGPL license.
+ See terms of license at gnu.org.
+
+ -->
+ </head>
+
+ <body bgcolor="white">
+ <p>Kernel plugins, an xml deployment implementation.
+
+ <h2>Package Specification</h2>
+ <ul>
+ <li><a href="javascript: alert('not available')">Not Available</a>
+ </ul>
+
+ <h2>Related Documentation</h2>
+ <ul>
+ <li><a href="javascript: alert('not available')">Not Available</a>
+ </ul>
+
+ <h2>Package Status</h2>
+ <ul>
+ <li><font color="red"><b>ALPHA</b></font>
+ </ul>
+
+ <h2>Todo</h2>
+ <ul>
+ <li>???
+ </ul>
+
+ <!-- Put @see and @since tags down here. -->
+
+ </body>
+</html>
More information about the jboss-cvs-commits
mailing list