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&q... />
+ * <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&a...
/>
+ * </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&a...
/>
+ * </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&q... />
- * <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&a...
/>
- * </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>