[jboss-cvs] JBossAS SVN: r91294 - in projects/jboss-osgi/trunk/reactor: bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jul 15 09:41:29 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-07-15 09:41:27 -0400 (Wed, 15 Jul 2009)
New Revision: 91294
Added:
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GTargetComponent.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GValue.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TActivation.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TInterfaces.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceList.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceProperties.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceUse.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java
Removed:
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaBindingParser.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-cm.xsd
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
Modified:
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint.xsd
projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/log4j.xml
projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml
projects/jboss-osgi/trunk/reactor/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixLogger.java
Log:
BP parsing now JBossXB annotation based
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -51,8 +51,7 @@
this.log = context.getLog();
this.context = context;
- //this.parser = new SchemaResolverParser(context);
- this.parser = new SchemaBindingParser(context);
+ this.parser = new SchemaResolverParser(context);
}
@SuppressWarnings("unchecked")
Deleted: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaBindingParser.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaBindingParser.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaBindingParser.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -1,110 +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;
-
-//$Id$
-
-import java.net.URL;
-
-import org.apache.xerces.dom.DOMXSImplementationSourceImpl;
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.BlueprintException;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
-
-/**
- * The SchemaBindingParser builds a JBossXB {@link SchemaBinding} from an annotated blueprint.xsd
- *
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class SchemaBindingParser implements JBossXBParser
-{
- private SchemaBinding schemaBinding;
-
- public SchemaBindingParser(BlueprintContext context)
- {
- // https://jira.jboss.org/jira/browse/JBXB-202
- // Inconsistent initialization of XSImplementation
- //
- // Please provide an JBossXB initialization entry point that is public and does not make an assumption on the availability of the TCCL
- //
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- ClassLoader bundleCL = getClass().getClassLoader();
- Thread.currentThread().setContextClassLoader(bundleCL);
-
- // Make sure we import and can load the XSImplementation
- // This is the code that is used in JBossXB Util.getXSImplementation()
- bundleCL.loadClass(DOMXSImplementationSourceImpl.class.getName());
-
- ClassLoader resourceLoader = getClass().getClassLoader();
- URL schemaXSD = resourceLoader.getResource("schema/blueprint-jbxb.xsd");
- if (schemaXSD == null)
- throw new BlueprintException("Cannot get blueprint schema from: " + resourceLoader);
-
- schemaBinding = XsdBinder.bind(schemaXSD.toExternalForm());
- }
- catch (ClassNotFoundException ex)
- {
- throw new IllegalStateException("Cannot load: " + DOMXSImplementationSourceImpl.class.getName());
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
-
- /*
- * Parse a blueprint descriptor
- */
- public TBlueprint parse(URL xmlURL)
- {
- if (xmlURL == null)
- throw new IllegalArgumentException("Cannot parse null descriptor URL");
-
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- ClassLoader bundleCL = getClass().getClassLoader();
- Thread.currentThread().setContextClassLoader(bundleCL);
-
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- TBlueprint tBlueprint = (TBlueprint)unmarshaller.unmarshal(xmlURL.toExternalForm(), schemaBinding);
-
- return tBlueprint;
- }
- catch (JBossXBException ex)
- {
- throw new BlueprintException("Cannot parse blueprint descriptor: " + xmlURL, ex);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
-}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GTargetComponent.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GTargetComponent.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GTargetComponent.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -0,0 +1,86 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+import org.jboss.xb.annotations.JBossXmlConstants;
+import org.jboss.xb.annotations.JBossXmlModelGroup;
+
+/**
+ */
+ at XmlType(name = "GtargetComponent", namespace = BlueprintContext.XMLNS_BLUEPRINT)
+ at JBossXmlModelGroup(kind = JBossXmlConstants.MODEL_GROUP_CHOICE)
+public class GTargetComponent
+{
+ protected TBean bean;
+ protected TReference reference;
+ protected List<Object> any;
+ protected String ref;
+
+ public TBean getBean()
+ {
+ return bean;
+ }
+
+ public void setBean(TBean value)
+ {
+ this.bean = value;
+ }
+
+ public TReference getReference()
+ {
+ return reference;
+ }
+
+ public void setReference(TReference value)
+ {
+ this.reference = value;
+ }
+
+ public List<Object> getAny()
+ {
+ if (any == null)
+ {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ @XmlAttribute
+ public String getRef()
+ {
+ return ref;
+ }
+
+ public void setRef(String value)
+ {
+ this.ref = value;
+ }
+}
Property changes on: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GTargetComponent.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GValue.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GValue.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GValue.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -0,0 +1,441 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+
+/**
+ */
+ at XmlType(name = "Tproperty", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description" })
+public class GValue
+{
+ protected String description;
+ protected TService service;
+ protected TReferenceList refList;
+ protected TReferenceList 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;
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String value)
+ {
+ this.description = value;
+ }
+
+ public TService getService()
+ {
+ return service;
+ }
+
+ public void setService(TService value)
+ {
+ this.service = value;
+ }
+
+ public TReferenceList getRefList()
+ {
+ return refList;
+ }
+
+ public void setRefList(TReferenceList value)
+ {
+ this.refList = value;
+ }
+
+ public TReferenceList getRefSet()
+ {
+ return refSet;
+ }
+
+ /**
+ * Sets the value of the refSet property.
+ *
+ * @param value allowed object is {@link TReferenceList }
+ *
+ */
+ public void setRefSet(TReferenceList 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;
+ }
+
+}
Property changes on: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/GValue.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TActivation.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TActivation.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TActivation.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -0,0 +1,62 @@
+/*
+ * 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;
+
+/**
+ * Tactivation defines the activation type for components. This is used in this
+ * schema by the <blueprint> default-activation attribute and the
+ * activation attribute.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Jul-2009
+ */
+public enum TActivation
+{
+ // [JBXB-209] Enum parsing requires value equal to type name
+ // https://jira.jboss.org/jira/browse/JBXB-209
+ eager("eager"),
+ lazy("lazy");
+
+ private final String value;
+
+ TActivation(String v)
+ {
+ value = v;
+ }
+
+ public String value()
+ {
+ return value;
+ }
+
+ public static TActivation fromValue(String v)
+ {
+ for (TActivation c : TActivation.values())
+ {
+ if (c.value.equals(v))
+ {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TActivation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TArgument.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -72,8 +72,8 @@
{
protected String description;
protected TService service;
- protected TRefCollection refList;
- protected TRefCollection refSet;
+ protected TReferenceList refList;
+ protected TReferenceList refSet;
protected TBean bean;
protected TReference reference;
protected TRef refFIXME;
@@ -138,10 +138,10 @@
/**
* Gets the value of the refList property.
*
- * @return possible object is {@link TRefCollection }
+ * @return possible object is {@link TReferenceList }
*
*/
- public TRefCollection getRefList()
+ public TReferenceList getRefList()
{
return refList;
}
@@ -149,10 +149,10 @@
/**
* Sets the value of the refList property.
*
- * @param value allowed object is {@link TRefCollection }
+ * @param value allowed object is {@link TReferenceList }
*
*/
- public void setRefList(TRefCollection value)
+ public void setRefList(TReferenceList value)
{
this.refList = value;
}
@@ -160,10 +160,10 @@
/**
* Gets the value of the refSet property.
*
- * @return possible object is {@link TRefCollection }
+ * @return possible object is {@link TReferenceList }
*
*/
- public TRefCollection getRefSet()
+ public TReferenceList getRefSet()
{
return refSet;
}
@@ -171,10 +171,10 @@
/**
* Sets the value of the refSet property.
*
- * @param value allowed object is {@link TRefCollection }
+ * @param value allowed object is {@link TReferenceList }
*
*/
- public void setRefSet(TRefCollection value)
+ public void setRefSet(TReferenceList value)
{
this.refSet = value;
}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -50,9 +50,8 @@
protected String initMethod;
protected String destroyMethod;
protected String factoryMethod;
- protected String factoryComponent;
+ protected String factoryRef;
protected String scope;
- protected Boolean lazyInit;
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
public String getDescription()
@@ -129,12 +128,12 @@
public String getFactoryComponentId()
{
- return factoryComponent;
+ return factoryRef;
}
public void setFactoryComponentId(String value)
{
- this.factoryComponent = value;
+ this.factoryRef = value;
}
public String getScope()
@@ -147,16 +146,6 @@
this.scope = value;
}
- public boolean isLazyInit()
- {
- return lazyInit;
- }
-
- public void setLazyInit(boolean value)
- {
- this.lazyInit = value;
- }
-
public Map<QName, String> getOtherAttributes()
{
return otherAttributes;
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -25,7 +25,6 @@
import java.math.BigInteger;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashSet;
@@ -59,15 +58,14 @@
*/
@JBossXmlSchema(namespace = BlueprintContext.XMLNS_BLUEPRINT, elementFormDefault = XmlNsForm.QUALIFIED)
@XmlRootElement(name = "blueprint", namespace = BlueprintContext.XMLNS_BLUEPRINT)
- at XmlType(name = "Tblueprint", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description", "typeConverters", "components" })
+ at XmlType(name = "Tblueprint", namespace = BlueprintContext.XMLNS_BLUEPRINT,
+ propOrder = { "description", "typeConverters", "components" })
public class TBlueprint
{
protected String description;
protected TTypeConverters typeConverters;
protected List<TComponent> components;
- protected Boolean defaultLazyInit;
- protected String defaultInitMethod;
- protected String defaultDestroyMethod;
+ protected TActivation defaultActivation;
protected BigInteger defaultTimeout;
protected TAvailability defaultAvailability;
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
@@ -93,8 +91,9 @@
}
@XmlElements( {
- @XmlElement(name = "bean", namespace = BlueprintContext.XMLNS_BLUEPRINT, type = TBean.class),
@XmlElement(name = "service", namespace = BlueprintContext.XMLNS_BLUEPRINT, type = TService.class),
+ @XmlElement(name = "reference-list", namespace = BlueprintContext.XMLNS_BLUEPRINT, type = TReferenceList.class),
+ @XmlElement(name = "bean", namespace = BlueprintContext.XMLNS_BLUEPRINT, type = TBean.class),
@XmlElement(name = "reference", namespace = BlueprintContext.XMLNS_BLUEPRINT, type = TReference.class) })
public List<TComponent> getComponents()
{
@@ -115,7 +114,7 @@
}
@SuppressWarnings("unchecked")
- public <T extends TComponent> Collection<T> getMetadata(Class<T> type)
+ public <T extends TComponent> List<T> getMetadata(Class<T> type)
{
List<T> compMetadata = new ArrayList<T>();
for (TComponent comp : getComponents())
@@ -148,39 +147,17 @@
}
@XmlAttribute
- public Boolean getDefaultLazyInit()
+ public TActivation getDefaultActivation()
{
- return defaultLazyInit;
+ return defaultActivation;
}
- public void setDefaultLazyInit(Boolean value)
+ public void setDefaultActivation(TActivation value)
{
- this.defaultLazyInit = value;
+ this.defaultActivation = value;
}
@XmlAttribute
- public String getDefaultInitMethod()
- {
- return defaultInitMethod;
- }
-
- public void setDefaultInitMethod(String value)
- {
- this.defaultInitMethod = value;
- }
-
- @XmlAttribute
- public String getDefaultDestroyMethod()
- {
- return defaultDestroyMethod;
- }
-
- public void setDefaultDestroyMethod(String value)
- {
- this.defaultDestroyMethod = value;
- }
-
- @XmlAttribute
public BigInteger getDefaultTimeout()
{
if (defaultTimeout == null)
Added: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TInterfaces.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TInterfaces.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TInterfaces.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -0,0 +1,55 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+
+/**
+ */
+ at XmlType(name = "Tinterfaces", namespace = BlueprintContext.XMLNS_BLUEPRINT)
+public class TInterfaces
+{
+ protected List<String> values;
+
+ @XmlElement(name="value")
+ public List<String> getValues()
+ {
+ if (values == null)
+ values = new ArrayList<String>();
+
+ return values;
+ }
+
+ public void setValues(List<String> interfaceName)
+ {
+ this.values = interfaceName;
+ }
+
+}
Property changes on: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TInterfaces.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TProperty.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -23,493 +23,61 @@
// $Id$
-import java.util.ArrayList;
-import java.util.List;
-
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import org.jboss.osgi.blueprint.BlueprintContext;
/**
- *
- *
- * 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>
- *
- *
*/
@XmlType(name = "Tproperty", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description" })
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 value;
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 }
- *
- */
+ @XmlAttribute
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 }
- *
- */
+ @XmlAttribute
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()
+ @XmlAttribute
+ public String getValue()
{
- return valueFIXME;
+ return value;
}
- /**
- * Sets the value of the valueFIXME property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setValueFIXME(String value)
+ public void setValue(String value)
{
- this.valueFIXME = value;
+ this.value = value;
}
-
}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -29,44 +29,26 @@
//$Id$
/**
+ * Tref is the type used for <ref> elements.
+ * This specifies a required component id for the reference component.
*
- *
- * Tref is the type used for <ref> elements. This specifies a required component id for the reference component.
- *
- *
- *
- * <p>
- * Java class for Tref complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tref">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="component" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
*/
@XmlType(name = "Tref", namespace = BlueprintContext.XMLNS_BLUEPRINT)
public class TRef
{
- protected String component;
+ protected String componentId;
@XmlAttribute
- public String getComponent()
+ public String getComponentId()
{
- return component;
+ return componentId;
}
- public void setComponent(String value)
+ public void setComponentId(String value)
{
- this.component = value;
+ this.componentId = value;
}
}
Deleted: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -1,166 +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$
-
-/**
- *
- *
- * The Tref-collection builds in the characteristics of the TserviceReference type to define characteristics of the <ref-set> and <ref-list> elements. This adds in the
- * characteristics that only apply to collections of references (e.g., sorting).
- *
- * <p>
- * Java class for Tref-collection complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tref-collection">
- * <complexContent>
- * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TserviceReference">
- * <sequence>
- * <element name="comparator" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tcomparator" minOccurs="0"/>
- * </sequence>
- * <attribute name="comparator-ref" type="{http://www.w3.org/2001/XMLSchema}token" />
- * <attribute name="member-type">
- * <simpleType>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="service-instance"/>
- * <enumeration value="service-reference"/>
- * </restriction>
- * </simpleType>
- * </attribute>
- * <attribute name="ordering-basis">
- * <simpleType>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="service"/>
- * <enumeration value="service-reference"/>
- * </restriction>
- * </simpleType>
- * </attribute>
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class TRefCollection extends TServiceReference
-{
- protected TComparator comparator;
- protected String comparatorRef;
- protected String memberType;
- protected String orderingBasis;
-
- /**
- * Gets the value of the comparator property.
- *
- * @return possible object is {@link TComparator }
- *
- */
- public TComparator getComparator()
- {
- return comparator;
- }
-
- /**
- * Sets the value of the comparator property.
- *
- * @param value allowed object is {@link TComparator }
- *
- */
- public void setComparator(TComparator value)
- {
- this.comparator = value;
- }
-
- /**
- * Gets the value of the comparatorRef property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getComparatorRef()
- {
- return comparatorRef;
- }
-
- /**
- * Sets the value of the comparatorRef property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setComparatorRef(String value)
- {
- this.comparatorRef = value;
- }
-
- /**
- * Gets the value of the memberType property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getMemberType()
- {
- return memberType;
- }
-
- /**
- * Sets the value of the memberType property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setMemberType(String value)
- {
- this.memberType = value;
- }
-
- /**
- * Gets the value of the orderingBasis property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getOrderingBasis()
- {
- return orderingBasis;
- }
-
- /**
- * Sets the value of the orderingBasis property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setOrderingBasis(String value)
- {
- this.orderingBasis = value;
- }
-
-}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -29,59 +29,26 @@
import org.jboss.osgi.blueprint.BlueprintContext;
-
/**
+ * The Treference type defines the <reference> element. These are instances of the TserviceReference type, with the addition of a timeout attribute. If the timeout is
+ * not specified, the default-timeout value is inherited from the encapsulating <blueprint> definition.
*
- *
- * The Treference type defines the <reference> element. These
- * are instances of the TserviceReference type, with the addition
- * of a timeout attribute. If the timeout is not specified,
- * the default-timeout value is inherited from the encapsulating
- * <blueprint> definition.
- *
- *
- *
- * <p>Java class for Treference complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Treference">
- * <complexContent>
- * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TserviceReference">
- * <attribute name="timeout" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Ttimeout" />
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
*/
// [JBXB-210] Property order cannot be defined on super type
// https://jira.jboss.org/jira/browse/JBXB-210
- at XmlType(name = "Treference", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description" })
+ at XmlType(name = "Treference", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description", "referenceListeners" })
public class TReference extends TServiceReference
{
protected BigInteger timeout;
- /*
- * Gets the value of the timeout property.
- * @return possible object is {@link BigInteger }
- */
public long getTimeout()
{
return timeout.longValue();
}
- /*
- * Sets the value of the timeout property.
- * @param value allowed object is {@link BigInteger }
- */
public void setTimeout(BigInteger value)
{
this.timeout = value;
}
-
}
Copied: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceList.java (from rev 91237, projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceList.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceList.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -0,0 +1,52 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+
+//$Id$
+
+/**
+ * The Treference-list builds in the characteristics of the TserviceReference type to define characteristics of the <reference-list>.
+ *
+ * This adds in the characteristics that only apply to collections of references (e.g., member-type).
+ */
+
+//[JBXB-210] Property order cannot be defined on super type
+//https://jira.jboss.org/jira/browse/JBXB-210
+ at XmlType(name = "Treference-list", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description" })
+public class TReferenceList extends TServiceReference
+{
+ protected TServiceUse memberType;
+
+ public TServiceUse getMemberType()
+ {
+ return memberType;
+ }
+
+ public void setMemberType(TServiceUse value)
+ {
+ this.memberType = value;
+ }
+}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -23,205 +23,36 @@
//$Id$
-import java.util.ArrayList;
-import java.util.List;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import org.jboss.osgi.blueprint.BlueprintContext;
/**
- *
- *
- * TReferenceListener defines a reference listener that is attached to a <reference>, <ref-set>, or <ref-list> element. The listener object can be specified as a <ref>
- * or as an inline <bean> or <reference> component. Listener events are mapped to the indicated bind or unbind methods.
- *
- *
- *
- * <p>
- * Java class for TReferenceListener complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TReferenceListener">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}targetComponent"/>
- * <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}token" />
- * <attribute name="bind-method" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * <attribute name="unbind-method" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
*/
+ at XmlType(name = "TreferenceListener", namespace = BlueprintContext.XMLNS_BLUEPRINT)
public class TReferenceListener
{
- protected TBean bean;
- protected TReference reference;
- protected TRef refFIXME;
- protected List<Object> any;
- protected String ref;
protected String bindMethod;
protected String unbindMethod;
- /**
- * 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 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 bindMethod property.
- *
- * @return possible object is {@link String }
- *
- */
+ @XmlAttribute
public String getBindMethod()
{
return bindMethod;
}
- /**
- * Sets the value of the bindMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
public void setBindMethod(String value)
{
this.bindMethod = value;
}
- /**
- * Gets the value of the unbindMethod property.
- *
- * @return possible object is {@link String }
- *
- */
+ @XmlAttribute
public String getUnbindMethod()
{
return unbindMethod;
}
- /**
- * Sets the value of the unbindMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
public void setUnbindMethod(String value)
{
this.unbindMethod = value;
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -26,11 +26,11 @@
import java.util.ArrayList;
import java.util.List;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import org.jboss.osgi.blueprint.BlueprintContext;
-
/**
*
*
@@ -76,92 +76,58 @@
protected String registrationMethod;
protected String unregistrationMethod;
- /**
- * Gets the value of the bean property.
- *
- * @return possible object is {@link TBean }
- *
- */
+ @XmlAttribute(name = "registration-method")
+ public String getRegistrationMethod()
+ {
+ return registrationMethod;
+ }
+
+ public void setRegistrationMethod(String value)
+ {
+ this.registrationMethod = value;
+ }
+
+ @XmlAttribute(name = "unregistration-method")
+ public String getUnregistrationMethod()
+ {
+ return unregistrationMethod;
+ }
+
+ public void setUnregistrationMethod(String value)
+ {
+ this.unregistrationMethod = value;
+ }
+
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)
@@ -171,69 +137,14 @@
return this.any;
}
- /**
- * 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 registrationMethod property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getRegistrationMethod()
- {
- return registrationMethod;
- }
-
- /**
- * Sets the value of the registrationMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setRegistrationMethod(String value)
- {
- this.registrationMethod = value;
- }
-
- /**
- * Gets the value of the unregistrationMethod property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getUnregistrationMethod()
- {
- return unregistrationMethod;
- }
-
- /**
- * Sets the value of the unregistrationMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setUnregistrationMethod(String value)
- {
- this.unregistrationMethod = value;
- }
}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -24,32 +24,31 @@
// $Id$
import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
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 at jboss.com
* @since 13-May-2009
*/
- at XmlType(name = "Tservice", namespace = BlueprintContext.XMLNS_BLUEPRINT,
- propOrder = { "description", "interfaceNames", "serviceProperties", "registrationListeners", "bean", "ref" })
+ at XmlType(name = "Tservice", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description", "interfaces", "serviceProperties", "registrationListeners",
+ "bean", "ref" })
public class TService extends TComponent
{
protected String description;
- protected List<String> interfaceNames;
- protected List<TServicePropertyEntry> serviceProperties;
- protected Collection<TRegistrationListener> registrationListener;
+ protected TInterfaces interfaces;
+ protected TServiceProperties serviceProperties;
+ protected List<TRegistrationListener> registrationListener;
protected TBean bean;
protected List<Object> any;
protected String ref;
@@ -70,50 +69,52 @@
@XmlAttribute(name = "interface")
public String getInterface()
{
- List<String> interfaceNames = getInterfaceNames();
+ List<String> interfaceNames = getInterfaces().getValues();
return interfaceNames.size() > 0 ? interfaceNames.get(0) : null;
}
public void setInterface(String interf)
{
- getInterfaceNames().add(interf);
+ getInterfaces().getValues().add(interf);
}
- public List<String> getInterfaceNames()
+ @XmlElement(name = "interfaces")
+ public TInterfaces getInterfaces()
{
- if (interfaceNames == null)
- interfaceNames = new ArrayList<String>();
-
- return interfaceNames;
+ if (interfaces == null)
+ interfaces = new TInterfaces();
+
+ return interfaces;
}
- public void setInterfaceNames(List<String> interfaces)
+ public void setInterfaces(TInterfaces interfaces)
{
- this.interfaceNames = interfaces;
+ this.interfaces = interfaces;
}
- public List<TServicePropertyEntry> getServiceProperties()
+ public TServiceProperties getServiceProperties()
{
if (serviceProperties == null)
- serviceProperties = new ArrayList<TServicePropertyEntry>();
+ serviceProperties = new TServiceProperties();
return serviceProperties;
}
- public void setServiceProperties(List<TServicePropertyEntry> serviceProperties)
+ public void setServiceProperties(TServiceProperties serviceProperties)
{
this.serviceProperties = serviceProperties;
}
- public Collection<TRegistrationListener> getRegistrationListeners()
+ @XmlElement(name = "registration-listener")
+ public List<TRegistrationListener> getRegistrationListeners()
{
if (registrationListener == null)
registrationListener = new ArrayList<TRegistrationListener>();
-
+
return registrationListener;
}
- public void setRegistrationListeners(Collection<TRegistrationListener> registrationListener)
+ public void setRegistrationListeners(List<TRegistrationListener> registrationListener)
{
this.registrationListener = registrationListener;
}
@@ -128,15 +129,7 @@
this.bean = value;
}
- public List<Object> getAny()
- {
- if (any == null)
- {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
+ @XmlAttribute
public String getRef()
{
return ref;
@@ -151,7 +144,7 @@
{
if (autoExportMode == null)
autoExportMode = TAutoExportModes.DISABLED;
-
+
return autoExportMode;
}
@@ -174,4 +167,13 @@
{
return otherAttributes;
}
+
+ public List<Object> getAny()
+ {
+ if (any == null)
+ {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
}
Copied: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceProperties.java (from rev 91237, projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceProperties.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceProperties.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -0,0 +1,96 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+
+
+/**
+ *
+ *
+ * TserviceProperty is used for <service-properties> elements.
+ * The syntax is similar to what is defined for <map>, but keys must be
+ * string values and there are no type defaults that can be specified.
+ * created from the entry elements, which require a key/value pair.
+ *
+ *
+ *
+ * <p>Java class for TserviceProperties complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TserviceProperties">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="entry" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TservicePropertyEntry" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlType(name = "TserviceProperties", namespace = BlueprintContext.XMLNS_BLUEPRINT)
+public class TServiceProperties {
+
+ protected List<TServicePropertyEntry> entry;
+
+ /**
+ * Gets the value of the entry 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 entry property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getEntry().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link TServicePropertyEntry }
+ *
+ *
+ */
+ public List<TServicePropertyEntry> getEntry() {
+ if (entry == null) {
+ entry = new ArrayList<TServicePropertyEntry>();
+ }
+ return this.entry;
+ }
+
+}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -28,103 +28,45 @@
import java.util.List;
import java.util.Map;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.jboss.osgi.blueprint.BlueprintContext;
-
/**
* TserviceReference is the base element type used for <reference>, <ref-set>, and <ref-list> elements. This type defines all of the characteristics common to both
* sorts of references.
- *
- * <p>
- * Java class for TserviceReference complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TserviceReference">
- * <complexContent>
- * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tcomponent">
- * <sequence>
- * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
- * <element name="interfaces" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tinterfaces" minOccurs="0"/>
- * <element name="listener" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TReferenceListener" maxOccurs="unbounded" minOccurs="0"/>
- * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="interface" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
- * <attribute name="filter" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
- * <attribute name="component-name" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * <attribute name="availability" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tavailability" />
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
*/
- at XmlType(name = "TserviceReference", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description" })
+ at XmlType(name = "TserviceReference", namespace = BlueprintContext.XMLNS_BLUEPRINT, propOrder = { "description", "referenceListeners" })
public class TServiceReference extends TComponent
{
protected String description;
- protected List<String> interfaceNames;
protected List<TReferenceListener> listener;
protected List<Object> any;
protected String filter;
protected String componentName;
protected TAvailability availability;
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ private String interfaceName;
- /**
- * 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 interfaces property.
- *
- */
- public List<String> getInterfaceNames()
- {
- if (interfaceNames == null)
- interfaceNames = new ArrayList<String>();
-
- return interfaceNames;
- }
-
- public void setInterfaceNames(List<String> interfaces)
- {
- this.interfaceNames = interfaces;
- }
-
- /**
- * Gets the value of the listener property.
- */
+ @XmlElement(name = "reference-listener")
public List<TReferenceListener> getReferenceListeners()
{
if (listener == null)
listener = new ArrayList<TReferenceListener>();
-
+
return this.listener;
}
@@ -133,9 +75,6 @@
this.listener = listener;
}
- /**
- * Gets the value of the any property.
- */
public List<Object> getAny()
{
if (any == null)
@@ -145,80 +84,54 @@
return this.any;
}
- /**
- * Gets the value of the filter property.
- *
- * @return possible object is {@link String }
- *
- */
public String getFilter()
{
return filter;
}
- /**
- * Sets the value of the filter property.
- *
- * @param value allowed object is {@link String }
- *
- */
public void setFilter(String value)
{
this.filter = value;
}
- /**
- * Gets the value of the componentName property.
- *
- * @return possible object is {@link String }
- *
- */
public String getComponentName()
{
return componentName;
}
- /**
- * Sets the value of the componentName property.
- *
- * @param value allowed object is {@link String }
- *
- */
public void setComponentName(String value)
{
this.componentName = value;
}
- /**
- * Gets the value of the availability property.
- *
- * @return possible object is {@link Tavailability }
- *
- */
+ @XmlAttribute
public TAvailability getAvailability()
{
if (availability == null)
availability = TAvailability.optional;
-
+
return availability;
}
- /**
- * Sets the value of the availability property.
- *
- * @param value allowed object is {@link Tavailability }
- *
- */
public void setAvailability(TAvailability value)
{
this.availability = value;
}
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- */
+ @XmlAttribute
+ public String getInterface()
+ {
+ return interfaceName;
+ }
+
+ public void setInterface(String interfaceName)
+ {
+ this.interfaceName = interfaceName;
+ }
+
public Map<QName, String> getOtherAttributes()
{
return otherAttributes;
}
+
}
Added: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceUse.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceUse.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceUse.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -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.parser.xb;
+
+// $Id$
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+
+/**
+ * Indicates the type of object that will be placed within the reference collection.
+ *
+ * "service-object" indicates the collection contains blueprint proxies for imported
+ * services.
+ *
+ * "service-reference" indicates the collection contains ServiceReference objects matching the target service type.
+ */
+ at XmlType(name = "Tservice-use", namespace = BlueprintContext.XMLNS_BLUEPRINT)
+public enum TServiceUse
+{
+ // [JBXB-209] Enum parsing requires value equal to type name
+ // https://jira.jboss.org/jira/browse/JBXB-209
+ service_object("service-object"), service_reference("service-reference");
+
+ private final String value;
+
+ TServiceUse(String v)
+ {
+ value = v;
+ }
+
+ public String value()
+ {
+ return value;
+ }
+
+ public static TServiceUse fromValue(String v)
+ {
+ for (TServiceUse c : TServiceUse.values())
+ {
+ if (c.value.equals(v))
+ {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+}
Property changes on: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceUse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -91,7 +91,7 @@
if (comp instanceof TRef)
{
TRef ref = (TRef)comp;
- String compName = ref.getComponent();
+ String compName = ref.getComponentId();
comp = tBlueprint.getComponentMetadata(compName);
components.set(i, comp);
}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -77,7 +77,7 @@
* Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link Tvalue }{@code >} {@link JAXBElement }{@code <}{@link TService }{@code >}
* {@link JAXBElement }{@code <}{@link TRef }{@code >} {@link JAXBElement }{@code <}{@link TReference }{@code >} {@link JAXBElement }{@code <}{@link TRef }{@code >}
* {@link JAXBElement }{@code <}{@link Tmap }{@code >} {@link JAXBElement }{@code <}{@link TBean }{@code >} {@link JAXBElement }{@code <}{@link Tnull }{@code >}
- * {@link JAXBElement }{@code <}{@link TRefCollection }{@code >} {@link JAXBElement }{@code <}{@link TRefCollection }{@code >} {@link JAXBElement }{@code <}
+ * {@link JAXBElement }{@code <}{@link TReferenceList }{@code >} {@link JAXBElement }{@code <}{@link TReferenceList }{@code >} {@link JAXBElement }{@code <}
* {@link Tcollection }{@code >} {@link Object } {@link JAXBElement }{@code <}{@link Tcollection }{@code >} {@link JAXBElement }{@code <}{@link Tcollection }{@code >}
* {@link JAXBElement }{@code <}{@link Tprops }{@code >}
*
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -52,8 +52,8 @@
{
protected TService service;
- protected TRefCollection refList;
- protected TRefCollection refSet;
+ protected TReferenceList refList;
+ protected TReferenceList refSet;
protected TBean bean;
protected TReference reference;
protected TRef refFIXME;
@@ -91,10 +91,10 @@
/**
* Gets the value of the refList property.
*
- * @return possible object is {@link TRefCollection }
+ * @return possible object is {@link TReferenceList }
*
*/
- public TRefCollection getRefList()
+ public TReferenceList getRefList()
{
return refList;
}
@@ -102,10 +102,10 @@
/**
* Sets the value of the refList property.
*
- * @param value allowed object is {@link TRefCollection }
+ * @param value allowed object is {@link TReferenceList }
*
*/
- public void setRefList(TRefCollection value)
+ public void setRefList(TReferenceList value)
{
this.refList = value;
}
@@ -113,10 +113,10 @@
/**
* Gets the value of the refSet property.
*
- * @return possible object is {@link TRefCollection }
+ * @return possible object is {@link TReferenceList }
*
*/
- public TRefCollection getRefSet()
+ public TReferenceList getRefSet()
{
return refSet;
}
@@ -124,10 +124,10 @@
/**
* Sets the value of the refSet property.
*
- * @param value allowed object is {@link TRefCollection }
+ * @param value allowed object is {@link TReferenceList }
*
*/
- public void setRefSet(TRefCollection value)
+ public void setRefSet(TReferenceList value)
{
this.refSet = value;
}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -66,8 +66,8 @@
protected Tkey keyFIXME;
protected TService service;
- protected TRefCollection refList;
- protected TRefCollection refSet;
+ protected TReferenceList refList;
+ protected TReferenceList refSet;
protected TBean bean;
protected TReference reference;
protected TRef refFIXME;
@@ -132,10 +132,10 @@
/**
* Gets the value of the refList property.
*
- * @return possible object is {@link TRefCollection }
+ * @return possible object is {@link TReferenceList }
*
*/
- public TRefCollection getRefList()
+ public TReferenceList getRefList()
{
return refList;
}
@@ -143,10 +143,10 @@
/**
* Sets the value of the refList property.
*
- * @param value allowed object is {@link TRefCollection }
+ * @param value allowed object is {@link TReferenceList }
*
*/
- public void setRefList(TRefCollection value)
+ public void setRefList(TReferenceList value)
{
this.refList = value;
}
@@ -154,10 +154,10 @@
/**
* Gets the value of the refSet property.
*
- * @return possible object is {@link TRefCollection }
+ * @return possible object is {@link TReferenceList }
*
*/
- public TRefCollection getRefSet()
+ public TReferenceList getRefSet()
{
return refSet;
}
@@ -165,10 +165,10 @@
/**
* Sets the value of the refSet property.
*
- * @param value allowed object is {@link TRefCollection }
+ * @param value allowed object is {@link TReferenceList }
*
*/
- public void setRefSet(TRefCollection value)
+ public void setRefSet(TReferenceList value)
{
this.refSet = value;
}
Deleted: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -1,91 +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;
-
-
-/**
- *
- *
- * TserviceProperty is used for <service-properties> elements.
- * The syntax is similar to what is defined for <map>, but keys must be
- * string values and there are no type defaults that can be specified.
- * created from the entry elements, which require a key/value pair.
- *
- *
- *
- * <p>Java class for TserviceProperties complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TserviceProperties">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="entry" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TservicePropertyEntry" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class TserviceProperties {
-
- protected List<TServicePropertyEntry> entry;
-
- /**
- * Gets the value of the entry 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 entry property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getEntry().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link TServicePropertyEntry }
- *
- *
- */
- public List<TServicePropertyEntry> getEntry() {
- if (entry == null) {
- entry = new ArrayList<TServicePropertyEntry>();
- }
- return this.entry;
- }
-
-}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -21,83 +21,39 @@
*/
package org.jboss.osgi.blueprint.parser.xb;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.osgi.blueprint.BlueprintContext;
+
// $Id$
/**
- * Tvalue is the type used for <value> elements. The <value> element is used for types that can be created from a single string value. The string value is the data
- * value for the element. The optional type attribute allows a target conversion value to be explicitly specified.
- *
- * <p>
- * Java class for Tvalue complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tvalue">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
*/
+ at XmlType(name = "Tvalue", namespace = BlueprintContext.XMLNS_BLUEPRINT)
public class Tvalue
{
-
protected String content;
protected String type;
- /**
- *
- *
- * Tvalue is the type used for <value> elements. The <value> element is used for types that can be created from a single string value. The string value is the data
- * value for the element. The optional type attribute allows a target conversion value to be explicitly specified.
- *
- *
- *
- * @return possible object is {@link String }
- *
- */
public String getContent()
{
return content;
}
- /**
- * Sets the value of the content property.
- *
- * @param value allowed object is {@link String }
- *
- */
public void setContent(String value)
{
this.content = value;
}
- /**
- * Gets the value of the type property.
- *
- * @return possible object is {@link String }
- *
- */
+ @XmlAttribute
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;
}
-
}
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -69,7 +69,7 @@
public List<String> getInterfaces()
{
- return tService.getInterfaceNames();
+ return tService.getInterfaces().getValues();
}
public int getRanking()
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -24,7 +24,6 @@
// $Id$
import java.util.Collection;
-import java.util.List;
import org.jboss.osgi.blueprint.BlueprintContext;
import org.jboss.osgi.blueprint.parser.xb.TAvailability;
@@ -71,11 +70,7 @@
public String getInterface()
{
- List<String> interfaceNames = tService.getInterfaceNames();
- if (interfaceNames.size() == 0)
- throw new IllegalStateException("Empty list of interfaces");
-
- return interfaceNames.get(0);
+ return tService.getInterface();
}
public Collection<ReferenceListener> getReferenceListeners()
Deleted: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-cm.xsd
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-cm.xsd 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-cm.xsd 2009-07-15 13:41:27 UTC (rev 91294)
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- /*
- * $Revision$
- *
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- targetNamespace="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0.0">
-
- <xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0" schemaLocation="../../blueprint/v1.0.0/blueprint.xsd"/>
-
- <!-- property placeholder -->
-
- <xsd:element name="property-placeholder" type="TpropertyPlaceholder"/>
-
- <xsd:complexType name="TpropertyPlaceholder">
- <xsd:complexContent>
- <xsd:extension base="bp:Tcomponent">
- <xsd:sequence>
- <!-- nested properties declaration -->
- <xsd:element name="default-properties" type="TdefaultProperties" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
-
- <!-- #### What should be the type for a persistent id? I think we need to define one like class and method -->
- <xsd:attribute name="persistent-id" type="xsd:string" use="required"/>
- <xsd:attribute name="placeholder-prefix" type="xsd:string" use="optional" default="${"/>
- <xsd:attribute name="placeholder-suffix" type="xsd:string" use="optional" default="}"/>
- <xsd:attribute name="defaults-ref" type="bp:Tidref" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
-
- <!-- #### is this the correct type here? This is defining placeholder properties,
- so should this be a restricted set of value types or should this be expanded to
- all of the elements you can inject into a bean property? -->
- <xsd:complexType name="TdefaultProperties">
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="property" type="bp:Tproperty"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <!-- managed-properties -->
-
- <xsd:element name="managed-properties" type="TmanagedProperties"/>
-
- <xsd:complexType name="TmanagedProperties">
- <xsd:attribute name="persistent-id" type="xsd:string" use="required"/>
- <xsd:attribute name="update-strategy" type="TupdateStrategyType" use="optional"/>
- <xsd:attribute name="update-method" type="xsd:string" use="optional"/>
- </xsd:complexType>
-
- <xsd:simpleType name="TupdateStrategyType">
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="none"/>
- <xsd:enumeration value="component-managed"/>
- <xsd:enumeration value="container-managed"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- managed-service-factory -->
-
- <xsd:element name="managed-service-factory" type="TmanagedServiceFactory"/>
-
- <xsd:complexType name="TmanagedServiceFactory">
- <xsd:complexContent>
- <xsd:extension base="bp:Tcomponent">
- <xsd:sequence>
- <xsd:group ref="bp:serviceElements"/>
- <xsd:element name="managed-component" type="TmanagedComponent" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- <xsd:attribute name="factory-pid" type="xsd:string" use="required"/>
- <xsd:attribute name="interface" type="bp:Tclass" use="optional"/>
- <xsd:attribute name="auto-export" type="bp:TautoExportModes" default="disabled"/>
- <xsd:attribute name="ranking" type="xsd:int" default="0"/>
- <xsd:anyAttribute namespace="##other" processContents="lax"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="TmanagedComponent">
- <xsd:group ref="bp:beanElements"/>
- <xsd:attribute name="class" type="bp:Tclass"/>
- <xsd:attribute name="init-method" type="bp:TnullableMethod"/>
- <xsd:attribute name="destroy-method" type="bp:TnullableMethod"/>
- <xsd:attribute name="factory-method" type="bp:Tmethod"/>
- <xsd:attribute name="factory-component" type="bp:Tidref"/>
- <xsd:anyAttribute namespace="##other" processContents="lax"/>
- </xsd:complexType>
-
-
- <!-- cm-properties -->
-
- <xsd:element name="cm-properties" type="TcmProperties"/>
-
- <xsd:complexType name="TcmProperties">
- <xsd:attribute name="persistent-id" type="xsd:string" use="required"/>
- <xsd:attribute name="update" type="xsd:boolean" use="optional" default="false"/>
- </xsd:complexType>
-
-</xsd:schema>
Deleted: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd 2009-07-15 13:41:27 UTC (rev 91294)
@@ -1,1262 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- /*
- * $Revision$
- *
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" targetNamespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb"
- elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0">
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the OSGi Blueprint service 1.0.0
- development descriptor. Blueprint configuration files
- using this schema must indicate the schema using the
- blueprint/v1.0.0 namespace. For example,
-
- <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
-
- if used as a qualified namespace, "bp:" is the recommended
- namespace prefix.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <!-- Schema elements for core component declarations -->
-
- <xsd:complexType name="Tcomponent" abstract="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The Tcomponent type is the base type for top-level
- Blueprint components. The <bean> <reference>, <service>,
- <ref-set>, and <ref-list> elements are all derived from
- the Tcomponent type. This type defines an id attributre
- that is used create references between different components.
- Component elements can also be inlined within other component
- definitions. The id attribute is not valid when inliine.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:attribute name="id" type="xsd:ID" />
- </xsd:complexType>
-
- <xsd:element name="blueprint" type="Tblueprint">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The <blueprint> element is the root element for a blueprint
- configuration file. A blueprint configuration has two sections.
- The first section (contained within <type-converters> elements)
- identifies components that are used for converting values into
- different target types. The type converters are optional, so
- the file does not need to specify a type converter section.
-
- Following the type converters are the component definitions.
- Components are <bean>, <service>, <reference>, <ref-set>, and
- <ref-list> elements that identify the bundle components that will
- be managed by the blueprint service.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:complexType name="Tblueprint">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TBlueprint"></jbxb:class>
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:element name="type-converters" type="Ttype-converters" minOccurs="0"
- maxOccurs="1" />
- <!-- top-level components -->
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="allComponents" />
- </xsd:choice>
- </xsd:sequence>
-
- <!-- Defaults-->
- <xsd:attribute name="default-lazy-init" default="false" type="Tlazy-init">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default lazy-init setting that will be defined
- for <bean> components. If not specified, the global
- default is "false". Individual <bean> components may
- override the default
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-init-method" type="Tmethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default init-method that will be defined
- for <bean> components. If not specified, no default
- init-method is defined. It is not an error for a
- bean to not implement the indicated default init-method.
- The value will be ignored. A bean can also specify
- a different init-method or disable the init-method
- call by specifying an init-method value of "".
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-destroy-method" type="Tmethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default destroy-method that will be defined
- for <bean> components. If not specified, no default
- destroy-method is defined. It is not an error for a
- bean to not implement the indicated default destroy-method.
- The value will be ignored. A bean can also specify
- a different destroy-method or disable the destroy-method
- call by specifying a destroy-method value of "".
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-timeout" type="Ttimeout" default="300000">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default timeout value to be used when operations
- are invoked on unstatisfied service references. If the
- reference does not change to a satisfied state within the timeout
- window, an error is raised on the method invocation. The
- default timeout value is 300000 milliseconds and individual
- <reference> element can override the specified configuration
- default.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-availability" type="Tavailability" default="mandatory">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default availability value to be used for
- <reference>, <ref-set>, and <ref-list> components. The
- normal default is "mandatory", and can be changed by individual
- service reference components.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:complexType>
-
- <xsd:complexType name="Ttype-converters">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TTypeConverters"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- The type used for the <type-converters> element. The
- <type-converters> section is a set of <bean>, <ref>, or
- <reference> elements that identify the type convert components
- that will ference components.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="targetComponent" />
- </xsd:choice>
- </xsd:complexType>
-
- <!-- Components that provide a reasonable target for injection
- used for listeners, etc. -->
-
- <xsd:group name="targetComponent">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A targetcomponent is one that can be a target for a
- listener, registration-listener, or type-converter element.
- This is used in contexts where the requirement is a single
- provided object that will implement a particular interface.
- The provided object is obtained either from a <ref> element
- or inline (<bean> or <reference>).
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="bean" type="Tbean" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="components"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="reference" type="Treference" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="components"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ref" type="Tref" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="components"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded" />
- </xsd:choice>
- </xsd:group>
-
- <xsd:group name="allComponents">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- allComponents is used in contexts where all component element
- types are value. The set of component elements contains
- <bean>, <service>, <reference>, <ref-set>, and <ref-list>.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="service" type="Tservice" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="components"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ref-list" type="Tref-collection" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="components"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ref-set" type="Tref-collection" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="components"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="targetComponent" />
- </xsd:choice>
- </xsd:group>
-
- <xsd:group name="beanElements">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A reusable definition of the elements allowed on a <bean> element.
- This definition is also used by the <bpcm:managed-component>
- element used in the blueprint-cm schema.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:choice 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>
-
- <xsd:complexType name="Tbean">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TBean"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- The type defintion for a <bean> component.
- This definition is also used by the <bpcm:managed-component>
- element used in the blueprint-cm schema. The <bean> attributes
- provide the characteristics for how to create a bean instance.
- Constructor arguments and injected properties are specified
- via child <argument> and <property> elements.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="Tcomponent">
- <xsd:group ref="beanElements" />
- <xsd:attribute name="class" type="Tclass">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="className"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="depends-on" type="TdependsOn" />
- <xsd:attribute name="init-method" type="TnullableMethod" />
- <xsd:attribute name="destroy-method" type="TnullableMethod" />
- <xsd:attribute name="factory-method" type="Tmethod" />
- <xsd:attribute name="factory-component" type="Tidref" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="factoryComponentId"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:attribute>
-
- <xsd:attribute name="scope">
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="singleton" />
- <xsd:enumeration value="prototype" />
- <xsd:enumeration value="bundle" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
-
- <xsd:attribute name="lazy-init" type="Tlazy-init">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The lazy-init attribute for this <bean>. This can either
- be "eager" ("false") or "lazy" ("true"). If not specified, it
- defaults to default-lazy-init attribute of the enclosing
- <blueprint> element. The default, default is "eager"
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <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>
- 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.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:group ref="value" />
- </xsd:sequence>
- <xsd:attribute name="index" type="xsd:nonNegativeInteger" />
- <xsd:attribute name="type" type="Tclass" />
- <xsd:attribute name="ref" type="Tidref" />
- <xsd:attribute name="value" type="TstringValue" />
- </xsd:complexType>
-
- <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>
- 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.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:group ref="value" />
- </xsd:sequence>
- <xsd:attribute name="name" type="Tmethod" use="required" />
- <xsd:attribute name="ref" type="Tidref" />
- <xsd:attribute name="value" type="TstringValue" />
- </xsd:complexType>
-
- <xsd:complexType name="Tkey">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The Tkey type defines the element types that are permitted
- for Map key situations. These can be any of the "value"
- types other than the <null> element.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:group ref="nonNullValue" />
- </xsd:complexType>
-
- <!-- reference -->
- <xsd:complexType name="Treference">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TReference"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- The Treference type defines the <reference> element. These
- are instances of the TserviceReference type, with the addition
- of a timeout attribute. If the timeout is not specified,
- the default-timeout value is inherited from the encapsulating
- <blueprint> definition.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TserviceReference">
- <xsd:attribute name="timeout" use="optional" type="Ttimeout" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- ref-set, ref-list -->
- <xsd:complexType name="Tref-collection">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TRefCollection"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- The Tref-collection builds in the characteristics of the
- TserviceReference type to define characteristics of the <ref-set>
- and <ref-list> elements. This adds in the characteristics that
- only apply to collections of references (e.g., sorting).
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TserviceReference">
- <xsd:sequence>
- <xsd:element name="comparator" type="Tcomparator" minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The <comparator> element defines a comparator instance that will
- be used to sort the constructed reference collection.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:attribute name="comparator-ref" type="xsd:token" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A shortcut alternative to using a <comparator> element when the
- comparator target is a top-level <bean> or <service> element.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
-
- <xsd:attribute name="member-type" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Indicates the type of object that will be placed within the
- reference collection. "service-instance" indicates the collection
- contains blueprint proxies for imported services. "service-reference"
- indicates the collection contains ServiceReferenc objects matching
- the target service type.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="service-instance" />
- <xsd:enumeration value="service-reference" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
-
- <xsd:attribute name="ordering-basis" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Indicates how collection sorting is handled. An ordering
- basis of "service" indicates sorting is handled using the service
- instance. "service-reference" indicates sorting is accomplished using
- the ServiceReference objects for the contained services. The default
- value is an implicit "none", indicating no sorting should be performed.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="service" />
- <xsd:enumeration value="service-reference" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
-
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- Reference base class -->
- <xsd:complexType name="TserviceReference">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TserviceReference is the base element type used for <reference>,
- <ref-set>, and <ref-list> elements. This type defines all of the
- characteristics common to both sorts of references.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="Tcomponent">
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:element name="interfaces" minOccurs="0" maxOccurs="1" type="Tinterfaces">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The definition of the required interfaces that the obtained services
- must implement. There is also a shortcut attribute defined for
- the typical case of just a single interface class.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- listener -->
- <xsd:element name="listener" type="TReferenceListener" minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A definition of a listener that will watch for bind/unbind events
- associated with the service reference. The targetted listener can
- be a <ref> to a <bean> or <reference> element, or an inline
- <bean> or <reference>.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
- processContents="lax" />
- </xsd:sequence>
-
- <xsd:attribute name="interface" use="optional" type="Tclass" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="interfaceNames"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:attribute>
-
- <xsd:attribute name="filter" use="optional" type="xsd:normalizedString">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A filter string used to narrow the search for a matching service
- reference.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="component-name" type="Tidref" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- An optional specifier that can be used to match a service definition
- to one created by a specific blueprint component.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="availability" type="Tavailability" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Use to control the initial processing of service references at
- blueprint context startup. "mandatory" indicates the context
- should not start unless the service is available within the
- specified context startup period. "optional" indicates availability
- of this service is not a requirement at bundle startup.
-
- NOTE: No default is specified because this can be overridden
- by the default-availability attribute of the <blueprint> element.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="TReferenceListener">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TReferenceListener"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- TReferenceListener defines a reference listener that is attached
- to a <reference>, <ref-set>, or <ref-list> element. The listener
- object can be specified as a <ref> or as an inline <bean> or
- <reference> component. Listener events are mapped to the indicated
- bind or unbind methods.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:group ref="targetComponent" />
- <xsd:attribute name="ref" type="xsd:token" use="optional" />
- <xsd:attribute name="bind-method" type="Tmethod" use="required" />
- <xsd:attribute name="unbind-method" type="Tmethod" use="required" />
- </xsd:complexType>
-
- <xsd:simpleType name="Tlazy-init">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tlazy-init defines a lazy-init type. This is used in this
- schema by the <blueprint> default-lazy-init attribute and the
- <bean> lazy-init attribute.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:boolean" />
- </xsd:simpleType>
-
- <xsd:simpleType name="Tavailability">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TAvailability"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- Tlazy-init defines an availability attribute type. This is used in this
- schema by the <blueprint> default-availability attribute and the
- <reference>, <ref-set>, and <ref-list> availability attribute.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="mandatory" />
- <xsd:enumeration value="optional" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="Tcomparator">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TComparator"></jbxb:class>
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:group ref="targetComponent" />
- </xsd:complexType>
-
- <!-- service -->
-
- <xsd:complexType name="Tservice">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TService"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- 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.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="Tcomponent">
- <xsd:sequence>
- <xsd:group ref="serviceElements" />
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
- processContents="lax" />
- </xsd:sequence>
- <xsd:attribute name="interface" type="Tclass" use="optional" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="interfaceNames"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="ref" type="Tidref" use="optional" />
- <xsd:attribute name="depends-on" type="TdependsOn" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- depends-on identifies (by name) other components that this service
- depends on. The service will only be registered after the
- depends-on services are successfully completed. Also, if there
- are <reference>, <ref-list>, <ref-set> elements with unstatisfied
- manadatory references, then the depends-on relationship will also
- be used to determine whether this service is registered or
- unregistered.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="auto-export" type="TautoExportModes" default="disabled" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="autoExportMode"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="ranking" type="xsd:int" default="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A service ranking value that is added to the service properties
- the service will be published with.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:group name="serviceElements">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A set of service elements that is shared by the <service> element
- in this schema and the <managed-service-factory> element in the
- blueprint-cm schema.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:element name="interfaces" type="Tinterfaces" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A collection of one or more interface class names this service
- will be registered under. The <service> element also has
- a shortcut interface attribute for the usual case of just
- a single interface being used. This also cannot be used if
- the auto-export attribute is used.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-properties" type="TserviceProperties" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The service provided when the service is registered. The service
- properties are similar to map elements, but the keys must always
- be strings, and the values are required to be in a narrower range.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="registration-listener" type="TregistrationListener"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="registrationListeners"/>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- A set of 0 or more registration listeners attached to this service
- component. The registration listeners will be notified whenever the
- service is registered or unregistered from the framework service
- registry.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- These are the two types of elements that can be bound as a service.
- This will be either a <ref> to a <bean> component or an inline <bean> component.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:element name="bean" type="Tbean" />
- <xsd:element name="ref" type="Tref" />
- </xsd:choice>
- </xsd:sequence>
- </xsd:group>
-
-
- <xsd:complexType name="TregistrationListener">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TRegistrationListener"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- A registration listener definition. The target registration listener
- can be either a <ref> to a <bean> or <service> component, or an inline
- <bean> or <service> component definition. The registration-method and
- unregistration-method attributes define the methods that will be called
- for the respective events.
-
- For the very common case of using a <ref> to a listener component, the
- ref attribute may also be used as a shortcut.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:group ref="targetComponent" />
- <xsd:attribute name="ref" type="Tidref" use="optional" />
- <!-- ### why are there both required? -->
- <xsd:attribute name="registration-method" type="Tmethod" use="required" />
- <xsd:attribute name="unregistration-method" type="Tmethod" use="required" />
- </xsd:complexType>
-
- <!--
- Values
- -->
-
- <xsd:group name="value">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The set of "value" types that can be used in any place a value
- can be specified. This set includes the <ref> and <idref> elements, any of the
- component types (<bean>, <service>, etc.) as inline components, the
- generic <value> element for types sourced from string values, any of the
- collection types (<set>, <list>, <array>, <map>, <props>), and the
- <null> type to inject a null value.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:group ref="nonNullValue" />
- <xsd:element name="null" type="Tnull" />
- </xsd:choice>
- </xsd:group>
-
- <xsd:complexType name="Tnull">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The definition for a <null> value type.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <!-- [FIXME] cannot be processed by xjc -->
- <!-- xsd:choice minOccurs="0" maxOccurs="unbounded" / -->
- </xsd:complexType>
-
- <xsd:group name="nonNullValue">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The set of "value" types that can be used in any place a non-null value
- can be specified. This set includes the <ref> and <idref> elements, any of the
- component types (<bean>, <service>, etc.) as inline components, the
- generic <value> element for types sourced from string values, and any of the
- collection types (<set>, <list>, <array>, <map>, <props>).
-
- The <null> type is NOT a member of this group.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="allComponents" />
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:element name="idref" type="Tref" />
- <xsd:element name="value" type="Tvalue" />
- <xsd:element name="list" type="Tcollection" />
- <xsd:element name="set" type="Tcollection" />
- <xsd:element name="map" type="Tmap" />
- <xsd:element name="array" type="Tcollection" />
- <xsd:element name="props" type="Tprops" />
- </xsd:choice>
- </xsd:sequence>
- </xsd:group>
-
- <xsd:complexType name="Tref">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TRef"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- Tref is the type used for <ref> elements. This specifies a required
- component id for the reference component.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="component" type="Tidref" use="required" />
- </xsd:complexType>
-
- <xsd:complexType name="Tvalue" mixed="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tvalue is the type used for <value> elements. The <value> element
- is used for types that can be created from a single string value.
- The string value is the data value for the element. The optional
- type attribute allows a target conversion value to be explicitly
- specified.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="type" type="Tclass" use="optional" />
- </xsd:complexType>
-
- <!-- Collection Values -->
-
- <xsd:complexType name="TtypedCollection">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TtypeCollection defines comment attributes shared among different
- collection types that allow a default value type to be specified.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="value-type" type="Tclass" />
- </xsd:complexType>
-
-
- <xsd:complexType name="Tcollection">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tcollection is the base schema type for different ordered collection
- types. This is shared between the <array>, <list>, and <set> elements.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TtypedCollection">
- <xsd:group ref="value" minOccurs="0" maxOccurs="unbounded" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="Tprops">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tprops is the type used by the <props> value element. The prop elements
- are pairs of string-valued keys and values.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="prop" type="Tprop" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="Tprop" mixed="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tprop is a single property element for a <props> value type. The property
- value can be specified using either the attribute, or as value data for
- the property element.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="key" type="TstringValue" use="required" />
- <xsd:attribute name="value" type="TstringValue" use="optional" />
- </xsd:complexType>
-
- <!-- 'map' element type -->
- <xsd:complexType name="Tmap">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tmap is the base type used for <map> elements. A map may have a
- default value type specified, so it inherits from the TtypeCollection
- type. A key type can also be specified, and the map members are
- created from the entry elements, which require a key/value pair.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TtypedCollection">
- <xsd:sequence>
- <xsd:element name="entry" type="TmapEntry" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="key-type" type="Tclass" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- 'entry' element type -->
- <xsd:complexType name="TmapEntry">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TmapEntry is used for <entry> elements nested inside of a <map> element.
- Each <entry> instance defines a key/value pair that will be added to the
- Map. Both the keys and values may be arbitrary types. Keys must not
- be <null> but <null> is permitted for entry values. A default type
- can be specified for both the keys and the values, but individual keys
- or values can override the default.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="key" type="Tkey" minOccurs="0" />
- <xsd:group ref="value" />
- </xsd:sequence>
- <xsd:attribute name="key" type="TstringValue" />
- <xsd:attribute name="key-ref" type="Tidref" />
- <xsd:attribute name="value" type="TstringValue" />
- <xsd:attribute name="value-ref" type="Tidref" />
- </xsd:complexType>
-
-
- <!-- 'service property' element type -->
- <xsd:complexType name="TserviceProperties">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TserviceProperty is used for <service-properties> elements.
- The syntax is similar to what is defined for <map>, but keys must be
- string values and there are no type defaults that can be specified.
- created from the entry elements, which require a key/value pair.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="entry" type="TservicePropertyEntry" minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- 'entry' element type -->
- <xsd:complexType name="TservicePropertyEntry">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TMapEntry"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- TservicePropertyEntry is an entry value used for the <service-properties>
- element. This does not allow a child <key> element and there are no
- key-ref or value-ref attributes.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="value" />
- </xsd:sequence>
- <xsd:attribute name="key" type="TstringValue" use="required" />
- <xsd:attribute name="value" type="TstringValue" use="optional" />
- </xsd:complexType>
-
- <!-- General types -->
-
- <xsd:complexType name="Tdescription" mixed="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A generic <description> element type to allow documentation to added to the
- blueprint configuration.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="0" maxOccurs="unbounded" />
- </xsd:complexType>
-
- <xsd:complexType name="Tinterfaces">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The type definition for the <interfaces> element used for <service>,
- <reference>, <ref-set>, and <ref-list>;
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="1" maxOccurs="unbounded">
- <xsd:element name="value" type="TinterfaceValue" >
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:property name="interfaceNames"/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
-
- <xsd:simpleType name="TinterfaceValue">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TinterfaceValue is used for subelements of the <interfaces> element.
- This is just a <value>xxxxx</value> element where the contained
- value is the name of an interface class.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="Tclass" />
- </xsd:simpleType>
-
- <xsd:simpleType name="Tclass">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tclass is a base type that should be used for all attributes that
- refer to java class names or java types.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:NCName" />
- </xsd:simpleType>
-
- <xsd:simpleType name="Tmethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tmethod is a base type that should be used for all attributes that
- refer to java method names.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:NCName" />
- </xsd:simpleType>
-
- <xsd:simpleType name="TnullableMethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tmethod is a base type that should be used for all attributes that
- refer to java method names. This version also allows "" to be
- specified to specify that no name should be used.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="[\i-[:]][\c-[:]]*" />
- <xsd:pattern value="" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- Should be used for all attributes and elements that refer to method names -->
- <xsd:simpleType name="Tidref">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tidref is a base type that should be used for all attributes that
- refer to component ids.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:NCName" />
- </xsd:simpleType>
-
- <xsd:simpleType name="TstringValue">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TstringValue is a base type that should be used for all attributes that
- refer to raw string values
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:normalizedString" />
- </xsd:simpleType>
-
- <xsd:simpleType name="TautoExportModes">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TAutoExportModes"></jbxb:class>
- </xsd:appinfo>
- <xsd:documentation>
- <![CDATA[
- TautoExportModes is a base type that should be used for export-mode
- attributes. Also used by the blueprint-cm compendium.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="disabled" />
- <xsd:enumeration value="interfaces" />
- <xsd:enumeration value="class-hierarchy" />
- <xsd:enumeration value="all-classes" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="Ttimeout">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Ttimeout is a base type that should be used for all attributes that
- specify timeout values
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:unsignedLong" />
- </xsd:simpleType>
-
- <xsd:simpleType name="TdependsOn">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TdependsOn is a base type that should be used for all attributes that
- specify depends-on relationships
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:normalizedString" />
- </xsd:simpleType>
-
-</xsd:schema>
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint.xsd
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint.xsd 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/impl/src/main/resources/schema/blueprint.xsd 2009-07-15 13:41:27 UTC (rev 91294)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
/*
- * $Revision$
+ * Revision: 7562
*
* Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
*
@@ -18,1108 +18,1207 @@
* limitations under the License.
*/
-->
-<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.osgi.org/xmlns/blueprint/v1.0.0" elementFormDefault="qualified"
- attributeFormDefault="unqualified" version="1.0.0">
+<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ elementFormDefault="qualified" attributeFormDefault="unqualified"
+ version="1.0.0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ This is the XML Schema for the OSGi Blueprint service 1.0.0
+ development descriptor. Blueprint configuration files
+ using this schema must indicate the schema using the
+ blueprint/v1.0.0 namespace. For example,
+
+ <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ if used as a qualified namespace, "bp" is the recommended
+ namespace prefix.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <!-- Schema elements for core component declarations -->
+
+ <xsd:complexType name="Tcomponent" abstract="true">
<xsd:annotation>
- <xsd:documentation>
- <![CDATA[
+ <xsd:documentation>
+ <![CDATA[
+ The Tcomponent type is the base type for top-level
+ Blueprint components. The <bean> <reference>, <service>,
+ and <reference-list> elements are all derived from
+ the Tcomponent type. This type defines an id attribute
+ that is used create references between different components.
+ Component elements can also be inlined within other component
+ definitions. The id attribute is not valid when inlined.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
- This is the XML Schema for the OSGi Blueprint service 1.0.0
- development descriptor. Blueprint configuration files
- using this schema must indicate the schema using the
- blueprint/v1.0.0 namespace. For example,
+ <xsd:attribute name="id" type="xsd:ID" />
- <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <xsd:attribute name="activation" type="Tactivation">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The activation attribute for this component. This can either
+ be "eager" or "lazy". If not specified, it
+ defaults to default-activation attribute of the enclosing
+ <blueprint> element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
- if used as a qualified namespace, "bp:" is the recommended
- namespace prefix.
- ]]>
+ <xsd:attribute name="depends-on" type="TdependsOn">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ depends-on identifies (by id) other components that this component
+ depends on. The component only be activated after the
+ depends-on components are successfully activated. Also, if there
+ are <reference> or <reference-list> elements with unstatisfied
+ manadatory references, then the depends-on relationship will also
+ be used to determine whether this service is enabled or not.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
- <!-- Schema elements for core component declarations -->
+ <xsd:element name="blueprint" type="Tblueprint">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The <blueprint> element is the root element for a blueprint
+ configuration file. A blueprint configuration has two sections.
+ The first section (contained within the <type-converters> element)
+ identifies components that are used for converting values into
+ different target types. The type converters are optional, so
+ the file does not need to specify a type converter section.
- <xsd:complexType name="Tcomponent" abstract="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
+ Following the type converters are the component definitions.
+ Components are <bean>, <service>, <reference>, and
+ <reference-list> elements that identify the bundle components that will
+ be managed by the blueprint service.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
- The Tcomponent type is the base type for top-level
- Blueprint components. The <bean> <reference>, <service>,
- <ref-set>, and <ref-list> elements are all derived from
- the Tcomponent type. This type defines an id attributre
- that is used create references between different components.
- Component elements can also be inlined within other component
- definitions. The id attribute is not valid when inliine.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
+ <xsd:complexType name="Tblueprint">
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription"
+ minOccurs="0" />
+ <xsd:element name="type-converters" type="Ttype-converters"
+ minOccurs="0" maxOccurs="1" />
+ <!-- top-level components -->
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="service" type="Tservice" />
+ <xsd:element name="reference-list" type="Treference-list" />
+ <xsd:element name="bean" type="Tbean" />
+ <xsd:element name="reference" type="Treference" />
+ <xsd:any namespace="##other" processContents="strict" />
+ </xsd:choice>
+ </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID" />
- </xsd:complexType>
+ <!-- Defaults-->
+ <xsd:attribute name="default-activation" default="eager"
+ type="Tactivation">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default activation setting that will be defined
+ for components. If not specified, the global default is "eager".
+ Individual components may override the default value.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-timeout" type="Ttimeout"
+ default="300000">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default timeout value to be used when operations
+ are invoked on unstatisfied service references. If the
+ reference does not change to a satisfied state within the timeout
+ window, an error is raised on the method invocation. The
+ default timeout value is 300000 milliseconds and individual
+ <reference> element can override the specified configuration
+ default.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-availability" type="Tavailability"
+ default="mandatory">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default availability value to be used for
+ <reference>, and <reference-list> components. The
+ normal default is "mandatory", and can be changed by individual
+ service reference components.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:complexType>
- <xsd:element name="blueprint" type="Tblueprint">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
+ <xsd:complexType name="Ttype-converters">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The type used for the <type-converters> element. The
+ <type-converters> section is a set of <bean>, <ref>, or
+ <reference> elements that identify the type converter components.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="bean" type="Tbean" />
+ <xsd:element name="reference" type="Treference" />
+ <xsd:element name="ref" type="Tref" />
+ <xsd:any namespace="##other" processContents="strict" />
+ </xsd:choice>
+ </xsd:complexType>
- The <blueprint> element is the root element for a blueprint
- configuration file. A blueprint configuration has two sections.
- The first section (contained within <type-converters> elements)
- identifies components that are used for converting values into
- different target types. The type converters are optional, so
- the file does not need to specify a type converter section.
+ <!--
+ Components that provide a reasonable target for injection used for
+ listeners, etc.
+ -->
- Following the type converters are the component definitions.
- Components are <bean>, <service>, <reference>, <ref-set>, and
- <ref-list> elements that identify the bundle components that will
- be managed by the blueprint service.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
+ <xsd:group name="GtargetComponent">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A target component is one that can be a target for a
+ listener, registration-listener or service elements.
+ This is used in contexts where the requirement is a single
+ provided object that will implement a particular interface.
+ The provided object is obtained either from a <ref> element
+ or an inlined <bean> or <reference>.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="Tinlined-bean" />
+ <xsd:element name="reference" type="Tinlined-reference" />
+ <xsd:element name="ref" type="Tref" />
+ <xsd:any namespace="##other" processContents="strict" />
+ </xsd:choice>
+ </xsd:group>
- <xsd:complexType name="Tblueprint">
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:element name="type-converters" type="Ttype-converters" minOccurs="0"
- maxOccurs="1" />
- <!-- top-level components -->
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="allComponents" />
- </xsd:choice>
- </xsd:sequence>
+ <xsd:group name="GallComponents">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An all components is used in contexts where all component element
+ types are values. The set of component elements contains
+ <bean>, <service>, <reference>, <reference-list> and <ref>.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="service" type="Tinlined-service" />
+ <xsd:element name="reference-list" type="Tinlined-reference-list" />
+ <xsd:group ref="GtargetComponent" />
+ </xsd:choice>
+ </xsd:group>
- <!-- Defaults-->
- <xsd:attribute name="default-lazy-init" default="false" type="Tlazy-init">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default lazy-init setting that will be defined
- for <bean> components. If not specified, the global
- default is "false". Individual <bean> components may
- override the default
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-init-method" type="Tmethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default init-method that will be defined
- for <bean> components. If not specified, no default
- init-method is defined. It is not an error for a
- bean to not implement the indicated default init-method.
- The value will be ignored. A bean can also specify
- a different init-method or disable the init-method
- call by specifying an init-method value of "".
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-destroy-method" type="Tmethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default destroy-method that will be defined
- for <bean> components. If not specified, no default
- destroy-method is defined. It is not an error for a
- bean to not implement the indicated default destroy-method.
- The value will be ignored. A bean can also specify
- a different destroy-method or disable the destroy-method
- call by specifying a destroy-method value of "".
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-timeout" type="Ttimeout" default="300000">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default timeout value to be used when operations
- are invoked on unstatisfied service references. If the
- reference does not change to a satisfied state within the timeout
- window, an error is raised on the method invocation. The
- default timeout value is 300000 milliseconds and individual
- <reference> element can override the specified configuration
- default.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="default-availability" type="Tavailability" default="mandatory">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Specifies the default availability value to be used for
- <reference>, <ref-set>, and <ref-list> components. The
- normal default is "mandatory", and can be changed by individual
- service reference components.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:complexType>
+ <xsd:group name="GbeanElements">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A bean elements is a reusable definition of the elements allowed on
+ a <bean> element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <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" />
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:group>
- <xsd:complexType name="Ttype-converters">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The type used for the <type-converters> element. The
- <type-converters> section is a set of <bean>, <ref>, or
- <reference> elements that identify the type convert components
- that will ference components.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="targetComponent" />
- </xsd:choice>
- </xsd:complexType>
+ <xsd:complexType name="Tbean">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The type definition for a <bean> component. The <bean>
+ attributes provide the characteristics for how to create a
+ bean instance. Constructor arguments and injected properties
+ are specified via child <argument> and <property> elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="Tcomponent">
+ <xsd:group ref="GbeanElements" />
+ <xsd:attribute name="class" type="Tclass" />
+ <xsd:attribute name="init-method" type="Tmethod" />
+ <xsd:attribute name="destroy-method" type="Tmethod" />
+ <xsd:attribute name="factory-method" type="Tmethod" />
+ <xsd:attribute name="factory-ref" type="Tidref" />
+ <xsd:attribute name="scope" type="Tscope" />
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
- <!-- Components that provide a reasonable target for injection
- used for listeners, etc. -->
+ <xsd:complexType name="Tinlined-bean">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Tinlined-bean type is used for inlined (i.e. non top level)
+ <bean> elements. Those elements have some restrictions on
+ the attributes that can be used to define them.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:restriction base="Tbean">
+ <xsd:group ref="GbeanElements" />
+ <xsd:attribute name="id" use="prohibited" />
+ <xsd:attribute name="depends-on" type="TdependsOn" />
+ <xsd:attribute name="activation" use="prohibited"
+ fixed="lazy" />
+ <xsd:attribute name="class" type="Tclass" />
+ <xsd:attribute name="init-method" type="Tmethod" />
+ <xsd:attribute name="destroy-method" use="prohibited" />
+ <xsd:attribute name="factory-method" type="Tmethod" />
+ <xsd:attribute name="factory-ref" type="Tidref" />
+ <xsd:attribute name="scope" use="prohibited" fixed="prototype" />
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
- <xsd:group name="targetComponent">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A targetcomponent is one that can be a target for a
- listener, registration-listener, or type-converter element.
- This is used in contexts where the requirement is a single
- provided object that will implement a particular interface.
- The provided object is obtained either from a <ref> element
- or inline (<bean> or <reference>).
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="bean" type="Tbean" />
- <xsd:element name="reference" type="Treference" />
- <xsd:element name="ref" type="Tref" />
- <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded" />
- </xsd:choice>
- </xsd:group>
+ <xsd:complexType name="Targument">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ 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.
- <xsd:group name="allComponents">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- allComponents is used in contexts where all component element
- types are value. The set of component elements contains
- <bean>, <service>, <reference>, <ref-set>, and <ref-list>.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="service" type="Tservice" />
- <xsd:element name="ref-list" type="Tref-collection" />
- <xsd:element name="ref-set" type="Tref-collection" />
- <xsd:group ref="targetComponent" />
- </xsd:choice>
- </xsd:group>
+ 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.
- <xsd:group name="beanElements">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A reusable definition of the elements allowed on a <bean> element.
- This definition is also used by the <bpcm:managed-component>
- element used in the blueprint-cm schema.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <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:choice>
- </xsd:sequence>
- </xsd:group>
+ 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.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription"
+ minOccurs="0" />
+ <xsd:group ref="Gvalue" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="index" type="xsd:nonNegativeInteger" />
+ <xsd:attribute name="type" type="Ttype" />
+ <xsd:attribute name="ref" type="Tidref" />
+ <xsd:attribute name="value" type="TstringValue" />
+ </xsd:complexType>
- <xsd:complexType name="Tbean">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The type defintion for a <bean> component.
- This definition is also used by the <bpcm:managed-component>
- element used in the blueprint-cm schema. The <bean> attributes
- provide the characteristics for how to create a bean instance.
- Constructor arguments and injected properties are specified
- via child <argument> and <property> elements.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="Tcomponent">
- <xsd:group ref="beanElements" />
- <xsd:attribute name="class" type="Tclass" />
- <xsd:attribute name="depends-on" type="TdependsOn" />
- <xsd:attribute name="init-method" type="TnullableMethod" />
- <xsd:attribute name="destroy-method" type="TnullableMethod" />
- <xsd:attribute name="factory-method" type="Tmethod" />
- <xsd:attribute name="factory-component" type="Tidref" />
+ <xsd:complexType name="Tproperty">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ 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.
- <xsd:attribute name="scope">
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="singleton" />
- <xsd:enumeration value="prototype" />
- <xsd:enumeration value="bundle" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
+ 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.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription"
+ minOccurs="0" />
+ <xsd:group ref="Gvalue" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="Tmethod" use="required" />
+ <xsd:attribute name="ref" type="Tidref" />
+ <xsd:attribute name="value" type="TstringValue" />
+ </xsd:complexType>
- <xsd:attribute name="lazy-init" type="Tlazy-init">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The lazy-init attribute for this <bean>. This can either
- be "eager" ("false") or "lazy" ("true"). If not specified, it
- defaults to default-lazy-init attribute of the enclosing
- <blueprint> element. The default, default is "eager"
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
+ <xsd:complexType name="Tkey">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Tkey type defines the element types that are permitted
+ for Map key situations. These can be any of the "value"
+ types other than the <null> element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group ref="GnonNullValue" />
+ </xsd:complexType>
- <xsd:complexType name="Targument">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- 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.
+ <!-- reference -->
+ <xsd:complexType name="Treference">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Treference type defines the <reference> element. These
+ are instances of the TserviceReference type, with the addition
+ of a timeout attribute. If the timeout is not specified,
+ the default-timeout value is inherited from the encapsulating
+ <blueprint> definition.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TserviceReference">
+ <xsd:sequence>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+ processContents="strict" />
+ </xsd:sequence>
+ <xsd:attribute name="timeout" type="Ttimeout" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
- 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.
+ <xsd:complexType name="Tinlined-reference">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Tinlined-reference type is used for inlined (i.e. non top level)
+ <reference> elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:restriction base="Treference">
+ <xsd:sequence>
+ <xsd:group ref="GserviceReferenceElements" />
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+ processContents="strict" />
+ </xsd:sequence>
+ <xsd:attribute name="id" use="prohibited" />
+ <xsd:attribute name="depends-on" type="TdependsOn" />
+ <xsd:attribute name="activation" use="prohibited"
+ fixed="lazy" />
+ <xsd:attribute name="interface" type="Tclass" />
+ <xsd:attribute name="filter" type="xsd:normalizedString" />
+ <xsd:attribute name="component-name" type="Tidref" />
+ <xsd:attribute name="availability" type="Tavailability" />
+ <xsd:attribute name="timeout" type="Ttimeout" />
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
- 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.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
+ <!-- reference-list -->
+ <xsd:complexType name="Treference-list">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Treference-list builds in the characteristics of the
+ TserviceReference type to define characteristics of the
+ <reference-list>. This adds in the characteristics that
+ only apply to collections of references (e.g., member-type).
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TserviceReference">
<xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:group ref="value" />
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+ processContents="strict" />
</xsd:sequence>
- <xsd:attribute name="index" type="xsd:nonNegativeInteger" />
- <xsd:attribute name="type" type="Tclass" />
- <xsd:attribute name="ref" type="Tidref" />
- <xsd:attribute name="value" type="TstringValue" />
- </xsd:complexType>
+ <xsd:attribute name="member-type" type="Tservice-use"
+ default="service-object">
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
- <xsd:complexType name="Tproperty">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- 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.
+ <xsd:complexType name="Tinlined-reference-list">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Tinlined-reference-list type is used for inlined (i.e. non top level)
+ <reference-list> elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:restriction base="Treference-list">
+ <xsd:sequence>
+ <xsd:group ref="GserviceReferenceElements" />
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+ processContents="strict" />
+ </xsd:sequence>
+ <xsd:attribute name="id" use="prohibited" />
+ <xsd:attribute name="depends-on" type="TdependsOn" />
+ <xsd:attribute name="activation" use="prohibited"
+ fixed="lazy" />
+ <xsd:attribute name="interface" type="Tclass" />
+ <xsd:attribute name="filter" type="xsd:normalizedString" />
+ <xsd:attribute name="component-name" type="Tidref" />
+ <xsd:attribute name="availability" type="Tavailability" />
+ <xsd:attribute name="member-type" type="Tservice-use"
+ default="service-object" />
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
- 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.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
+ <!-- Reference base class -->
+ <xsd:complexType name="TserviceReference">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TserviceReference is the base element type used for <reference>
+ and <reference-list> elements. This type defines all of the
+ characteristics common to both sorts of references.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="Tcomponent">
<xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:group ref="value" />
+ <xsd:group ref="GserviceReferenceElements" />
</xsd:sequence>
- <xsd:attribute name="name" type="Tmethod" use="required" />
- <xsd:attribute name="ref" type="Tidref" />
- <xsd:attribute name="value" type="TstringValue" />
- </xsd:complexType>
- <xsd:complexType name="Tkey">
- <xsd:annotation>
+ <xsd:attribute name="interface" type="Tclass">
+ <xsd:annotation>
<xsd:documentation>
- <![CDATA[
- The Tkey type defines the element types that are permitted
- for Map key situations. These can be any of the "value"
- types other than the <null> element.
- ]]>
+ <![CDATA[
+ The interface that the OSGi service must implement and that will be
+ implemented by the proxy object.
+ This attribute is optional.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
- <xsd:group ref="nonNullValue" />
- </xsd:complexType>
-
- <!-- reference -->
- <xsd:complexType name="Treference">
- <xsd:annotation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="filter" type="xsd:normalizedString">
+ <xsd:annotation>
<xsd:documentation>
- <![CDATA[
- The Treference type defines the <reference> element. These
- are instances of the TserviceReference type, with the addition
- of a timeout attribute. If the timeout is not specified,
- the default-timeout value is inherited from the encapsulating
- <blueprint> definition.
- ]]>
+ <![CDATA[
+ A filter string used to narrow the search for a matching service
+ reference.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TserviceReference">
- <xsd:attribute name="timeout" use="optional" type="Ttimeout" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- ref-set, ref-list -->
- <xsd:complexType name="Tref-collection">
- <xsd:annotation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="component-name" type="Tidref">
+ <xsd:annotation>
<xsd:documentation>
- <![CDATA[
- The Tref-collection builds in the characteristics of the
- TserviceReference type to define characteristics of the <ref-set>
- and <ref-list> elements. This adds in the characteristics that
- only apply to collections of references (e.g., sorting).
- ]]>
+ <![CDATA[
+ An optional specifier that can be used to match a service definition
+ to one created by a specific blueprint component.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TserviceReference">
- <xsd:sequence>
- <xsd:element name="comparator" type="Tcomparator" minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The <comparator> element defines a comparator instance that will
- be used to sort the constructed reference collection.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="availability" type="Tavailability">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Use to control the initial processing of service references at
+ blueprint context startup. "mandatory" indicates the context
+ should not start unless the service is available within the
+ specified context startup period. "optional" indicates availability
+ of this service is not a requirement at bundle startup.
- <xsd:attribute name="comparator-ref" type="xsd:token" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A shortcut alternative to using a <comparator> element when the
- comparator target is a top-level <bean> or <service> element.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
+ NOTE: No default is specified because this can be overridden
+ by the default-availability attribute of the <blueprint> element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
- <xsd:attribute name="member-type" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Indicates the type of object that will be placed within the
- reference collection. "service-instance" indicates the collection
- contains blueprint proxies for imported services. "service-reference"
- indicates the collection contains ServiceReferenc objects matching
- the target service type.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="service-instance" />
- <xsd:enumeration value="service-reference" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
-
- <xsd:attribute name="ordering-basis" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Indicates how collection sorting is handled. An ordering
- basis of "service" indicates sorting is handled using the service
- instance. "service-reference" indicates sorting is accomplished using
- the ServiceReference objects for the contained services. The default
- value is an implicit "none", indicating no sorting should be performed.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="service" />
- <xsd:enumeration value="service-reference" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
-
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- Reference base class -->
- <xsd:complexType name="TserviceReference">
+ <xsd:group name="GserviceReferenceElements">
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription"
+ minOccurs="0" />
+ <!-- listener -->
+ <xsd:element name="reference-listener" type="TreferenceListener"
+ minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TserviceReference is the base element type used for <reference>,
- <ref-set>, and <ref-list> elements. This type defines all of the
- characteristics common to both sorts of references.
- ]]>
- </xsd:documentation>
+ <xsd:documentation>
+ <![CDATA[
+ A definition of a listener that will watch for bind/unbind events
+ associated with the service reference. The targetted listener can
+ be a <ref> to a <bean> or <reference> element, or an inline
+ <bean> or <reference>.
+ ]]>
+ </xsd:documentation>
</xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="Tcomponent">
- <xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:element name="interfaces" minOccurs="0" maxOccurs="1" type="Tinterfaces">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The definition of the required interfaces that the obtained services
- must implement. There is also a shortcut attribute defined for
- the typical case of just a single interface class.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:group>
- <!-- listener -->
- <xsd:element name="listener" type="TReferenceListener" minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A definition of a listener that will watch for bind/unbind events
- associated with the service reference. The targetted listener can
- be a <ref> to a <bean> or <reference> element, or an inline
- <bean> or <reference>.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
- processContents="lax" />
- </xsd:sequence>
+ <xsd:complexType name="TreferenceListener">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TReferenceListener defines a reference listener that is attached
+ to a <reference> or <reference-list> element. The listener
+ object can be specified as a <ref> or as an inline <bean> or
+ <reference> component. Listener events are mapped to the indicated
+ bind or unbind methods.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="GtargetComponent" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="ref" type="Tidref" />
+ <xsd:attribute name="bind-method" type="Tmethod" />
+ <xsd:attribute name="unbind-method" type="Tmethod" />
+ </xsd:complexType>
- <xsd:attribute name="interface" use="optional" type="Tclass" />
- <xsd:attribute name="filter" use="optional" type="xsd:normalizedString">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A filter string used to narrow the search for a matching service
- reference.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="component-name" type="Tidref" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- An optional specifier that can be used to match a service definition
- to one created by a specific blueprint component.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="availability" type="Tavailability" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Use to control the initial processing of service references at
- blueprint context startup. "mandatory" indicates the context
- should not start unless the service is available within the
- specified context startup period. "optional" indicates availability
- of this service is not a requirement at bundle startup.
+ <xsd:simpleType name="Tactivation">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tactivation defines the activation type for components. This is used in this
+ schema by the <blueprint> default-activation attribute and the
+ activation attribute.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="eager" />
+ <xsd:enumeration value="lazy" />
+ </xsd:restriction>
+ </xsd:simpleType>
- NOTE: No default is specified because this can be overridden
- by the default-availability attribute of the <blueprint> element.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
+ <xsd:simpleType name="Tavailability">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tavailability defines an availability attribute type. This is used in this
+ schema by the <blueprint> default-availability attribute and the
+ <reference> and <reference-list> availability attribute.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="mandatory" />
+ <xsd:enumeration value="optional" />
+ </xsd:restriction>
+ </xsd:simpleType>
- <xsd:complexType name="TReferenceListener">
- <xsd:annotation>
+ <!-- service -->
+
+ <xsd:complexType name="Tservice">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ 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.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="Tcomponent">
+ <xsd:sequence>
+ <xsd:group ref="GserviceElements" />
+ </xsd:sequence>
+ <xsd:attribute name="interface" type="Tclass">
+ <xsd:annotation>
<xsd:documentation>
- <![CDATA[
- TReferenceListener defines a reference listener that is attached
- to a <reference>, <ref-set>, or <ref-list> element. The listener
- object can be specified as a <ref> or as an inline <bean> or
- <reference> component. Listener events are mapped to the indicated
- bind or unbind methods.
- ]]>
+ <![CDATA[
+ The interface that this OSGi service will provide.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
- <xsd:group ref="targetComponent" />
- <xsd:attribute name="ref" type="xsd:token" use="optional" />
- <xsd:attribute name="bind-method" type="Tmethod" use="required" />
- <xsd:attribute name="unbind-method" type="Tmethod" use="required" />
- </xsd:complexType>
-
- <xsd:simpleType name="Tlazy-init">
- <xsd:annotation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="ref" type="Tidref">
+ <xsd:annotation>
<xsd:documentation>
- <![CDATA[
- Tlazy-init defines a lazy-init type. This is used in this
- schema by the <blueprint> default-lazy-init attribute and the
- <bean> lazy-init attribute.
- ]]>
+ <![CDATA[
+ The ref attribute can be used to specify the component that provides
+ the object exported as an OSGi service.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:boolean" />
- </xsd:simpleType>
-
- <xsd:simpleType name="Tavailability">
- <xsd:annotation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="auto-export" type="TautoExportModes"
+ default="disabled">
+ <xsd:annotation>
<xsd:documentation>
- <![CDATA[
- Tlazy-init defines an availability attribute type. This is used in this
- schema by the <blueprint> default-availability attribute and the
- <reference>, <ref-set>, and <ref-list> availability attribute.
- ]]>
+ <![CDATA[
+ If set to a value different from "disabled", the Blueprint Container
+ will introspect the target to discover the set of interfaces or classes
+ that the service will be registered under.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="mandatory" />
- <xsd:enumeration value="optional" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="Tcomparator">
- <xsd:group ref="targetComponent" />
- </xsd:complexType>
-
- <!-- service -->
-
- <xsd:complexType name="Tservice">
- <xsd:annotation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="ranking" type="xsd:int" default="0">
+ <xsd:annotation>
<xsd:documentation>
- <![CDATA[
- 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.
- ]]>
+ <![CDATA[
+ A service ranking value that is added to the service properties
+ the service will be published with.
+ ]]>
</xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="Tcomponent">
- <xsd:sequence>
- <xsd:group ref="serviceElements" />
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
- processContents="lax" />
- </xsd:sequence>
- <xsd:attribute name="interface" type="Tclass" use="optional" />
- <xsd:attribute name="ref" type="Tidref" use="optional" />
- <xsd:attribute name="depends-on" type="TdependsOn" use="optional">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- depends-on identifies (by name) other components that this service
- depends on. The service will only be registered after the
- depends-on services are successfully completed. Also, if there
- are <reference>, <ref-list>, <ref-set> elements with unstatisfied
- manadatory references, then the depends-on relationship will also
- be used to determine whether this service is registered or
- unregistered.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="auto-export" type="TautoExportModes" default="disabled" />
- <xsd:attribute name="ranking" type="xsd:int" default="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A service ranking value that is added to the service properties
- the service will be published with.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:anyAttribute namespace="##other" processContents="lax" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
- <xsd:group name="serviceElements">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A set of service elements that is shared by the <service> element
- in this schema and the <managed-service-factory> element in the
- blueprint-cm schema.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
+ <xsd:complexType name="Tinlined-service">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Tinlined-service type is used for inlined (i.e. non top level)
+ <service> elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:restriction base="Tservice">
<xsd:sequence>
- <xsd:element name="description" type="Tdescription" minOccurs="0" />
- <xsd:element name="interfaces" type="Tinterfaces" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A collection of one or more interface class names this service
- will be registered under. The <service> element also has
- a shortcut interface attribute for the usual case of just
- a single interface being used. This also cannot be used if
- the auto-export attribute is used.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-properties" type="TserviceProperties" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The service provided when the service is registered. The service
- properties are similar to map elements, but the keys must always
- be strings, and the values are required to be in a narrower range.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="registration-listener" type="TregistrationListener"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A set of 0 or more registration listeners attached to this service
- component. The registration listeners will be notified whenever the
- service is registered or unregistered from the framework service
- registry.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- These are the two types of elements that can be bound as a service.
- This will be either a <ref> to a <bean> component or an inline <bean> component.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:element name="bean" type="Tbean" />
- <xsd:element name="ref" type="Tref" />
- </xsd:choice>
+ <xsd:group ref="GserviceElements" />
</xsd:sequence>
- </xsd:group>
+ <xsd:attribute name="id" use="prohibited" />
+ <xsd:attribute name="depends-on" type="TdependsOn" />
+ <xsd:attribute name="activation" use="prohibited"
+ fixed="lazy" />
+ <xsd:attribute name="interface" type="Tclass" />
+ <xsd:attribute name="ref" type="Tidref" />
+ <xsd:attribute name="auto-export" type="TautoExportModes"
+ default="disabled" />
+ <xsd:attribute name="ranking" type="xsd:int" default="0" />
+ <xsd:anyAttribute namespace="##other"
+ processContents="strict" />
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
-
- <xsd:complexType name="TregistrationListener">
+ <xsd:group name="GbaseServiceElements">
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription"
+ minOccurs="0" />
+ <xsd:element name="interfaces" type="Tinterfaces"
+ minOccurs="0">
<xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A registration listener definition. The target registration listener
- can be either a <ref> to a <bean> or <service> component, or an inline
- <bean> or <service> component definition. The registration-method and
- unregistration-method attributes define the methods that will be called
- for the respective events.
-
- For the very common case of using a <ref> to a listener component, the
- ref attribute may also be used as a shortcut.
- ]]>
- </xsd:documentation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection of one or more interface class names this service
+ will be registered under. The <service> element also has
+ a shortcut interface attribute for the usual case of just
+ a single interface being used. This also cannot be used if
+ the auto-export attribute is used.
+ ]]>
+ </xsd:documentation>
</xsd:annotation>
- <xsd:group ref="targetComponent" />
- <xsd:attribute name="ref" type="Tidref" use="optional" />
- <!-- ### why are there both required? -->
- <xsd:attribute name="registration-method" type="Tmethod" use="required" />
- <xsd:attribute name="unregistration-method" type="Tmethod" use="required" />
- </xsd:complexType>
+ </xsd:element>
- <!--
- Values
- -->
-
- <xsd:group name="value">
+ <xsd:element name="service-properties" type="TserviceProperties"
+ minOccurs="0">
<xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The set of "value" types that can be used in any place a value
- can be specified. This set includes the <ref> and <idref> elements, any of the
- component types (<bean>, <service>, etc.) as inline components, the
- generic <value> element for types sourced from string values, any of the
- collection types (<set>, <list>, <array>, <map>, <props>), and the
- <null> type to inject a null value.
- ]]>
- </xsd:documentation>
+ <xsd:documentation>
+ <![CDATA[
+ The service provided when the service is registered. The service
+ properties are similar to map elements, but the keys must always
+ be strings, and the values are required to be in a narrower range.
+ ]]>
+ </xsd:documentation>
</xsd:annotation>
- <xsd:choice>
- <xsd:group ref="nonNullValue" />
- <xsd:element name="null" type="Tnull" />
- </xsd:choice>
- </xsd:group>
-
- <xsd:complexType name="Tnull">
+ </xsd:element>
+ <xsd:element name="registration-listener" type="TregistrationListener"
+ minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The definition for a <null> value type.
- ]]>
- </xsd:documentation>
+ <xsd:documentation>
+ <![CDATA[
+ A set of 0 or more registration listeners attached to this service
+ component. The registration listeners will be notified whenever the
+ service is registered or unregistered from the framework service
+ registry.
+ ]]>
+ </xsd:documentation>
</xsd:annotation>
- <!-- [FIXME] cannot be processed by xjc -->
- <!-- xsd:choice minOccurs="0" maxOccurs="unbounded" / -->
- </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:group>
- <xsd:group name="nonNullValue">
+ <xsd:group name="GserviceElements">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A set of service elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="GbaseServiceElements" />
+ <xsd:group ref="GtargetComponent" minOccurs="0">
<xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The set of "value" types that can be used in any place a non-null value
- can be specified. This set includes the <ref> and <idref> elements, any of the
- component types (<bean>, <service>, etc.) as inline components, the
- generic <value> element for types sourced from string values, and any of the
- collection types (<set>, <list>, <array>, <map>, <props>).
-
- The <null> type is NOT a member of this group.
- ]]>
- </xsd:documentation>
+ <xsd:documentation>
+ <![CDATA[
+ A service definition can use any of the target types as an inline element
+ as well.
+ ]]>
+ </xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="allComponents" />
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:element name="idref" type="Tref" />
- <xsd:element name="value" type="Tvalue" />
- <xsd:element name="list" type="Tcollection" />
- <xsd:element name="set" type="Tcollection" />
- <xsd:element name="map" type="Tmap" />
- <xsd:element name="array" type="Tcollection" />
- <xsd:element name="props" type="Tprops" />
- </xsd:choice>
- </xsd:sequence>
- </xsd:group>
+ </xsd:group>
+ </xsd:sequence>
+ </xsd:group>
- <xsd:complexType name="Tref">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tref is the type used for <ref> elements. This specifies a required
- component id for the reference component.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="component" type="Tidref" use="required" />
- </xsd:complexType>
+ <xsd:complexType name="TregistrationListener">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A registration listener definition. The target registration listener
+ can be either a <ref> to a <bean> or <service> component, or an inline
+ <bean> or <service> component definition. The registration-method and
+ unregistration-method attributes define the methods that will be called
+ for the respective events.
- <xsd:complexType name="Tvalue" mixed="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tvalue is the type used for <value> elements. The <value> element
- is used for types that can be created from a single string value.
- The string value is the data value for the element. The optional
- type attribute allows a target conversion value to be explicitly
- specified.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="type" type="Tclass" use="optional" />
- </xsd:complexType>
+ For the very common case of using a <ref> to a listener component, the
+ ref attribute may also be used as a shortcut.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="GtargetComponent" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="ref" type="Tidref" />
+ <xsd:attribute name="registration-method" type="Tmethod" />
+ <xsd:attribute name="unregistration-method" type="Tmethod" />
+ </xsd:complexType>
- <!-- Collection Values -->
+ <!-- Values -->
- <xsd:complexType name="TtypedCollection">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TtypeCollection defines comment attributes shared among different
- collection types that allow a default value type to be specified.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="value-type" type="Tclass" />
- </xsd:complexType>
+ <xsd:group name="Gvalue">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The set of "value" types that can be used in any place a value
+ can be specified. This set includes the <ref> and <idref> elements, any of the
+ component types (<bean>, <service>, etc.) as inline components, the
+ generic <value> element for types sourced from string values, any of the
+ collection types (<set>, <list>, <array>, <map>, <props>), and the
+ <null> type to inject a null value.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:group ref="GnonNullValue" />
+ <xsd:element name="null" type="Tnull" />
+ </xsd:choice>
+ </xsd:group>
+ <xsd:complexType name="Tnull">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The definition for a <null> value type.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:complexType>
- <xsd:complexType name="Tcollection">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tcollection is the base schema type for different ordered collection
- types. This is shared between the <array>, <list>, and <set> elements.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TtypedCollection">
- <xsd:group ref="value" minOccurs="0" maxOccurs="unbounded" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
+ <xsd:group name="GnonNullValue">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The set of "value" types that can be used in any place a non-null value
+ can be specified. This set includes the <ref> and <idref> elements, any of the
+ component types (<bean>, <service>, etc.) as inline components, the
+ generic <value> element for types sourced from string values, and any of the
+ collection types (<set>, <list>, <array>, <map>, <props>).
- <xsd:complexType name="Tprops">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tprops is the type used by the <props> value element. The prop elements
- are pairs of string-valued keys and values.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="prop" type="Tprop" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:complexType>
+ The <null> type is NOT a member of this group.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:group ref="GallComponents" />
+ <xsd:element name="idref" type="Tref" />
+ <xsd:element name="value" type="Tvalue" />
+ <xsd:element name="list" type="Tcollection" />
+ <xsd:element name="set" type="Tcollection" />
+ <xsd:element name="map" type="Tmap" />
+ <xsd:element name="array" type="Tcollection" />
+ <xsd:element name="props" type="Tprops" />
+ </xsd:choice>
+ </xsd:group>
- <xsd:complexType name="Tprop" mixed="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tprop is a single property element for a <props> value type. The property
- value can be specified using either the attribute, or as value data for
- the property element.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="key" type="TstringValue" use="required" />
- <xsd:attribute name="value" type="TstringValue" use="optional" />
- </xsd:complexType>
+ <xsd:complexType name="Tref">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tref is the type used for <ref> elements. This specifies a required
+ component id for the reference component.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="component-id" type="Tidref" use="required" />
+ </xsd:complexType>
- <!-- 'map' element type -->
- <xsd:complexType name="Tmap">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tmap is the base type used for <map> elements. A map may have a
- default value type specified, so it inherits from the TtypeCollection
- type. A key type can also be specified, and the map members are
- created from the entry elements, which require a key/value pair.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="TtypedCollection">
- <xsd:sequence>
- <xsd:element name="entry" type="TmapEntry" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="key-type" type="Tclass" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
+ <xsd:complexType name="Tvalue" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tvalue is the type used for <value> elements. The <value> element
+ is used for types that can be created from a single string value.
+ The string value is the data value for the element. The optional
+ type attribute allows a target conversion value to be explicitly
+ specified.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="type" type="Ttype" />
+ </xsd:complexType>
- <!-- 'entry' element type -->
- <xsd:complexType name="TmapEntry">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TmapEntry is used for <entry> elements nested inside of a <map> element.
- Each <entry> instance defines a key/value pair that will be added to the
- Map. Both the keys and values may be arbitrary types. Keys must not
- be <null> but <null> is permitted for entry values. A default type
- can be specified for both the keys and the values, but individual keys
- or values can override the default.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="key" type="Tkey" minOccurs="0" />
- <xsd:group ref="value" />
- </xsd:sequence>
- <xsd:attribute name="key" type="TstringValue" />
- <xsd:attribute name="key-ref" type="Tidref" />
- <xsd:attribute name="value" type="TstringValue" />
- <xsd:attribute name="value-ref" type="Tidref" />
- </xsd:complexType>
+ <!-- Collection Values -->
+ <xsd:complexType name="TtypedCollection">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TtypeCollection defines comment attributes shared among different
+ collection types that allow a default value type to be specified.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="value-type" type="Ttype" />
+ </xsd:complexType>
- <!-- 'service property' element type -->
- <xsd:complexType name="TserviceProperties">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TserviceProperty is used for <service-properties> elements.
- The syntax is similar to what is defined for <map>, but keys must be
- string values and there are no type defaults that can be specified.
- created from the entry elements, which require a key/value pair.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="entry" type="TservicePropertyEntry" minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:complexType>
+ <xsd:complexType name="Tcollection">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tcollection is the base schema type for different ordered collection
+ types. This is shared between the <array>, <list>, and <set> elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TtypedCollection">
+ <xsd:group ref="Gvalue" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
- <!-- 'entry' element type -->
- <xsd:complexType name="TservicePropertyEntry">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TservicePropertyEntry is an entry value used for the <service-properties>
- element. This does not allow a child <key> element and there are no
- key-ref or value-ref attributes.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
+ <xsd:complexType name="Tprops">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tprops is the type used by the <props> value element. The prop elements
+ are pairs of string-valued keys and values.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="prop" type="Tprop" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Tprop" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tprop is a single property element for a <props> value type. The property
+ value can be specified using either the attribute, or as value data for
+ the property element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="key" type="TstringValue" use="required" />
+ <xsd:attribute name="value" type="TstringValue" />
+ </xsd:complexType>
+
+ <!-- 'map' element type -->
+ <xsd:complexType name="Tmap">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tmap is the base type used for <map> elements. A map may have a
+ default value type specified, so it inherits from the TtypeCollection
+ type. A key type can also be specified, and the map members are
+ created from the entry elements, which require a key/value pair.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TtypedCollection">
<xsd:sequence>
- <xsd:group ref="value" />
+ <xsd:element name="entry" type="TmapEntry" minOccurs="0"
+ maxOccurs="unbounded" />
</xsd:sequence>
- <xsd:attribute name="key" type="TstringValue" use="required" />
- <xsd:attribute name="value" type="TstringValue" use="optional" />
- </xsd:complexType>
+ <xsd:attribute name="key-type" type="Ttype" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
- <!-- General types -->
+ <!-- 'entry' element type -->
+ <xsd:complexType name="TmapEntry">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TmapEntry is used for <entry> elements nested inside of a <map> element.
+ Each <entry> instance defines a key/value pair that will be added to the
+ Map. Both the keys and values may be arbitrary types. Keys must not
+ be <null> but <null> is permitted for entry values. A default type
+ can be specified for both the keys and the values, but individual keys
+ or values can override the default.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key" type="Tkey" minOccurs="0" />
+ <xsd:group ref="Gvalue" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="key" type="TstringValue" />
+ <xsd:attribute name="key-ref" type="Tidref" />
+ <xsd:attribute name="value" type="TstringValue" />
+ <xsd:attribute name="value-ref" type="Tidref" />
+ </xsd:complexType>
- <xsd:complexType name="Tdescription" mixed="true">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- A generic <description> element type to allow documentation to added to the
- blueprint configuration.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="0" maxOccurs="unbounded" />
- </xsd:complexType>
+ <!-- 'service property' element type -->
+ <xsd:complexType name="TserviceProperties">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TserviceProperty is used for <service-properties> elements.
+ The syntax is similar to what is defined for <map>, but keys must be
+ string values and there are no type defaults that can be specified.
+ created from the entry elements, which require a key/value pair.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="entry" type="TservicePropertyEntry"
+ minOccurs="0" maxOccurs="unbounded" />
+ <xsd:any namespace="##other" processContents="strict"
+ minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
- <xsd:complexType name="Tinterfaces">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- The type definition for the <interfaces> element used for <service>,
- <reference>, <ref-set>, and <ref-list>;
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="1" maxOccurs="unbounded">
- <xsd:element name="value" type="TinterfaceValue" />
- </xsd:choice>
- </xsd:complexType>
+ <!-- 'entry' element type -->
+ <xsd:complexType name="TservicePropertyEntry">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TservicePropertyEntry is an entry value used for the <service-properties>
+ element. This does not allow a child <key> element and there are no
+ key-ref or value-ref attributes.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="Gvalue" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="key" type="TstringValue" use="required" />
+ <xsd:attribute name="value" type="TstringValue" />
+ </xsd:complexType>
- <xsd:simpleType name="TinterfaceValue">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TinterfaceValue is used for subelements of the <interfaces> element.
- This is just a <value>xxxxx</value> element where the contained
- value is the name of an interface class.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="Tclass" />
- </xsd:simpleType>
+ <!-- General types -->
- <xsd:simpleType name="Tclass">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tclass is a base type that should be used for all attributes that
- refer to java class names or java types.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:NCName" />
- </xsd:simpleType>
+ <xsd:complexType name="Tdescription" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A generic <description> element type to allow documentation to added to the
+ blueprint configuration.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded" />
+ </xsd:complexType>
- <xsd:simpleType name="Tmethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tmethod is a base type that should be used for all attributes that
- refer to java method names.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:NCName" />
- </xsd:simpleType>
+ <xsd:complexType name="Tinterfaces">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The type definition for the <interfaces> element used for <service>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:element name="value" type="TinterfaceValue" />
+ </xsd:choice>
+ </xsd:complexType>
- <xsd:simpleType name="TnullableMethod">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tmethod is a base type that should be used for all attributes that
- refer to java method names. This version also allows "" to be
- specified to specify that no name should be used.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="[\i-[:]][\c-[:]]*" />
- <xsd:pattern value="" />
- </xsd:restriction>
- </xsd:simpleType>
+ <xsd:simpleType name="TinterfaceValue">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TinterfaceValue is used for subelements of the <interfaces> element.
+ This is just a <value>xxxxx</value> element where the contained
+ value is the name of an interface class.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="Tclass" />
+ </xsd:simpleType>
- <!-- Should be used for all attributes and elements that refer to method names -->
- <xsd:simpleType name="Tidref">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Tidref is a base type that should be used for all attributes that
- refer to component ids.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:NCName" />
- </xsd:simpleType>
+ <xsd:simpleType name="Tclass">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tclass is a base type that should be used for all attributes that
+ refer to java class names.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NCName" />
+ </xsd:simpleType>
- <xsd:simpleType name="TstringValue">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TstringValue is a base type that should be used for all attributes that
- refer to raw string values
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:normalizedString" />
- </xsd:simpleType>
+ <xsd:simpleType name="Ttype">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Ttype is a base type that refer to java types such as classes or
+ arrays.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="[\i-[:]][\c-[:]]*(\[\])*" />
+ </xsd:restriction>
+ </xsd:simpleType>
- <xsd:simpleType name="TautoExportModes">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TautoExportModes is a base type that should be used for export-mode
- attributes. Also used by the blueprint-cm compendium.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="disabled" />
- <xsd:enumeration value="interfaces" />
- <xsd:enumeration value="class-hierarchy" />
- <xsd:enumeration value="all-classes" />
- </xsd:restriction>
- </xsd:simpleType>
+ <xsd:simpleType name="Tmethod">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tmethod is a base type that should be used for all attributes that
+ refer to java method names.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NCName" />
+ </xsd:simpleType>
- <xsd:simpleType name="Ttimeout">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- Ttimeout is a base type that should be used for all attributes that
- specify timeout values
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:unsignedLong" />
- </xsd:simpleType>
+ <!--
+ Should be used for all attributes and elements that refer to method
+ names
+ -->
+ <xsd:simpleType name="Tidref">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tidref is a base type that should be used for all attributes that
+ refer to component ids.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NCName" />
+ </xsd:simpleType>
- <xsd:simpleType name="TdependsOn">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- TdependsOn is a base type that should be used for all attributes that
- specify depends-on relationships
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:normalizedString" />
- </xsd:simpleType>
+ <xsd:simpleType name="TstringValue">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TstringValue is a base type that should be used for all attributes that
+ refer to raw string values
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:normalizedString" />
+ </xsd:simpleType>
-</xsd:schema>
+ <xsd:simpleType name="TautoExportModes">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TautoExportModes is a base type that should be used for export-mode
+ attributes.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="disabled" />
+ <xsd:enumeration value="interfaces" />
+ <xsd:enumeration value="class-hierarchy" />
+ <xsd:enumeration value="all-classes" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Ttimeout">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Ttimeout is a base type that should be used for all attributes that
+ specify timeout values
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:unsignedLong" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="TdependsOn">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TdependsOn is a base type that should be used for all attributes that
+ specify depends-on relationships
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction>
+ <xsd:simpleType>
+ <xsd:list itemType="Tidref" />
+ </xsd:simpleType>
+ <xsd:minLength value="1" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Tscope">
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="singleton" />
+ <xsd:enumeration value="prototype" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Tservice-use">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Indicates the type of object that will be placed within the
+ reference collection. "service-object" indicates the
+ collection contains blueprint proxies for imported services.
+ "service-reference" indicates the collection contains
+ ServiceReference objects matching the target service type.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="service-object" />
+ <xsd:enumeration value="service-reference" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+</xsd:schema>
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/pom.xml 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/pom.xml 2009-07-15 13:41:27 UTC (rev 91294)
@@ -11,6 +11,15 @@
<!-- $Id$ -->
+ <!--
+ Set these VM properties in your IDE debugger
+
+ -Dlog4j.output.dir=${workspace_loc:jboss-osgi-blueprint-testsuite/target}
+ -Djboss.osgi.framework.properties=jboss-osgi-felix.properties
+ -Dorg.jboss.osgi.husky.Invoker=org.jboss.osgi.husky.internal.OSGiInvoker
+ -Dtest.archive.directory=${workspace_loc:jboss-osgi-blueprint-testsuite/target}/test-libs
+ -->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -31,6 +31,7 @@
import java.util.List;
import org.jboss.osgi.blueprint.parser.BlueprintParser;
+import org.jboss.osgi.blueprint.parser.xb.TActivation;
import org.jboss.osgi.blueprint.parser.xb.TAvailability;
import org.jboss.osgi.blueprint.parser.xb.TBean;
import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
@@ -67,15 +68,9 @@
TAvailability defaultAvailability = blueprint.getDefaultAvailability();
assertEquals(TAvailability.mandatory, defaultAvailability);
- String defaultDestroyMethod = blueprint.getDefaultDestroyMethod();
- assertEquals("defaultDestroyMethod", defaultDestroyMethod);
+ TActivation defaultActivation = blueprint.getDefaultActivation();
+ assertEquals(TActivation.eager, defaultActivation);
- String defaultInitMethod = blueprint.getDefaultInitMethod();
- assertEquals("defaultInitMethod", defaultInitMethod);
-
- Boolean defaultLazyInit = blueprint.getDefaultLazyInit();
- assertEquals(Boolean.FALSE, defaultLazyInit);
-
long defaultTimeout = blueprint.getDefaultTimeout().longValue();
assertEquals(300000, defaultTimeout);
}
@@ -125,7 +120,7 @@
{
Collection<TServiceReference> serviceRefs = blueprint.getMetadata(TServiceReference.class);
assertNotNull("ServiceReferenceMetadata not null", serviceRefs);
- assertEquals("ServiceReferenceMetadata size", 3, serviceRefs.size());
+ assertEquals("ServiceReferenceMetadata size", 2, serviceRefs.size());
}
@Test
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -24,12 +24,12 @@
//$Id$
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
import java.math.BigInteger;
import java.net.URL;
import org.jboss.osgi.blueprint.parser.BlueprintParser;
+import org.jboss.osgi.blueprint.parser.xb.TActivation;
import org.jboss.osgi.blueprint.parser.xb.TAvailability;
import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
import org.jboss.osgi.spi.testing.OSGiTest;
@@ -53,9 +53,7 @@
// assert default attributes
assertEquals("default-availability: mandatory", TAvailability.mandatory, blueprint.getDefaultAvailability());
assertEquals("default-timeout: 300000", new BigInteger("300000"), blueprint.getDefaultTimeout());
- assertEquals("default-lazy-init: FALSE", Boolean.FALSE, blueprint.getDefaultLazyInit());
- assertNull("default-init-method: null", blueprint.getDefaultInitMethod());
- assertNull("default-destroy-method: null", blueprint.getDefaultDestroyMethod());
+ assertEquals("default-activation: eager", TActivation.eager, blueprint.getDefaultActivation());
}
@Test
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -65,14 +65,14 @@
TService serviceA = (TService)compList.get(1);
assertEquals("serviceA", serviceA.getId());
- List<String> intfsA = serviceA.getInterfaceNames();
+ List<String> intfsA = serviceA.getInterfaces().getValues();
assertTrue(intfsA.size() > 0);
assertEquals(ServiceA.class.getName(), intfsA.get(0));
TService serviceB = (TService)compList.get(2);
assertEquals("serviceB", serviceB.getId());
- List<String> intfsB = serviceB.getInterfaceNames();
+ List<String> intfsB = serviceB.getInterfaces().getValues();
assertTrue(intfsB.size() > 0);
assertEquals(ServiceB.class.getName(), intfsB.get(0));
}
Added: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -0,0 +1,128 @@
+/*
+ * 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.test.osgi.blueprint.parser;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.management.MBeanServer;
+
+import org.jboss.osgi.blueprint.parser.BlueprintParser;
+import org.jboss.osgi.blueprint.parser.xb.TBean;
+import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
+import org.jboss.osgi.blueprint.parser.xb.TProperty;
+import org.jboss.osgi.blueprint.parser.xb.TReference;
+import org.jboss.osgi.blueprint.parser.xb.TService;
+import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.jboss.test.osgi.blueprint.MockBlueprintContext;
+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.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Blueprint parser tests
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class BlueprintContainerParserTestCase
+{
+ private static TBlueprint blueprint;
+
+ @BeforeClass
+ public static void beforeClass()
+ {
+ URL xmlURL = new OSGiTestHelper().getResourceURL("container/OSGI-INF/blueprint/basic-service.xml");
+ blueprint = new BlueprintParser(new MockBlueprintContext()).parse(xmlURL);
+ }
+
+ @Test
+ public void getBeanMetadata() throws Exception
+ {
+ List<TBean> beans = blueprint.getMetadata(TBean.class);
+ assertNotNull("TBeans not null", beans);
+ assertEquals("TBeans size", 1, beans.size());
+
+ TBean bean = beans.get(0);
+ assertNotNull("TBean not null", bean);
+ assertEquals(BeanA.class.getName(), bean.getClassName());
+
+ List<TProperty> props = bean.getProperties();
+ assertNotNull("TProperties not null", props);
+ assertEquals("TProperties size", 1, props.size());
+
+ TProperty prop = props.get(0);
+ assertNotNull("TProperty not null", prop);
+ assertEquals("mbeanServer", prop.getName());
+ assertEquals("mbeanService", prop.getRef());
+ }
+
+ @Test
+ public void getServiceMetadata() throws Exception
+ {
+ List<TService> services = blueprint.getMetadata(TService.class);
+ assertNotNull("TServices not null", services);
+ assertEquals("TServices size", 2, services.size());
+
+ TService serviceA = services.get(0);
+ assertEquals("serviceA", serviceA.getId());
+ assertEquals("beanA", serviceA.getRef());
+ assertEquals(ServiceA.class.getName(), serviceA.getInterface());
+
+ TService serviceB = services.get(1);
+ assertEquals("serviceB", serviceB.getId());
+ assertEquals(ServiceB.class.getName(), serviceB.getInterface());
+
+ TBean bean = serviceB.getBean();
+ assertNotNull("TBean not null", bean);
+ assertEquals(BeanB.class.getName(), bean.getClassName());
+
+ List<TProperty> props = bean.getProperties();
+ assertNotNull("TProperties not null", props);
+ assertEquals("TProperties size", 1, props.size());
+
+ TProperty prop = props.get(0);
+ assertNotNull("TProperty not null", prop);
+ assertEquals("beanA", prop.getName());
+ assertEquals("beanA", prop.getRef());
+ }
+
+ @Test
+ public void getReferenceMetadata() throws Exception
+ {
+ List<TReference> references = blueprint.getMetadata(TReference.class);
+ assertNotNull("TReferences not null", references);
+ assertEquals("TReferences size", 1, references.size());
+
+ TReference ref = references.get(0);
+ assertEquals("mbeanService", ref.getId());
+ assertEquals(MBeanServer.class.getName(), ref.getInterface());
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/log4j.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/log4j.xml 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/log4j.xml 2009-07-15 13:41:27 UTC (rev 91294)
@@ -38,11 +38,11 @@
</category>
-->
- <!-- Show jboss deployer traces -->
+ <!-- Show jboss deployer traces
<category name="org.jboss.xb">
<priority value="TRACE" />
</category>
-
+ -->
<!-- ======================= -->
<!-- Setup the Root category -->
Modified: projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/bundles/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml 2009-07-15 13:41:27 UTC (rev 91294)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
- default-availability="mandatory" default-destroy-method="defaultDestroyMethod" default-init-method="defaultInitMethod" default-lazy-init="false" default-timeout="300000">
+ default-activation="eager" default-availability="mandatory" default-timeout="300000">
<description>blueprint description</description>
@@ -9,8 +9,8 @@
<bean class="foo.TypeConverterBean" />
<reference component-name="typeConverterReferenceA" />
<reference component-name="typeConverterReferenceB" />
- <ref component="typeConverterRefA" />
- <ref component="typeConverterRefB" />
+ <ref component-id="typeConverterRefA" />
+ <ref component-id="typeConverterRefB" />
</type-converters>
<bean id="typeConverterRefA" class="foo.TypeConverterRefA"/>
@@ -35,29 +35,18 @@
<service id="idServiceB" ref="serviceRef" />
- <ref-set id="myServices" interface="com.xyz.MyService" member-type="service-instance" ordering-basis="service" comparator-ref="someComparator" />
+ <reference-list id="myEventListeners" interface="com.xyz.EventListener" />
- <ref-list id="myEventListeners" interface="com.xyz.EventListener" />
-
- <!--
- <ref-list id="myOtherServices" interface="com.xyz.OtherService" ordering-basis="service-reference">
- <comparator>
- <bean class="MyOtherServiceComparator" />
- </comparator>
- </ref-list>
+ <!--
+ availablitity="optional"
-->
-
- <reference component-name="referenceCompName" interface="foo.referenceInterf" filter="referenceFilter" availablitity="optional">
+ <reference component-name="referenceCompName" interface="foo.referenceInterf" filter="referenceFilter" >
<description>reference description</description>
- <interfaces>
- <value>foo.ReferenceInterfA</value>
- <value>foo.ReferenceInterfB</value>
- </interfaces>
- <listener ref="referenceListenerA" bind-method="bindMethod" unbind-method="unbindMethod" />
- <listener ref="referenceListenerB" />
+ <reference-listener ref="referenceListenerA" bind-method="bindMethod" unbind-method="unbindMethod" />
+ <reference-listener ref="referenceListenerB" />
</reference>
- <bean id="beanA" class="foo.Bean" depends-on="beanDependency" init-method="initMethod" destroy-method="destroyMethod" factory-method="factoryMethod"
- factory-component="factoryComponent" scope="singleton" lazy-init="lazy" />
+ <bean id="beanA" class="foo.Bean" init-method="initMethod" destroy-method="destroyMethod" factory-method="factoryMethod"
+ factory-ref="factoryComponent" scope="singleton"/>
</blueprint>
Modified: projects/jboss-osgi/trunk/reactor/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixLogger.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixLogger.java 2009-07-15 13:38:06 UTC (rev 91293)
+++ projects/jboss-osgi/trunk/reactor/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixLogger.java 2009-07-15 13:41:27 UTC (rev 91294)
@@ -23,6 +23,7 @@
//$Id: FelixIntegration.java 84730 2009-02-25 12:57:23Z thomas.diesler at jboss.com $
+import org.apache.felix.moduleloader.ResourceNotFoundException;
import org.jboss.logging.Logger;
import org.osgi.framework.ServiceReference;
@@ -56,6 +57,13 @@
if (level == LOG_DEBUG)
{
+ // [FELIX-1124] ResourceNotFoundException too verbose
+ // https://issues.apache.org/jira/browse/FELIX-1124
+ if (throwable instanceof ResourceNotFoundException)
+ {
+ msg = "ResourceNotFoundException: " + msg;
+ throwable = null;
+ }
log.debug(msg, throwable);
}
else if (level == LOG_INFO)
More information about the jboss-cvs-commits
mailing list