You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fm...@apache.org on 2009/02/07 13:13:15 UTC

svn commit: r741883 - in /felix/sandbox/fmeschbe/scr: ./ src/main/java/org/osgi/ src/main/java/org/osgi/service/ src/main/java/org/osgi/service/component/ src/main/resources/ src/main/resources/org/ src/main/resources/org/osgi/ src/main/resources/org/o...

Author: fmeschbe
Date: Sat Feb  7 12:13:15 2009
New Revision: 741883

URL: http://svn.apache.org/viewvc?rev=741883&view=rev
Log:
FELIX-925 Add new constants from RFC 134

Added:
    felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/
    felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/
    felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/
    felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/ComponentConstants.java   (with props)
    felix/sandbox/fmeschbe/scr/src/main/resources/
    felix/sandbox/fmeschbe/scr/src/main/resources/org/
    felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/
    felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/service/
    felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/service/component/
    felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/service/component/packageinfo
Modified:
    felix/sandbox/fmeschbe/scr/pom.xml

Modified: felix/sandbox/fmeschbe/scr/pom.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/fmeschbe/scr/pom.xml?rev=741883&r1=741882&r2=741883&view=diff
==============================================================================
--- felix/sandbox/fmeschbe/scr/pom.xml (original)
+++ felix/sandbox/fmeschbe/scr/pom.xml Sat Feb  7 12:13:15 2009
@@ -38,21 +38,26 @@
             <groupId>${pom.groupId}</groupId>
             <artifactId>org.osgi.core</artifactId>
             <version>1.0.0</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>org.osgi.compendium</artifactId>
             <version>1.0.0</version>
+            <scope>compile</scope>
+            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>org.apache.felix.shell</artifactId>
             <version>1.0.0</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>net.sf.kxml</groupId>
             <artifactId>kxml2</artifactId>
             <version>2.2.2</version>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
     <build>
@@ -60,7 +65,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>1.4.0</version>
+                <version>1.4.3</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -74,12 +79,11 @@
                         <Export-Package>
                             org.apache.felix.scr;version=${pom.version},
                             org.osgi.service.cm,
-                            org.osgi.service.component
+                            org.osgi.service.component;-split-package:=merge-first
                         </Export-Package>
                         <Private-Package>
-                            org.apache.felix.scr.impl.*, org.kxml2.io,
-                            org.osgi.util.tracker,
-                            org.xmlpull.v1;-split-package:=merge-first
+                            org.apache.felix.scr.impl.*,
+                            org.osgi.util.tracker
                         </Private-Package>
                         <Import-Package>
                             org.apache.felix.shell;resolution:=optional,*
@@ -87,6 +91,9 @@
                         <DynamicImport-Package>
                             org.osgi.service.log
                         </DynamicImport-Package>
+                        <Embed-Dependency>
+                            kxml2;inline=org/kxml2/io/*|org/xmlpull/v1/*,
+                        </Embed-Dependency>
                     </instructions>
                 </configuration>
             </plugin>

Added: felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
URL: http://svn.apache.org/viewvc/felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/ComponentConstants.java?rev=741883&view=auto
==============================================================================
--- felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/ComponentConstants.java (added)
+++ felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/ComponentConstants.java Sat Feb  7 12:13:15 2009
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) OSGi Alliance (2004, 2006). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component;
+
+/**
+ * Defines standard names for Service Component constants.
+ * 
+ * @version $Revision$
+ */
+public interface ComponentConstants {
+    /**
+     * Manifest header (named &quot;Service-Component&quot;) specifying the XML
+     * documents within a bundle that contain the bundle's Service Component
+     * descriptions.
+     * <p>
+     * The attribute value may be retrieved from the <code>Dictionary</code>
+     * object returned by the <code>Bundle.getHeaders</code> method.
+     */
+    public static final String SERVICE_COMPONENT = "Service-Component";
+
+    /**
+     * A component property for a component configuration that contains the name
+     * of the component as specified in the <code>name</code> attribute of the
+     * <code>component</code> element. The type of this property must be
+     * <code>String</code>.
+     */
+    public final static String COMPONENT_NAME = "component.name";
+
+    /**
+     * A component property that contains the generated id for a component
+     * configuration. The type of this property must be <code>Long</code>.
+     * <p>
+     * The value of this property is assigned by the Service Component Runtime
+     * when a component configuration is created. The Service Component Runtime
+     * assigns a unique value that is larger than all previously assigned values
+     * since the Service Component Runtime was started. These values are NOT
+     * persistent across restarts of the Service Component Runtime.
+     */
+    public final static String COMPONENT_ID = "component.id";
+
+    /**
+     * A service registration property for a Component Factory that contains the
+     * value of the <code>factory</code> attribute. The type of this property
+     * must be <code>String</code>.
+     */
+    public final static String COMPONENT_FACTORY = "component.factory";
+
+    /**
+     * The suffix for reference target properties. These properties contain the
+     * filter to select the target services for a reference. The type of this
+     * property must be <code>String</code>.
+     */
+    public final static String REFERENCE_TARGET_SUFFIX = ".target";
+
+    /**
+     * The reason the component instance was deactivated is unspecified.
+     * 
+     * @since 1.1
+     */
+    public static final int DEACTIVATION_REASON_UNSPECIFIED = 0;
+
+    /**
+     * The component instance was deactivated because the component was
+     * disabled.
+     * 
+     * @since 1.1
+     */
+    public static final int DEACTIVATION_REASON_DISABLED = 1;
+
+    /**
+     * The component instance was deactivated because a reference became
+     * unsatisfied. Copyright © IBM Corporation 2008 All Rights Reserved RFC 134
+     * Declarative Services Updates Page 6 of 12 Draft 4 November 2008
+     * 
+     * @since 1.1
+     */
+    public static final int DEACTIVATION_REASON_REFERENCE = 2;
+
+    /**
+     * The component instance was deactivated because its configuration was
+     * changed.
+     * 
+     * @since 1.1
+     */
+    public static final int DEACTIVATION_REASON_CONFIGURATION_MODIFIED = 3;
+
+    /**
+     * The component instance was deactivated because its configuration was
+     * deleted.
+     * 
+     * @since 1.1
+     */
+    public static final int DEACTIVATION_REASON_CONFIGURATION_DELETED = 4;
+
+    /**
+     * The component instance was deactivated because the component was
+     * disposed.
+     * 
+     * @since 1.1
+     */
+    public static final int DEACTIVATION_REASON_DISPOSED = 5;
+
+    /**
+     * The component instance was deactivated because the bundle was stopped.
+     * 
+     * @since 1.1
+     */
+    public static final int DEACTIVATION_REASON_BUNDLE_STOPPED = 6;
+
+}

Propchange: felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/fmeschbe/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/service/component/packageinfo
URL: http://svn.apache.org/viewvc/felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/service/component/packageinfo?rev=741883&view=auto
==============================================================================
--- felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/service/component/packageinfo (added)
+++ felix/sandbox/fmeschbe/scr/src/main/resources/org/osgi/service/component/packageinfo Sat Feb  7 12:13:15 2009
@@ -0,0 +1 @@
+version 1.1