You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2009/12/08 14:27:28 UTC
svn commit: r888395 - in
/sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi:
ManifestHeader.java OsgiUtil.java
Author: cziegeler
Date: Tue Dec 8 13:27:27 2009
New Revision: 888395
URL: http://svn.apache.org/viewvc?rev=888395&view=rev
Log:
Add some javadocs.
Modified:
sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java
sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java
Modified: sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java?rev=888395&r1=888394&r2=888395&view=diff
==============================================================================
--- sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java (original)
+++ sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java Tue Dec 8 13:27:27 2009
@@ -51,7 +51,7 @@
String getAttributeValue(String name);
String getDirectiveValue(String name);
-}
+ }
/** The entries for this header. */
private Entry[] entries = new Entry[0];
Modified: sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java?rev=888395&r1=888394&r2=888395&view=diff
==============================================================================
--- sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java (original)
+++ sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java Tue Dec 8 13:27:27 2009
@@ -225,8 +225,20 @@
return defaultArray;
}
+ /**
+ * Create an osgi event with the given topic and properties.
+ * If a bundle parameter is provided the symbolic name is added
+ * as a property.
+ * If a service parameter is provided, information about the service
+ * is added to the properties.
+ * @param sourceBundle Optional source bundle
+ * @param sourceService Optional source service
+ * @param topic The event topic.
+ * @param props A non-null map of properties for the event.
+ * @return The OSGi event.
+ */
public static Event createEvent(Bundle sourceBundle,
- ServiceReference sourceService, String eventName,
+ ServiceReference sourceService, String topic,
Map<String, Object> props) {
// get a private copy of the properties
@@ -259,7 +271,7 @@
new Long(System.currentTimeMillis()));
// create the event
- return new Event(eventName, table);
+ return new Event(topic, table);
}
}