JBoss-OSGI SVN: r90707 - projects/jboss-osgi/trunk/blueprint/testsuite.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-30 15:54:24 -0400 (Tue, 30 Jun 2009)
New Revision: 90707
Modified:
projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
Log:
Enable remote blueprint testing
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-06-30 19:51:31 UTC (rev 90706)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-06-30 19:54:24 UTC (rev 90707)
@@ -194,7 +194,6 @@
<!--
Name: remote-testing
Descr: Setup for remote integration testing
- -->
<profile>
<id>remote-testing</id>
<activation>
@@ -213,6 +212,7 @@
</plugins>
</build>
</profile>
+ -->
</profiles>
</project>
15 years
JBoss-OSGI SVN: r90703 - in projects/jboss-osgi/projects/bundles/microcontainer/trunk: src/main/java/org/jboss/osgi/microcontainer/internal and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-30 15:19:06 -0400 (Tue, 30 Jun 2009)
New Revision: 90703
Added:
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeanDeployer.java
Modified:
projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/resources/META-INF/base-deployers-beans.xml
Log:
[JBDEPLOY-202] BeansDeployer cannot be recycled
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-06-30 19:15:50 UTC (rev 90702)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-06-30 19:19:06 UTC (rev 90703)
@@ -19,7 +19,7 @@
<!-- Properties -->
<properties>
- <version.jboss.deployers>2.0.5.GA</version.jboss.deployers>
+ <version.jboss.deployers>2.0.5.SP1</version.jboss.deployers>
<version.jboss.microcontainer>2.0.4.GA</version.jboss.microcontainer>
<version.jboss.osgi.apache.xerces>2.9.1</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.common>1.0.0.Beta2</version.jboss.osgi.common>
Added: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeanDeployer.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeanDeployer.java (rev 0)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeanDeployer.java 2009-06-30 19:19:06 UTC (rev 90703)
@@ -0,0 +1,72 @@
+/*
+ * 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.osgi.microcontainer.internal;
+
+// $Id: $
+
+import org.jboss.deployers.vfs.deployer.kernel.BeanDeployer;
+import org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaResolverFactory;
+
+/**
+ * A {@link BeanDeployer} that provides a non-static {@link SchemaBindingResolver}.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 30-Jun-2009
+ */
+public class EmbeddedBeanDeployer extends BeanDeployer
+{
+ private JBossXBDeployerHelper<KernelDeployment> helper;
+
+ @Override
+ protected JBossXBDeployerHelper<KernelDeployment> getHelper()
+ {
+ if (helper == null)
+ helper = new EmbeddedDeployerHelper<KernelDeployment>(getOutput());
+
+ return helper;
+ }
+
+ class EmbeddedDeployerHelper<T> extends JBossXBDeployerHelper<T>
+ {
+ private DefaultSchemaResolver resolver;
+
+ protected EmbeddedDeployerHelper(Class<T> output)
+ {
+ super(output);
+ }
+
+ @Override
+ public DefaultSchemaResolver getResolver()
+ {
+ if (resolver == null)
+ {
+ SchemaResolverFactory factory = EmbeddedSchemaResolverFactory.getInstance();
+ resolver = (DefaultSchemaResolver)factory.getSchemaBindingResolver();
+ }
+ return resolver;
+ }
+ }
+}
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/resources/META-INF/base-deployers-beans.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/resources/META-INF/base-deployers-beans.xml 2009-06-30 19:15:50 UTC (rev 90702)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/resources/META-INF/base-deployers-beans.xml 2009-06-30 19:19:06 UTC (rev 90703)
@@ -66,7 +66,7 @@
<!-- POJO Deployment -->
- <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
+ <bean name="BeanDeployer" class="org.jboss.osgi.microcontainer.internal.EmbeddedBeanDeployer">
<property name="suffix">jboss-beans.xml</property>
</bean>
<bean name="KernelDeploymentDeployer" class="org.jboss.osgi.deployer.BundleContainedBeansDeployer">
15 years
JBoss-OSGI SVN: r90694 - projects/jboss-osgi/trunk/blueprint/testsuite.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-30 08:53:50 -0400 (Tue, 30 Jun 2009)
New Revision: 90694
Modified:
projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
Log:
explicitly disable for equinox and knopflerfish
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-06-30 12:48:27 UTC (rev 90693)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-06-30 12:53:50 UTC (rev 90694)
@@ -144,14 +144,15 @@
<profiles>
<!--
- Name: explicit-framework
- Descr: Setup for framework integration testing
+ Name: framework-equinox
+ Descr: Setup for Equinox framework integration testing
-->
<profile>
- <id>explicit-framework</id>
+ <id>framework-equinox</id>
<activation>
<property>
<name>framework</name>
+ <value>equinox</value>
</property>
</activation>
<build>
@@ -167,6 +168,30 @@
</profile>
<!--
+ Name: framework-knopflerfish
+ Descr: Setup for Knopflerfish framework integration testing
+ -->
+ <profile>
+ <id>framework-knopflerfish</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>knopflerfish</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
Name: remote-testing
Descr: Setup for remote integration testing
-->
15 years
JBoss-OSGI SVN: r90690 - in projects/jboss-osgi/trunk: blueprint/impl and 4 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-30 08:09:27 -0400 (Tue, 30 Jun 2009)
New Revision: 90690
Added:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ManagerFactory.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ReferenceManager.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java
Removed:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceReferenceManager.java
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/
Modified:
projects/jboss-osgi/trunk/blueprint/impl/pom.xml
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceManager.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
projects/jboss-osgi/trunk/pom.xml
Log:
Add BP support for <reference>
Modified: projects/jboss-osgi/trunk/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/pom.xml 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/pom.xml 2009-06-30 12:09:27 UTC (rev 90690)
@@ -72,10 +72,12 @@
org.jboss.osgi.common.log;version=1.0,
org.jboss.osgi.spi;version=1.0,
org.jboss.osgi.spi.service;version=1.0,
+ org.jboss.reflect.spi,
org.jboss.util.xml,
org.jboss.xb.*,
org.osgi.framework,
- org.osgi.service.log,
+ org.osgi.service.log,
+ org.osgi.util.tracker,
org.w3c.dom,
</Import-Package>
</instructions>
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -34,10 +34,7 @@
import org.jboss.osgi.spi.service.MicrocontainerService;
import org.osgi.framework.ServiceReference;
import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.blueprint.reflect.BeanMetadata;
import org.osgi.service.blueprint.reflect.ComponentMetadata;
-import org.osgi.service.blueprint.reflect.ServiceMetadata;
-import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
import org.osgi.service.log.LogService;
/**
@@ -147,23 +144,4 @@
return controller;
}
-
- static AbstractManager createManager(BlueprintContext context, BlueprintContainer container, ComponentMetadata comp)
- {
- AbstractManager manager = null;
-
- if (comp instanceof BeanMetadata)
- manager = new BeanManager(context, container, (BeanMetadata)comp);
-
- else if (comp instanceof ServiceMetadata)
- manager = new ServiceManager(context, container, (ServiceMetadata)comp);
-
- else if (comp instanceof ServiceReferenceMetadata)
- manager = new ServiceReferenceManager(context, container, (ServiceReferenceMetadata)comp);
-
- if (manager == null)
- throw new IllegalArgumentException("Unsupported component type: " + comp);
-
- return manager;
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -23,15 +23,21 @@
//$Id$
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.osgi.blueprint.BlueprintContext;
import org.jboss.osgi.blueprint.reflect.BeanMetadataImpl;
+import org.jboss.osgi.blueprint.reflect.ReferenceMetadataImpl;
+import org.jboss.reflect.spi.TypeInfo;
import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.reflect.BeanMetadata;
import org.osgi.service.blueprint.reflect.BeanProperty;
import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+import org.osgi.util.tracker.ServiceTracker;
/**
* A bean manager provides regular Java objects as component
@@ -55,13 +61,13 @@
*/
public class BeanManager extends AbstractManager
{
- private BeanMetadataImpl beanMetadata;
- private BeanMetaData kernelBeanMetaData;
+ private BeanMetadataImpl bpBeanMetadata;
+ private BeanMetaData mcBeanMetadata;
public BeanManager(BlueprintContext context, BlueprintContainer container, BeanMetadata compMetadata)
{
super(context, container, compMetadata);
- this.beanMetadata = (BeanMetadataImpl)compMetadata;
+ this.bpBeanMetadata = (BeanMetadataImpl)compMetadata;
}
@Override
@@ -70,27 +76,29 @@
super.install();
// Install the kernel bean
- installKernelBean(getKernelBeanMetaData(beanMetadata));
+ installKernelBean(getMicrocontainerBeanMetaData(bpBeanMetadata));
}
@Override
public void shutdown()
{
- if (kernelBeanMetaData != null)
- uninstallKernelBean(kernelBeanMetaData);
+ if (mcBeanMetadata != null)
+ uninstallKernelBean(mcBeanMetadata);
super.shutdown();
}
- public BeanMetaData getKernelBeanMetaData(BeanMetadataImpl compMetadata)
+ public BeanMetaData getMicrocontainerBeanMetaData(BeanMetadataImpl compMetadata)
{
- if (kernelBeanMetaData == null)
+ if (mcBeanMetadata == null)
{
String key = compMetadata.getKey();
String clazz = compMetadata.getClassName();
BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(key, clazz);
- for (BeanProperty prop : beanMetadata.getProperties())
+ mcBeanMetadata = builder.getBeanMetaData();
+
+ for (BeanProperty prop : bpBeanMetadata.getProperties())
{
String name = prop.getName();
Metadata value = prop.getValue();
@@ -99,16 +107,47 @@
BeanMetadataImpl beanValue = (BeanMetadataImpl)value;
BlueprintContainerImpl impl = (BlueprintContainerImpl)container;
BeanManager beanManager = (BeanManager)impl.getComponentManager(beanValue.getKey());
- BeanMetaData valueMetaData = beanManager.getKernelBeanMetaData(beanValue);
+ BeanMetaData valueMetaData = beanManager.getMicrocontainerBeanMetaData(beanValue);
builder.addPropertyMetaData(name, valueMetaData);
}
+ else if (value instanceof ReferenceMetadata)
+ {
+ ReferenceMetadataImpl refValue = (ReferenceMetadataImpl)value;
+ BlueprintContainerImpl impl = (BlueprintContainerImpl)container;
+ ReferenceManager refManager = (ReferenceManager)impl.getComponentManager(refValue.getKey());
+ ValueMetaData valueMetaData = new ServiceValueMetaData(refManager.getServiceTracker());
+ builder.addPropertyMetaData(name, valueMetaData);
+ }
else
{
- //throw new IllegalStateException("Unsupported property value: " + value);
+ throw new IllegalStateException("Unsupported property value: " + value);
}
}
- kernelBeanMetaData = builder.getBeanMetaData();
}
- return kernelBeanMetaData;
+ return mcBeanMetadata;
}
+
+ /**
+ * A {@link ValueMetaData} implementation that gets its underlying value
+ * from a {@link ServiceTracker}
+ */
+ private class ServiceValueMetaData extends AbstractValueMetaData
+ {
+ private static final long serialVersionUID = 1L;
+ private ServiceTracker tracker;
+
+ private ServiceValueMetaData(ServiceTracker tracker)
+ {
+ this.tracker = tracker;
+
+ if (tracker == null)
+ throw new IllegalArgumentException("Underlying ServiceTracker cannot be null");
+ }
+
+ @Override
+ public Object getValue(TypeInfo info, ClassLoader cl)
+ {
+ return tracker.getService();
+ }
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -175,9 +175,11 @@
private void createManagers(BlueprintMetadata bpMetadata)
{
+ ManagerFactory factory = new ManagerFactory(context, this);
+
for (ComponentMetadata comp : bpMetadata.getComponents())
{
- AbstractManager manager = AbstractManager.createManager(context, this, comp);
+ AbstractManager manager = factory.createManager(comp);
String key = manager.getId();
if (key == null)
Added: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ManagerFactory.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ManagerFactory.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ManagerFactory.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -0,0 +1,68 @@
+/*
+ * 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.osgi.blueprint.container;
+
+//$Id: AbstractManager.java 90472 2009-06-19 15:11:39Z thomas.diesler(a)jboss.com $
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+
+/**
+ * Construct a component manager from the given component metadata.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 17-Jun-2009
+ */
+public class ManagerFactory
+{
+ protected BlueprintContext context;
+ protected BlueprintContainer container;
+
+ public ManagerFactory(BlueprintContext context, BlueprintContainer container)
+ {
+ this.context = context;
+ this.container = container;
+ }
+
+ public AbstractManager createManager(ComponentMetadata comp)
+ {
+ AbstractManager manager = null;
+
+ if (comp instanceof BeanMetadata)
+ manager = new BeanManager(context, container, (BeanMetadata)comp);
+
+ else if (comp instanceof ServiceMetadata)
+ manager = new ServiceManager(context, container, (ServiceMetadata)comp);
+
+ else if (comp instanceof ReferenceMetadata)
+ manager = new ReferenceManager(context, container, (ReferenceMetadata)comp);
+
+ if (manager == null)
+ throw new IllegalArgumentException("Unsupported component type: " + comp);
+
+ return manager;
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ReferenceManager.java (from rev 90669, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceReferenceManager.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ReferenceManager.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ReferenceManager.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -0,0 +1,69 @@
+/*
+ * 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.osgi.blueprint.container;
+
+//$Id$
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+import org.jboss.osgi.blueprint.reflect.ReferenceMetadataImpl;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Reference managers track a service in the OSGi service registry.
+ * When activated, they provide a ServiceReference object or a proxy
+ * to a service object.
+ *
+ * A reference is satisfied when its selection matches a service in the
+ * registry.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 17-Jun-2009
+ */
+public class ReferenceManager extends AbstractManager
+{
+ private ReferenceMetadataImpl refMetadata;
+ private ServiceTracker tracker;
+
+ public ReferenceManager(BlueprintContext context, BlueprintContainer container, ReferenceMetadata compMetadata)
+ {
+ super(context, container, compMetadata);
+ this.refMetadata = (ReferenceMetadataImpl)compMetadata;
+ }
+
+ public ServiceTracker getServiceTracker()
+ {
+ if (tracker == null)
+ {
+ String intfName = refMetadata.getInterface();
+ tracker = new ServiceTracker(context.getBundleContext(), intfName, null);
+ tracker.open();
+ }
+ return tracker;
+ }
+
+ public Object getService()
+ {
+ return getServiceTracker().getService();
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceManager.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceManager.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceManager.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -61,7 +61,10 @@
// Create the anonymous bean manager
Target target = serviceMetadata.getServiceComponent();
if (target instanceof BeanMetadata)
- anonymousBean = (BeanManager)AbstractManager.createManager(context, container, (BeanMetadata)target);
+ {
+ ManagerFactory factory = new ManagerFactory(context, container);
+ anonymousBean = (BeanManager)factory.createManager((BeanMetadata)target);
+ }
}
@Override
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceReferenceManager.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceReferenceManager.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/ServiceReferenceManager.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -1,51 +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.osgi.blueprint.container;
-
-//$Id$
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.reflect.ServiceReferenceMetadataImpl;
-import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
-
-/**
- * Reference managers track a service in the OSGi service registry.
- * When activated, they provide a ServiceReference object or a proxy
- * to a service object.
- *
- * A reference is satisfied when its selection matches a service in the
- * registry.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 17-Jun-2009
- */
-public class ServiceReferenceManager extends AbstractManager
-{
- private ServiceReferenceMetadataImpl srefMetadata;
-
- public ServiceReferenceManager(BlueprintContext context, BlueprintContainer container, ServiceReferenceMetadata compMetadata)
- {
- super(context, container, compMetadata);
- this.srefMetadata = (ServiceReferenceMetadataImpl)compMetadata;
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -59,11 +59,10 @@
{
value = blueprint.getComponent(ref);
}
+
+ if (value == null)
+ throw new IllegalStateException("Cannot obtain value for property: " + getName());
}
-
- //if (value == null)
- // throw new IllegalStateException("Cannot obtain value for property: " + getName());
-
return value;
}
}
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -26,8 +26,8 @@
import org.jboss.osgi.blueprint.BlueprintContext;
import org.jboss.osgi.blueprint.parser.xb.TBean;
import org.jboss.osgi.blueprint.parser.xb.TComponent;
+import org.jboss.osgi.blueprint.parser.xb.TReference;
import org.jboss.osgi.blueprint.parser.xb.TService;
-import org.jboss.osgi.blueprint.parser.xb.TServiceReference;
import org.osgi.service.blueprint.reflect.ComponentMetadata;
/**
@@ -66,8 +66,8 @@
else if (tComp instanceof TService)
comp = new ServiceMetadataImpl(context, blueprint, (TService)tComp);
- else if (tComp instanceof TServiceReference)
- comp = new ServiceReferenceMetadataImpl(context, blueprint, (TServiceReference)tComp);
+ else if (tComp instanceof TReference)
+ comp = new ReferenceMetadataImpl(context, blueprint, (TReference)tComp);
if (comp == null)
throw new IllegalArgumentException("Unsupported component type: " + tComp);
Added: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -0,0 +1,58 @@
+/*
+ * 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.osgi.blueprint.reflect;
+
+// $Id: ServiceReferenceMetadataImpl.java 90472 2009-06-19 15:11:39Z thomas.diesler(a)jboss.com $
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+import org.jboss.osgi.blueprint.parser.xb.TReference;
+import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+
+/**
+ * Service reference that will bind to a single matching service in the service
+ * registry.
+ *
+ * Defines the <code>reference</code> element.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 30-Jun-2009
+ */
+public class ReferenceMetadataImpl extends ServiceReferenceMetadataImpl implements ReferenceMetadata
+{
+ private TReference tReference;
+
+ public ReferenceMetadataImpl(BlueprintContext context, BlueprintMetadata blueprint, TReference tReference)
+ {
+ super(context, blueprint, tReference);
+ this.tReference = tReference;
+ }
+
+ public long getTimeout()
+ {
+ return tReference.getTimeout();
+ }
+
+ public String toString()
+ {
+ return "Reference[id=" + getId() + "]";
+ }
+}
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -39,7 +39,7 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class ServiceReferenceMetadataImpl extends ComponentMetadataImpl implements ServiceReferenceMetadata
+public abstract class ServiceReferenceMetadataImpl extends ComponentMetadataImpl implements ServiceReferenceMetadata
{
private TServiceReference tService;
@@ -85,6 +85,6 @@
public String toString()
{
- return "Reference[id=" + getId() + "]";
+ return "ServiceReference[id=" + getId() + "]";
}
}
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-06-30 12:09:27 UTC (rev 90690)
@@ -45,6 +45,7 @@
import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.jboss.osgi.spi.testing.OSGiTestHelper;
import org.jboss.test.osgi.blueprint.container.bundle.BeanA;
+import org.jboss.test.osgi.blueprint.container.bundle.BeanB;
import org.jboss.test.osgi.blueprint.container.bundle.ServiceA;
import org.jboss.test.osgi.blueprint.container.bundle.ServiceB;
import org.junit.AfterClass;
@@ -56,8 +57,8 @@
import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.reflect.BeanMetadata;
import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceMetadata;
import org.osgi.service.blueprint.reflect.ServiceMetadata;
-import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
/**
* BlueprintContainer API tests
@@ -169,6 +170,12 @@
ServiceB serviceB = (ServiceB)context.getService(srefB);
assertNotNull("Service available", serviceB);
+ BeanB beanB = (BeanB)serviceB;
+ BeanA beanA = beanB.getBeanA();
+ assertNotNull("BeanA available", beanA);
+
+ MBeanServer mbeanServer = beanA.getMbeanServer();
+ assertNotNull("MBeanServer available", mbeanServer);
}
@Test
@@ -265,12 +272,12 @@
assumeNotNull(context);
BlueprintContainer bpContainer = getBlueprintContainer();
- Collection<ServiceReferenceMetadata> srefsMetadata = bpContainer.getMetadata(ServiceReferenceMetadata.class);
+ Collection<ReferenceMetadata> srefsMetadata = bpContainer.getMetadata(ReferenceMetadata.class);
- assertNotNull("ServiceReferenceMetadata not null", srefsMetadata);
- assertEquals("ServiceReferenceMetadata size", 1, srefsMetadata.size());
+ assertNotNull("ReferenceMetadata not null", srefsMetadata);
+ assertEquals("ReferenceMetadata size", 1, srefsMetadata.size());
- ServiceReferenceMetadata srefMetadata = srefsMetadata.iterator().next();
+ ReferenceMetadata srefMetadata = srefsMetadata.iterator().next();
assertEquals("mbeanService", srefMetadata.getId());
String interfaceName = srefMetadata.getInterface();
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-06-30 09:25:55 UTC (rev 90689)
+++ projects/jboss-osgi/trunk/pom.xml 2009-06-30 12:09:27 UTC (rev 90690)
@@ -29,7 +29,7 @@
<version.args4j>2.0.12</version.args4j>
<version.apache.felix.configadmin>1.0.10</version.apache.felix.configadmin>
<version.apache.felix.core>1.2.0</version.apache.felix.core>
- <version.apache.felix.http.jetty>1.0.0</version.apache.felix.http.jetty>
+ <version.apache.felix.http.jetty>1.0.1</version.apache.felix.http.jetty>
<version.apache.felix.log>1.0.0</version.apache.felix.log>
<version.apache.felix.metatype>1.0.2</version.apache.felix.metatype>
<version.izpack>4.2.0</version.izpack>
15 years
JBoss-OSGI SVN: r90689 - projects/jboss-osgi/projects/runtime/felix/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-30 05:25:55 -0400 (Tue, 30 Jun 2009)
New Revision: 90689
Modified:
projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
Log:
Update to felix-1.8.1
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-06-30 08:22:54 UTC (rev 90688)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-06-30 09:25:55 UTC (rev 90689)
@@ -17,7 +17,7 @@
</parent>
<properties>
- <version.felix.framework>1.8.0</version.felix.framework>
+ <version.felix.framework>1.8.1</version.felix.framework>
<version.felix.log>1.0.0</version.felix.log>
<version.felix.osgi.compendium>1.2.0</version.felix.osgi.compendium>
<version.jboss.osgi.spi>1.0.0.Beta2</version.jboss.osgi.spi>
15 years
JBoss-OSGI SVN: r90688 - projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-30 04:22:54 -0400 (Tue, 30 Jun 2009)
New Revision: 90688
Modified:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java
Log:
Add namespace qualifiers to JAXB annotations
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java 2009-06-30 08:20:26 UTC (rev 90687)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java 2009-06-30 08:22:54 UTC (rev 90688)
@@ -47,29 +47,28 @@
/**
* The blueprint element is the top element.
- *
- * The definitions consist of two sections:
- * the type-converter section and the components section.
*
+ * The definitions consist of two sections: the type-converter section and the components section.
+ *
* blueprint ::= <type-converters> component
* component ::= <bean> | <service> | service-reference
* service-reference ::= <reference> | <ref-list> | <ref-set>
- * type-converter ::= <bean> | <ref>
+ * type-converter ::= <bean> | <ref>
*
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-(a)JBossXmlSchema(namespace=BlueprintContext.XMLNS_BLUEPRINT, elementFormDefault= XmlNsForm.QUALIFIED)
-@XmlRootElement(name="blueprint")
-@XmlType(name="Tblueprint")
+@JBossXmlSchema(namespace = BlueprintContext.XMLNS_BLUEPRINT, elementFormDefault = XmlNsForm.QUALIFIED)
+@XmlRootElement(name = "blueprint", namespace = BlueprintContext.XMLNS_BLUEPRINT)
+@XmlType(name = "Tblueprint", namespace = BlueprintContext.XMLNS_BLUEPRINT)
public class TBlueprint
{
protected String description;
protected TTypeConverters typeConverters;
@XmlElements({
- @XmlElement(name="bean", type=TBean.class),
- @XmlElement(name="service", type=TService.class),
- @XmlElement(name="reference", type=TReference.class)})
+ @XmlElement(name="bean", namespace = BlueprintContext.XMLNS_BLUEPRINT, type=TBean.class),
+ @XmlElement(name="service", namespace = BlueprintContext.XMLNS_BLUEPRINT, type=TService.class),
+ @XmlElement(name="reference", namespace = BlueprintContext.XMLNS_BLUEPRINT, type=TReference.class)})
protected List<TComponent> components;
protected Boolean defaultLazyInit;
protected String defaultInitMethod;
@@ -138,7 +137,7 @@
}
return Collections.unmodifiableSet(compIds);
}
-
+
@SuppressWarnings("unchecked")
public <T extends TComponent> Collection<T> getMetadata(Class<T> type)
{
@@ -155,7 +154,7 @@
{
if (name == null)
throw new IllegalArgumentException("Cannot get metadata for id: null");
-
+
TComponent compMetadata = null;
for (TComponent comp : getComponents())
{
@@ -165,13 +164,13 @@
break;
}
}
-
+
if (compMetadata == null)
throw new NoSuchComponentException(name);
-
+
return compMetadata;
}
-
+
/**
* Gets the value of the defaultLazyInit property.
*
15 years
JBoss-OSGI SVN: r90670 - in projects/jboss-osgi/trunk/testsuite: trailblazer and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-29 09:42:18 -0400 (Mon, 29 Jun 2009)
New Revision: 90670
Modified:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java
projects/jboss-osgi/trunk/testsuite/trailblazer/.classpath
Log:
comment dead code
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java 2009-06-29 05:57:45 UTC (rev 90669)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java 2009-06-29 13:42:18 UTC (rev 90670)
@@ -23,7 +23,6 @@
//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler(a)jboss.com $
-
import static org.junit.Assert.assertEquals;
import java.util.List;
@@ -73,12 +72,12 @@
OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
packageAdmin.refreshPackages(null);
}
-
+
@Test
public void testRedeploySingle() throws Exception
{
OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
-
+
bundleA.start();
SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
@@ -86,25 +85,25 @@
assertEquals("Start messages", 1, messages.size());
bundleA.uninstall();
-
+
// Reinstall bundleA
bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
bundleA.start();
- // The static in bundleA.SomeBean is expected to be recreated
-
+ // The static in bundleA.SomeBean is expected to be recreated
+
messages = report(someBean.getMessages());
assertEquals("Start messages", 1, messages.size());
-
+
bundleA.uninstall();
}
-
+
@Test
public void testRedeployWithReference() throws Exception
{
OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
OSGiBundle bundleB = runtime.installBundle("jbosgi108-bundleB.jar");
-
+
bundleA.start();
bundleB.start();
@@ -113,28 +112,29 @@
assertEquals("Start messages", 2, messages.size());
bundleA.uninstall();
-
- // After uninstall bundleA, bundleB still holds a reference on bundleA.SomeBean
+ // After uninstall bundleA, bundleB still holds a reference on
+ // bundleA.SomeBean
+
// Reinstall bundleA
bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
bundleA.start();
// The static in bundleA.SomeBean is expected to be reused
-
+
messages = report(someBean.getMessages());
assertEquals("Start messages", 4, messages.size());
-
+
bundleB.uninstall();
bundleA.uninstall();
}
-
+
@Test
public void testRedeployWithReferenceAndRefresh() throws Exception
{
OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
OSGiBundle bundleB = runtime.installBundle("jbosgi108-bundleB.jar");
-
+
bundleA.start();
bundleB.start();
@@ -143,37 +143,36 @@
assertEquals("Start messages", 2, messages.size());
bundleA.uninstall();
-
- // After uninstall bundleA, bundleB still holds a reference on bundleA.SomeBean
+ // After uninstall bundleA, bundleB still holds a reference on
+ // bundleA.SomeBean
+
// Refresh all packages
OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
packageAdmin.refreshPackages(null);
-
+
// Reinstall bundleA
bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
bundleA.start();
- // The static in bundleA.SomeBean is expected to be recreated
-
+ // The static in bundleA.SomeBean is expected to be recreated
+
messages = report(someBean.getMessages());
assertEquals("Start messages", 1, messages.size());
-
+
bundleB.uninstall();
bundleA.uninstall();
}
-
+
private List<String> report(List<String> messages)
{
- if (false)
+ System.out.println(">>>>>>>>>>>>");
+ for (String aux : messages)
{
- System.out.println(">>>>>>>>>>>>");
- for (String aux : messages)
- {
- System.out.println(aux);
- }
- System.out.println("<<<<<<<<<<<");
+ System.out.println(aux);
}
+ System.out.println("<<<<<<<<<<<");
+
return messages;
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/.classpath
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/.classpath 2009-06-29 05:57:45 UTC (rev 90669)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/.classpath 2009-06-29 13:42:18 UTC (rev 90670)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
- <classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
15 years
JBoss-OSGI SVN: r90477 - in projects/jboss-osgi/trunk/blueprint/impl/src/main: java/org/jboss/osgi/blueprint/parser/xb and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-19 15:29:55 -0400 (Fri, 19 Jun 2009)
New Revision: 90477
Added:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java
Removed:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java
Modified:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
Log:
Inject bean as bean property
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java 2009-06-19 16:15:53 UTC (rev 90476)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BeanManager.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -30,6 +30,8 @@
import org.jboss.osgi.blueprint.reflect.BeanMetadataImpl;
import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.Metadata;
/**
* A bean manager provides regular Java objects as component
@@ -54,7 +56,7 @@
public class BeanManager extends AbstractManager
{
private BeanMetadataImpl beanMetadata;
- private BeanMetaData kernelBean;
+ private BeanMetaData kernelBeanMetaData;
public BeanManager(BlueprintContext context, BlueprintContainer container, BeanMetadata compMetadata)
{
@@ -66,26 +68,47 @@
public void install()
{
super.install();
-
- kernelBean = getKernelBean(beanMetadata);
- installKernelBean(kernelBean);
+
+ // Install the kernel bean
+ installKernelBean(getKernelBeanMetaData(beanMetadata));
}
@Override
public void shutdown()
{
- if (kernelBean != null)
- uninstallKernelBean(kernelBean);
+ if (kernelBeanMetaData != null)
+ uninstallKernelBean(kernelBeanMetaData);
super.shutdown();
}
- private BeanMetaData getKernelBean(BeanMetadataImpl compMetadata)
+ public BeanMetaData getKernelBeanMetaData(BeanMetadataImpl compMetadata)
{
- String name = compMetadata.getKey();
- String clazz = compMetadata.getClassName();
+ if (kernelBeanMetaData == null)
+ {
+ String key = compMetadata.getKey();
+ String clazz = compMetadata.getClassName();
- BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, clazz);
- return builder.getBeanMetaData();
+ BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(key, clazz);
+ for (BeanProperty prop : beanMetadata.getProperties())
+ {
+ String name = prop.getName();
+ Metadata value = prop.getValue();
+ if (value instanceof BeanMetadata)
+ {
+ BeanMetadataImpl beanValue = (BeanMetadataImpl)value;
+ BlueprintContainerImpl impl = (BlueprintContainerImpl)container;
+ BeanManager beanManager = (BeanManager)impl.getComponentManager(beanValue.getKey());
+ BeanMetaData valueMetaData = beanManager.getKernelBeanMetaData(beanValue);
+ builder.addPropertyMetaData(name, valueMetaData);
+ }
+ else
+ {
+ //throw new IllegalStateException("Unsupported property value: " + value);
+ }
+ }
+ kernelBeanMetaData = builder.getBeanMetaData();
+ }
+ return kernelBeanMetaData;
}
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java (from rev 90471, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -0,0 +1,536 @@
+/*
+ * 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.osgi.blueprint.parser.xb;
+
+// $Id$
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ *
+ * An argument used to create an object defined by a <bean> component. The <argument> elements are the arguments for the bean class constructor or passed to the bean
+ * factory method.
+ *
+ * The type, if specified, is used to disambiguate the constructor or method signature. Arguments may also be matched up with arguments by explicitly specifying the
+ * index position. If the index is used, then all <argument> elements for the bean must also specify the index.
+ *
+ * The value and ref attributes are convenience shortcuts to make the <argument> tag easier to code. A fuller set of injected values and types can be specified using
+ * one of the "value" type elements.
+ *
+ * <p>
+ * Java class for Targument complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Targument">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
+ * </sequence>
+ * <attribute name="index" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ * <attribute name="type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
+ * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class TArgument
+{
+ protected String description;
+ protected TService service;
+ protected TRefCollection refList;
+ protected TRefCollection refSet;
+ protected TBean bean;
+ protected TReference reference;
+ protected TRef refFIXME;
+ protected List<Object> any;
+ protected TRef idref;
+ protected Tvalue value;
+ protected Tcollection list;
+ protected Tcollection set;
+ protected Tmap map;
+ protected Tcollection array;
+ protected Tprops props;
+ protected Tnull _null;
+ protected BigInteger index;
+ protected String type;
+ protected String ref;
+ protected String valueFIXME;
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDescription(String value)
+ {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the service property.
+ *
+ * @return possible object is {@link TService }
+ *
+ */
+ public TService getService()
+ {
+ return service;
+ }
+
+ /**
+ * Sets the value of the service property.
+ *
+ * @param value allowed object is {@link TService }
+ *
+ */
+ public void setService(TService value)
+ {
+ this.service = value;
+ }
+
+ /**
+ * Gets the value of the refList property.
+ *
+ * @return possible object is {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefList()
+ {
+ return refList;
+ }
+
+ /**
+ * Sets the value of the refList property.
+ *
+ * @param value allowed object is {@link TRefCollection }
+ *
+ */
+ public void setRefList(TRefCollection value)
+ {
+ this.refList = value;
+ }
+
+ /**
+ * Gets the value of the refSet property.
+ *
+ * @return possible object is {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefSet()
+ {
+ return refSet;
+ }
+
+ /**
+ * Sets the value of the refSet property.
+ *
+ * @param value allowed object is {@link TRefCollection }
+ *
+ */
+ public void setRefSet(TRefCollection value)
+ {
+ this.refSet = value;
+ }
+
+ /**
+ * Gets the value of the bean property.
+ *
+ * @return possible object is {@link TBean }
+ *
+ */
+ public TBean getBean()
+ {
+ return bean;
+ }
+
+ /**
+ * Sets the value of the bean property.
+ *
+ * @param value allowed object is {@link TBean }
+ *
+ */
+ public void setBean(TBean value)
+ {
+ this.bean = value;
+ }
+
+ /**
+ * Gets the value of the reference property.
+ *
+ * @return possible object is {@link TReference }
+ *
+ */
+ public TReference getReference()
+ {
+ return reference;
+ }
+
+ /**
+ * Sets the value of the reference property.
+ *
+ * @param value allowed object is {@link TReference }
+ *
+ */
+ public void setReference(TReference value)
+ {
+ this.reference = value;
+ }
+
+ /**
+ * Gets the value of the refFIXME property.
+ *
+ * @return possible object is {@link TRef }
+ *
+ */
+ public TRef getRefFIXME()
+ {
+ return refFIXME;
+ }
+
+ /**
+ * Sets the value of the refFIXME property.
+ *
+ * @param value allowed object is {@link TRef }
+ *
+ */
+ public void setRefFIXME(TRef value)
+ {
+ this.refFIXME = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
+ * JAXB object. This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny()
+ {
+ if (any == null)
+ {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets the value of the idref property.
+ *
+ * @return possible object is {@link TRef }
+ *
+ */
+ public TRef getIdref()
+ {
+ return idref;
+ }
+
+ /**
+ * Sets the value of the idref property.
+ *
+ * @param value allowed object is {@link TRef }
+ *
+ */
+ public void setIdref(TRef value)
+ {
+ this.idref = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return possible object is {@link Tvalue }
+ *
+ */
+ public Tvalue getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value allowed object is {@link Tvalue }
+ *
+ */
+ public void setValue(Tvalue value)
+ {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the list property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getList()
+ {
+ return list;
+ }
+
+ /**
+ * Sets the value of the list property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setList(Tcollection value)
+ {
+ this.list = value;
+ }
+
+ /**
+ * Gets the value of the set property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getSet()
+ {
+ return set;
+ }
+
+ /**
+ * Sets the value of the set property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setSet(Tcollection value)
+ {
+ this.set = value;
+ }
+
+ /**
+ * Gets the value of the map property.
+ *
+ * @return possible object is {@link Tmap }
+ *
+ */
+ public Tmap getMap()
+ {
+ return map;
+ }
+
+ /**
+ * Sets the value of the map property.
+ *
+ * @param value allowed object is {@link Tmap }
+ *
+ */
+ public void setMap(Tmap value)
+ {
+ this.map = value;
+ }
+
+ /**
+ * Gets the value of the array property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getArray()
+ {
+ return array;
+ }
+
+ /**
+ * Sets the value of the array property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setArray(Tcollection value)
+ {
+ this.array = value;
+ }
+
+ /**
+ * Gets the value of the props property.
+ *
+ * @return possible object is {@link Tprops }
+ *
+ */
+ public Tprops getProps()
+ {
+ return props;
+ }
+
+ /**
+ * Sets the value of the props property.
+ *
+ * @param value allowed object is {@link Tprops }
+ *
+ */
+ public void setProps(Tprops value)
+ {
+ this.props = value;
+ }
+
+ /**
+ * Gets the value of the null property.
+ *
+ * @return possible object is {@link Tnull }
+ *
+ */
+ public Tnull getNull()
+ {
+ return _null;
+ }
+
+ /**
+ * Sets the value of the null property.
+ *
+ * @param value allowed object is {@link Tnull }
+ *
+ */
+ public void setNull(Tnull value)
+ {
+ this._null = value;
+ }
+
+ /**
+ * Gets the value of the index property.
+ *
+ * @return possible object is {@link BigInteger }
+ *
+ */
+ public BigInteger getIndex()
+ {
+ return index;
+ }
+
+ /**
+ * Sets the value of the index property.
+ *
+ * @param value allowed object is {@link BigInteger }
+ *
+ */
+ public void setIndex(BigInteger value)
+ {
+ this.index = value;
+ }
+
+ /**
+ * Gets the value of the type property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getType()
+ {
+ return type;
+ }
+
+ /**
+ * Sets the value of the type property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setType(String value)
+ {
+ this.type = value;
+ }
+
+ /**
+ * Gets the value of the ref property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getRef()
+ {
+ return ref;
+ }
+
+ /**
+ * Sets the value of the ref property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setRef(String value)
+ {
+ this.ref = value;
+ }
+
+ /**
+ * Gets the value of the valueFIXME property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getValueFIXME()
+ {
+ return valueFIXME;
+ }
+
+ /**
+ * Sets the value of the valueFIXME property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setValueFIXME(String value)
+ {
+ this.valueFIXME = value;
+ }
+
+}
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java 2009-06-19 16:15:53 UTC (rev 90476)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -23,14 +23,10 @@
// $Id$
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
@@ -46,7 +42,8 @@
public class TBean extends TComponent
{
protected String description;
- protected List<Object> argumentOrPropertyOrAny;
+ protected List<TProperty> properties;
+ protected List<TArgument> arguments;
protected String className;
protected String initMethod;
protected String destroyMethod;
@@ -72,36 +69,26 @@
this.description = value;
}
- /**
- * Gets the value of the argumentOrPropertyOrAny property.
- *
- * <p>
- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
- * JAXB object. This is why there is not a <CODE>set</CODE> method for the argumentOrPropertyOrAny property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- *
- * <pre>
- * getArgumentOrPropertyOrAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list {@link Object } {@link JAXBElement }{@code <}{@link Targument }{@code >} {@link JAXBElement }{@code <}
- * {@link Tproperty }{@code >}
- *
- *
- */
- public List<Object> getArgumentOrPropertyOrAny()
+ public List<TProperty> getProperties()
{
- if (argumentOrPropertyOrAny == null)
- {
- argumentOrPropertyOrAny = new ArrayList<Object>();
- }
- return this.argumentOrPropertyOrAny;
+ return properties;
}
+ public void setProperties(List<TProperty> properties)
+ {
+ this.properties = properties;
+ }
+
+ public List<TArgument> getArguments()
+ {
+ return arguments;
+ }
+
+ public void setArguments(List<TArgument> arguments)
+ {
+ this.arguments = arguments;
+ }
+
/**
* Gets the value of the class property.
*/
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java (from rev 90471, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -0,0 +1,510 @@
+/*
+ * 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.osgi.blueprint.parser.xb;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ *
+ * A property that will be injected into a created <bean> component. The <property> elements correspond to named JavaBean setting methods for a created bean object.
+ *
+ * The value and ref attributes are convenience shortcuts to make the <argument> tag easier to code. A fuller set of injected values and types can be specified using
+ * one of the "value" type elements.
+ *
+ *
+ *
+ * <p>
+ * Java class for Tproperty complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tproperty">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
+ * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class TProperty
+{
+ protected String description;
+ protected TService service;
+ protected TRefCollection refList;
+ protected TRefCollection refSet;
+ protected TBean bean;
+ protected TReference reference;
+ protected TRef refFIXME;
+ protected List<Object> any;
+ protected TRef idref;
+ protected Tvalue value;
+ protected Tcollection list;
+ protected Tcollection set;
+ protected Tmap map;
+ protected Tcollection array;
+ protected Tprops props;
+ protected Tnull _null;
+ protected String name;
+ protected String ref;
+ protected String valueFIXME;
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDescription(String value)
+ {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the service property.
+ *
+ * @return possible object is {@link TService }
+ *
+ */
+ public TService getService()
+ {
+ return service;
+ }
+
+ /**
+ * Sets the value of the service property.
+ *
+ * @param value allowed object is {@link TService }
+ *
+ */
+ public void setService(TService value)
+ {
+ this.service = value;
+ }
+
+ /**
+ * Gets the value of the refList property.
+ *
+ * @return possible object is {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefList()
+ {
+ return refList;
+ }
+
+ /**
+ * Sets the value of the refList property.
+ *
+ * @param value allowed object is {@link TRefCollection }
+ *
+ */
+ public void setRefList(TRefCollection value)
+ {
+ this.refList = value;
+ }
+
+ /**
+ * Gets the value of the refSet property.
+ *
+ * @return possible object is {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefSet()
+ {
+ return refSet;
+ }
+
+ /**
+ * Sets the value of the refSet property.
+ *
+ * @param value allowed object is {@link TRefCollection }
+ *
+ */
+ public void setRefSet(TRefCollection value)
+ {
+ this.refSet = value;
+ }
+
+ /**
+ * Gets the value of the bean property.
+ *
+ * @return possible object is {@link TBean }
+ *
+ */
+ public TBean getBean()
+ {
+ return bean;
+ }
+
+ /**
+ * Sets the value of the bean property.
+ *
+ * @param value allowed object is {@link TBean }
+ *
+ */
+ public void setBean(TBean value)
+ {
+ this.bean = value;
+ }
+
+ /**
+ * Gets the value of the reference property.
+ *
+ * @return possible object is {@link TReference }
+ *
+ */
+ public TReference getReference()
+ {
+ return reference;
+ }
+
+ /**
+ * Sets the value of the reference property.
+ *
+ * @param value allowed object is {@link TReference }
+ *
+ */
+ public void setReference(TReference value)
+ {
+ this.reference = value;
+ }
+
+ /**
+ * Gets the value of the refFIXME property.
+ *
+ * @return possible object is {@link TRef }
+ *
+ */
+ public TRef getRefFIXME()
+ {
+ return refFIXME;
+ }
+
+ /**
+ * Sets the value of the refFIXME property.
+ *
+ * @param value allowed object is {@link TRef }
+ *
+ */
+ public void setRefFIXME(TRef value)
+ {
+ this.refFIXME = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
+ * JAXB object. This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny()
+ {
+ if (any == null)
+ {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets the value of the idref property.
+ *
+ * @return possible object is {@link TRef }
+ *
+ */
+ public TRef getIdref()
+ {
+ return idref;
+ }
+
+ /**
+ * Sets the value of the idref property.
+ *
+ * @param value allowed object is {@link TRef }
+ *
+ */
+ public void setIdref(TRef value)
+ {
+ this.idref = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return possible object is {@link Tvalue }
+ *
+ */
+ public Tvalue getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value allowed object is {@link Tvalue }
+ *
+ */
+ public void setValue(Tvalue value)
+ {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the list property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getList()
+ {
+ return list;
+ }
+
+ /**
+ * Sets the value of the list property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setList(Tcollection value)
+ {
+ this.list = value;
+ }
+
+ /**
+ * Gets the value of the set property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getSet()
+ {
+ return set;
+ }
+
+ /**
+ * Sets the value of the set property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setSet(Tcollection value)
+ {
+ this.set = value;
+ }
+
+ /**
+ * Gets the value of the map property.
+ *
+ * @return possible object is {@link Tmap }
+ *
+ */
+ public Tmap getMap()
+ {
+ return map;
+ }
+
+ /**
+ * Sets the value of the map property.
+ *
+ * @param value allowed object is {@link Tmap }
+ *
+ */
+ public void setMap(Tmap value)
+ {
+ this.map = value;
+ }
+
+ /**
+ * Gets the value of the array property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getArray()
+ {
+ return array;
+ }
+
+ /**
+ * Sets the value of the array property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setArray(Tcollection value)
+ {
+ this.array = value;
+ }
+
+ /**
+ * Gets the value of the props property.
+ *
+ * @return possible object is {@link Tprops }
+ *
+ */
+ public Tprops getProps()
+ {
+ return props;
+ }
+
+ /**
+ * Sets the value of the props property.
+ *
+ * @param value allowed object is {@link Tprops }
+ *
+ */
+ public void setProps(Tprops value)
+ {
+ this.props = value;
+ }
+
+ /**
+ * Gets the value of the null property.
+ *
+ * @return possible object is {@link Tnull }
+ *
+ */
+ public Tnull getNull()
+ {
+ return _null;
+ }
+
+ /**
+ * Sets the value of the null property.
+ *
+ * @param value allowed object is {@link Tnull }
+ *
+ */
+ public void setNull(Tnull value)
+ {
+ this._null = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setName(String value)
+ {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the ref property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getRef()
+ {
+ return ref;
+ }
+
+ /**
+ * Sets the value of the ref property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setRef(String value)
+ {
+ this.ref = value;
+ }
+
+ /**
+ * Gets the value of the valueFIXME property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getValueFIXME()
+ {
+ return valueFIXME;
+ }
+
+ /**
+ * Sets the value of the valueFIXME property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setValueFIXME(String value)
+ {
+ this.valueFIXME = value;
+ }
+
+}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java 2009-06-19 16:15:53 UTC (rev 90476)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -1,536 +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.osgi.blueprint.parser.xb;
-
-// $Id$
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- * An argument used to create an object defined by a <bean> component. The <argument> elements are the arguments for the bean class constructor or passed to the bean
- * factory method.
- *
- * The type, if specified, is used to disambiguate the constructor or method signature. Arguments may also be matched up with arguments by explicitly specifying the
- * index position. If the index is used, then all <argument> elements for the bean must also specify the index.
- *
- * The value and ref attributes are convenience shortcuts to make the <argument> tag easier to code. A fuller set of injected values and types can be specified using
- * one of the "value" type elements.
- *
- * <p>
- * Java class for Targument complex type.
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Targument">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
- * </sequence>
- * <attribute name="index" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
- * <attribute name="type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
- * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Targument
-{
- protected String description;
- protected TService service;
- protected TRefCollection refList;
- protected TRefCollection refSet;
- protected TBean bean;
- protected TReference reference;
- protected TRef refFIXME;
- protected List<Object> any;
- protected TRef idref;
- protected Tvalue value;
- protected Tcollection list;
- protected Tcollection set;
- protected Tmap map;
- protected Tcollection array;
- protected Tprops props;
- protected Tnull _null;
- protected BigInteger index;
- protected String type;
- protected String ref;
- protected String valueFIXME;
-
- /**
- * Gets the value of the description property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Sets the value of the description property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setDescription(String value)
- {
- this.description = value;
- }
-
- /**
- * Gets the value of the service property.
- *
- * @return possible object is {@link TService }
- *
- */
- public TService getService()
- {
- return service;
- }
-
- /**
- * Sets the value of the service property.
- *
- * @param value allowed object is {@link TService }
- *
- */
- public void setService(TService value)
- {
- this.service = value;
- }
-
- /**
- * Gets the value of the refList property.
- *
- * @return possible object is {@link TRefCollection }
- *
- */
- public TRefCollection getRefList()
- {
- return refList;
- }
-
- /**
- * Sets the value of the refList property.
- *
- * @param value allowed object is {@link TRefCollection }
- *
- */
- public void setRefList(TRefCollection value)
- {
- this.refList = value;
- }
-
- /**
- * Gets the value of the refSet property.
- *
- * @return possible object is {@link TRefCollection }
- *
- */
- public TRefCollection getRefSet()
- {
- return refSet;
- }
-
- /**
- * Sets the value of the refSet property.
- *
- * @param value allowed object is {@link TRefCollection }
- *
- */
- public void setRefSet(TRefCollection value)
- {
- this.refSet = value;
- }
-
- /**
- * Gets the value of the bean property.
- *
- * @return possible object is {@link TBean }
- *
- */
- public TBean getBean()
- {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value allowed object is {@link TBean }
- *
- */
- public void setBean(TBean value)
- {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return possible object is {@link TReference }
- *
- */
- public TReference getReference()
- {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value allowed object is {@link TReference }
- *
- */
- public void setReference(TReference value)
- {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return possible object is {@link TRef }
- *
- */
- public TRef getRefFIXME()
- {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value allowed object is {@link TRef }
- *
- */
- public void setRefFIXME(TRef value)
- {
- this.refFIXME = value;
- }
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
- * JAXB object. This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- *
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list {@link Object }
- *
- *
- */
- public List<Object> getAny()
- {
- if (any == null)
- {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets the value of the idref property.
- *
- * @return possible object is {@link TRef }
- *
- */
- public TRef getIdref()
- {
- return idref;
- }
-
- /**
- * Sets the value of the idref property.
- *
- * @param value allowed object is {@link TRef }
- *
- */
- public void setIdref(TRef value)
- {
- this.idref = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return possible object is {@link Tvalue }
- *
- */
- public Tvalue getValue()
- {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value allowed object is {@link Tvalue }
- *
- */
- public void setValue(Tvalue value)
- {
- this.value = value;
- }
-
- /**
- * Gets the value of the list property.
- *
- * @return possible object is {@link Tcollection }
- *
- */
- public Tcollection getList()
- {
- return list;
- }
-
- /**
- * Sets the value of the list property.
- *
- * @param value allowed object is {@link Tcollection }
- *
- */
- public void setList(Tcollection value)
- {
- this.list = value;
- }
-
- /**
- * Gets the value of the set property.
- *
- * @return possible object is {@link Tcollection }
- *
- */
- public Tcollection getSet()
- {
- return set;
- }
-
- /**
- * Sets the value of the set property.
- *
- * @param value allowed object is {@link Tcollection }
- *
- */
- public void setSet(Tcollection value)
- {
- this.set = value;
- }
-
- /**
- * Gets the value of the map property.
- *
- * @return possible object is {@link Tmap }
- *
- */
- public Tmap getMap()
- {
- return map;
- }
-
- /**
- * Sets the value of the map property.
- *
- * @param value allowed object is {@link Tmap }
- *
- */
- public void setMap(Tmap value)
- {
- this.map = value;
- }
-
- /**
- * Gets the value of the array property.
- *
- * @return possible object is {@link Tcollection }
- *
- */
- public Tcollection getArray()
- {
- return array;
- }
-
- /**
- * Sets the value of the array property.
- *
- * @param value allowed object is {@link Tcollection }
- *
- */
- public void setArray(Tcollection value)
- {
- this.array = value;
- }
-
- /**
- * Gets the value of the props property.
- *
- * @return possible object is {@link Tprops }
- *
- */
- public Tprops getProps()
- {
- return props;
- }
-
- /**
- * Sets the value of the props property.
- *
- * @param value allowed object is {@link Tprops }
- *
- */
- public void setProps(Tprops value)
- {
- this.props = value;
- }
-
- /**
- * Gets the value of the null property.
- *
- * @return possible object is {@link Tnull }
- *
- */
- public Tnull getNull()
- {
- return _null;
- }
-
- /**
- * Sets the value of the null property.
- *
- * @param value allowed object is {@link Tnull }
- *
- */
- public void setNull(Tnull value)
- {
- this._null = value;
- }
-
- /**
- * Gets the value of the index property.
- *
- * @return possible object is {@link BigInteger }
- *
- */
- public BigInteger getIndex()
- {
- return index;
- }
-
- /**
- * Sets the value of the index property.
- *
- * @param value allowed object is {@link BigInteger }
- *
- */
- public void setIndex(BigInteger value)
- {
- this.index = value;
- }
-
- /**
- * Gets the value of the type property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getType()
- {
- return type;
- }
-
- /**
- * Sets the value of the type property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setType(String value)
- {
- this.type = value;
- }
-
- /**
- * Gets the value of the ref property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getRef()
- {
- return ref;
- }
-
- /**
- * Sets the value of the ref property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setRef(String value)
- {
- this.ref = value;
- }
-
- /**
- * Gets the value of the valueFIXME property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getValueFIXME()
- {
- return valueFIXME;
- }
-
- /**
- * Sets the value of the valueFIXME property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setValueFIXME(String value)
- {
- this.valueFIXME = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java 2009-06-19 16:15:53 UTC (rev 90476)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -1,550 +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.osgi.blueprint.parser.xb;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-
-/**
- *
- *
- * A property that will be injected into a created <bean>
- * component. The <property> elements correspond to named
- * JavaBean setting methods for a created bean object.
- *
- * The value and ref attributes are convenience shortcuts to make
- * the <argument> tag easier to code. A fuller set of injected
- * values and types can be specified using one of the "value"
- * type elements.
- *
- *
- *
- * <p>Java class for Tproperty complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tproperty">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
- * </sequence>
- * <attribute name="name" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tproperty {
-
- protected String description;
- protected TService service;
- protected TRefCollection refList;
- protected TRefCollection refSet;
- protected TBean bean;
- protected TReference reference;
- protected TRef refFIXME;
- protected List<Object> any;
- protected TRef idref;
- protected Tvalue value;
- protected Tcollection list;
- protected Tcollection set;
- protected Tmap map;
- protected Tcollection array;
- protected Tprops props;
- protected Tnull _null;
- protected String name;
- protected String ref;
- protected String valueFIXME;
-
- /**
- * Gets the value of the description property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the value of the description property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDescription(String value) {
- this.description = value;
- }
-
- /**
- * Gets the value of the service property.
- *
- * @return
- * possible object is
- * {@link TService }
- *
- */
- public TService getService() {
- return service;
- }
-
- /**
- * Sets the value of the service property.
- *
- * @param value
- * allowed object is
- * {@link TService }
- *
- */
- public void setService(TService value) {
- this.service = value;
- }
-
- /**
- * Gets the value of the refList property.
- *
- * @return
- * possible object is
- * {@link TRefCollection }
- *
- */
- public TRefCollection getRefList() {
- return refList;
- }
-
- /**
- * Sets the value of the refList property.
- *
- * @param value
- * allowed object is
- * {@link TRefCollection }
- *
- */
- public void setRefList(TRefCollection value) {
- this.refList = value;
- }
-
- /**
- * Gets the value of the refSet property.
- *
- * @return
- * possible object is
- * {@link TRefCollection }
- *
- */
- public TRefCollection getRefSet() {
- return refSet;
- }
-
- /**
- * Sets the value of the refSet property.
- *
- * @param value
- * allowed object is
- * {@link TRefCollection }
- *
- */
- public void setRefSet(TRefCollection value) {
- this.refSet = value;
- }
-
- /**
- * Gets the value of the bean property.
- *
- * @return
- * possible object is
- * {@link TBean }
- *
- */
- public TBean getBean() {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value
- * allowed object is
- * {@link TBean }
- *
- */
- public void setBean(TBean value) {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return
- * possible object is
- * {@link TReference }
- *
- */
- public TReference getReference() {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value
- * allowed object is
- * {@link TReference }
- *
- */
- public void setReference(TReference value) {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return
- * possible object is
- * {@link TRef }
- *
- */
- public TRef getRefFIXME() {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value
- * allowed object is
- * {@link TRef }
- *
- */
- public void setRefFIXME(TRef value) {
- this.refFIXME = value;
- }
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets the value of the idref property.
- *
- * @return
- * possible object is
- * {@link TRef }
- *
- */
- public TRef getIdref() {
- return idref;
- }
-
- /**
- * Sets the value of the idref property.
- *
- * @param value
- * allowed object is
- * {@link TRef }
- *
- */
- public void setIdref(TRef value) {
- this.idref = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link Tvalue }
- *
- */
- public Tvalue getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link Tvalue }
- *
- */
- public void setValue(Tvalue value) {
- this.value = value;
- }
-
- /**
- * Gets the value of the list property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getList() {
- return list;
- }
-
- /**
- * Sets the value of the list property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setList(Tcollection value) {
- this.list = value;
- }
-
- /**
- * Gets the value of the set property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getSet() {
- return set;
- }
-
- /**
- * Sets the value of the set property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setSet(Tcollection value) {
- this.set = value;
- }
-
- /**
- * Gets the value of the map property.
- *
- * @return
- * possible object is
- * {@link Tmap }
- *
- */
- public Tmap getMap() {
- return map;
- }
-
- /**
- * Sets the value of the map property.
- *
- * @param value
- * allowed object is
- * {@link Tmap }
- *
- */
- public void setMap(Tmap value) {
- this.map = value;
- }
-
- /**
- * Gets the value of the array property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getArray() {
- return array;
- }
-
- /**
- * Sets the value of the array property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setArray(Tcollection value) {
- this.array = value;
- }
-
- /**
- * Gets the value of the props property.
- *
- * @return
- * possible object is
- * {@link Tprops }
- *
- */
- public Tprops getProps() {
- return props;
- }
-
- /**
- * Sets the value of the props property.
- *
- * @param value
- * allowed object is
- * {@link Tprops }
- *
- */
- public void setProps(Tprops value) {
- this.props = value;
- }
-
- /**
- * Gets the value of the null property.
- *
- * @return
- * possible object is
- * {@link Tnull }
- *
- */
- public Tnull getNull() {
- return _null;
- }
-
- /**
- * Sets the value of the null property.
- *
- * @param value
- * allowed object is
- * {@link Tnull }
- *
- */
- public void setNull(Tnull value) {
- this._null = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the ref property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getRef() {
- return ref;
- }
-
- /**
- * Sets the value of the ref property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setRef(String value) {
- this.ref = value;
- }
-
- /**
- * Gets the value of the valueFIXME property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValueFIXME() {
- return valueFIXME;
- }
-
- /**
- * Sets the value of the valueFIXME property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValueFIXME(String value) {
- this.valueFIXME = value;
- }
-
-}
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java 2009-06-19 16:15:53 UTC (rev 90476)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -23,10 +23,13 @@
// $Id$
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import org.jboss.osgi.blueprint.BlueprintContext;
import org.jboss.osgi.blueprint.parser.xb.TBean;
+import org.jboss.osgi.blueprint.parser.xb.TProperty;
import org.jboss.osgi.spi.NotImplementedException;
import org.osgi.service.blueprint.reflect.BeanArgument;
import org.osgi.service.blueprint.reflect.BeanMetadata;
@@ -44,7 +47,8 @@
{
private ComponentMetadata parent;
private TBean tBean;
-
+ private List<BeanProperty> properties;
+
public BeanMetadataImpl(BlueprintContext context, BlueprintMetadata blueprint, TBean tBean)
{
this(context, blueprint, null, tBean);
@@ -62,7 +66,7 @@
String key = super.getId();
if (key == null && parent != null)
key = parent.getId() + "#anonymousBean";
-
+
return key;
}
@@ -98,7 +102,15 @@
public List<BeanProperty> getProperties()
{
- throw new NotImplementedException();
+ if (properties == null)
+ {
+ properties = new ArrayList<BeanProperty>();
+ for (TProperty prop : tBean.getProperties())
+ {
+ properties.add(new BeanPropertyImpl(context, blueprint, prop));
+ }
+ }
+ return Collections.unmodifiableList(properties);
}
public Class<?> getRuntimeClass()
Added: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java 2009-06-19 19:29:55 UTC (rev 90477)
@@ -0,0 +1,69 @@
+/*
+ * 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.osgi.blueprint.reflect;
+
+// $Id$
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+import org.jboss.osgi.blueprint.parser.xb.TProperty;
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.Metadata;
+
+/**
+ * Metadata describing a property to be injected.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 13-May-2009
+ */
+public class BeanPropertyImpl extends MetadataImpl implements BeanProperty
+{
+ private TProperty tProperty;
+ private Metadata value;
+
+ public BeanPropertyImpl(BlueprintContext context, BlueprintMetadata blueprint, TProperty tProperty)
+ {
+ super(context, blueprint);
+ this.tProperty = tProperty;
+ }
+
+ public String getName()
+ {
+ return tProperty.getName();
+ }
+
+ public Metadata getValue()
+ {
+ if (value == null)
+ {
+ String ref = tProperty.getRef();
+ if (ref != null)
+ {
+ value = blueprint.getComponent(ref);
+ }
+ }
+
+ //if (value == null)
+ // throw new IllegalStateException("Cannot obtain value for property: " + getName());
+
+ return value;
+ }
+}
Property changes on: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanPropertyImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd 2009-06-19 16:15:53 UTC (rev 90476)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd 2009-06-19 19:29:55 UTC (rev 90477)
@@ -281,10 +281,21 @@
<xsd:sequence>
<xsd:element name="description" type="Tdescription" minOccurs="0" />
<xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="argument" type="Targument" />
- <xsd:element name="property" type="Tproperty" />
- <xsd:any namespace="##other" processContents="strict" minOccurs="0"
- maxOccurs="unbounded" />
+ <xsd:element name="argument" type="Targument" >
+ <xsd:annotation>
+ <xsd:appinfo>
+ <jbxb:property name="arguments"/>
+ </xsd:appinfo>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property" type="Tproperty" >
+ <xsd:annotation>
+ <xsd:appinfo>
+ <jbxb:property name="properties"/>
+ </xsd:appinfo>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded" />
</xsd:choice>
</xsd:sequence>
</xsd:group>
@@ -356,6 +367,9 @@
<xsd:complexType name="Targument">
<xsd:annotation>
+ <xsd:appinfo>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TArgument"></jbxb:class>
+ </xsd:appinfo>
<xsd:documentation>
<![CDATA[
An argument used to create an object defined by a <bean>
@@ -387,6 +401,9 @@
<xsd:complexType name="Tproperty">
<xsd:annotation>
+ <xsd:appinfo>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TProperty"></jbxb:class>
+ </xsd:appinfo>
<xsd:documentation>
<![CDATA[
A property that will be injected into a created <bean>
15 years
JBoss-OSGI SVN: r90476 - projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-19 12:15:53 -0400 (Fri, 19 Jun 2009)
New Revision: 90476
Modified:
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/log4j.xml
Log:
Enable line numbers
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/log4j.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/log4j.xml 2009-06-19 16:15:26 UTC (rev 90475)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/log4j.xml 2009-06-19 16:15:53 UTC (rev 90476)
@@ -12,7 +12,7 @@
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ <param name="ConversionPattern" value="%d %-5p [%c:%L] %m%n"/>
</layout>
</appender>
15 years
JBoss-OSGI SVN: r90475 - in projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint: parser/xb and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-06-19 12:15:26 -0400 (Fri, 19 Jun 2009)
New Revision: 90475
Modified:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java
Log:
More work on JAXB annotated parsing
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java 2009-06-19 15:51:59 UTC (rev 90474)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java 2009-06-19 16:15:26 UTC (rev 90475)
@@ -30,7 +30,6 @@
import org.jboss.osgi.blueprint.BlueprintContext;
import org.jboss.osgi.blueprint.BlueprintException;
import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.util.xml.JBossEntityResolver;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -50,7 +49,6 @@
public SchemaResolverParser(BlueprintContext context)
{
- JBossEntityResolver.registerEntity(XMLNS_BLUEPRINT, "blueprint.xsd");
resolver = new BlueprintSchemaResolver(context);
}
@@ -93,7 +91,8 @@
try
{
- addClassBinding(BlueprintContext.XMLNS_BLUEPRINT, TBlueprint.class.getName());
+ addSchemaLocation(XMLNS_BLUEPRINT, "blueprint.xsd");
+ addClassBinding(BlueprintContext.XMLNS_BLUEPRINT, TBlueprint.class);
}
catch (RuntimeException rte)
{
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java 2009-06-19 15:51:59 UTC (rev 90474)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java 2009-06-19 16:15:26 UTC (rev 90475)
@@ -29,8 +29,12 @@
import java.util.Map;
import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
+import org.jboss.osgi.blueprint.BlueprintContext;
/**
* The type defintion for a <bean> component.
@@ -38,6 +42,7 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
+@XmlType(name = "Tbean", namespace = BlueprintContext.XMLNS_BLUEPRINT)
public class TBean extends TComponent
{
protected String description;
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java 2009-06-19 15:51:59 UTC (rev 90474)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java 2009-06-19 16:15:26 UTC (rev 90475)
@@ -33,11 +33,14 @@
import java.util.Map;
import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
+import org.jboss.osgi.blueprint.BlueprintContext;
import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.xb.annotations.JBossXmlSchema;
import org.osgi.service.blueprint.container.NoSuchComponentException;
@@ -56,13 +59,17 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-@JBossXmlSchema(namespace="urn:jboss:policy:1.0", elementFormDefault= XmlNsForm.QUALIFIED)
+(a)JBossXmlSchema(namespace=BlueprintContext.XMLNS_BLUEPRINT, elementFormDefault= XmlNsForm.QUALIFIED)
@XmlRootElement(name="blueprint")
@XmlType(name="Tblueprint")
public class TBlueprint
{
protected String description;
protected TTypeConverters typeConverters;
+ @XmlElements({
+ @XmlElement(name="bean", type=TBean.class),
+ @XmlElement(name="service", type=TService.class),
+ @XmlElement(name="reference", type=TReference.class)})
protected List<TComponent> components;
protected Boolean defaultLazyInit;
protected String defaultInitMethod;
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java 2009-06-19 15:51:59 UTC (rev 90474)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java 2009-06-19 16:15:26 UTC (rev 90475)
@@ -25,7 +25,11 @@
import java.math.BigInteger;
+import javax.xml.bind.annotation.XmlType;
+import org.jboss.osgi.blueprint.BlueprintContext;
+
+
/**
*
*
@@ -54,6 +58,7 @@
*
*
*/
+@XmlType(name = "Treference", namespace = BlueprintContext.XMLNS_BLUEPRINT)
public class TReference extends TServiceReference
{
protected BigInteger timeout;
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java 2009-06-19 15:51:59 UTC (rev 90474)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java 2009-06-19 16:15:26 UTC (rev 90475)
@@ -29,15 +29,19 @@
import java.util.List;
import java.util.Map;
+import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
+import org.jboss.osgi.blueprint.BlueprintContext;
+
/**
* Tservice is the type for services exported by this blueprint bundle. Services are sourced by either a <ref> to a <bean> component or an <inline> bean component.
*
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
+@XmlType(name = "Tservice", namespace = BlueprintContext.XMLNS_BLUEPRINT)
public class TService extends TComponent
{
protected String description;
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java 2009-06-19 15:51:59 UTC (rev 90474)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java 2009-06-19 16:15:26 UTC (rev 90475)
@@ -49,16 +49,14 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class BlueprintMetadata
+public class BlueprintMetadata extends MetadataImpl
{
- private BlueprintContext context;
-
private TBlueprint tBlueprint;
private Map<String, ComponentMetadata> components = new LinkedHashMap<String, ComponentMetadata>();
public BlueprintMetadata(BlueprintContext context, TBlueprint tBlueprint)
{
- this.context = context;
+ super(context, null);
this.tBlueprint = tBlueprint;
}
15 years