Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 2253 invoked from network); 8 Dec 2009 13:27:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Dec 2009 13:27:52 -0000 Received: (qmail 45805 invoked by uid 500); 8 Dec 2009 13:27:52 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 45741 invoked by uid 500); 8 Dec 2009 13:27:51 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 45732 invoked by uid 99); 8 Dec 2009 13:27:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2009 13:27:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2009 13:27:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 38D3023888EC; Tue, 8 Dec 2009 13:27:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r888395 - in /sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi: ManifestHeader.java OsgiUtil.java Date: Tue, 08 Dec 2009 13:27:28 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091208132728.38D3023888EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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); } }