You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2010/03/03 22:11:27 UTC
svn commit: r918693 -
/felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
Author: pderop
Date: Wed Mar 3 21:11:27 2010
New Revision: 918693
URL: http://svn.apache.org/viewvc?rev=918693&view=rev
Log:
fixed javadoc
Modified:
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
Modified: felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java?rev=918693&r1=918692&r2=918693&view=diff
==============================================================================
--- felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java (original)
+++ felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java Wed Mar 3 21:11:27 2010
@@ -25,13 +25,50 @@
import org.osgi.framework.Bundle;
+/**
+ * Annotates a Bundle Adapter Service class. The adapter will be applied to any bundle that
+ * matches the specified bundle state mask and filter condition. For each matching
+ * bundle an adapter will be created based on the adapter implementation class.
+ * The adapter will be registered with the specified interface and existing properties
+ * from the original resource plus any extra properties you supply here.
+ * It will also inherit all dependencies, and if you declare the original
+ * service as a member it will be injected.
+ *
+ * @param bundleStateMask the bundle state mask to apply
+ * @param bundleFilter the filter to apply to the bundle manifest
+ * @param adapterImplementation the implementation of the adapter
+ * @param adapterInterface the interface to use when registering adapters
+ * @param adapterProperties additional properties to use with the service registration
+ * @param propagate <code>true</code> if properties from the bundle should be propagated to the service
+ * @return a service that acts as a factory for generating bundle adapters
+ */
public @Retention(RetentionPolicy.CLASS)
@Target(ElementType.TYPE)
@interface BundleAdapterService
{
+ /**
+ * The filter used to match a given bundle.
+ */
String filter();
+
+ /**
+ * the bundle state mask to apply
+ */
int stateMask() default Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE;
+
+ /**
+ * The interface to use when registering adapters. By default, the interface directly implemented
+ * by the annotated class is used.
+ */
Class<?> service() default Object.class;
+
+ /**
+ * Additional properties to use with the service registration
+ */
Param[] properties() default {};
+
+ /**
+ * Specifies if properties from the bundle should be propagated to the service.
+ */
boolean propagate() default true;
}