[jboss-osgi-commits] JBoss-OSGI SVN: r90375 - in projects/jboss-osgi/trunk: blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser and 6 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Thu Jun 18 02:51:01 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-06-18 02:51:00 -0400 (Thu, 18 Jun 2009)
New Revision: 90375
Added:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/JBossXBParser.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAutoExportModes.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAvailability.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComparator.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComponent.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServicePropertyEntry.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tmap.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tnull.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprop.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprops.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TtypedCollection.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java
Removed:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/AutoExportModes.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Availability.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComparatorImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefCollectionImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceListenerImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RegistrationListenerImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServicePropertyEntry.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Targument.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tcollection.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tkey.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tmap.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TmapEntry.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tnull.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprop.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tproperty.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprops.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TserviceProperties.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TtypedCollection.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tvalue.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TypeConverters.java
Modified:
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentMetadataImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/main/java/org/jboss/osgi/trailblazer/web/MainServlet.java
Log:
Decouple jbossxb model from BP reflect model - ok
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/BlueprintContainerImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -23,28 +23,18 @@
//$Id: BlueprintContextImpl.java 90313 2009-06-17 10:37:51Z thomas.diesler at jboss.com $
-import java.net.URL;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.jboss.osgi.blueprint.parser.BlueprintParser;
import org.jboss.osgi.blueprint.reflect.BlueprintMetadata;
-import org.jboss.osgi.common.log.LogServiceTracker;
import org.jboss.osgi.spi.NotImplementedException;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.blueprint.container.NoSuchComponentException;
import org.osgi.service.blueprint.reflect.ComponentMetadata;
-import org.osgi.service.log.LogService;
/**
* When a Blueprint extender bundle detects that a Blueprint bundle is
@@ -75,22 +65,23 @@
public static final String PROPERTY_BLUEPRINT_BUNDLE_SYMBOLIC_NAME = "osgi.blueprint.container.symbolicname";
public static final String PROPERTY_BLUEPRINT_BUNDLE_VERSION = "osgi.blueprint.container.version";
- private LogService log;
-
private BundleContext context;
private Bundle bundle;
- private Map<String, ComponentMetadata> components = new HashMap<String, ComponentMetadata>();
+ private BlueprintMetadata bpMetadata;
+
public BlueprintContainerImpl(BundleContext context, Bundle bundle)
{
- this.log = new LogServiceTracker(context);
this.context = context;
this.bundle = bundle;
}
public void initialize()
{
- BlueprintMetadata bpMetadata = getBlueprintMetadata();
+ BlueprintParser bpParser = new BlueprintParser(context);
+ bpMetadata = bpParser.getBlueprintMetadata(bundle);
+ bpMetadata.initialize();
+
registerBlueprintContainerService();
}
@@ -99,15 +90,6 @@
return bundle.getBundleContext();
}
- public ComponentMetadata getComponentMetadata(String name)
- {
- ComponentMetadata compMetadata = components.get(name);
- if (compMetadata == null)
- throw new NoSuchComponentException(name);
-
- return compMetadata;
- }
-
public int getCompliance()
{
return COMPLIANCE_STRICT;
@@ -115,19 +97,17 @@
public Set<String> getComponentIds()
{
- return Collections.unmodifiableSet(components.keySet());
+ return bpMetadata.getComponentIds();
}
- @SuppressWarnings("unchecked")
+ public ComponentMetadata getComponentMetadata(String name)
+ {
+ return bpMetadata.getComponentMetadata(name);
+ }
+
public <T extends ComponentMetadata> Collection<T> getMetadata(Class<T> type)
{
- List<T> compMetadata = new ArrayList<T>();
- for (ComponentMetadata comp : components.values())
- {
- if (type.isAssignableFrom(comp.getClass()))
- compMetadata.add((T)comp);
- }
- return Collections.unmodifiableList(compMetadata);
+ return bpMetadata.getMetadata(type);
}
public Object getComponentInstance(String id)
@@ -135,58 +115,6 @@
throw new NotImplementedException();
}
- @SuppressWarnings("unchecked")
- private BlueprintMetadata getBlueprintMetadata()
- {
- BlueprintMetadata bpMetadata = null;
-
- // If a Bundle-Blueprint manifest header is defined, then this header contains a list of paths.
- // If this header is not defined, then resources ending in .xml in the bundle’s
- // OSGI-INF/blueprint directory must be used. These are the resources that
- // would be found by calling the Bundle findEntries("OSGI-INF/blueprint", "*.xml", false) method.
-
- String descriptorPaths = (String)bundle.getHeaders().get(HEADER_BUNDLE_BLUEPRINT);
- if (descriptorPaths != null)
- {
- log.log(LogService.LOG_INFO, HEADER_BUNDLE_BLUEPRINT + ": " + descriptorPaths + " in bundle: " + bundle);
- String[] descritors = descriptorPaths.split(", ");
-
- for (String descriptor : descritors)
- {
- BlueprintMetadata aux = processDescriptor(bundle, descriptor);
- bpMetadata = aux.merge(bpMetadata);
- }
- }
-
- Enumeration<URL> foundEntries = bundle.findEntries("OSGI-INF/blueprint", "*.xml", false);
- if (foundEntries != null)
- {
- while (foundEntries.hasMoreElements())
- {
- URL nextEntry = foundEntries.nextElement();
- BlueprintMetadata aux = processDescriptor(bundle, nextEntry);
- bpMetadata = aux.merge(bpMetadata);
- }
- }
-
- if (bpMetadata == null)
- throw new IllegalStateException("Cannot obtain blueprint metadata");
-
- return bpMetadata;
- }
-
- private BlueprintMetadata processDescriptor(Bundle bundle, String descriptor)
- {
- URL descriptorURL = bundle.getResource(descriptor);
- return processDescriptor(bundle, descriptorURL);
- }
-
- private BlueprintMetadata processDescriptor(Bundle bundle, URL descriptorURL)
- {
- BlueprintMetadata blueprint = new BlueprintParser().parse(descriptorURL);
- return blueprint;
- }
-
private void registerBlueprintContainerService()
{
String symbolicName = bundle.getSymbolicName();
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -21,19 +21,21 @@
*/
package org.jboss.osgi.blueprint.parser;
-//$Id$
+import static org.jboss.osgi.blueprint.container.BlueprintContainerImpl.HEADER_BUNDLE_BLUEPRINT;
import java.net.URL;
+import java.util.Enumeration;
-import org.apache.xerces.dom.DOMXSImplementationSourceImpl;
-import org.jboss.osgi.blueprint.BlueprintException;
+import org.jboss.osgi.blueprint.parser.xb.JBossXBParser;
+import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
import org.jboss.osgi.blueprint.reflect.BlueprintMetadata;
-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;
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+//$Id$
+
/**
* The Blueprint descriptor parser.
*
@@ -42,73 +44,64 @@
*/
public class BlueprintParser
{
- private static SchemaBinding schemaBinding;
-
- public BlueprintParser()
+ private LogService log;
+ private BundleContext context;
+
+ public BlueprintParser(BundleContext context)
{
- if (schemaBinding == null)
- {
- // 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);
+ this.log = new LogServiceTracker(context);
+ this.context = context;
+ }
+
+ @SuppressWarnings("unchecked")
+ public BlueprintMetadata getBlueprintMetadata(Bundle bundle)
+ {
+ TBlueprint tBlueprint = null;
- // 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());
+ // If a Bundle-Blueprint manifest header is defined, then this header contains a list of paths.
+ // If this header is not defined, then resources ending in .xml in the bundle’s
+ // OSGI-INF/blueprint directory must be used. These are the resources that
+ // would be found by calling the Bundle findEntries("OSGI-INF/blueprint", "*.xml", false) method.
- 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)
+ String descriptorPaths = (String)bundle.getHeaders().get(HEADER_BUNDLE_BLUEPRINT);
+ if (descriptorPaths != null)
+ {
+ log.log(LogService.LOG_INFO, HEADER_BUNDLE_BLUEPRINT + ": " + descriptorPaths + " in bundle: " + bundle);
+ String[] descritors = descriptorPaths.split(", ");
+
+ for (String descriptor : descritors)
{
- throw new IllegalStateException("Cannot load: " + DOMXSImplementationSourceImpl.class.getName());
+ TBlueprint aux = processDescriptor(bundle, descriptor);
+ tBlueprint = aux.merge(tBlueprint);
}
- finally
+ }
+
+ Enumeration<URL> foundEntries = bundle.findEntries("OSGI-INF/blueprint", "*.xml", false);
+ if (foundEntries != null)
+ {
+ while (foundEntries.hasMoreElements())
{
- Thread.currentThread().setContextClassLoader(ctxLoader);
+ URL nextEntry = foundEntries.nextElement();
+ TBlueprint aux = processDescriptor(nextEntry);
+ tBlueprint = aux.merge(tBlueprint);
}
}
+
+ if (tBlueprint == null)
+ throw new IllegalStateException("Cannot obtain blueprint metadata");
+
+ return new BlueprintMetadata(context, tBlueprint);
}
-
- /*
- * * Parse a blueprint descriptor
- */
- public BlueprintMetadata parse(URL xmlURL)
+
+ private TBlueprint processDescriptor(Bundle bundle, String descriptor)
{
- if (xmlURL == null)
- throw new IllegalArgumentException("Cannot parse null descriptor URL");
+ URL descriptorURL = bundle.getResource(descriptor);
+ return processDescriptor(descriptorURL);
+ }
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- ClassLoader bundleCL = getClass().getClassLoader();
- Thread.currentThread().setContextClassLoader(bundleCL);
-
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- BlueprintMetadata bpMetadata = (BlueprintMetadata)unmarshaller.unmarshal(xmlURL.toExternalForm(), schemaBinding);
-
- bpMetadata.initialize();
-
- return bpMetadata;
- }
- catch (JBossXBException ex)
- {
- throw new BlueprintException("Cannot parse blueprint descriptor: " + xmlURL, ex);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
+ private TBlueprint processDescriptor(URL descriptorURL)
+ {
+ TBlueprint blueprint = new JBossXBParser().parse(descriptorURL);
+ return blueprint;
}
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/JBossXBParser.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/JBossXBParser.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/JBossXBParser.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,111 @@
+/*
+ * 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.net.URL;
+
+import org.apache.xerces.dom.DOMXSImplementationSourceImpl;
+import org.jboss.osgi.blueprint.BlueprintException;
+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 Blueprint descriptor parser.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class JBossXBParser
+{
+ private static SchemaBinding schemaBinding;
+
+ public JBossXBParser()
+ {
+ if (schemaBinding == null)
+ {
+ // 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
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAutoExportModes.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/AutoExportModes.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAutoExportModes.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAutoExportModes.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,64 @@
+/*
+ * 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$
+
+/**
+ * Java class for TautoExportModes.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public enum TAutoExportModes
+{
+
+ DISABLED("disabled"),
+ INTERFACES("interfaces"),
+ CLASS_HIERARCHY("class-hierarchy"),
+ ALL_CLASSES("all-classes");
+
+ private final String value;
+
+ TAutoExportModes(String v)
+ {
+ value = v;
+ }
+
+ public String value()
+ {
+ return value;
+ }
+
+ public static TAutoExportModes fromValue(String v)
+ {
+ for (TAutoExportModes c : TAutoExportModes.values())
+ {
+ if (c.value.equals(v))
+ {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAvailability.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Availability.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAvailability.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TAvailability.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+/**
+ * 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.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public enum TAvailability
+{
+ MANDATORY("mandatory"),
+ OPTIONAL("optional");
+
+ private final String value;
+
+ TAvailability(String v)
+ {
+ value = v;
+ }
+
+ public String value()
+ {
+ return value;
+ }
+
+ public static TAvailability fromValue(String v)
+ {
+ for (TAvailability c : TAvailability.values())
+ {
+ if (c.value.equals(v))
+ {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBean.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,259 @@
+/*
+ * 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.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+
+
+/**
+ * The type defintion for a <bean> component.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class TBean extends TComponent
+{
+ protected String description;
+ protected List<Object> argumentOrPropertyOrAny;
+ protected String className;
+ protected String initMethod;
+ protected String destroyMethod;
+ protected String factoryMethod;
+ protected String factoryComponent;
+ protected String scope;
+ protected Boolean lazyInit;
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the description property.
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ */
+ public void setDescription(String value)
+ {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the argumentOrPropertyOrAny property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
+ * JAXB object. This is why there is not a <CODE>set</CODE> method for the argumentOrPropertyOrAny property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getArgumentOrPropertyOrAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link Object } {@link JAXBElement }{@code <}{@link Targument }{@code >} {@link JAXBElement }{@code <}
+ * {@link Tproperty }{@code >}
+ *
+ *
+ */
+ public List<Object> getArgumentOrPropertyOrAny()
+ {
+ if (argumentOrPropertyOrAny == null)
+ {
+ argumentOrPropertyOrAny = new ArrayList<Object>();
+ }
+ return this.argumentOrPropertyOrAny;
+ }
+
+ /**
+ * Gets the value of the class property.
+ */
+ public String getClassName()
+ {
+ return className;
+ }
+
+ /**
+ * Sets the value of the class property.
+ */
+ public void setClassName(String value)
+ {
+ this.className = value;
+ }
+
+ /**
+ * Gets the value of the initMethod property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getInitMethod()
+ {
+ return initMethod;
+ }
+
+ /**
+ * Sets the value of the initMethod property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setInitMethod(String value)
+ {
+ this.initMethod = value;
+ }
+
+ /**
+ * Gets the value of the destroyMethod property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDestroyMethod()
+ {
+ return destroyMethod;
+ }
+
+ /**
+ * Sets the value of the destroyMethod property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDestroyMethod(String value)
+ {
+ this.destroyMethod = value;
+ }
+
+ /**
+ * Gets the value of the factoryMethod property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getFactoryMethod()
+ {
+ return factoryMethod;
+ }
+
+ /**
+ * Sets the value of the factoryMethod property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setFactoryMethod(String value)
+ {
+ this.factoryMethod = value;
+ }
+
+ /**
+ * Gets the value of the factoryComponent property.
+ *
+ */
+ public String getFactoryComponentId()
+ {
+ return factoryComponent;
+ }
+
+ /**
+ * Sets the value of the factoryComponent property.
+ *
+ */
+ public void setFactoryComponentId(String value)
+ {
+ this.factoryComponent = value;
+ }
+
+ /**
+ * Gets the value of the scope property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getScope()
+ {
+ return scope;
+ }
+
+ /**
+ * Sets the value of the scope property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setScope(String value)
+ {
+ this.scope = value;
+ }
+
+ /**
+ * Gets the value of the lazyInit property.
+ *
+ * @return possible object is {@link Boolean }
+ *
+ */
+ public boolean isLazyInit()
+ {
+ return lazyInit;
+ }
+
+ /**
+ * Sets the value of the lazyInit property.
+ *
+ * @param value allowed object is {@link Boolean }
+ *
+ */
+ public void setLazyInit(boolean value)
+ {
+ this.lazyInit = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return always non-null
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return otherAttributes;
+ }
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TBlueprint.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,295 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.parser.xb;
+
+// $Id$
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.service.blueprint.container.NoSuchComponentException;
+
+/**
+ * The blueprint element is the top element.
+ *
+ * The definitions consist of two sections:
+ * the type-converter section and the components section.
+ *
+ * blueprint ::= <type-converters> component
+ * component ::= <bean> | <service> | service-reference
+ * service-reference ::= <reference> | <ref-list> | <ref-set>
+ * type-converter ::= <bean> | <ref>
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class TBlueprint
+{
+ protected String description;
+ protected TTypeConverters typeConverters;
+ protected List<TComponent> components;
+ protected Boolean defaultLazyInit;
+ protected String defaultInitMethod;
+ protected String defaultDestroyMethod;
+ protected BigInteger defaultTimeout;
+ protected TAvailability defaultAvailability;
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the description property.
+ *
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ */
+ public void setDescription(String value)
+ {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the typeConverters property.
+ *
+ * @return possible object is {@link TTypeConverters }
+ *
+ */
+ public TTypeConverters getTypeConverters()
+ {
+ return typeConverters;
+ }
+
+ /**
+ * Sets the value of the typeConverters property.
+ *
+ * @param value allowed object is {@link TTypeConverters }
+ *
+ */
+ public void setTypeConverters(TTypeConverters value)
+ {
+ this.typeConverters = value;
+ }
+
+ /**
+ * Gets the value of components
+ */
+ public List<TComponent> getComponents()
+ {
+ if (components == null)
+ components = new ArrayList<TComponent>();
+
+ return components;
+ }
+
+ public Set<String> getComponentIds()
+ {
+ Set<String> compIds = new LinkedHashSet<String>();
+ for (TComponent comp : getComponents())
+ {
+ compIds.add(comp.getId());
+ }
+ return Collections.unmodifiableSet(compIds);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T extends TComponent> Collection<T> getMetadata(Class<T> type)
+ {
+ List<T> compMetadata = new ArrayList<T>();
+ for (TComponent comp : getComponents())
+ {
+ if (type.isAssignableFrom(comp.getClass()))
+ compMetadata.add((T)comp);
+ }
+ return Collections.unmodifiableList(compMetadata);
+ }
+
+ public TComponent getComponentMetadata(String name)
+ {
+ if (name == null)
+ throw new IllegalArgumentException("Cannot get metadata for id: null");
+
+ TComponent compMetadata = null;
+ for (TComponent comp : getComponents())
+ {
+ if (name.equals(comp.getId()))
+ {
+ compMetadata = comp;
+ break;
+ }
+ }
+
+ if (compMetadata == null)
+ throw new NoSuchComponentException(name);
+
+ return compMetadata;
+ }
+
+ /**
+ * Gets the value of the defaultLazyInit property.
+ *
+ * @return possible object is {@link Boolean }
+ *
+ */
+ public Boolean isDefaultLazyInit()
+ {
+ return defaultLazyInit;
+ }
+
+ /**
+ * Sets the value of the defaultLazyInit property.
+ *
+ * @param value allowed object is {@link Boolean }
+ *
+ */
+ public void setDefaultLazyInit(Boolean value)
+ {
+ this.defaultLazyInit = value;
+ }
+
+ /**
+ * Gets the value of the defaultInitMethod property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDefaultInitMethod()
+ {
+ return defaultInitMethod;
+ }
+
+ /**
+ * Sets the value of the defaultInitMethod property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDefaultInitMethod(String value)
+ {
+ this.defaultInitMethod = value;
+ }
+
+ /**
+ * Gets the value of the defaultDestroyMethod property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDefaultDestroyMethod()
+ {
+ return defaultDestroyMethod;
+ }
+
+ /**
+ * Sets the value of the defaultDestroyMethod property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDefaultDestroyMethod(String value)
+ {
+ this.defaultDestroyMethod = value;
+ }
+
+ /**
+ * Gets the value of the defaultTimeout property.
+ */
+ public BigInteger getDefaultTimeout()
+ {
+ if (defaultTimeout == null)
+ defaultTimeout = new BigInteger("300000");
+
+ return defaultTimeout;
+ }
+
+ /**
+ * Sets the value of the defaultTimeout property.
+ */
+ public void setDefaultTimeout(BigInteger value)
+ {
+ this.defaultTimeout = value;
+ }
+
+ /**
+ * Gets the value of the defaultAvailability property.
+ *
+ * @return possible object is {@link Tavailability }
+ *
+ */
+ public TAvailability getDefaultAvailability()
+ {
+ if (defaultAvailability == null)
+ defaultAvailability = TAvailability.MANDATORY;
+
+ return defaultAvailability;
+ }
+
+ /**
+ * Sets the value of the defaultAvailability property.
+ *
+ * @param value allowed object is {@link Tavailability }
+ *
+ */
+ public void setDefaultAvailability(TAvailability value)
+ {
+ this.defaultAvailability = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return always non-null
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return otherAttributes;
+ }
+
+ // Merge this Blueprint meta data with the given other, which may be null.
+ public TBlueprint merge(TBlueprint other)
+ {
+ if (other == null)
+ return this;
+
+ throw new NotImplementedException("Blueprint metadata merge not yet implemented");
+ }
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComparator.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComparatorImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComparator.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComparator.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,93 @@
+/*
+ * 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;
+
+
+/**
+ * <p>
+ * Java class for Tcomparator complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tcomparator">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}targetComponent"/>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class TComparator
+{
+ protected List<TComponent> components;
+ protected List<Object> any;
+
+ public List<TComponent> getComponents()
+ {
+ return components;
+ }
+
+ public void setComponents(List<TComponent> components)
+ {
+ this.components = components;
+ }
+
+ /**
+ * 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;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComponent.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentMetadataImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComponent.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TComponent.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -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;
+
+/**
+ * The Component 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 Component 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.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public abstract class TComponent
+{
+ protected String id;
+ protected List<String> dependsOn;
+ protected int initialization;
+
+ /**
+ * Gets the value of the id property.
+ */
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ */
+ public void setId(String value)
+ {
+ this.id = value;
+ }
+
+ public List<String> getDependsOn()
+ {
+ if (dependsOn == null)
+ dependsOn = new ArrayList<String>();
+
+ return dependsOn;
+ }
+
+ public void setDependsOn(List<String> dependsOn)
+ {
+ this.dependsOn = dependsOn;
+ }
+
+ public int getInitialization()
+ {
+ return initialization;
+ }
+
+ public void setInitialization(int initialization)
+ {
+ this.initialization = initialization;
+ }
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRef.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,77 @@
+/*
+ * 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$
+
+/**
+ *
+ *
+ * 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>
+ *
+ *
+ */
+public class TRef
+{
+ protected String component;
+
+ /**
+ * Gets the value of the component property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getComponent()
+ {
+ return component;
+ }
+
+ /**
+ * Sets the value of the component property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setComponent(String value)
+ {
+ this.component = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefCollectionImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRefCollection.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,166 @@
+/*
+ * 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;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReference.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.parser.xb;
+
+// $Id$
+
+import java.math.BigInteger;
+
+
+/**
+ *
+ *
+ * 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>
+ *
+ *
+ */
+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/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceListenerImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TReferenceListener.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,230 @@
+/*
+ * 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;
+
+
+/**
+ *
+ *
+ * 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>
+ *
+ *
+ */
+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 }
+ *
+ */
+ 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 }
+ *
+ */
+ 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;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RegistrationListenerImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TRegistrationListener.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,231 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.parser.xb;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ *
+ *
+ * A 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.
+ *
+ *
+ *
+ * <p>
+ * Java class for TregistrationListener complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TregistrationListener">
+ * <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.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ * <attribute name="registration-method" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
+ * <attribute name="unregistration-method" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class TRegistrationListener
+{
+ protected TBean bean;
+ protected TReference reference;
+ protected TRef refFIXME;
+ protected List<Object> any;
+ protected String ref;
+ protected String registrationMethod;
+ protected String unregistrationMethod;
+
+ /**
+ * 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 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;
+ }
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java (from rev 90359, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TService.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,226 @@
+/*
+ * 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.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * 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
+ */
+public class TService extends TComponent
+{
+ protected String description;
+ protected List<String> interfaceNames;
+ protected List<TServicePropertyEntry> serviceProperties;
+ protected Collection<TRegistrationListener> registrationListener;
+ protected TBean bean;
+ protected List<Object> any;
+ protected String ref;
+ protected TAutoExportModes autoExportMode;
+ protected int ranking;
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * 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 serviceProperties property.
+ */
+ public List<TServicePropertyEntry> getServiceProperties()
+ {
+ if (serviceProperties == null)
+ serviceProperties = new ArrayList<TServicePropertyEntry>();
+
+ return serviceProperties;
+ }
+
+ public void setServiceProperties(List<TServicePropertyEntry> serviceProperties)
+ {
+ this.serviceProperties = serviceProperties;
+ }
+
+ /**
+ * Gets the value of the registrationListener property.
+ */
+ public Collection<TRegistrationListener> getRegistrationListeners()
+ {
+ if (registrationListener == null)
+ registrationListener = new ArrayList<TRegistrationListener>();
+
+ return registrationListener;
+ }
+
+ public void setRegistrationListeners(Collection<TRegistrationListener> registrationListener)
+ {
+ this.registrationListener = registrationListener;
+ }
+
+ /**
+ * 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 any property.
+ */
+ 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 autoExport property.
+ *
+ * @return possible object is {@link TAutoExportModes }
+ */
+ public TAutoExportModes getAutoExportMode()
+ {
+ if (autoExportMode == null)
+ autoExportMode = TAutoExportModes.DISABLED;
+
+ return autoExportMode;
+ }
+
+ /**
+ * Sets the value of the autoExport property.
+ *
+ * @param value allowed object is {@link TAutoExportModes }
+ */
+ public void setAutoExportMode(TAutoExportModes value)
+ {
+ this.autoExportMode = value;
+ }
+
+ /**
+ * Gets the value of the ranking property.
+ */
+ public int getRanking()
+ {
+ return ranking;
+ }
+
+ /**
+ * Sets the value of the ranking property.
+ */
+ public void setRanking(int value)
+ {
+ this.ranking = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return otherAttributes;
+ }
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServicePropertyEntry.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServicePropertyEntry.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServicePropertyEntry.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServicePropertyEntry.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,56 @@
+/*
+ * 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$
+
+/**
+ * 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.
+ *
+ */
+public class TServicePropertyEntry
+{
+ protected String key;
+ protected String value;
+
+ public String getKey()
+ {
+ return key;
+ }
+
+ public void setKey(String key)
+ {
+ this.key = key;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java (from rev 90359, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TServiceReference.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,220 @@
+/*
+ * 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.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * 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>
+ *
+ *
+ */
+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>();
+
+ /**
+ * 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.
+ */
+ public List<TReferenceListener> getReferenceListeners()
+ {
+ if (listener == null)
+ listener = new ArrayList<TReferenceListener>();
+
+ return this.listener;
+ }
+
+ public void setReferenceListeners(List<TReferenceListener> listener)
+ {
+ this.listener = listener;
+ }
+
+ /**
+ * Gets the value of the any property.
+ */
+ public List<Object> getAny()
+ {
+ if (any == null)
+ {
+ any = new ArrayList<Object>();
+ }
+ 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 }
+ *
+ */
+ 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.
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return otherAttributes;
+ }
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java (from rev 90358, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TypeConverters.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TTypeConverters.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,89 @@
+/*
+ * 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;
+
+
+/**
+ *
+ *
+ * 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.
+ *
+ *
+ *
+ * <p>
+ * Java class for Ttype-converters complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Ttype-converters">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <choice maxOccurs="unbounded" minOccurs="0">
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}targetComponent"/>
+ * </choice>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class TTypeConverters
+{
+ protected List<Object> components;
+
+ public List<Object> getComponents()
+ {
+ if (components == null)
+ components = new ArrayList<Object>();
+
+ return components;
+ }
+
+ public void setComponents(List<Object> converters)
+ {
+ this.components = converters;
+ }
+
+ public void resolveRefs(TBlueprint tBlueprint)
+ {
+ for (int i = 0; i < getComponents().size(); i++)
+ {
+ Object comp = components.get(i);
+ if (comp instanceof TRef)
+ {
+ TRef ref = (TRef)comp;
+ String compName = ref.getComponent();
+ comp = tBlueprint.getComponentMetadata(compName);
+ components.set(i, comp);
+ }
+ }
+ }
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Targument.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Targument.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,536 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.parser.xb;
+
+// $Id$
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ *
+ * An argument used to create an object defined by a <bean> component. The <argument> elements are the arguments for the bean class constructor or passed to the bean
+ * factory method.
+ *
+ * The type, if specified, is used to disambiguate the constructor or method signature. Arguments may also be matched up with arguments by explicitly specifying the
+ * index position. If the index is used, then all <argument> elements for the bean must also specify the index.
+ *
+ * The value and ref attributes are convenience shortcuts to make the <argument> tag easier to code. A fuller set of injected values and types can be specified using
+ * one of the "value" type elements.
+ *
+ * <p>
+ * Java class for Targument complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Targument">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
+ * </sequence>
+ * <attribute name="index" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ * <attribute name="type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
+ * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class Targument
+{
+ protected String description;
+ protected TService service;
+ protected TRefCollection refList;
+ protected TRefCollection refSet;
+ protected TBean bean;
+ protected TReference reference;
+ protected TRef refFIXME;
+ protected List<Object> any;
+ protected TRef idref;
+ protected Tvalue value;
+ protected Tcollection list;
+ protected Tcollection set;
+ protected Tmap map;
+ protected Tcollection array;
+ protected Tprops props;
+ protected Tnull _null;
+ protected BigInteger index;
+ protected String type;
+ protected String ref;
+ protected String valueFIXME;
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDescription(String value)
+ {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the service property.
+ *
+ * @return possible object is {@link TService }
+ *
+ */
+ public TService getService()
+ {
+ return service;
+ }
+
+ /**
+ * Sets the value of the service property.
+ *
+ * @param value allowed object is {@link TService }
+ *
+ */
+ public void setService(TService value)
+ {
+ this.service = value;
+ }
+
+ /**
+ * Gets the value of the refList property.
+ *
+ * @return possible object is {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefList()
+ {
+ return refList;
+ }
+
+ /**
+ * Sets the value of the refList property.
+ *
+ * @param value allowed object is {@link TRefCollection }
+ *
+ */
+ public void setRefList(TRefCollection value)
+ {
+ this.refList = value;
+ }
+
+ /**
+ * Gets the value of the refSet property.
+ *
+ * @return possible object is {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefSet()
+ {
+ return refSet;
+ }
+
+ /**
+ * Sets the value of the refSet property.
+ *
+ * @param value allowed object is {@link TRefCollection }
+ *
+ */
+ public void setRefSet(TRefCollection value)
+ {
+ this.refSet = value;
+ }
+
+ /**
+ * Gets the value of the bean property.
+ *
+ * @return possible object is {@link TBean }
+ *
+ */
+ public TBean getBean()
+ {
+ return bean;
+ }
+
+ /**
+ * Sets the value of the bean property.
+ *
+ * @param value allowed object is {@link TBean }
+ *
+ */
+ public void setBean(TBean value)
+ {
+ this.bean = value;
+ }
+
+ /**
+ * Gets the value of the reference property.
+ *
+ * @return possible object is {@link TReference }
+ *
+ */
+ public TReference getReference()
+ {
+ return reference;
+ }
+
+ /**
+ * Sets the value of the reference property.
+ *
+ * @param value allowed object is {@link TReference }
+ *
+ */
+ public void setReference(TReference value)
+ {
+ this.reference = value;
+ }
+
+ /**
+ * Gets the value of the refFIXME property.
+ *
+ * @return possible object is {@link TRef }
+ *
+ */
+ public TRef getRefFIXME()
+ {
+ return refFIXME;
+ }
+
+ /**
+ * Sets the value of the refFIXME property.
+ *
+ * @param value allowed object is {@link TRef }
+ *
+ */
+ public void setRefFIXME(TRef value)
+ {
+ this.refFIXME = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
+ * JAXB object. This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny()
+ {
+ if (any == null)
+ {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets the value of the idref property.
+ *
+ * @return possible object is {@link TRef }
+ *
+ */
+ public TRef getIdref()
+ {
+ return idref;
+ }
+
+ /**
+ * Sets the value of the idref property.
+ *
+ * @param value allowed object is {@link TRef }
+ *
+ */
+ public void setIdref(TRef value)
+ {
+ this.idref = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return possible object is {@link Tvalue }
+ *
+ */
+ public Tvalue getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value allowed object is {@link Tvalue }
+ *
+ */
+ public void setValue(Tvalue value)
+ {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the list property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getList()
+ {
+ return list;
+ }
+
+ /**
+ * Sets the value of the list property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setList(Tcollection value)
+ {
+ this.list = value;
+ }
+
+ /**
+ * Gets the value of the set property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getSet()
+ {
+ return set;
+ }
+
+ /**
+ * Sets the value of the set property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setSet(Tcollection value)
+ {
+ this.set = value;
+ }
+
+ /**
+ * Gets the value of the map property.
+ *
+ * @return possible object is {@link Tmap }
+ *
+ */
+ public Tmap getMap()
+ {
+ return map;
+ }
+
+ /**
+ * Sets the value of the map property.
+ *
+ * @param value allowed object is {@link Tmap }
+ *
+ */
+ public void setMap(Tmap value)
+ {
+ this.map = value;
+ }
+
+ /**
+ * Gets the value of the array property.
+ *
+ * @return possible object is {@link Tcollection }
+ *
+ */
+ public Tcollection getArray()
+ {
+ return array;
+ }
+
+ /**
+ * Sets the value of the array property.
+ *
+ * @param value allowed object is {@link Tcollection }
+ *
+ */
+ public void setArray(Tcollection value)
+ {
+ this.array = value;
+ }
+
+ /**
+ * Gets the value of the props property.
+ *
+ * @return possible object is {@link Tprops }
+ *
+ */
+ public Tprops getProps()
+ {
+ return props;
+ }
+
+ /**
+ * Sets the value of the props property.
+ *
+ * @param value allowed object is {@link Tprops }
+ *
+ */
+ public void setProps(Tprops value)
+ {
+ this.props = value;
+ }
+
+ /**
+ * Gets the value of the null property.
+ *
+ * @return possible object is {@link Tnull }
+ *
+ */
+ public Tnull getNull()
+ {
+ return _null;
+ }
+
+ /**
+ * Sets the value of the null property.
+ *
+ * @param value allowed object is {@link Tnull }
+ *
+ */
+ public void setNull(Tnull value)
+ {
+ this._null = value;
+ }
+
+ /**
+ * Gets the value of the index property.
+ *
+ * @return possible object is {@link BigInteger }
+ *
+ */
+ public BigInteger getIndex()
+ {
+ return index;
+ }
+
+ /**
+ * Sets the value of the index property.
+ *
+ * @param value allowed object is {@link BigInteger }
+ *
+ */
+ public void setIndex(BigInteger value)
+ {
+ this.index = value;
+ }
+
+ /**
+ * Gets the value of the type property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getType()
+ {
+ return type;
+ }
+
+ /**
+ * Sets the value of the type property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setType(String value)
+ {
+ this.type = value;
+ }
+
+ /**
+ * Gets the value of the ref property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getRef()
+ {
+ return ref;
+ }
+
+ /**
+ * Sets the value of the ref property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setRef(String value)
+ {
+ this.ref = value;
+ }
+
+ /**
+ * Gets the value of the valueFIXME property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getValueFIXME()
+ {
+ return valueFIXME;
+ }
+
+ /**
+ * Sets the value of the valueFIXME property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setValueFIXME(String value)
+ {
+ this.valueFIXME = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tcollection.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tcollection.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,93 @@
+/*
+ * 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;
+
+
+/**
+ *
+ *
+ * Tcollection is the base schema type for different ordered collection types. This is shared between the <array>, <list>, and <set> elements.
+ *
+ *
+ *
+ * <p>
+ * Java class for Tcollection complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tcollection">
+ * <complexContent>
+ * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TtypedCollection">
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value" maxOccurs="unbounded" minOccurs="0"/>
+ * </extension>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class Tcollection extends TtypedCollection
+{
+ protected List<Object> value;
+
+ /**
+ * Gets the value of the value 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 value property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getValue().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * 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 Tcollection }{@code >} {@link Object } {@link JAXBElement }{@code <}{@link Tcollection }{@code >} {@link JAXBElement }{@code <}{@link Tcollection }{@code >}
+ * {@link JAXBElement }{@code <}{@link Tprops }{@code >}
+ *
+ *
+ */
+ public List<Object> getValue()
+ {
+ if (value == null)
+ {
+ value = new ArrayList<Object>();
+ }
+ return this.value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tkey.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tkey.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,384 @@
+/*
+ * 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;
+
+
+/**
+ * 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.
+ *
+ * <p>
+ * Java class for Tkey complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tkey">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}nonNullValue"/>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class Tkey
+{
+
+ 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;
+
+ /**
+ * 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;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tmap.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tmap.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tmap.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tmap.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,116 @@
+/*
+ * 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;
+
+
+/**
+ *
+ *
+ * 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.
+ *
+ *
+ *
+ * <p>
+ * Java class for Tmap complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tmap">
+ * <complexContent>
+ * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TtypedCollection">
+ * <sequence>
+ * <element name="entry" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TmapEntry" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="key-type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
+ * </extension>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class Tmap extends TtypedCollection
+{
+
+ protected List<TmapEntry> entry;
+ protected String keyType;
+
+ /**
+ * 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 TmapEntry }
+ *
+ *
+ */
+ public List<TmapEntry> getEntry()
+ {
+ if (entry == null)
+ {
+ entry = new ArrayList<TmapEntry>();
+ }
+ return this.entry;
+ }
+
+ /**
+ * Gets the value of the keyType property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getKeyType()
+ {
+ return keyType;
+ }
+
+ /**
+ * Sets the value of the keyType property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setKeyType(String value)
+ {
+ this.keyType = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TmapEntry.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TmapEntry.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,535 @@
+/*
+ * 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;
+
+
+/**
+ *
+ *
+ * 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.
+ *
+ *
+ *
+ * <p>
+ * Java class for TmapEntry complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TmapEntry">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="keyFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tkey" minOccurs="0"/>
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
+ * </sequence>
+ * <attribute name="key" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ * <attribute name="key-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" />
+ * <attribute name="value-ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class TmapEntry
+{
+
+ protected Tkey keyFIXME;
+ 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 key;
+ protected String keyRef;
+ protected String valueFIXME;
+ protected String valueRef;
+
+ /**
+ * Gets the value of the keyFIXME property.
+ *
+ * @return possible object is {@link Tkey }
+ *
+ */
+ public Tkey getKeyFIXME()
+ {
+ return keyFIXME;
+ }
+
+ /**
+ * Sets the value of the keyFIXME property.
+ *
+ * @param value allowed object is {@link Tkey }
+ *
+ */
+ public void setKeyFIXME(Tkey value)
+ {
+ this.keyFIXME = 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 key property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getKey()
+ {
+ return key;
+ }
+
+ /**
+ * Sets the value of the key property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setKey(String value)
+ {
+ this.key = value;
+ }
+
+ /**
+ * Gets the value of the keyRef property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getKeyRef()
+ {
+ return keyRef;
+ }
+
+ /**
+ * Sets the value of the keyRef property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setKeyRef(String value)
+ {
+ this.keyRef = 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;
+ }
+
+ /**
+ * Gets the value of the valueRef property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getValueRef()
+ {
+ return valueRef;
+ }
+
+ /**
+ * Sets the value of the valueRef property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setValueRef(String value)
+ {
+ this.valueRef = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tnull.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tnull.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tnull.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tnull.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,53 @@
+/*
+ * 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 definition for a <null> value type.
+ *
+ *
+ *
+ * <p>
+ * Java class for Tnull complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tnull">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class Tnull
+{
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprop.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprop.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprop.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprop.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,123 @@
+/*
+ * 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$
+
+/**
+ * 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.
+ * <p>
+ * Java class for Tprop complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tprop">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <attribute name="key" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ * <attribute name="value" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ */
+public class Tprop
+{
+ protected String content;
+ protected String key;
+ protected String value;
+
+ /**
+ *
+ *
+ * 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.
+ *
+ *
+ *
+ * @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 key property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getKey()
+ {
+ return key;
+ }
+
+ /**
+ * Sets the value of the key property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setKey(String value)
+ {
+ this.key = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tproperty.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tproperty.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,550 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.parser.xb;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+
+/**
+ *
+ *
+ * A property that will be injected into a created <bean>
+ * component. The <property> elements correspond to named
+ * JavaBean setting methods for a created bean object.
+ *
+ * The value and ref attributes are convenience shortcuts to make
+ * the <argument> tag easier to code. A fuller set of injected
+ * values and types can be specified using one of the "value"
+ * type elements.
+ *
+ *
+ *
+ * <p>Java class for Tproperty complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tproperty">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
+ * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class Tproperty {
+
+ protected String description;
+ protected TService service;
+ protected TRefCollection refList;
+ protected TRefCollection refSet;
+ protected TBean bean;
+ protected TReference reference;
+ protected TRef refFIXME;
+ protected List<Object> any;
+ protected TRef idref;
+ protected Tvalue value;
+ protected Tcollection list;
+ protected Tcollection set;
+ protected Tmap map;
+ protected Tcollection array;
+ protected Tprops props;
+ protected Tnull _null;
+ protected String name;
+ protected String ref;
+ protected String valueFIXME;
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDescription(String value) {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the service property.
+ *
+ * @return
+ * possible object is
+ * {@link TService }
+ *
+ */
+ public TService getService() {
+ return service;
+ }
+
+ /**
+ * Sets the value of the service property.
+ *
+ * @param value
+ * allowed object is
+ * {@link TService }
+ *
+ */
+ public void setService(TService value) {
+ this.service = value;
+ }
+
+ /**
+ * Gets the value of the refList property.
+ *
+ * @return
+ * possible object is
+ * {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefList() {
+ return refList;
+ }
+
+ /**
+ * Sets the value of the refList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link TRefCollection }
+ *
+ */
+ public void setRefList(TRefCollection value) {
+ this.refList = value;
+ }
+
+ /**
+ * Gets the value of the refSet property.
+ *
+ * @return
+ * possible object is
+ * {@link TRefCollection }
+ *
+ */
+ public TRefCollection getRefSet() {
+ return refSet;
+ }
+
+ /**
+ * Sets the value of the refSet property.
+ *
+ * @param value
+ * allowed object is
+ * {@link TRefCollection }
+ *
+ */
+ public void setRefSet(TRefCollection value) {
+ this.refSet = value;
+ }
+
+ /**
+ * Gets the value of the bean property.
+ *
+ * @return
+ * possible object is
+ * {@link TBean }
+ *
+ */
+ public TBean getBean() {
+ return bean;
+ }
+
+ /**
+ * Sets the value of the bean property.
+ *
+ * @param value
+ * allowed object is
+ * {@link TBean }
+ *
+ */
+ public void setBean(TBean value) {
+ this.bean = value;
+ }
+
+ /**
+ * Gets the value of the reference property.
+ *
+ * @return
+ * possible object is
+ * {@link TReference }
+ *
+ */
+ public TReference getReference() {
+ return reference;
+ }
+
+ /**
+ * Sets the value of the reference property.
+ *
+ * @param value
+ * allowed object is
+ * {@link TReference }
+ *
+ */
+ public void setReference(TReference value) {
+ this.reference = value;
+ }
+
+ /**
+ * Gets the value of the refFIXME property.
+ *
+ * @return
+ * possible object is
+ * {@link TRef }
+ *
+ */
+ public TRef getRefFIXME() {
+ return refFIXME;
+ }
+
+ /**
+ * Sets the value of the refFIXME property.
+ *
+ * @param value
+ * allowed object is
+ * {@link TRef }
+ *
+ */
+ public void setRefFIXME(TRef value) {
+ this.refFIXME = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets the value of the idref property.
+ *
+ * @return
+ * possible object is
+ * {@link TRef }
+ *
+ */
+ public TRef getIdref() {
+ return idref;
+ }
+
+ /**
+ * Sets the value of the idref property.
+ *
+ * @param value
+ * allowed object is
+ * {@link TRef }
+ *
+ */
+ public void setIdref(TRef value) {
+ this.idref = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link Tvalue }
+ *
+ */
+ public Tvalue getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tvalue }
+ *
+ */
+ public void setValue(Tvalue value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the list property.
+ *
+ * @return
+ * possible object is
+ * {@link Tcollection }
+ *
+ */
+ public Tcollection getList() {
+ return list;
+ }
+
+ /**
+ * Sets the value of the list property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tcollection }
+ *
+ */
+ public void setList(Tcollection value) {
+ this.list = value;
+ }
+
+ /**
+ * Gets the value of the set property.
+ *
+ * @return
+ * possible object is
+ * {@link Tcollection }
+ *
+ */
+ public Tcollection getSet() {
+ return set;
+ }
+
+ /**
+ * Sets the value of the set property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tcollection }
+ *
+ */
+ public void setSet(Tcollection value) {
+ this.set = value;
+ }
+
+ /**
+ * Gets the value of the map property.
+ *
+ * @return
+ * possible object is
+ * {@link Tmap }
+ *
+ */
+ public Tmap getMap() {
+ return map;
+ }
+
+ /**
+ * Sets the value of the map property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tmap }
+ *
+ */
+ public void setMap(Tmap value) {
+ this.map = value;
+ }
+
+ /**
+ * Gets the value of the array property.
+ *
+ * @return
+ * possible object is
+ * {@link Tcollection }
+ *
+ */
+ public Tcollection getArray() {
+ return array;
+ }
+
+ /**
+ * Sets the value of the array property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tcollection }
+ *
+ */
+ public void setArray(Tcollection value) {
+ this.array = value;
+ }
+
+ /**
+ * Gets the value of the props property.
+ *
+ * @return
+ * possible object is
+ * {@link Tprops }
+ *
+ */
+ public Tprops getProps() {
+ return props;
+ }
+
+ /**
+ * Sets the value of the props property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tprops }
+ *
+ */
+ public void setProps(Tprops value) {
+ this.props = value;
+ }
+
+ /**
+ * Gets the value of the null property.
+ *
+ * @return
+ * possible object is
+ * {@link Tnull }
+ *
+ */
+ public Tnull getNull() {
+ return _null;
+ }
+
+ /**
+ * Sets the value of the null property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tnull }
+ *
+ */
+ public void setNull(Tnull value) {
+ this._null = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the ref property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRef() {
+ return ref;
+ }
+
+ /**
+ * Sets the value of the ref property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRef(String value) {
+ this.ref = value;
+ }
+
+ /**
+ * Gets the value of the valueFIXME property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValueFIXME() {
+ return valueFIXME;
+ }
+
+ /**
+ * Sets the value of the valueFIXME property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValueFIXME(String value) {
+ this.valueFIXME = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprops.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprops.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprops.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tprops.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,90 @@
+/*
+ * 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;
+
+/**
+ *
+ *
+ * Tprops is the type used by the <props> value element. The prop elements are pairs of string-valued keys and values.
+ *
+ *
+ *
+ * <p>
+ * Java class for Tprops complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tprops">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="prop" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tprop" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class Tprops
+{
+
+ protected List<Tprop> prop;
+
+ /**
+ * Gets the value of the prop 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 prop property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getProp().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link Tprop }
+ *
+ *
+ */
+ public List<Tprop> getProp()
+ {
+ if (prop == null)
+ {
+ prop = new ArrayList<Tprop>();
+ }
+ return this.prop;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TserviceProperties.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TserviceProperties.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,91 @@
+/*
+ * 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;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TtypedCollection.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TtypedCollection.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TtypedCollection.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/TtypedCollection.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,74 @@
+/*
+ * 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$
+
+/**
+ * TtypeCollection defines comment attributes shared among different collection types that allow a default value type to be specified.
+ *
+ * <p>
+ * Java class for TtypedCollection complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TtypedCollection">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <attribute name="value-type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class TtypedCollection
+{
+
+ protected String valueType;
+
+ /**
+ * Gets the value of the valueType property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getValueType()
+ {
+ return valueType;
+ }
+
+ /**
+ * Sets the value of the valueType property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setValueType(String value)
+ {
+ this.valueType = value;
+ }
+
+}
Copied: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java (from rev 90336, projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tvalue.java)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/xb/Tvalue.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,103 @@
+/*
+ * 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$
+
+/**
+ * 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>
+ *
+ *
+ */
+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 }
+ *
+ */
+ 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;
+ }
+
+}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/AutoExportModes.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/AutoExportModes.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/AutoExportModes.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,64 +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.reflect;
-
-// $Id$
-
-/**
- * Java class for TautoExportModes.
- *
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public enum AutoExportModes
-{
-
- DISABLED("disabled"),
- INTERFACES("interfaces"),
- CLASS_HIERARCHY("class-hierarchy"),
- ALL_CLASSES("all-classes");
-
- private final String value;
-
- AutoExportModes(String v)
- {
- value = v;
- }
-
- public String value()
- {
- return value;
- }
-
- public static AutoExportModes fromValue(String v)
- {
- for (AutoExportModes c : AutoExportModes.values())
- {
- if (c.value.equals(v))
- {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Availability.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Availability.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Availability.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,60 +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.reflect;
-
-/**
- * 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.
- *
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public enum Availability
-{
- MANDATORY("mandatory"),
- OPTIONAL("optional");
-
- private final String value;
-
- Availability(String v)
- {
- value = v;
- }
-
- public String value()
- {
- return value;
- }
-
- public static Availability fromValue(String v)
- {
- for (Availability c : Availability.values())
- {
- if (c.value.equals(v))
- {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -23,236 +23,74 @@
// $Id$
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-import javax.xml.bind.JAXBElement;
-import javax.xml.namespace.QName;
+import org.jboss.osgi.blueprint.parser.xb.TBean;
+import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.reflect.BeanArgument;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.Target;
/**
- * The type defintion for a <bean> component.
+ * Metadata for a Bean Component.
*
* @author thomas.diesler at jboss.com
* @since 13-May-2009
*/
-public class BeanMetadataImpl extends ComponentMetadataImpl
+public class BeanMetadataImpl extends ComponentMetadataImpl implements BeanMetadata
{
- protected String description;
- protected List<Object> argumentOrPropertyOrAny;
- protected String className;
- protected String initMethod;
- protected String destroyMethod;
- protected String factoryMethod;
- protected String factoryComponent;
- protected String scope;
- protected Boolean lazyInit;
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the description property.
- */
- public String getDescription()
+ private TBean tBean;
+
+ public BeanMetadataImpl(BundleContext context, TBean tBean)
{
- return description;
+ super(context, tBean);
+ this.tBean = tBean;
}
- /**
- * Sets the value of the description property.
- */
- public void setDescription(String value)
+ public List<BeanArgument> getArguments()
{
- this.description = value;
+ throw new NotImplementedException();
}
- /**
- * Gets the value of the argumentOrPropertyOrAny property.
- *
- * <p>
- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
- * JAXB object. This is why there is not a <CODE>set</CODE> method for the argumentOrPropertyOrAny property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- *
- * <pre>
- * getArgumentOrPropertyOrAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list {@link Object } {@link JAXBElement }{@code <}{@link Targument }{@code >} {@link JAXBElement }{@code <}
- * {@link Tproperty }{@code >}
- *
- *
- */
- public List<Object> getArgumentOrPropertyOrAny()
- {
- if (argumentOrPropertyOrAny == null)
- {
- argumentOrPropertyOrAny = new ArrayList<Object>();
- }
- return this.argumentOrPropertyOrAny;
- }
-
- /**
- * Gets the value of the class property.
- */
public String getClassName()
{
- return className;
+ return tBean.getClassName();
}
- /**
- * Sets the value of the class property.
- */
- public void setClassName(String value)
- {
- this.className = value;
- }
-
- /**
- * Gets the value of the initMethod property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getInitMethod()
- {
- return initMethod;
- }
-
- /**
- * Sets the value of the initMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setInitMethod(String value)
- {
- this.initMethod = value;
- }
-
- /**
- * Gets the value of the destroyMethod property.
- *
- * @return possible object is {@link String }
- *
- */
public String getDestroyMethod()
{
- return destroyMethod;
+ return tBean.getDestroyMethod();
}
- /**
- * Sets the value of the destroyMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setDestroyMethod(String value)
+ public Target getFactoryComponent()
{
- this.destroyMethod = value;
+ throw new NotImplementedException();
}
- /**
- * Gets the value of the factoryMethod property.
- *
- * @return possible object is {@link String }
- *
- */
public String getFactoryMethod()
{
- return factoryMethod;
+ return tBean.getFactoryMethod();
}
- /**
- * Sets the value of the factoryMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setFactoryMethod(String value)
+ public String getInitMethod()
{
- this.factoryMethod = value;
+ return tBean.getInitMethod();
}
- /**
- * Gets the value of the factoryComponent property.
- *
- */
- public String getFactoryComponentId()
+ public List<BeanProperty> getProperties()
{
- return factoryComponent;
+ throw new NotImplementedException();
}
- /**
- * Sets the value of the factoryComponent property.
- *
- */
- public void setFactoryComponentId(String value)
+ public Class<?> getRuntimeClass()
{
- this.factoryComponent = value;
+ throw new NotImplementedException();
}
- /**
- * Gets the value of the scope property.
- *
- * @return possible object is {@link String }
- *
- */
public String getScope()
{
- return scope;
+ return tBean.getScope();
}
-
- /**
- * Sets the value of the scope property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setScope(String value)
- {
- this.scope = value;
- }
-
- /**
- * Gets the value of the lazyInit property.
- *
- * @return possible object is {@link Boolean }
- *
- */
- public boolean isLazyInit()
- {
- return lazyInit;
- }
-
- /**
- * Sets the value of the lazyInit property.
- *
- * @param value allowed object is {@link Boolean }
- *
- */
- public void setLazyInit(boolean value)
- {
- this.lazyInit = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return always non-null
- */
- public Map<QName, String> getOtherAttributes()
- {
- return otherAttributes;
- }
}
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BlueprintMetadata.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -23,106 +23,76 @@
// $Id$
-import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
-import javax.xml.namespace.QName;
-
+import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
+import org.jboss.osgi.blueprint.parser.xb.TComponent;
import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.container.NoSuchComponentException;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
/**
* The blueprint element is the top element.
- *
- * The definitions consist of two sections:
- * the type-converter section and the components section.
*
+ * The definitions consist of two sections: the type-converter section and the components section.
+ *
* blueprint ::= <type-converters> component
* component ::= <bean> | <service> | service-reference
* service-reference ::= <reference> | <ref-list> | <ref-set>
- * type-converter ::= <bean> | <ref>
+ * type-converter ::= <bean> | <ref>
*
* @author thomas.diesler at jboss.com
* @since 13-May-2009
*/
public class BlueprintMetadata
{
- protected String description;
- protected TypeConverters typeConverters;
- protected List<ComponentMetadataImpl> components;
- protected Boolean defaultLazyInit;
- protected String defaultInitMethod;
- protected String defaultDestroyMethod;
- protected BigInteger defaultTimeout;
- protected Availability defaultAvailability;
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ private BundleContext context;
- public void initialize()
- {
- if (typeConverters != null)
- typeConverters.resolveRefs(this);
- }
-
- /**
- * Gets the value of the description property.
- *
- */
- public String getDescription()
- {
- return description;
- }
+ private TBlueprint tBlueprint;
+ private Map<String, ComponentMetadata> components = new LinkedHashMap<String, ComponentMetadata>();
- /**
- * Sets the value of the description property.
- *
- */
- public void setDescription(String value)
+ public BlueprintMetadata(BundleContext context, TBlueprint tBlueprint)
{
- this.description = value;
+ this.context = context;
+ this.tBlueprint = tBlueprint;
}
- /**
- * Gets the value of the typeConverters property.
- *
- * @return possible object is {@link TypeConverters }
- *
- */
- public TypeConverters getTypeConverters()
+ public void initialize()
{
- return typeConverters;
+ ComponentFactory factory = new ComponentFactory(context);
+ for (TComponent tComp : tBlueprint.getComponents())
+ {
+ ComponentMetadata comp = factory.newComponent(tComp);
+ components.put(comp.getId(), comp);
+ }
}
- /**
- * Sets the value of the typeConverters property.
- *
- * @param value allowed object is {@link TypeConverters }
- *
- */
- public void setTypeConverters(TypeConverters value)
+ public Set<String> getComponentIds()
{
- this.typeConverters = value;
+ return Collections.unmodifiableSet(components.keySet());
}
- /**
- * Gets the value of components
- */
- public List<ComponentMetadataImpl> getComponents()
+ public ComponentMetadata getComponentMetadata(String name)
{
- if (components == null)
- components = new ArrayList<ComponentMetadataImpl>();
+ ComponentMetadata compMetadata = components.get(name);
+ if (compMetadata == null)
+ throw new NoSuchComponentException(name);
- return this.components;
+ return compMetadata;
}
@SuppressWarnings("unchecked")
- public <T extends ComponentMetadataImpl> Collection<T> getMetadata(Class<T> type)
+ public <T extends ComponentMetadata> Collection<T> getMetadata(Class<T> type)
{
List<T> compMetadata = new ArrayList<T>();
- for (ComponentMetadataImpl comp : components)
+ for (ComponentMetadata comp : components.values())
{
if (type.isAssignableFrom(comp.getClass()))
compMetadata.add((T)comp);
@@ -130,132 +100,6 @@
return Collections.unmodifiableList(compMetadata);
}
- /**
- * Gets the value of the defaultLazyInit property.
- *
- * @return possible object is {@link Boolean }
- *
- */
- public Boolean isDefaultLazyInit()
- {
- return defaultLazyInit;
- }
-
- /**
- * Sets the value of the defaultLazyInit property.
- *
- * @param value allowed object is {@link Boolean }
- *
- */
- public void setDefaultLazyInit(Boolean value)
- {
- this.defaultLazyInit = value;
- }
-
- /**
- * Gets the value of the defaultInitMethod property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getDefaultInitMethod()
- {
- return defaultInitMethod;
- }
-
- /**
- * Sets the value of the defaultInitMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setDefaultInitMethod(String value)
- {
- this.defaultInitMethod = value;
- }
-
- /**
- * Gets the value of the defaultDestroyMethod property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getDefaultDestroyMethod()
- {
- return defaultDestroyMethod;
- }
-
- /**
- * Sets the value of the defaultDestroyMethod property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setDefaultDestroyMethod(String value)
- {
- this.defaultDestroyMethod = value;
- }
-
- /**
- * Gets the value of the defaultTimeout property.
- */
- public BigInteger getDefaultTimeout()
- {
- if (defaultTimeout == null)
- defaultTimeout = new BigInteger("300000");
-
- return defaultTimeout;
- }
-
- /**
- * Sets the value of the defaultTimeout property.
- */
- public void setDefaultTimeout(BigInteger value)
- {
- this.defaultTimeout = value;
- }
-
- /**
- * Gets the value of the defaultAvailability property.
- *
- * @return possible object is {@link Tavailability }
- *
- */
- public Availability getDefaultAvailability()
- {
- if (defaultAvailability == null)
- defaultAvailability = Availability.MANDATORY;
-
- return defaultAvailability;
- }
-
- /**
- * Sets the value of the defaultAvailability property.
- *
- * @param value allowed object is {@link Tavailability }
- *
- */
- public void setDefaultAvailability(Availability value)
- {
- this.defaultAvailability = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return always non-null
- */
- public Map<QName, String> getOtherAttributes()
- {
- return otherAttributes;
- }
-
// Merge this Blueprint meta data with the given other, which may be null.
public BlueprintMetadata merge(BlueprintMetadata other)
{
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComparatorImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComparatorImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComparatorImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,92 +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.reflect;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * <p>
- * Java class for Tcomparator complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tcomparator">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}targetComponent"/>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class ComparatorImpl
-{
- protected List<ComponentMetadataImpl> components;
- protected List<Object> any;
-
- public List<ComponentMetadataImpl> getComponents()
- {
- return components;
- }
-
- public void setComponents(List<ComponentMetadataImpl> components)
- {
- this.components = components;
- }
-
- /**
- * 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;
- }
-
-}
Added: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.reflect;
+
+// $Id$
+
+import org.jboss.osgi.blueprint.parser.xb.TBean;
+import org.jboss.osgi.blueprint.parser.xb.TComponent;
+import org.jboss.osgi.blueprint.parser.xb.TService;
+import org.jboss.osgi.blueprint.parser.xb.TServiceReference;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
+
+/**
+ * A factory for blueprint metadata objects
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2009
+ */
+class ComponentFactory
+{
+ private BundleContext context;
+ private int anonymousID;
+
+ ComponentFactory(BundleContext context)
+ {
+ this.context = context;
+ }
+
+ ComponentMetadata newComponent(TComponent tComp)
+ {
+ ComponentMetadata comp;
+
+ if (tComp.getId() == null)
+ tComp.setId(".anonymousId#" + (++anonymousID));
+
+ if (tComp instanceof TBean)
+ comp = newBeanMetadata((TBean)tComp);
+
+ else if (tComp instanceof TService)
+ comp = newServiceMetadata((TService)tComp);
+
+ else if (tComp instanceof TServiceReference)
+ comp = newServiceReferenceMetadata((TServiceReference)tComp);
+
+ else
+ throw new IllegalArgumentException("Unsupported component type: " + tComp);
+
+ return comp;
+ }
+
+ private BeanMetadata newBeanMetadata(TBean tComp)
+ {
+ return new BeanMetadataImpl(context, tComp);
+ }
+
+ private ServiceMetadata newServiceMetadata(TService tComp)
+ {
+ return new ServiceMetadataImpl(context, tComp);
+ }
+
+ private ServiceReferenceMetadata newServiceReferenceMetadata(TServiceReference tComp)
+ {
+ return new ServiceReferenceMetadataImpl(context, tComp);
+ }
+}
Property changes on: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentMetadataImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ComponentMetadataImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -21,66 +21,41 @@
*/
package org.jboss.osgi.blueprint.reflect;
-//$Id$
+// $Id$
-import java.util.ArrayList;
import java.util.List;
+import org.jboss.osgi.blueprint.parser.xb.TComponent;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+
/**
- * The Component 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 Component type.
+ * Base class for all components.
*
- * 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.
- *
* @author thomas.diesler at jboss.com
* @since 13-May-2009
*/
-public abstract class ComponentMetadataImpl
+public class ComponentMetadataImpl implements ComponentMetadata
{
- protected String id;
- protected List<String> dependsOn;
- protected int initialization;
+ protected TComponent tComp;
- /**
- * Gets the value of the id property.
- */
- public String getId()
+ public ComponentMetadataImpl(BundleContext context, TComponent tComp)
{
- return id;
+ this.tComp = tComp;
}
- /**
- * Sets the value of the id property.
- */
- public void setId(String value)
- {
- this.id = value;
- }
-
public List<String> getDependsOn()
{
- if (dependsOn == null)
- dependsOn = new ArrayList<String>();
-
- return dependsOn;
+ return tComp.getDependsOn();
}
- public void setDependsOn(List<String> dependsOn)
+ public String getId()
{
- this.dependsOn = dependsOn;
+ return tComp.getId();
}
public int getInitialization()
{
- return initialization;
+ return tComp.getInitialization();
}
-
- public void setInitialization(int initialization)
- {
- this.initialization = initialization;
- }
}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefCollectionImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefCollectionImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefCollectionImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,165 +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.reflect;
-
-//$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 RefCollectionImpl extends ServiceReferenceMetadataImpl
-{
- protected ComparatorImpl comparator;
- protected String comparatorRef;
- protected String memberType;
- protected String orderingBasis;
-
- /**
- * Gets the value of the comparator property.
- *
- * @return possible object is {@link ComparatorImpl }
- *
- */
- public ComparatorImpl getComparator()
- {
- return comparator;
- }
-
- /**
- * Sets the value of the comparator property.
- *
- * @param value allowed object is {@link ComparatorImpl }
- *
- */
- public void setComparator(ComparatorImpl 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;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RefImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,77 +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.reflect;
-
-//$Id$
-
-/**
- *
- *
- * 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>
- *
- *
- */
-public class RefImpl
-{
- protected String component;
-
- /**
- * Gets the value of the component property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getComponent()
- {
- return component;
- }
-
- /**
- * Sets the value of the component property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setComponent(String value)
- {
- this.component = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceListenerImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceListenerImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceListenerImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,229 +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.reflect;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- *
- * 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>
- *
- *
- */
-public class ReferenceListenerImpl
-{
- protected BeanMetadataImpl bean;
- protected ReferenceMetadataImpl reference;
- protected RefImpl 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 BeanMetadataImpl }
- *
- */
- public BeanMetadataImpl getBean()
- {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value allowed object is {@link BeanMetadataImpl }
- *
- */
- public void setBean(BeanMetadataImpl value)
- {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return possible object is {@link ReferenceMetadataImpl }
- *
- */
- public ReferenceMetadataImpl getReference()
- {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value allowed object is {@link ReferenceMetadataImpl }
- *
- */
- public void setReference(ReferenceMetadataImpl value)
- {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return possible object is {@link RefImpl }
- *
- */
- public RefImpl getRefFIXME()
- {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value allowed object is {@link RefImpl }
- *
- */
- public void setRefFIXME(RefImpl 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 }
- *
- */
- 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 }
- *
- */
- 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;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ReferenceMetadataImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,78 +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.reflect;
-
-// $Id$
-
-import java.math.BigInteger;
-
-/**
- *
- *
- * 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>
- *
- *
- */
-public class ReferenceMetadataImpl extends ServiceReferenceMetadataImpl
-{
- 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;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RegistrationListenerImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RegistrationListenerImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/RegistrationListenerImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,230 +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.reflect;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- *
- * 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.
- *
- *
- *
- * <p>
- * Java class for TregistrationListener complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TregistrationListener">
- * <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.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * <attribute name="registration-method" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * <attribute name="unregistration-method" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class RegistrationListenerImpl
-{
- protected BeanMetadataImpl bean;
- protected ReferenceMetadataImpl reference;
- protected RefImpl refFIXME;
- protected List<Object> any;
- protected String ref;
- protected String registrationMethod;
- protected String unregistrationMethod;
-
- /**
- * Gets the value of the bean property.
- *
- * @return possible object is {@link BeanMetadataImpl }
- *
- */
- public BeanMetadataImpl getBean()
- {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value allowed object is {@link BeanMetadataImpl }
- *
- */
- public void setBean(BeanMetadataImpl value)
- {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return possible object is {@link ReferenceMetadataImpl }
- *
- */
- public ReferenceMetadataImpl getReference()
- {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value allowed object is {@link ReferenceMetadataImpl }
- *
- */
- public void setReference(ReferenceMetadataImpl value)
- {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return possible object is {@link RefImpl }
- *
- */
- public RefImpl getRefFIXME()
- {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value allowed object is {@link RefImpl }
- *
- */
- public void setRefFIXME(RefImpl 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 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/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -23,220 +23,71 @@
// $Id$
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-import javax.xml.namespace.QName;
+import org.jboss.osgi.blueprint.parser.xb.TAutoExportModes;
+import org.jboss.osgi.blueprint.parser.xb.TService;
+import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.reflect.MapEntry;
+import org.osgi.service.blueprint.reflect.RegistrationListener;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+import org.osgi.service.blueprint.reflect.Target;
/**
- * 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.
+ * Metadata representing a service to be exported by a module context.
*
* @author thomas.diesler at jboss.com
* @since 13-May-2009
*/
-public class ServiceMetadataImpl extends ComponentMetadataImpl
+public class ServiceMetadataImpl extends ComponentMetadataImpl implements ServiceMetadata
{
- protected String description;
- protected List<String> interfaceNames;
- protected List<ServicePropertyEntry> serviceProperties;
- protected Collection<RegistrationListenerImpl> registrationListener;
- protected BeanMetadataImpl bean;
- protected List<Object> any;
- protected String ref;
- protected AutoExportModes autoExportMode;
- protected int ranking;
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the description property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getDescription()
+ private TService tService;
+
+ public ServiceMetadataImpl(BundleContext context, TService tService)
{
- return description;
+ super(context, tService);
+ this.tService = tService;
}
- /**
- * 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 serviceProperties property.
- */
- public List<ServicePropertyEntry> getServiceProperties()
- {
- if (serviceProperties == null)
- serviceProperties = new ArrayList<ServicePropertyEntry>();
-
- return serviceProperties;
- }
-
- public void setServiceProperties(List<ServicePropertyEntry> serviceProperties)
- {
- this.serviceProperties = serviceProperties;
- }
-
- /**
- * Gets the value of the registrationListener property.
- */
- public Collection<RegistrationListenerImpl> getRegistrationListeners()
- {
- if (registrationListener == null)
- registrationListener = new ArrayList<RegistrationListenerImpl>();
-
- return registrationListener;
- }
-
- public void setRegistrationListeners(Collection<RegistrationListenerImpl> registrationListener)
- {
- this.registrationListener = registrationListener;
- }
-
- /**
- * Gets the value of the bean property.
- *
- * @return possible object is {@link BeanMetadataImpl }
- *
- */
- public BeanMetadataImpl getBean()
- {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value allowed object is {@link BeanMetadataImpl }
- *
- */
- public void setBean(BeanMetadataImpl value)
- {
- this.bean = value;
- }
-
- /**
- * Gets the value of the any property.
- */
- 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 autoExport property.
- *
- * @return possible object is {@link AutoExportModes }
- */
- public AutoExportModes getAutoExportMode()
- {
- if (autoExportMode == null)
- autoExportMode = AutoExportModes.DISABLED;
-
- return autoExportMode;
- }
-
- /**
- * Sets the value of the autoExport property.
- *
- * @param value allowed object is {@link AutoExportModes }
- */
- public void setAutoExportMode(AutoExportModes value)
- {
- this.autoExportMode = value;
- }
-
- /*
public int getAutoExport()
{
int modeValue = AUTO_EXPORT_DISABLED;
+ TAutoExportModes mode = tService.getAutoExportMode();
- AutoExportModes mode = getAutoExportMode();
- if (mode == AutoExportModes.ALL_CLASSES)
+ if (mode == TAutoExportModes.ALL_CLASSES)
modeValue = AUTO_EXPORT_ALL_CLASSES;
- else if (mode == AutoExportModes.CLASS_HIERARCHY)
+ else if (mode == TAutoExportModes.CLASS_HIERARCHY)
modeValue = AUTO_EXPORT_CLASS_HIERARCHY;
- else if (mode == AutoExportModes.INTERFACES)
+ else if (mode == TAutoExportModes.INTERFACES)
modeValue = AUTO_EXPORT_INTERFACES;
return modeValue;
}
- */
- /**
- * Gets the value of the ranking property.
- */
+ public List<String> getInterfaces()
+ {
+ return tService.getInterfaceNames();
+ }
+
public int getRanking()
{
- return ranking;
+ return tService.getRanking();
}
- /**
- * Sets the value of the ranking property.
- */
- public void setRanking(int value)
+ public Collection<RegistrationListener> getRegistrationListeners()
{
- this.ranking = value;
+ throw new NotImplementedException();
}
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- */
- public Map<QName, String> getOtherAttributes()
+ public Target getServiceComponent()
{
- return otherAttributes;
+ throw new NotImplementedException();
}
+
+ public List<MapEntry> getServiceProperties()
+ {
+ throw new NotImplementedException();
+ }
}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServicePropertyEntry.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServicePropertyEntry.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServicePropertyEntry.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,40 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-package org.jboss.osgi.blueprint.reflect;
-
-/**
- * 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.
- *
- */
-public class ServicePropertyEntry
-{
- protected String key;
- protected String value;
-
- public String getKey()
- {
- return key;
- }
-
- public void setKey(String key)
- {
- this.key = key;
- }
-
- public String getValue()
- {
- return value;
- }
-
- public void setValue(String value)
- {
- this.value = value;
- }
-
-}
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -23,206 +23,63 @@
// $Id$
-import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collection;
import java.util.List;
-import java.util.Map;
-import javax.xml.namespace.QName;
+import org.jboss.osgi.blueprint.parser.xb.TAvailability;
+import org.jboss.osgi.blueprint.parser.xb.TServiceReference;
+import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.reflect.ReferenceListener;
+import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
/**
- * 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.
+ * Metadata representing a service to be exported by a module context.
*
- * <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>
- *
- *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
*/
-public class ServiceReferenceMetadataImpl extends ComponentMetadataImpl
+public class ServiceReferenceMetadataImpl extends ComponentMetadataImpl implements ServiceReferenceMetadata
{
- protected String description;
- protected List<String> interfaceNames;
- protected List<ReferenceListenerImpl> listener;
- protected List<Object> any;
- protected String filter;
- protected String componentName;
- protected Availability availability;
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the description property.
- *
- * @return possible object is {@link String }
- *
- */
- public String getDescription()
+ private TServiceReference tService;
+
+ public ServiceReferenceMetadataImpl(BundleContext context, TServiceReference tService)
{
- return description;
+ super(context, tService);
+ this.tService = tService;
}
- /**
- * Sets the value of the description property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setDescription(String value)
+ public int getAvailability()
{
- this.description = value;
- }
-
- /**
- * Gets the value of the interfaces property.
- *
- */
- public List<String> getInterfaceNames()
- {
- if (interfaceNames == null)
- interfaceNames = new ArrayList<String>();
+ int availability = AVAILABILITY_OPTIONAL;
- return interfaceNames;
- }
-
- public void setInterfaceNames(List<String> interfaces)
- {
- this.interfaceNames = interfaces;
- }
-
- public String getInterface()
- {
- List<String> interfaces = getInterfaceNames();
- if (interfaces.size() == 0)
- throw new IllegalStateException("Empty list of interfaces");
-
- return interfaces.get(0);
- }
-
- /**
- * Gets the value of the listener property.
- */
- public List<ReferenceListenerImpl> getReferenceListeners()
- {
- if (listener == null)
- listener = new ArrayList<ReferenceListenerImpl>();
+ if (tService.getAvailability() == TAvailability.MANDATORY)
+ availability = AVAILABILITY_MANDATORY;
- return this.listener;
+ return availability;
}
- public void setReferenceListeners(List<ReferenceListenerImpl> listener)
+ public String getComponentName()
{
- this.listener = listener;
+ return tService.getComponentName();
}
- /**
- * Gets the value of the any property.
- */
- public List<Object> getAny()
- {
- if (any == null)
- {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets the value of the filter property.
- *
- * @return possible object is {@link String }
- *
- */
public String getFilter()
{
- return filter;
+ return tService.getFilter();
}
- /**
- * Sets the value of the filter property.
- *
- * @param value allowed object is {@link String }
- *
- */
- public void setFilter(String value)
+ public String getInterface()
{
- 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 }
- *
- */
- public Availability getAvailability()
- {
- if (availability == null)
- availability = Availability.OPTIONAL;
+ List<String> interfaceNames = tService.getInterfaceNames();
+ if (interfaceNames.size() == 0)
+ throw new IllegalStateException("Empty list of interfaces");
- return availability;
+ return interfaceNames.get(0);
}
- /**
- * Sets the value of the availability property.
- *
- * @param value allowed object is {@link Tavailability }
- *
- */
- public void setAvailability(Availability value)
+ public Collection<ReferenceListener> getReferenceListeners()
{
- this.availability = value;
+ throw new NotImplementedException();
}
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- */
- public Map<QName, String> getOtherAttributes()
- {
- return otherAttributes;
- }
}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Targument.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Targument.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Targument.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,567 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- *
- * An argument used to create an object defined by a <bean>
- * component. The <argument> elements are the arguments for the
- * bean class constructor or passed to the bean factory method.
- *
- * The type, if specified, is used to disambiguate the constructor
- * or method signature. Arguments may also be matched up with
- * arguments by explicitly specifying the index position. If the
- * index is used, then all <argument> elements for the bean must
- * also specify the index.
- *
- * The value and ref attributes are convenience shortcuts to make
- * the <argument> tag easier to code. A fuller set of injected
- * values and types can be specified using one of the "value"
- * type elements.
- *
- *
- *
- * <p>Java class for Targument complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Targument">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
- * </sequence>
- * <attribute name="index" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
- * <attribute name="type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
- * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Targument {
-
- protected String description;
- protected ServiceMetadataImpl service;
- protected RefCollectionImpl refList;
- protected RefCollectionImpl refSet;
- protected BeanMetadataImpl bean;
- protected ReferenceMetadataImpl reference;
- protected RefImpl refFIXME;
- protected List<Object> any;
- protected RefImpl idref;
- protected Tvalue value;
- protected Tcollection list;
- protected Tcollection set;
- protected Tmap map;
- protected Tcollection array;
- protected Tprops props;
- protected Tnull _null;
- protected BigInteger index;
- protected String type;
- protected String ref;
- protected String valueFIXME;
-
- /**
- * Gets the value of the description property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the value of the description property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDescription(String value) {
- this.description = value;
- }
-
- /**
- * Gets the value of the service property.
- *
- * @return
- * possible object is
- * {@link ServiceMetadataImpl }
- *
- */
- public ServiceMetadataImpl getService() {
- return service;
- }
-
- /**
- * Sets the value of the service property.
- *
- * @param value
- * allowed object is
- * {@link ServiceMetadataImpl }
- *
- */
- public void setService(ServiceMetadataImpl value) {
- this.service = value;
- }
-
- /**
- * Gets the value of the refList property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefList() {
- return refList;
- }
-
- /**
- * Sets the value of the refList property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefList(RefCollectionImpl value) {
- this.refList = value;
- }
-
- /**
- * Gets the value of the refSet property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefSet() {
- return refSet;
- }
-
- /**
- * Sets the value of the refSet property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefSet(RefCollectionImpl value) {
- this.refSet = value;
- }
-
- /**
- * Gets the value of the bean property.
- *
- * @return
- * possible object is
- * {@link BeanMetadataImpl }
- *
- */
- public BeanMetadataImpl getBean() {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value
- * allowed object is
- * {@link BeanMetadataImpl }
- *
- */
- public void setBean(BeanMetadataImpl value) {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return
- * possible object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public ReferenceMetadataImpl getReference() {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value
- * allowed object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public void setReference(ReferenceMetadataImpl value) {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return
- * possible object is
- * {@link RefImpl }
- *
- */
- public RefImpl getRefFIXME() {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setRefFIXME(RefImpl 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 RefImpl }
- *
- */
- public RefImpl getIdref() {
- return idref;
- }
-
- /**
- * Sets the value of the idref property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setIdref(RefImpl value) {
- this.idref = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link Tvalue }
- *
- */
- public Tvalue getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link Tvalue }
- *
- */
- public void setValue(Tvalue value) {
- this.value = value;
- }
-
- /**
- * Gets the value of the list property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getList() {
- return list;
- }
-
- /**
- * Sets the value of the list property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setList(Tcollection value) {
- this.list = value;
- }
-
- /**
- * Gets the value of the set property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getSet() {
- return set;
- }
-
- /**
- * Sets the value of the set property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setSet(Tcollection value) {
- this.set = value;
- }
-
- /**
- * Gets the value of the map property.
- *
- * @return
- * possible object is
- * {@link Tmap }
- *
- */
- public Tmap getMap() {
- return map;
- }
-
- /**
- * Sets the value of the map property.
- *
- * @param value
- * allowed object is
- * {@link Tmap }
- *
- */
- public void setMap(Tmap value) {
- this.map = value;
- }
-
- /**
- * Gets the value of the array property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getArray() {
- return array;
- }
-
- /**
- * Sets the value of the array property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setArray(Tcollection value) {
- this.array = value;
- }
-
- /**
- * Gets the value of the props property.
- *
- * @return
- * possible object is
- * {@link Tprops }
- *
- */
- public Tprops getProps() {
- return props;
- }
-
- /**
- * Sets the value of the props property.
- *
- * @param value
- * allowed object is
- * {@link Tprops }
- *
- */
- public void setProps(Tprops value) {
- this.props = value;
- }
-
- /**
- * Gets the value of the null property.
- *
- * @return
- * possible object is
- * {@link Tnull }
- *
- */
- public Tnull getNull() {
- return _null;
- }
-
- /**
- * Sets the value of the null property.
- *
- * @param value
- * allowed object is
- * {@link Tnull }
- *
- */
- public void setNull(Tnull value) {
- this._null = value;
- }
-
- /**
- * Gets the value of the index property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getIndex() {
- return index;
- }
-
- /**
- * Sets the value of the index property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setIndex(BigInteger value) {
- this.index = value;
- }
-
- /**
- * Gets the value of the type property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getType() {
- return type;
- }
-
- /**
- * Sets the value of the type property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setType(String value) {
- this.type = value;
- }
-
- /**
- * Gets the value of the ref property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getRef() {
- return ref;
- }
-
- /**
- * Sets the value of the ref property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setRef(String value) {
- this.ref = value;
- }
-
- /**
- * Gets the value of the valueFIXME property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValueFIXME() {
- return valueFIXME;
- }
-
- /**
- * Sets the value of the valueFIXME property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValueFIXME(String value) {
- this.valueFIXME = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tcollection.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tcollection.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tcollection.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,87 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- *
- * Tcollection is the base schema type for different ordered collection
- * types. This is shared between the <array>, <list>, and <set> elements.
- *
- *
- *
- * <p>Java class for Tcollection complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tcollection">
- * <complexContent>
- * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TtypedCollection">
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value" maxOccurs="unbounded" minOccurs="0"/>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tcollection
- extends TtypedCollection
-{
- protected List<Object> value;
-
- /**
- * Gets the value of the value 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 value property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getValue().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link JAXBElement }{@code <}{@link Tvalue }{@code >}
- * {@link JAXBElement }{@code <}{@link ServiceMetadataImpl }{@code >}
- * {@link JAXBElement }{@code <}{@link RefImpl }{@code >}
- * {@link JAXBElement }{@code <}{@link ReferenceMetadataImpl }{@code >}
- * {@link JAXBElement }{@code <}{@link RefImpl }{@code >}
- * {@link JAXBElement }{@code <}{@link Tmap }{@code >}
- * {@link JAXBElement }{@code <}{@link BeanMetadataImpl }{@code >}
- * {@link JAXBElement }{@code <}{@link Tnull }{@code >}
- * {@link JAXBElement }{@code <}{@link RefCollectionImpl }{@code >}
- * {@link JAXBElement }{@code <}{@link RefCollectionImpl }{@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 >}
- *
- *
- */
- public List<Object> getValue() {
- if (value == null) {
- value = new ArrayList<Object>();
- }
- return this.value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tkey.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tkey.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tkey.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,398 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- *
- * 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.
- *
- *
- *
- * <p>Java class for Tkey complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tkey">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}nonNullValue"/>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tkey {
-
- protected ServiceMetadataImpl service;
- protected RefCollectionImpl refList;
- protected RefCollectionImpl refSet;
- protected BeanMetadataImpl bean;
- protected ReferenceMetadataImpl reference;
- protected RefImpl refFIXME;
- protected List<Object> any;
- protected RefImpl idref;
- protected Tvalue value;
- protected Tcollection list;
- protected Tcollection set;
- protected Tmap map;
- protected Tcollection array;
- protected Tprops props;
-
- /**
- * Gets the value of the service property.
- *
- * @return
- * possible object is
- * {@link ServiceMetadataImpl }
- *
- */
- public ServiceMetadataImpl getService() {
- return service;
- }
-
- /**
- * Sets the value of the service property.
- *
- * @param value
- * allowed object is
- * {@link ServiceMetadataImpl }
- *
- */
- public void setService(ServiceMetadataImpl value) {
- this.service = value;
- }
-
- /**
- * Gets the value of the refList property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefList() {
- return refList;
- }
-
- /**
- * Sets the value of the refList property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefList(RefCollectionImpl value) {
- this.refList = value;
- }
-
- /**
- * Gets the value of the refSet property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefSet() {
- return refSet;
- }
-
- /**
- * Sets the value of the refSet property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefSet(RefCollectionImpl value) {
- this.refSet = value;
- }
-
- /**
- * Gets the value of the bean property.
- *
- * @return
- * possible object is
- * {@link BeanMetadataImpl }
- *
- */
- public BeanMetadataImpl getBean() {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value
- * allowed object is
- * {@link BeanMetadataImpl }
- *
- */
- public void setBean(BeanMetadataImpl value) {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return
- * possible object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public ReferenceMetadataImpl getReference() {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value
- * allowed object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public void setReference(ReferenceMetadataImpl value) {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return
- * possible object is
- * {@link RefImpl }
- *
- */
- public RefImpl getRefFIXME() {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setRefFIXME(RefImpl 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 RefImpl }
- *
- */
- public RefImpl getIdref() {
- return idref;
- }
-
- /**
- * Sets the value of the idref property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setIdref(RefImpl 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;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tmap.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tmap.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tmap.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,104 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- *
- * 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.
- *
- *
- *
- * <p>Java class for Tmap complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tmap">
- * <complexContent>
- * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TtypedCollection">
- * <sequence>
- * <element name="entry" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TmapEntry" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="key-type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tmap
- extends TtypedCollection
-{
-
- protected List<TmapEntry> entry;
- protected String keyType;
-
- /**
- * 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 TmapEntry }
- *
- *
- */
- public List<TmapEntry> getEntry() {
- if (entry == null) {
- entry = new ArrayList<TmapEntry>();
- }
- return this.entry;
- }
-
- /**
- * Gets the value of the keyType property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getKeyType() {
- return keyType;
- }
-
- /**
- * Sets the value of the keyType property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setKeyType(String value) {
- this.keyType = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TmapEntry.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TmapEntry.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TmapEntry.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,558 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- *
- * 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.
- *
- *
- *
- * <p>Java class for TmapEntry complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TmapEntry">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="keyFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tkey" minOccurs="0"/>
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
- * </sequence>
- * <attribute name="key" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
- * <attribute name="key-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" />
- * <attribute name="value-ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class TmapEntry {
-
- protected Tkey keyFIXME;
- protected ServiceMetadataImpl service;
- protected RefCollectionImpl refList;
- protected RefCollectionImpl refSet;
- protected BeanMetadataImpl bean;
- protected ReferenceMetadataImpl reference;
- protected RefImpl refFIXME;
- protected List<Object> any;
- protected RefImpl idref;
- protected Tvalue value;
- protected Tcollection list;
- protected Tcollection set;
- protected Tmap map;
- protected Tcollection array;
- protected Tprops props;
- protected Tnull _null;
- protected String key;
- protected String keyRef;
- protected String valueFIXME;
- protected String valueRef;
-
- /**
- * Gets the value of the keyFIXME property.
- *
- * @return
- * possible object is
- * {@link Tkey }
- *
- */
- public Tkey getKeyFIXME() {
- return keyFIXME;
- }
-
- /**
- * Sets the value of the keyFIXME property.
- *
- * @param value
- * allowed object is
- * {@link Tkey }
- *
- */
- public void setKeyFIXME(Tkey value) {
- this.keyFIXME = value;
- }
-
- /**
- * Gets the value of the service property.
- *
- * @return
- * possible object is
- * {@link ServiceMetadataImpl }
- *
- */
- public ServiceMetadataImpl getService() {
- return service;
- }
-
- /**
- * Sets the value of the service property.
- *
- * @param value
- * allowed object is
- * {@link ServiceMetadataImpl }
- *
- */
- public void setService(ServiceMetadataImpl value) {
- this.service = value;
- }
-
- /**
- * Gets the value of the refList property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefList() {
- return refList;
- }
-
- /**
- * Sets the value of the refList property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefList(RefCollectionImpl value) {
- this.refList = value;
- }
-
- /**
- * Gets the value of the refSet property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefSet() {
- return refSet;
- }
-
- /**
- * Sets the value of the refSet property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefSet(RefCollectionImpl value) {
- this.refSet = value;
- }
-
- /**
- * Gets the value of the bean property.
- *
- * @return
- * possible object is
- * {@link BeanMetadataImpl }
- *
- */
- public BeanMetadataImpl getBean() {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value
- * allowed object is
- * {@link BeanMetadataImpl }
- *
- */
- public void setBean(BeanMetadataImpl value) {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return
- * possible object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public ReferenceMetadataImpl getReference() {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value
- * allowed object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public void setReference(ReferenceMetadataImpl value) {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return
- * possible object is
- * {@link RefImpl }
- *
- */
- public RefImpl getRefFIXME() {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setRefFIXME(RefImpl 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 RefImpl }
- *
- */
- public RefImpl getIdref() {
- return idref;
- }
-
- /**
- * Sets the value of the idref property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setIdref(RefImpl 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 key property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getKey() {
- return key;
- }
-
- /**
- * Sets the value of the key property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setKey(String value) {
- this.key = value;
- }
-
- /**
- * Gets the value of the keyRef property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getKeyRef() {
- return keyRef;
- }
-
- /**
- * Sets the value of the keyRef property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setKeyRef(String value) {
- this.keyRef = 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;
- }
-
- /**
- * Gets the value of the valueRef property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValueRef() {
- return valueRef;
- }
-
- /**
- * Sets the value of the valueRef property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValueRef(String value) {
- this.valueRef = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tnull.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tnull.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tnull.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,37 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-
-/**
- *
- *
- * The definition for a <null> value type.
- *
- *
- *
- * <p>Java class for Tnull complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tnull">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tnull {
-
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprop.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprop.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprop.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,121 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-/**
- *
- *
- * 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.
- *
- *
- *
- * <p>Java class for Tprop complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tprop">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="key" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
- * <attribute name="value" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tprop {
-
- protected String content;
- protected String key;
- protected String value;
-
- /**
- *
- *
- * 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.
- *
- *
- *
- * @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 key property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getKey() {
- return key;
- }
-
- /**
- * Sets the value of the key property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setKey(String value) {
- this.key = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tproperty.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tproperty.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tproperty.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,534 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- *
- * A property that will be injected into a created <bean>
- * component. The <property> elements correspond to named
- * JavaBean setting methods for a created bean object.
- *
- * The value and ref attributes are convenience shortcuts to make
- * the <argument> tag easier to code. A fuller set of injected
- * values and types can be specified using one of the "value"
- * type elements.
- *
- *
- *
- * <p>Java class for Tproperty complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tproperty">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}String" minOccurs="0"/>
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}value"/>
- * </sequence>
- * <attribute name="name" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * <attribute name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * <attribute name="valueFIXME" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tproperty {
-
- protected String description;
- protected ServiceMetadataImpl service;
- protected RefCollectionImpl refList;
- protected RefCollectionImpl refSet;
- protected BeanMetadataImpl bean;
- protected ReferenceMetadataImpl reference;
- protected RefImpl refFIXME;
- protected List<Object> any;
- protected RefImpl idref;
- protected Tvalue value;
- protected Tcollection list;
- protected Tcollection set;
- protected Tmap map;
- protected Tcollection array;
- protected Tprops props;
- protected Tnull _null;
- protected String name;
- protected String ref;
- protected String valueFIXME;
-
- /**
- * Gets the value of the description property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the value of the description property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDescription(String value) {
- this.description = value;
- }
-
- /**
- * Gets the value of the service property.
- *
- * @return
- * possible object is
- * {@link ServiceMetadataImpl }
- *
- */
- public ServiceMetadataImpl getService() {
- return service;
- }
-
- /**
- * Sets the value of the service property.
- *
- * @param value
- * allowed object is
- * {@link ServiceMetadataImpl }
- *
- */
- public void setService(ServiceMetadataImpl value) {
- this.service = value;
- }
-
- /**
- * Gets the value of the refList property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefList() {
- return refList;
- }
-
- /**
- * Sets the value of the refList property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefList(RefCollectionImpl value) {
- this.refList = value;
- }
-
- /**
- * Gets the value of the refSet property.
- *
- * @return
- * possible object is
- * {@link RefCollectionImpl }
- *
- */
- public RefCollectionImpl getRefSet() {
- return refSet;
- }
-
- /**
- * Sets the value of the refSet property.
- *
- * @param value
- * allowed object is
- * {@link RefCollectionImpl }
- *
- */
- public void setRefSet(RefCollectionImpl value) {
- this.refSet = value;
- }
-
- /**
- * Gets the value of the bean property.
- *
- * @return
- * possible object is
- * {@link BeanMetadataImpl }
- *
- */
- public BeanMetadataImpl getBean() {
- return bean;
- }
-
- /**
- * Sets the value of the bean property.
- *
- * @param value
- * allowed object is
- * {@link BeanMetadataImpl }
- *
- */
- public void setBean(BeanMetadataImpl value) {
- this.bean = value;
- }
-
- /**
- * Gets the value of the reference property.
- *
- * @return
- * possible object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public ReferenceMetadataImpl getReference() {
- return reference;
- }
-
- /**
- * Sets the value of the reference property.
- *
- * @param value
- * allowed object is
- * {@link ReferenceMetadataImpl }
- *
- */
- public void setReference(ReferenceMetadataImpl value) {
- this.reference = value;
- }
-
- /**
- * Gets the value of the refFIXME property.
- *
- * @return
- * possible object is
- * {@link RefImpl }
- *
- */
- public RefImpl getRefFIXME() {
- return refFIXME;
- }
-
- /**
- * Sets the value of the refFIXME property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setRefFIXME(RefImpl 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 RefImpl }
- *
- */
- public RefImpl getIdref() {
- return idref;
- }
-
- /**
- * Sets the value of the idref property.
- *
- * @param value
- * allowed object is
- * {@link RefImpl }
- *
- */
- public void setIdref(RefImpl value) {
- this.idref = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link Tvalue }
- *
- */
- public Tvalue getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link Tvalue }
- *
- */
- public void setValue(Tvalue value) {
- this.value = value;
- }
-
- /**
- * Gets the value of the list property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getList() {
- return list;
- }
-
- /**
- * Sets the value of the list property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setList(Tcollection value) {
- this.list = value;
- }
-
- /**
- * Gets the value of the set property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getSet() {
- return set;
- }
-
- /**
- * Sets the value of the set property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setSet(Tcollection value) {
- this.set = value;
- }
-
- /**
- * Gets the value of the map property.
- *
- * @return
- * possible object is
- * {@link Tmap }
- *
- */
- public Tmap getMap() {
- return map;
- }
-
- /**
- * Sets the value of the map property.
- *
- * @param value
- * allowed object is
- * {@link Tmap }
- *
- */
- public void setMap(Tmap value) {
- this.map = value;
- }
-
- /**
- * Gets the value of the array property.
- *
- * @return
- * possible object is
- * {@link Tcollection }
- *
- */
- public Tcollection getArray() {
- return array;
- }
-
- /**
- * Sets the value of the array property.
- *
- * @param value
- * allowed object is
- * {@link Tcollection }
- *
- */
- public void setArray(Tcollection value) {
- this.array = value;
- }
-
- /**
- * Gets the value of the props property.
- *
- * @return
- * possible object is
- * {@link Tprops }
- *
- */
- public Tprops getProps() {
- return props;
- }
-
- /**
- * Sets the value of the props property.
- *
- * @param value
- * allowed object is
- * {@link Tprops }
- *
- */
- public void setProps(Tprops value) {
- this.props = value;
- }
-
- /**
- * Gets the value of the null property.
- *
- * @return
- * possible object is
- * {@link Tnull }
- *
- */
- public Tnull getNull() {
- return _null;
- }
-
- /**
- * Sets the value of the null property.
- *
- * @param value
- * allowed object is
- * {@link Tnull }
- *
- */
- public void setNull(Tnull value) {
- this._null = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the ref property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getRef() {
- return ref;
- }
-
- /**
- * Sets the value of the ref property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setRef(String value) {
- this.ref = value;
- }
-
- /**
- * Gets the value of the valueFIXME property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValueFIXME() {
- return valueFIXME;
- }
-
- /**
- * Sets the value of the valueFIXME property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValueFIXME(String value) {
- this.valueFIXME = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprops.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprops.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tprops.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,74 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- *
- *
- * Tprops is the type used by the <props> value element. The prop elements
- * are pairs of string-valued keys and values.
- *
- *
- *
- * <p>Java class for Tprops complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tprops">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="prop" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tprop" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tprops {
-
- protected List<Tprop> prop;
-
- /**
- * Gets the value of the prop 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 prop property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getProp().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Tprop }
- *
- *
- */
- public List<Tprop> getProp() {
- if (prop == null) {
- prop = new ArrayList<Tprop>();
- }
- return this.prop;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TserviceProperties.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TserviceProperties.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TserviceProperties.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,75 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-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<ServicePropertyEntry> 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 ServicePropertyEntry }
- *
- *
- */
- public List<ServicePropertyEntry> getEntry() {
- if (entry == null) {
- entry = new ArrayList<ServicePropertyEntry>();
- }
- return this.entry;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TtypedCollection.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TtypedCollection.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TtypedCollection.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,65 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-
-
-/**
- *
- *
- * TtypeCollection defines comment attributes shared among different
- * collection types that allow a default value type to be specified.
- *
- *
- *
- * <p>Java class for TtypedCollection complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TtypedCollection">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="value-type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class TtypedCollection {
-
- protected String valueType;
-
- /**
- * Gets the value of the valueType property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValueType() {
- return valueType;
- }
-
- /**
- * Sets the value of the valueType property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValueType(String value) {
- this.valueType = value;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tvalue.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tvalue.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/Tvalue.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,99 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.reflect;
-
-/**
- *
- *
- * 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>
- *
- *
- */
-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 }
- *
- */
- 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;
- }
-
-}
Deleted: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TypeConverters.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TypeConverters.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/TypeConverters.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -1,88 +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.reflect;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- *
- * 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.
- *
- *
- *
- * <p>
- * Java class for Ttype-converters complex type.
- *
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Ttype-converters">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <choice maxOccurs="unbounded" minOccurs="0">
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}targetComponent"/>
- * </choice>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class TypeConverters
-{
- protected List<Object> components;
-
- public List<Object> getComponents()
- {
- if (components == null)
- components = new ArrayList<Object>();
-
- return components;
- }
-
- public void setComponents(List<Object> converters)
- {
- this.components = converters;
- }
-
- void resolveRefs(BlueprintMetadata bpMetadata)
- {
- for (int i = 0; i < getComponents().size(); i++)
- {
- Object comp = components.get(i);
- if (comp instanceof RefImpl)
- {
- RefImpl ref = (RefImpl)comp;
- String compName = ref.getComponent();
- //comp = bpMetadata.getComponentMetadata(compName);
- components.set(i, comp);
- }
- }
- }
-}
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd 2009-06-18 06:51:00 UTC (rev 90375)
@@ -85,7 +85,7 @@
<xsd:complexType name="Tblueprint">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.BlueprintMetadata"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TBlueprint"></jbxb:class>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
@@ -174,7 +174,7 @@
<xsd:complexType name="Ttype-converters">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.TypeConverters"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TTypeConverters"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -292,7 +292,7 @@
<xsd:complexType name="Tbean">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.BeanMetadataImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TBean"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -426,7 +426,7 @@
<xsd:complexType name="Treference">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.ReferenceMetadataImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TReference"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -449,7 +449,7 @@
<xsd:complexType name="Tref-collection">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.RefCollectionImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TRefCollection"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -628,7 +628,7 @@
<xsd:complexType name="TReferenceListener">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.ReferenceListenerImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TReferenceListener"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -662,7 +662,7 @@
<xsd:simpleType name="Tavailability">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.Availability"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TAvailability"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -681,7 +681,7 @@
<xsd:complexType name="Tcomparator">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.ComparatorImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TComparator"></jbxb:class>
</xsd:appinfo>
</xsd:annotation>
<xsd:group ref="targetComponent" />
@@ -692,7 +692,7 @@
<xsd:complexType name="Tservice">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.ServiceMetadataImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TService"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -826,7 +826,7 @@
<xsd:complexType name="TregistrationListener">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.RegistrationListenerImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TRegistrationListener"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -914,7 +914,7 @@
<xsd:complexType name="Tref">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.RefImpl"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TRef"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -1069,7 +1069,7 @@
<xsd:complexType name="TservicePropertyEntry">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.ServicePropertyEntry"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TMapEntry"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
@@ -1201,7 +1201,7 @@
<xsd:simpleType name="TautoExportModes">
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.osgi.blueprint.reflect.AutoExportModes"></jbxb:class>
+ <jbxb:class impl="org.jboss.osgi.blueprint.parser.xb.TAutoExportModes"></jbxb:class>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -66,7 +66,6 @@
* @author thomas.diesler at jboss.com
* @since 13-May-2009
*/
- at Ignore
public class BlueprintContainerTestCase
{
@ProvideContext
@@ -112,38 +111,18 @@
}
@Test
- public void testBlueprintContextAvailable() throws Exception
+ public void testBlueprintContainerAvailable() throws Exception
{
if (context == null)
huskyBridge.run();
assumeNotNull(context);
- BlueprintContainer bpContext = getBlueprintContainer();
- assertNotNull("BlueprintContainer available", bpContext);
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ assertNotNull("BlueprintContainer available", bpContainer);
}
-
@Test
- public void getBeanComponentsMetadata() throws Exception
- {
- if (context == null)
- huskyBridge.run();
-
- assumeNotNull(context);
-
- BlueprintContainer bpContext = getBlueprintContainer();
- Collection<BeanMetadata> bcMetadata = bpContext.getMetadata(BeanMetadata.class);
-
- assertNotNull("BeanComponentsMetadata not null", bcMetadata);
- assertEquals("BeanComponentsMetadata size", 1, bcMetadata.size());
-
- BeanMetadata bmd = bcMetadata.iterator().next();
- assertEquals("beanA", bmd.getId());
- assertEquals(BeanA.class.getName(), bmd.getClassName());
- }
-
- @Test
public void getBundleContext() throws Exception
{
if (context == null)
@@ -151,14 +130,13 @@
assumeNotNull(context);
- BlueprintContainer bpContext = getBlueprintContainer();
- BundleContext bndContext = bpContext.getBundleContext();
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ BundleContext bndContext = bpContainer.getBundleContext();
assertNotNull("BundleContext not null", bndContext);
assertEquals("BundleContext equals", context, bndContext);
}
-
@Test
@Ignore
public void getComponent() throws Exception
@@ -168,35 +146,35 @@
assumeNotNull(context);
- BlueprintContainer bpContext = getBlueprintContainer();
- bpContext.getComponentInstance("beanA");
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ bpContainer.getComponentInstance("beanA");
}
@Test
- public void getComponentMetadata() throws Exception
+ public void testComponentMetadataByName() throws Exception
{
if (context == null)
huskyBridge.run();
assumeNotNull(context);
- BlueprintContainer bpContext = getBlueprintContainer();
- ComponentMetadata compMetadata = bpContext.getComponentMetadata("beanA");
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ ComponentMetadata compMetadata = bpContainer.getComponentMetadata("beanA");
assertNotNull("ComponentMetadata not null", compMetadata);
assertEquals("beanA", compMetadata.getId());
}
@Test
- public void getComponentNames() throws Exception
+ public void getComponentIds() throws Exception
{
if (context == null)
huskyBridge.run();
assumeNotNull(context);
- BlueprintContainer bpContext = getBlueprintContainer();
- Set<String> compNames = bpContext.getComponentIds();
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ Set<String> compNames = bpContainer.getComponentIds();
assertNotNull("ComponentNames not null", compNames);
assertEquals("ComponentNames size", 4, compNames.size());
@@ -207,16 +185,35 @@
}
@Test
- public void getExportedServicesMetadata() throws Exception
+ public void testBeanMetadata() throws Exception
{
if (context == null)
huskyBridge.run();
assumeNotNull(context);
- BlueprintContainer bpContext = getBlueprintContainer();
- Collection<ServiceMetadata> servicesMetadata = bpContext.getMetadata(ServiceMetadata.class);
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ Collection<BeanMetadata> bcMetadata = bpContainer.getMetadata(BeanMetadata.class);
+
+ assertNotNull("BeanComponentsMetadata not null", bcMetadata);
+ assertEquals("BeanComponentsMetadata size", 1, bcMetadata.size());
+
+ BeanMetadata bmd = bcMetadata.iterator().next();
+ assertEquals("beanA", bmd.getId());
+ assertEquals(BeanA.class.getName(), bmd.getClassName());
+ }
+ @Test
+ public void testServiceMetadata() throws Exception
+ {
+ if (context == null)
+ huskyBridge.run();
+
+ assumeNotNull(context);
+
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ Collection<ServiceMetadata> servicesMetadata = bpContainer.getMetadata(ServiceMetadata.class);
+
assertNotNull("ServiceMetadata not null", servicesMetadata);
assertEquals("ServiceMetadata size", 2, servicesMetadata.size());
@@ -239,15 +236,15 @@
}
@Test
- public void getReferencedServicesMetadata() throws Exception
+ public void testServiceReferenceMetadata() throws Exception
{
if (context == null)
huskyBridge.run();
assumeNotNull(context);
- BlueprintContainer bpContext = getBlueprintContainer();
- Collection<ServiceReferenceMetadata> srefsMetadata = bpContext.getMetadata(ServiceReferenceMetadata.class);
+ BlueprintContainer bpContainer = getBlueprintContainer();
+ Collection<ServiceReferenceMetadata> srefsMetadata = bpContainer.getMetadata(ServiceReferenceMetadata.class);
assertNotNull("ServiceReferenceMetadata not null", srefsMetadata);
assertEquals("ServiceReferenceMetadata size", 1, srefsMetadata.size());
@@ -265,7 +262,7 @@
ServiceReference sref = context.getServiceReference(BlueprintContainer.class.getName());
assertNotNull("BlueprintContainer service not null", sref);
- BlueprintContainer bpContext = (BlueprintContainer)context.getService(sref);
- return bpContext;
+ BlueprintContainer bpContainer = (BlueprintContainer)context.getService(sref);
+ return bpContainer;
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -30,15 +30,15 @@
import java.util.Collection;
import java.util.List;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
-import org.jboss.osgi.blueprint.reflect.Availability;
-import org.jboss.osgi.blueprint.reflect.BeanMetadataImpl;
-import org.jboss.osgi.blueprint.reflect.BlueprintMetadata;
-import org.jboss.osgi.blueprint.reflect.RefImpl;
-import org.jboss.osgi.blueprint.reflect.ReferenceMetadataImpl;
-import org.jboss.osgi.blueprint.reflect.ServiceMetadataImpl;
-import org.jboss.osgi.blueprint.reflect.ServiceReferenceMetadataImpl;
-import org.jboss.osgi.blueprint.reflect.TypeConverters;
+import org.jboss.osgi.blueprint.parser.xb.JBossXBParser;
+import org.jboss.osgi.blueprint.parser.xb.TAvailability;
+import org.jboss.osgi.blueprint.parser.xb.TBean;
+import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
+import org.jboss.osgi.blueprint.parser.xb.TRef;
+import org.jboss.osgi.blueprint.parser.xb.TReference;
+import org.jboss.osgi.blueprint.parser.xb.TService;
+import org.jboss.osgi.blueprint.parser.xb.TServiceReference;
+import org.jboss.osgi.blueprint.parser.xb.TTypeConverters;
import org.jboss.osgi.spi.testing.OSGiTestHelper;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -51,20 +51,20 @@
*/
public class AllElementsParserTestCase
{
- private static BlueprintMetadata blueprint;
+ private static TBlueprint blueprint;
@BeforeClass
public static void beforeClass()
{
URL xmlURL = new OSGiTestHelper().getResourceURL("parser/blueprint-all-elements.xml");
- blueprint = new BlueprintParser().parse(xmlURL);
+ blueprint = new JBossXBParser().parse(xmlURL);
}
@Test
public void testRootAttributes() throws Exception
{
- Availability defaultAvailability = blueprint.getDefaultAvailability();
- assertEquals(Availability.MANDATORY, defaultAvailability);
+ TAvailability defaultAvailability = blueprint.getDefaultAvailability();
+ assertEquals(TAvailability.MANDATORY, defaultAvailability);
String defaultDestroyMethod = blueprint.getDefaultDestroyMethod();
assertEquals("defaultDestroyMethod", defaultDestroyMethod);
@@ -89,32 +89,32 @@
@Test
public void getTypeConverters() throws Exception
{
- TypeConverters typeConverters = blueprint.getTypeConverters();
+ TTypeConverters typeConverters = blueprint.getTypeConverters();
assertNotNull("TypeConverters not null", typeConverters);
List<Object> converters = typeConverters.getComponents();
assertEquals("TypeConverters size", 5, converters.size());
- BeanMetadataImpl conv1 = (BeanMetadataImpl)converters.get(0);
+ TBean conv1 = (TBean)converters.get(0);
assertNotNull("Converter not null", conv1);
- ReferenceMetadataImpl conv2 = (ReferenceMetadataImpl)converters.get(1);
+ TReference conv2 = (TReference)converters.get(1);
assertNotNull("Converter not null", conv2);
- ReferenceMetadataImpl conv3 = (ReferenceMetadataImpl)converters.get(2);
+ TReference conv3 = (TReference)converters.get(2);
assertNotNull("Converter not null", conv3);
- RefImpl conv4 = (RefImpl)converters.get(3);
+ TRef conv4 = (TRef)converters.get(3);
assertNotNull("Converter not null", conv4);
- RefImpl conv5 = (RefImpl)converters.get(4);
+ TRef conv5 = (TRef)converters.get(4);
assertNotNull("Converter not null", conv5);
}
@Test
public void getExportedServicesMetadata() throws Exception
{
- Collection<ServiceMetadataImpl> services = blueprint.getMetadata(ServiceMetadataImpl.class);
+ Collection<TService> services = blueprint.getMetadata(TService.class);
assertNotNull("ServiceMetadata not null", services);
assertEquals("ServiceMetadata size", 2, services.size());
}
@@ -122,7 +122,7 @@
@Test
public void getReferencedServicesMetadata() throws Exception
{
- Collection<ServiceReferenceMetadataImpl> serviceRefs = blueprint.getMetadata(ServiceReferenceMetadataImpl.class);
+ Collection<TServiceReference> serviceRefs = blueprint.getMetadata(TServiceReference.class);
assertNotNull("ServiceReferenceMetadata not null", serviceRefs);
assertEquals("ServiceReferenceMetadata size", 3, serviceRefs.size());
}
@@ -130,7 +130,7 @@
@Test
public void getBeanComponentsMetadata() throws Exception
{
- Collection<BeanMetadataImpl> beans = blueprint.getMetadata(BeanMetadataImpl.class);
+ Collection<TBean> beans = blueprint.getMetadata(TBean.class);
assertNotNull("BeanMetadata not null", beans);
assertEquals("BeanMetadata size", 3, beans.size());
}
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -29,10 +29,10 @@
import java.net.URL;
import java.util.List;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
-import org.jboss.osgi.blueprint.reflect.BeanMetadataImpl;
-import org.jboss.osgi.blueprint.reflect.BlueprintMetadata;
-import org.jboss.osgi.blueprint.reflect.ComponentMetadataImpl;
+import org.jboss.osgi.blueprint.parser.xb.JBossXBParser;
+import org.jboss.osgi.blueprint.parser.xb.TBean;
+import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
+import org.jboss.osgi.blueprint.parser.xb.TComponent;
import org.jboss.osgi.spi.testing.OSGiTest;
import org.jboss.test.osgi.blueprint.parser.comp.BeanA;
import org.jboss.test.osgi.blueprint.parser.comp.BeanB;
@@ -50,16 +50,16 @@
public void testBasicBeans() throws Exception
{
URL xmlURL = getResourceURL("parser/blueprint-basic-beans.xml");
- BlueprintMetadata blueprint = new BlueprintParser().parse(xmlURL);
+ TBlueprint blueprint = new JBossXBParser().parse(xmlURL);
- List<ComponentMetadataImpl> compList = blueprint.getComponents();
+ List<TComponent> compList = blueprint.getComponents();
assertTrue(compList.size() > 0);
- BeanMetadataImpl beanA = (BeanMetadataImpl)compList.get(0);
+ TBean beanA = (TBean)compList.get(0);
assertEquals(BeanA.class.getName(), beanA.getClassName());
assertEquals("beanA", beanA.getId());
- BeanMetadataImpl beanB = (BeanMetadataImpl)compList.get(1);
+ TBean beanB = (TBean)compList.get(1);
assertEquals(BeanB.class.getName(), beanB.getClassName());
assertEquals("beanB", beanB.getId());
}
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicRootParserTestCase.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -29,9 +29,9 @@
import java.math.BigInteger;
import java.net.URL;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
-import org.jboss.osgi.blueprint.reflect.Availability;
-import org.jboss.osgi.blueprint.reflect.BlueprintMetadata;
+import org.jboss.osgi.blueprint.parser.xb.JBossXBParser;
+import org.jboss.osgi.blueprint.parser.xb.TAvailability;
+import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
import org.jboss.osgi.spi.testing.OSGiTest;
import org.junit.Test;
@@ -47,10 +47,10 @@
public void testBlueprintDefaultAttributes() throws Exception
{
URL xmlURL = getResourceURL("parser/blueprint-basic-root.xml");
- BlueprintMetadata blueprint = new BlueprintParser().parse(xmlURL);
+ TBlueprint blueprint = new JBossXBParser().parse(xmlURL);
// assert default attributes
- assertEquals(Availability.MANDATORY, blueprint.getDefaultAvailability());
+ assertEquals(TAvailability.MANDATORY, blueprint.getDefaultAvailability());
assertEquals(new BigInteger("300000"), blueprint.getDefaultTimeout());
assertEquals(Boolean.FALSE, blueprint.isDefaultLazyInit());
assertNull(blueprint.getDefaultInitMethod());
@@ -61,7 +61,7 @@
public void testBlueprintDescription() throws Exception
{
URL xmlURL = getResourceURL("parser/blueprint-basic-root.xml");
- BlueprintMetadata blueprint = new BlueprintParser().parse(xmlURL);
+ TBlueprint blueprint = new JBossXBParser().parse(xmlURL);
// assert description
assertEquals("some text", blueprint.getDescription());
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -29,11 +29,11 @@
import java.net.URL;
import java.util.List;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
-import org.jboss.osgi.blueprint.reflect.BeanMetadataImpl;
-import org.jboss.osgi.blueprint.reflect.BlueprintMetadata;
-import org.jboss.osgi.blueprint.reflect.ComponentMetadataImpl;
-import org.jboss.osgi.blueprint.reflect.ServiceMetadataImpl;
+import org.jboss.osgi.blueprint.parser.xb.JBossXBParser;
+import org.jboss.osgi.blueprint.parser.xb.TBean;
+import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
+import org.jboss.osgi.blueprint.parser.xb.TComponent;
+import org.jboss.osgi.blueprint.parser.xb.TService;
import org.jboss.osgi.spi.testing.OSGiTest;
import org.jboss.test.osgi.blueprint.parser.comp.BeanA;
import org.jboss.test.osgi.blueprint.parser.comp.ServiceA;
@@ -52,23 +52,23 @@
public void testBasicBeans() throws Exception
{
URL xmlURL = getResourceURL("parser/blueprint-basic-service.xml");
- BlueprintMetadata blueprint = new BlueprintParser().parse(xmlURL);
+ TBlueprint blueprint = new JBossXBParser().parse(xmlURL);
- List<ComponentMetadataImpl> compList = blueprint.getComponents();
+ List<TComponent> compList = blueprint.getComponents();
assertTrue(compList.size() > 0);
- BeanMetadataImpl beanA = (BeanMetadataImpl)compList.get(0);
+ TBean beanA = (TBean)compList.get(0);
assertEquals(BeanA.class.getName(), beanA.getClassName());
assertEquals("beanA", beanA.getId());
- ServiceMetadataImpl serviceA = (ServiceMetadataImpl)compList.get(1);
+ TService serviceA = (TService)compList.get(1);
assertEquals("serviceA", serviceA.getId());
List<String> intfsA = serviceA.getInterfaceNames();
assertTrue(intfsA.size() > 0);
assertEquals(ServiceA.class.getName(), intfsA.get(0));
- ServiceMetadataImpl serviceB = (ServiceMetadataImpl)compList.get(2);
+ TService serviceB = (TService)compList.get(2);
assertEquals("serviceB", serviceB.getId());
List<String> intfsB = serviceB.getInterfaceNames();
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/main/java/org/jboss/osgi/trailblazer/web/MainServlet.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/main/java/org/jboss/osgi/trailblazer/web/MainServlet.java 2009-06-18 06:24:16 UTC (rev 90374)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/main/java/org/jboss/osgi/trailblazer/web/MainServlet.java 2009-06-18 06:51:00 UTC (rev 90375)
@@ -34,10 +34,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.jboss.osgi.common.log.LogServiceTracker;
import org.osgi.framework.BundleContext;
import org.osgi.service.http.HttpService;
-import org.osgi.service.log.LogService;
/**
@@ -50,15 +48,11 @@
@SuppressWarnings("serial")
public class MainServlet extends HttpServlet
{
- private LogService log;
-
private BundleContext context;
public MainServlet(BundleContext context)
{
- this.log = new LogServiceTracker(context);
this.context = context;
-
}
@Override
More information about the jboss-osgi-commits
mailing list