db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r737043 [3/4] - in /db/derby/code/trunk: ./ java/stubs/felix/ java/stubs/felix/org/ java/stubs/felix/org/osgi/ java/stubs/felix/org/osgi/framework/ tools/ant/properties/ tools/ide/netbeans/6.0/nbproject/ tools/java/
Date Fri, 23 Jan 2009 15:05:48 GMT
Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Constants.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Constants.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Constants.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Constants.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,1109 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Constants.java,v 1.32 2007/02/20 00:07:22 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2000, 2007). 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.framework;
+
+/**
+ * Defines standard names for the OSGi environment system properties, service
+ * properties, and Manifest header attribute keys.
+ * 
+ * <p>
+ * The values associated with these keys are of type
+ * <code>java.lang.String</code>, unless otherwise indicated.
+ * 
+ * @since 1.1
+ * @version $Revision: 1.32 $
+ */
+
+public interface Constants {
+	/**
+	 * Location identifier of the OSGi <i>system bundle </i>, which is defined
+	 * to be &quot;System Bundle&quot;.
+	 */
+	public static final String	SYSTEM_BUNDLE_LOCATION					= "System Bundle";
+
+	/**
+	 * Alias for the symbolic name of the OSGi <i>system bundle </i>. It is
+	 * defined to be &quot;system.bundle&quot;.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	SYSTEM_BUNDLE_SYMBOLICNAME				= "system.bundle";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Category&quot;) identifying the
+	 * bundle's category.
+	 * <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	BUNDLE_CATEGORY							= "Bundle-Category";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ClassPath&quot;) identifying a list
+	 * of directories and embedded JAR files, which are bundle resources used to
+	 * extend the bundle's classpath.
+	 * 
+	 * <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	BUNDLE_CLASSPATH						= "Bundle-ClassPath";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Copyright&quot;) identifying the
+	 * bundle's copyright information.
+	 * <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	BUNDLE_COPYRIGHT						= "Bundle-Copyright";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Description&quot;) containing a brief
+	 * description of the bundle's functionality.
+	 * <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	BUNDLE_DESCRIPTION						= "Bundle-Description";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Name&quot;) identifying the bundle's
+	 * name.
+	 * <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	BUNDLE_NAME								= "Bundle-Name";
+
+	/**
+	 * Manifest header (named &quot;Bundle-NativeCode&quot;) identifying a
+	 * number of hardware environments and the native language code libraries
+	 * that the bundle is carrying for each of these environments.
+	 * 
+	 * <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	BUNDLE_NATIVECODE						= "Bundle-NativeCode";
+
+	/**
+	 * Manifest header (named &quot;Export-Package&quot;) identifying the
+	 * packages that the bundle offers to the Framework for export.
+	 * 
+	 * <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	EXPORT_PACKAGE							= "Export-Package";
+
+	/**
+	 * Manifest header (named &quot;Export-Service&quot;) identifying the fully
+	 * qualified class names of the services that the bundle may register (used
+	 * for informational purposes only).
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @deprecated As of 1.2.
+	 */
+	public static final String	EXPORT_SERVICE							= "Export-Service";
+
+	/**
+	 * Manifest header (named &quot;Import-Package&quot;) identifying the
+	 * packages on which the bundle depends.
+	 * 
+	 * <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	IMPORT_PACKAGE							= "Import-Package";
+
+	/**
+	 * Manifest header (named &quot;DynamicImport-Package&quot;) identifying the
+	 * packages that the bundle may dynamically import during execution.
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.2
+	 */
+	public static final String	DYNAMICIMPORT_PACKAGE					= "DynamicImport-Package";
+
+	/**
+	 * Manifest header (named &quot;Import-Service&quot;) identifying the fully
+	 * qualified class names of the services that the bundle requires (used for
+	 * informational purposes only).
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @deprecated As of 1.2.
+	 */
+	public static final String	IMPORT_SERVICE							= "Import-Service";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Vendor&quot;) identifying the
+	 * bundle's vendor.
+	 * 
+	 * <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	BUNDLE_VENDOR							= "Bundle-Vendor";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Version&quot;) identifying the
+	 * bundle's version.
+	 * 
+	 * <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	BUNDLE_VERSION							= "Bundle-Version";
+
+	/**
+	 * Manifest header (named &quot;Bundle-DocURL&quot;) identifying the
+	 * bundle's documentation URL, from which further information about the
+	 * bundle may be obtained.
+	 * 
+	 * <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	BUNDLE_DOCURL							= "Bundle-DocURL";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ContactAddress&quot;) identifying the
+	 * contact address where problems with the bundle may be reported; for
+	 * example, an email address.
+	 * 
+	 * <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	BUNDLE_CONTACTADDRESS					= "Bundle-ContactAddress";
+
+	/**
+	 * Manifest header attribute (named &quot;Bundle-Activator&quot;)
+	 * identifying the bundle's activator class.
+	 * 
+	 * <p>
+	 * If present, this header specifies the name of the bundle resource class
+	 * that implements the <code>BundleActivator</code> interface and whose
+	 * <code>start</code> and <code>stop</code> methods are called by the
+	 * Framework when the bundle is started and stopped, respectively.
+	 * 
+	 * <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	BUNDLE_ACTIVATOR						= "Bundle-Activator";
+
+	/**
+	 * Manifest header (named &quot;Bundle-UpdateLocation&quot;) identifying the
+	 * location from which a new bundle version is obtained during a bundle
+	 * update operation.
+	 * 
+	 * <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	BUNDLE_UPDATELOCATION					= "Bundle-UpdateLocation";
+
+	/**
+	 * Manifest header attribute (named &quot;specification-version&quot;)
+	 * identifying the version of a package specified in the Export-Package or
+	 * Import-Package manifest header.
+	 * 
+	 * @deprecated As of 1.3. This has been replaced by
+	 *             {@link #VERSION_ATTRIBUTE}.
+	 */
+	public static final String	PACKAGE_SPECIFICATION_VERSION			= "specification-version";
+
+	/**
+	 * Manifest header attribute (named &quot;processor&quot;) identifying the
+	 * processor required to run native bundle code specified in the
+	 * Bundle-NativeCode manifest header).
+	 * 
+	 * <p>
+	 * The attribute value is encoded in the Bundle-NativeCode manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; processor=x86 ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_PROCESSOR				= "processor";
+
+	/**
+	 * Manifest header attribute (named &quot;osname&quot;) identifying the
+	 * operating system required to run native bundle code specified in the
+	 * Bundle-NativeCode manifest header).
+	 * <p>
+	 * The attribute value is encoded in the Bundle-NativeCode manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; osname=Linux ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_OSNAME				= "osname";
+
+	/**
+	 * Manifest header attribute (named &quot;osversion&quot;) identifying the
+	 * operating system version required to run native bundle code specified in
+	 * the Bundle-NativeCode manifest header).
+	 * <p>
+	 * The attribute value is encoded in the Bundle-NativeCode manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; osversion=&quot;2.34&quot; ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_OSVERSION				= "osversion";
+
+	/**
+	 * Manifest header attribute (named &quot;language&quot;) identifying the
+	 * language in which the native bundle code is written specified in the
+	 * Bundle-NativeCode manifest header. See ISO 639 for possible values.
+	 * <p>
+	 * The attribute value is encoded in the Bundle-NativeCode manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; language=nl_be ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_LANGUAGE				= "language";
+
+	/**
+	 * Manifest header (named &quot;Bundle-RequiredExecutionEnvironment&quot;)
+	 * identifying the required execution environment for the bundle. The
+	 * service platform may run this bundle if any of the execution environments
+	 * named in this header matches one of the execution environments it
+	 * implements.
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.2
+	 */
+	public static final String	BUNDLE_REQUIREDEXECUTIONENVIRONMENT		= "Bundle-RequiredExecutionEnvironment";
+
+	/*
+	 * Framework environment properties.
+	 */
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.version&quot;) identifying the Framework
+	 * version.
+	 * 
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 */
+	public static final String	FRAMEWORK_VERSION						= "org.osgi.framework.version";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.vendor&quot;) identifying the Framework
+	 * implementation vendor.
+	 * 
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 */
+	public static final String	FRAMEWORK_VENDOR						= "org.osgi.framework.vendor";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.language&quot;) identifying the Framework
+	 * implementation language (see ISO 639 for possible values).
+	 * 
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 */
+	public static final String	FRAMEWORK_LANGUAGE						= "org.osgi.framework.language";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.os.name&quot;) identifying the Framework
+	 * host-computer's operating system.
+	 * 
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 */
+	public static final String	FRAMEWORK_OS_NAME						= "org.osgi.framework.os.name";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.os.version&quot;) identifying the Framework
+	 * host-computer's operating system version number.
+	 * 
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 */
+	public static final String	FRAMEWORK_OS_VERSION					= "org.osgi.framework.os.version";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.processor&quot;) identifying the Framework
+	 * host-computer's processor name.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 */
+	public static final String	FRAMEWORK_PROCESSOR						= "org.osgi.framework.processor";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.executionenvironment&quot;) identifying
+	 * execution environments provided by the Framework.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 * 
+	 * @since 1.2
+	 */
+	public static final String	FRAMEWORK_EXECUTIONENVIRONMENT			= "org.osgi.framework.executionenvironment";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.bootdelegation&quot;) identifying packages for
+	 * which the Framework must delegate class loading to the boot class path.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	FRAMEWORK_BOOTDELEGATION				= "org.osgi.framework.bootdelegation";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.system.packages&quot;) identifying package which
+	 * the system bundle must export.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	FRAMEWORK_SYSTEMPACKAGES				= "org.osgi.framework.system.packages";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.supports.framework.extension&quot;) identifying whether
+	 * the Framework supports framework extension bundles. As of version 1.4,
+	 * the value of this property must be <code>true</code>. The Framework
+	 * must support framework extension bundles.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	SUPPORTS_FRAMEWORK_EXTENSION			= "org.osgi.supports.framework.extension";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.supports.bootclasspath.extension&quot;) identifying
+	 * whether the Framework supports bootclasspath extension bundles. If the
+	 * value of this property is <code>true</code>, then the Framework
+	 * supports bootclasspath extension bundles. The default value is
+	 * <code>false</code>.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	SUPPORTS_BOOTCLASSPATH_EXTENSION		= "org.osgi.supports.bootclasspath.extension";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.supports.framework.fragment&quot;) identifying whether the
+	 * Framework supports fragment bundles. As of version 1.4, the value of this
+	 * property must be <code>true</code>. The Framework must support
+	 * fragment bundles.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	SUPPORTS_FRAMEWORK_FRAGMENT				= "org.osgi.supports.framework.fragment";
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.supports.framework.requirebundle&quot;) identifying
+	 * whether the Framework supports the <code>Require-Bundle</code> manifest
+	 * header. As of version 1.4, the value of this property must be
+	 * <code>true</code>. The Framework must support the
+	 * <code>Require-Bundle</code> manifest header.
+	 * <p>
+	 * The value of this property may be retrieved by calling the
+	 * <code>BundleContext.getProperty</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	SUPPORTS_FRAMEWORK_REQUIREBUNDLE		= "org.osgi.supports.framework.requirebundle";
+
+	/*
+	 * Service properties.
+	 */
+
+	/**
+	 * Service property (named &quot;objectClass&quot;) identifying all of the
+	 * class names under which a service was registered in the Framework (of
+	 * type <code>java.lang.String[]</code>).
+	 * 
+	 * <p>
+	 * This property is set by the Framework when a service is registered.
+	 */
+	public static final String	OBJECTCLASS								= "objectClass";
+
+	/**
+	 * Service property (named &quot;service.id&quot;) identifying a service's
+	 * registration number (of type <code>java.lang.Long</code>).
+	 * 
+	 * <p>
+	 * The value of this property is assigned by the Framework when a service is
+	 * registered. The Framework assigns a unique value that is larger than all
+	 * previously assigned values since the Framework was started. These values
+	 * are NOT persistent across restarts of the Framework.
+	 */
+	public static final String	SERVICE_ID								= "service.id";
+
+	/**
+	 * Service property (named &quot;service.pid&quot;) identifying a service's
+	 * persistent identifier.
+	 * 
+	 * <p>
+	 * This property may be supplied in the <code>properties</code>
+	 * <code>Dictionary</code>
+	 * object passed to the <code>BundleContext.registerService</code> method.
+	 * 
+	 * <p>
+	 * A service's persistent identifier uniquely identifies the service and
+	 * persists across multiple Framework invocations.
+	 * 
+	 * <p>
+	 * By convention, every bundle has its own unique namespace, starting with
+	 * the bundle's identifier (see {@link Bundle#getBundleId}) and followed by
+	 * a dot (.). A bundle may use this as the prefix of the persistent
+	 * identifiers for the services it registers.
+	 */
+	public static final String	SERVICE_PID								= "service.pid";
+
+	/**
+	 * Service property (named &quot;service.ranking&quot;) identifying a
+	 * service's ranking number (of type <code>java.lang.Integer</code>).
+	 * 
+	 * <p>
+	 * This property may be supplied in the <code>properties
+	 * Dictionary</code>
+	 * object passed to the <code>BundleContext.registerService</code> method.
+	 * 
+	 * <p>
+	 * The service ranking is used by the Framework to determine the <i>default
+	 * </i> service to be returned from a call to the
+	 * {@link BundleContext#getServiceReference} method: If more than one
+	 * service implements the specified class, the <code>ServiceReference</code>
+	 * object with the highest ranking is returned.
+	 * 
+	 * <p>
+	 * The default ranking is zero (0). A service with a ranking of
+	 * <code>Integer.MAX_VALUE</code> is very likely to be returned as the
+	 * default service, whereas a service with a ranking of
+	 * <code>Integer.MIN_VALUE</code> is very unlikely to be returned.
+	 * 
+	 * <p>
+	 * If the supplied property value is not of type
+	 * <code>java.lang.Integer</code>, it is deemed to have a ranking value
+	 * of zero.
+	 */
+	public static final String	SERVICE_RANKING							= "service.ranking";
+
+	/**
+	 * Service property (named &quot;service.vendor&quot;) identifying a
+	 * service's vendor.
+	 * 
+	 * <p>
+	 * This property may be supplied in the properties <code>Dictionary</code>
+	 * object passed to the <code>BundleContext.registerService</code> method.
+	 */
+	public static final String	SERVICE_VENDOR							= "service.vendor";
+
+	/**
+	 * Service property (named &quot;service.description&quot;) identifying a
+	 * service's description.
+	 * 
+	 * <p>
+	 * This property may be supplied in the properties <code>Dictionary</code>
+	 * object passed to the <code>BundleContext.registerService</code> method.
+	 */
+	public static final String	SERVICE_DESCRIPTION						= "service.description";
+
+	/**
+	 * Manifest header (named &quot;Bundle-SymbolicName&quot;) identifying the
+	 * bundle's symbolic name.
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_SYMBOLICNAME						= "Bundle-SymbolicName";
+
+	/**
+	 * Manifest header directive (named &quot;singleton&quot;) identifying
+	 * whether a bundle is a singleton. The default value is <code>false</code>.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Bundle-SymbolicName manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; singleton:=true
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	SINGLETON_DIRECTIVE						= "singleton";
+
+	/**
+	 * Manifest header directive (named &quot;fragment-attachment&quot;)
+	 * identifying if and when a fragment may attach to a host bundle. The
+	 * default value is <code>&quot;always&quot;</code>.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Bundle-SymbolicName manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;never&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_ALWAYS
+	 * @see Constants#FRAGMENT_ATTACHMENT_RESOLVETIME
+	 * @see Constants#FRAGMENT_ATTACHMENT_NEVER
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_DIRECTIVE			= "fragment-attachment";
+
+	/**
+	 * Manifest header directive value (named &quot;always&quot;) identifying a
+	 * fragment attachment type of always. A fragment attachment type of always
+	 * indicates that fragments are allowed to attach to the host bundle at any
+	 * time (while the host is resolved or during the process of resolving the
+	 * host bundle).
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Bundle-SymbolicName manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;always&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_ALWAYS				= "always";
+
+	/**
+	 * Manifest header directive value (named &quot;resolve-time&quot;)
+	 * identifying a fragment attachment type of resolve-time. A fragment
+	 * attachment type of resolve-time indicates that fragments are allowed to
+	 * attach to the host bundle only during the process of resolving the host
+	 * bundle.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Bundle-SymbolicName manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;resolve-time&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_RESOLVETIME			= "resolve-time";
+
+	/**
+	 * Manifest header directive value (named &quot;never&quot;) identifying a
+	 * fragment attachment type of never. A fragment attachment type of never
+	 * indicates that no fragments are allowed to attach to the host bundle at
+	 * any time.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Bundle-SymbolicName manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;never&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_NEVER				= "never";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Localization&quot;) identifying the
+	 * base name of the bundle's localization entries.
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @see #BUNDLE_LOCALIZATION_DEFAULT_BASENAME
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_LOCALIZATION						= "Bundle-Localization";
+
+	/**
+	 * Default value for the <code>Bundle-Localization</code> manifest header.
+	 * 
+	 * @see #BUNDLE_LOCALIZATION
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_LOCALIZATION_DEFAULT_BASENAME	= "OSGI-INF/l10n/bundle";
+
+	/**
+	 * Manifest header (named &quot;Require-Bundle&quot;) identifying the
+	 * symbolic names of other bundles required by the bundle.
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	REQUIRE_BUNDLE							= "Require-Bundle";
+
+	/**
+	 * Manifest header attribute (named &quot;bundle-version&quot;) identifying
+	 * a range of versions for a bundle specified in the Require-Bundle or
+	 * Fragment-Host manifest headers. The default value is <code>0.0.0</code>.
+	 * 
+	 * <p>
+	 * The attribute value is encoded in the Require-Bundle manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; bundle-version=&quot;1.1&quot;
+	 *     Require-Bundle: com.acme.module.test; bundle-version=&quot;[1.0,2.0)&quot;
+	 * </pre>
+	 * 
+	 * <p>
+	 * The bundle-version attribute value uses a mathematical interval notation
+	 * to specify a range of bundle versions. A bundle-version attribute value
+	 * specified as a single version means a version range that includes any
+	 * bundle version greater than or equal to the specified version.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	BUNDLE_VERSION_ATTRIBUTE				= "bundle-version";
+
+	/**
+	 * Manifest header (named &quot;Fragment-Host&quot;) identifying the
+	 * symbolic name of another bundle for which that the bundle is a fragment.
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_HOST							= "Fragment-Host";
+
+	/**
+	 * Manifest header attribute (named &quot;selection-filter&quot;) is used
+	 * for selection by filtering based upon system properties.
+	 * 
+	 * <p>
+	 * The attribute value is encoded in manifest headers like:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: libgtk.so; selection-filter=&quot;(ws=gtk)&quot;; ...
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	SELECTION_FILTER_ATTRIBUTE				= "selection-filter";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ManifestVersion&quot;) identifying
+	 * the bundle manifest version. A bundle manifest may express the version of
+	 * the syntax in which it is written by specifying a bundle manifest
+	 * version. Bundles exploiting OSGi R4, or later, syntax must specify a
+	 * bundle manifest version.
+	 * <p>
+	 * The bundle manifest version defined by OSGi R4 or, more specifically, by
+	 * V1.3 of the OSGi Framework Specification is "2".
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_MANIFESTVERSION					= "Bundle-ManifestVersion";
+
+	/**
+	 * Manifest header attribute (named &quot;version&quot;) identifying the
+	 * version of a package specified in the Export-Package or Import-Package
+	 * manifest header.
+	 * 
+	 * <p>
+	 * The attribute value is encoded in the Export-Package or Import-Package
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; version=&quot;1.1&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	VERSION_ATTRIBUTE						= "version";
+
+	/**
+	 * Manifest header attribute (named &quot;bundle-symbolic-name&quot;)
+	 * identifying the symbolic name of a bundle that exports a package
+	 * specified in the Import-Package manifest header.
+	 * 
+	 * <p>
+	 * The attribute value is encoded in the Import-Package manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; bundle-symbolic-name=&quot;com.acme.module.test&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_SYMBOLICNAME_ATTRIBUTE			= "bundle-symbolic-name";
+
+	/**
+	 * Manifest header directive (named &quot;resolution&quot;) identifying the
+	 * resolution type in the Import-Package or Require-Bundle manifest header.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Import-Package or Require-Bundle
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; resolution:=&quot;optional&quot;
+	 *     Require-Bundle: com.acme.module.test; resolution:=&quot;optional&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#RESOLUTION_MANDATORY
+	 * @see Constants#RESOLUTION_OPTIONAL
+	 * @since 1.3
+	 */
+	public final static String	RESOLUTION_DIRECTIVE					= "resolution";
+
+	/**
+	 * Manifest header directive value (named &quot;mandatory&quot;) identifying
+	 * a mandatory resolution type. A mandatory resolution type indicates that
+	 * the import package or require bundle must be resolved when the bundle is
+	 * resolved. If such an import or require bundle cannot be resolved, the
+	 * module fails to resolve.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Import-Package or Require-Bundle
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; resolution:=&quot;manditory&quot;
+	 *     Require-Bundle: com.acme.module.test; resolution:=&quot;manditory&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#RESOLUTION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	RESOLUTION_MANDATORY					= "mandatory";
+
+	/**
+	 * Manifest header directive value (named &quot;optional&quot;) identifying
+	 * an optional resolution type. An optional resolution type indicates that
+	 * the import or require bundle is optional and the bundle may be resolved
+	 * without the import or require bundle being resolved. If the import or
+	 * require bundle is not resolved when the bundle is resolved, the import or
+	 * require bundle may not be resolved before the bundle is refreshed.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Import-Package or Require-Bundle
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; resolution:=&quot;optional&quot;
+	 *     Require-Bundle: com.acme.module.test; resolution:=&quot;optional&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#RESOLUTION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	RESOLUTION_OPTIONAL						= "optional";
+
+	/**
+	 * Manifest header directive (named &quot;uses&quot;) identifying a list of
+	 * packages that an exported package uses.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Export-Package manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Export-Package: org.osgi.util.tracker; uses:=&quot;org.osgi.framework&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	USES_DIRECTIVE							= "uses";
+
+	/**
+	 * Manifest header directive (named &quot;include&quot;).
+	 * <p>
+	 * This directive is used by the Import-Package manifest header to identify
+	 * a list of classes of the specified package which must be allowed to be
+	 * exported. The directive value is encoded in the Import-Package manifest
+	 * header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; include:=&quot;MyClass*&quot;
+	 * </pre>
+	 * 
+	 * <p>
+	 * This directive is also used by the Bundle-ActivationPolicy manifest
+	 * header to identify the packages from which class loads will trigger lazy
+	 * activation. The directive value is encoded in the Bundle-ActivationPolicy
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Bundle-ActivationPolicy: lazy; include:=&quot;org.osgi.framework&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	INCLUDE_DIRECTIVE						= "include";
+
+	/**
+	 * Manifest header directive (named &quot;exclude&quot;).
+	 * <p>
+	 * This directive is used by the Export-Package manifest header to identify
+	 * a list of classes of the specified package which must not be allowed to
+	 * be exported. The directive value is encoded in the Export-Package
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Export-Package: org.osgi.framework; exclude:=&quot;*Impl&quot;
+	 * </pre>
+	 * 
+	 * <p>
+	 * This directive is also used by the Bundle-ActivationPolicy manifest
+	 * header to identify the packages from which class loads will not trigger
+	 * lazy activation. The directive value is encoded in the
+	 * Bundle-ActivationPolicy manifest header like:
+	 * 
+	 * <pre>
+	 *     Bundle-ActivationPolicy: lazy; exclude:=&quot;org.osgi.framework&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	EXCLUDE_DIRECTIVE						= "exclude";
+
+	/**
+	 * Manifest header directive (named &quot;mandatory&quot;) identifying names
+	 * of matching attributes which must be specified by matching Import-Package
+	 * statements in the Export-Package manifest header.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Export-Package manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Export-Package: org.osgi.framework; mandatory:=&quot;bundle-symbolic-name&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	MANDATORY_DIRECTIVE						= "mandatory";
+
+	/**
+	 * Manifest header directive (named &quot;visibility&quot;) identifying the
+	 * visibility of a reqiured bundle in the Require-Bundle manifest header.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Require-Bundle manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; visibility:=&quot;reexport&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#VISIBILITY_PRIVATE
+	 * @see Constants#VISIBILITY_REEXPORT
+	 * @since 1.3
+	 */
+	public final static String	VISIBILITY_DIRECTIVE					= "visibility";
+
+	/**
+	 * Manifest header directive value (named &quot;private&quot;) identifying a
+	 * private visibility type. A private visibility type indicates that any
+	 * packages that are exported by the required bundle are not made visible on
+	 * the export signature of the requiring bundle.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Require-Bundle manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; visibility:=&quot;private&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#VISIBILITY_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	VISIBILITY_PRIVATE						= "private";
+
+	/**
+	 * Manifest header directive value (named &quot;reexport&quot;) identifying
+	 * a reexport visibility type. A reexport visibility type indicates any
+	 * packages that are exported by the required bundle are re-exported by the
+	 * requiring bundle. Any arbitrary arbitrary matching attributes with which
+	 * they were exported by the required bundle are deleted.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Require-Bundle manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; visibility:=&quot;reexport&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#VISIBILITY_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	VISIBILITY_REEXPORT						= "reexport";
+	/**
+	 * Manifest header directive (named &quot;extension&quot;) identifying the
+	 * type of the extension fragment.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Fragment-Host manifest header like:
+	 * 
+	 * <pre>
+	 *     Fragment-Host: system.bundle; extension:=&quot;framework&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#EXTENSION_FRAMEWORK
+	 * @see Constants#EXTENSION_BOOTCLASSPATH
+	 * @since 1.3
+	 */
+	public final static String	EXTENSION_DIRECTIVE						= "extension";
+
+	/**
+	 * Manifest header directive value (named &quot;framework&quot;) identifying
+	 * the type of extension fragment. An extension fragment type of framework
+	 * indicates that the extension fragment is to be loaded by the framework's
+	 * class loader.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Fragment-Host manifest header like:
+	 * 
+	 * <pre>
+	 *     Fragment-Host: system.bundle; extension:=&quot;framework&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#EXTENSION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	EXTENSION_FRAMEWORK						= "framework";
+
+	/**
+	 * Manifest header directive value (named &quot;bootclasspath&quot;)
+	 * identifying the type of extension fragment. An extension fragment type of
+	 * bootclasspath indicates that the extension fragment is to be loaded by
+	 * the boot class loader.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Fragment-Host manifest header like:
+	 * 
+	 * <pre>
+	 *     Fragment-Host: system.bundle; extension:=&quot;bootclasspath&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#EXTENSION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	EXTENSION_BOOTCLASSPATH					= "bootclasspath";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ActivationPolicy&quot;) identifying
+	 * the bundle's activation policy.
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.4
+	 * @see Constants#ACTIVATION_LAZY
+	 * @see Constants#INCLUDE_DIRECTIVE
+	 * @see Constants#EXCLUDE_DIRECTIVE
+	 */
+	public final static String	BUNDLE_ACTIVATIONPOLICY					= "Bundle-ActivationPolicy";
+
+	/**
+	 * Bundle activation policy (named &quot;lazy&quot;) declaring the bundle
+	 * must be activated when the first class load is made from the bundle.
+	 * <p>
+	 * A bundle with the lazy activation policy that is started with the
+	 * {@link Bundle#START_ACTIVATION_POLICY START_ACTIVATION_POLICY} option
+	 * will wait in the {@link Bundle#STARTING STARTING} state until the first
+	 * class load from the bundle occurs. The bundle will then be activated
+	 * before the class is returned to the requestor.
+	 * <p>
+	 * The activation policy value is specified as in the
+	 * Bundle-ActivationPolicy manifest header like:
+	 * 
+	 * <pre>
+	 *       Bundle-ActivationPolicy: lazy
+	 * </pre>
+	 * 
+	 * @see Constants#BUNDLE_ACTIVATIONPOLICY
+	 * @see Bundle#start(int)
+	 * @see Bundle#START_ACTIVATION_POLICY
+	 * @since 1.4
+	 */
+	public final static String	ACTIVATION_LAZY							= "lazy";
+
+}
\ No newline at end of file

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Filter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Filter.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Filter.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Filter.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,125 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Filter.java,v 1.16 2007/02/21 16:49:05 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2000, 2007). 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.framework;
+
+import java.util.Dictionary;
+
+/**
+ * An RFC 1960-based Filter.
+ * <p>
+ * <code>Filter</code> objects can be created by calling
+ * {@link BundleContext#createFilter} with the chosen filter string.
+ * <p>
+ * A <code>Filter</code> object can be used numerous times to determine if the
+ * match argument matches the filter string that was used to create the
+ * <code>Filter</code> object.
+ * <p>
+ * Some examples of LDAP filters are:
+ * 
+ * <pre>
+ *  &quot;(cn=Babs Jensen)&quot;
+ *  &quot;(!(cn=Tim Howes))&quot;
+ *  &quot;(&amp;(&quot; + Constants.OBJECTCLASS + &quot;=Person)(|(sn=Jensen)(cn=Babs J*)))&quot;
+ *  &quot;(o=univ*of*mich*)&quot;
+ * </pre>
+ * 
+ * @since 1.1
+ * @see "Core Specification, section 5.5, for a description of the filter string
+ *      syntax."
+ * @ThreadSafe
+ * @version $Revision: 1.16 $
+ */
+public interface Filter {
+	/**
+	 * Filter using a service's properties.
+	 * <p>
+	 * The filter is executed using the keys and values of the referenced
+	 * service's properties. The keys are case insensitively matched with the
+	 * filter.
+	 * 
+	 * @param reference The reference to the service whose properties are used
+	 *        in the match.
+	 * 
+	 * @return <code>true</code> if the service's properties match this
+	 *         filter; <code>false</code> otherwise.
+	 */
+	public boolean match(ServiceReference reference);
+
+	/**
+	 * Filter using a <code>Dictionary</code> object. The Filter is executed
+	 * using the <code>Dictionary</code> object's keys and values. The keys
+	 * are case insensitively matched with the filter.
+	 * 
+	 * @param dictionary The <code>Dictionary</code> object whose keys are
+	 *        used in the match.
+	 * 
+	 * @return <code>true</code> if the <code>Dictionary</code> object's
+	 *         keys and values match this filter; <code>false</code>
+	 *         otherwise.
+	 * 
+	 * @throws IllegalArgumentException If <code>dictionary</code> contains
+	 *         case variants of the same key name.
+	 */
+	public boolean match(Dictionary dictionary);
+
+	/**
+	 * Returns this <code>Filter</code> object's filter string.
+	 * <p>
+	 * The filter string is normalized by removing whitespace which does not
+	 * affect the meaning of the filter.
+	 * 
+	 * @return Filter string.
+	 */
+	public String toString();
+
+	/**
+	 * Compares this <code>Filter</code> object to another object.
+	 * 
+	 * @param obj The object to compare against this <code>Filter</code>
+	 *        object.
+	 * 
+	 * @return If the other object is a <code>Filter</code> object, then
+	 *         returns <code>this.toString().equals(obj.toString()</code>;<code>false</code>
+	 *         otherwise.
+	 */
+	public boolean equals(Object obj);
+
+	/**
+	 * Returns the hashCode for this <code>Filter</code> object.
+	 * 
+	 * @return The hashCode of the filter string; that is,
+	 *         <code>this.toString().hashCode()</code>.
+	 */
+	public int hashCode();
+
+	/**
+	 * Filter with case sensitivity using a <code>Dictionary</code> object.
+	 * The Filter is executed using the <code>Dictionary</code> object's keys
+	 * and values. The keys are case sensitively matched with the filter.
+	 * 
+	 * @param dictionary The <code>Dictionary</code> object whose keys are
+	 *        used in the match.
+	 * 
+	 * @return <code>true</code> if the <code>Dictionary</code> object's
+	 *         keys and values match this filter; <code>false</code>
+	 *         otherwise.
+	 * 
+	 * @since 1.3
+	 */
+	public boolean matchCase(Dictionary dictionary);
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/Filter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkEvent.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkEvent.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkEvent.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkEvent.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,208 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkEvent.java,v 1.15 2007/02/20 00:14:12 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2004, 2007). 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.framework;
+
+import java.util.EventObject;
+
+/**
+ * A general event from the Framework.
+ * 
+ * <p>
+ * <code>FrameworkEvent</code> objects are delivered to
+ * <code>FrameworkListener</code>s when a general event occurs within the
+ * OSGi environment. A type code is used to identify the event type for future
+ * extendability.
+ * 
+ * <p>
+ * OSGi Alliance reserves the right to extend the set of event types.
+ * 
+ * @Immutable
+ * @see FrameworkListener
+ * @version $Revision: 1.15 $
+ */
+
+public class FrameworkEvent extends EventObject {
+	static final long		serialVersionUID	= 207051004521261705L;
+	/**
+	 * Bundle related to the event.
+	 */
+	private final Bundle	bundle;
+
+	/**
+	 * Exception related to the event.
+	 */
+	private final Throwable	throwable;
+
+	/**
+	 * Type of event.
+	 */
+	private final int		type;
+
+	/**
+	 * The Framework has started.
+	 * 
+	 * <p>
+	 * This event is fired when the Framework has started after all installed
+	 * bundles that are marked to be started have been started and the Framework
+	 * has reached the intitial start level.
+	 * 
+	 * <p>
+	 * The value of <code>STARTED</code> is 0x00000001.
+	 * 
+	 * @see "<code>StartLevel</code>"
+	 */
+	public final static int	STARTED				= 0x00000001;
+
+	/**
+	 * An error has occurred.
+	 * 
+	 * <p>
+	 * There was an error associated with a bundle.
+	 * 
+	 * <p>
+	 * The value of <code>ERROR</code> is 0x00000002.
+	 */
+	public final static int	ERROR				= 0x00000002;
+
+	/**
+	 * A PackageAdmin.refreshPackage operation has completed.
+	 * 
+	 * <p>
+	 * This event is fired when the Framework has completed the refresh packages
+	 * operation initiated by a call to the PackageAdmin.refreshPackages method.
+	 * 
+	 * <p>
+	 * The value of <code>PACKAGES_REFRESHED</code> is 0x00000004.
+	 * 
+	 * @since 1.2
+	 * @see "<code>PackageAdmin.refreshPackages</code>"
+	 */
+	public final static int	PACKAGES_REFRESHED	= 0x00000004;
+
+	/**
+	 * A StartLevel.setStartLevel operation has completed.
+	 * 
+	 * <p>
+	 * This event is fired when the Framework has completed changing the active
+	 * start level initiated by a call to the StartLevel.setStartLevel method.
+	 * 
+	 * <p>
+	 * The value of <code>STARTLEVEL_CHANGED</code> is 0x00000008.
+	 * 
+	 * @since 1.2
+	 * @see "<code>StartLevel</code>"
+	 */
+	public final static int	STARTLEVEL_CHANGED	= 0x00000008;
+
+	/**
+	 * A warning has occurred.
+	 * 
+	 * <p>
+	 * There was a warning associated with a bundle.
+	 * 
+	 * <p>
+	 * The value of <code>WARNING</code> is 0x00000010.
+	 * 
+	 * @since 1.3
+	 */
+	public final static int	WARNING				= 0x00000010;
+
+	/**
+	 * An informational event has occurred.
+	 * 
+	 * <p>
+	 * There was an informational event associated with a bundle.
+	 * 
+	 * <p>
+	 * The value of <code>INFO</code> is 0x00000020.
+	 * 
+	 * @since 1.3
+	 */
+	public final static int	INFO				= 0x00000020;
+
+	/**
+	 * Creates a Framework event.
+	 * 
+	 * @param type The event type.
+	 * @param source The event source object. This may not be <code>null</code>.
+	 * @deprecated As of 1.2. This constructor is deprecated in favor of using
+	 *             the other constructor with the System Bundle as the event
+	 *             source.
+	 */
+	public FrameworkEvent(int type, Object source) {
+		super(source);
+		this.type = type;
+		this.bundle = null;
+		this.throwable = null;
+	}
+
+	/**
+	 * Creates a Framework event regarding the specified bundle.
+	 * 
+	 * @param type The event type.
+	 * @param bundle The event source.
+	 * @param throwable The related exception. This argument may be
+	 *        <code>null</code> if there is no related exception.
+	 */
+	public FrameworkEvent(int type, Bundle bundle, Throwable throwable) {
+		super(bundle);
+		this.type = type;
+		this.bundle = bundle;
+		this.throwable = throwable;
+	}
+
+	/**
+	 * Returns the exception related to this event.
+	 * 
+	 * @return The related exception or <code>null</code> if none.
+	 */
+	public Throwable getThrowable() {
+		return throwable;
+	}
+
+	/**
+	 * Returns the bundle associated with the event. This bundle is also the
+	 * source of the event.
+	 * 
+	 * @return The bundle associated with the event.
+	 */
+	public Bundle getBundle() {
+		return bundle;
+	}
+
+	/**
+	 * Returns the type of framework event.
+	 * <p>
+	 * The type values are:
+	 * <ul>
+	 * <li>{@link #STARTED}
+	 * <li>{@link #ERROR}
+	 * <li>{@link #WARNING}
+	 * <li>{@link #INFO}
+	 * <li>{@link #PACKAGES_REFRESHED}
+	 * <li>{@link #STARTLEVEL_CHANGED}
+	 * </ul>
+	 * 
+	 * @return The type of state change.
+	 */
+
+	public int getType() {
+		return type;
+	}
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkListener.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkListener.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkListener.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkListener.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,51 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkListener.java,v 1.12 2007/02/21 16:49:05 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2000, 2007). 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.framework;
+
+import java.util.EventListener;
+
+/**
+ * A <code>FrameworkEvent</code> listener. <code>FrameworkListener</code> is
+ * a listener interface that may be implemented by a bundle developer. When a
+ * <code>FrameworkEvent</code> is fired, it is asynchronously delivered to a
+ * <code>FrameworkListener</code>. The Framework delivers
+ * <code>FrameworkEvent</code> objects to a <code>FrameworkListener</code>
+ * in order and must not concurrently call a <code>FrameworkListener</code>.
+ * 
+ * <p>
+ * A <code>FrameworkListener</code> object is registered with the Framework
+ * using the {@link BundleContext#addFrameworkListener} method.
+ * <code>FrameworkListener</code> objects are called with a
+ * <code>FrameworkEvent</code> objects when the Framework starts and when
+ * asynchronous errors occur.
+ * 
+ * @see FrameworkEvent
+ * @NotThreadSafe
+ * @version $Revision: 1.12 $
+ */
+
+public interface FrameworkListener extends EventListener {
+
+	/**
+	 * Receives notification of a general <code>FrameworkEvent</code> object.
+	 * 
+	 * @param event The <code>FrameworkEvent</code> object.
+	 */
+	public void frameworkEvent(FrameworkEvent event);
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,147 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkUtil.java,v 1.10 2007/02/21 16:49:05 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2005, 2007). 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.framework;
+
+import java.lang.reflect.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Framework Utility class.
+ * 
+ * <p>
+ * This class contains utility methods which access Framework functions that may
+ * be useful to bundles.
+ * 
+ * @since 1.3
+ * @ThreadSafe
+ * @version $Revision: 1.10 $
+ */
+public class FrameworkUtil {
+	/*
+	 * NOTE: A framework implementor may also choose to replace this class in
+	 * their distribution with a class that directly interfaces with the
+	 * framework implementation.
+	 */
+
+	/*
+	 * This class will load the FrameworkUtil class in the package named by the
+	 * org.osgi.vendor.framework package. For each instance of this class, an
+	 * instance of the vendor FrameworkUtil class will be created and this class
+	 * will delegate method calls to the vendor FrameworkUtil instance.
+	 */
+
+	private static class ImplHolder implements PrivilegedAction {
+		private static final String	packageProperty	= "org.osgi.vendor.framework";
+		
+		/*
+		 * This is the delegate method used by createFilter.
+		 */
+		static final Method	createFilter;
+		
+		static {
+			createFilter = (Method) AccessController.doPrivileged(new ImplHolder());
+		}
+		
+		private ImplHolder() {
+		}
+
+		public Object run() {
+			String packageName = System
+			.getProperty(packageProperty);
+			if (packageName == null) {
+				throw new NoClassDefFoundError(packageProperty
+						+ " property not set");
+			}
+			
+			Class delegateClass;
+			try {
+				delegateClass = Class.forName(packageName
+						+ ".FrameworkUtil");
+			}
+			catch (ClassNotFoundException e) {
+				throw new NoClassDefFoundError(e.toString());
+			}
+			
+			Method result;
+			try {
+				result = delegateClass.getMethod("createFilter",
+						new Class[] {String.class});
+			}
+			catch (NoSuchMethodException e) {
+				throw new NoSuchMethodError(e.toString());
+			}
+			
+			if (!Modifier.isStatic(result.getModifiers())) {
+				throw new NoSuchMethodError(
+				"createFilter method must be static");
+			}
+			
+			return result;
+		}
+	}
+
+	
+	/**
+	 * FrameworkUtil objects may not be constructed. 
+	 */
+	private FrameworkUtil() {}
+	
+	/**
+	 * Creates a <code>Filter</code> object. This <code>Filter</code> object
+	 * may be used to match a <code>ServiceReference</code> object or a
+	 * <code>Dictionary</code> object.
+	 * 
+	 * <p>
+	 * If the filter cannot be parsed, an {@link InvalidSyntaxException} will be
+	 * thrown with a human readable message where the filter became unparsable.
+	 * 
+	 * @param filter The filter string.
+	 * @return A <code>Filter</code> object encapsulating the filter string.
+	 * @throws InvalidSyntaxException If <code>filter</code> contains an
+	 *         invalid filter string that cannot be parsed.
+	 * @throws NullPointerException If <code>filter</code> is null.
+	 * 
+	 * @see Filter
+	 */
+	public static Filter createFilter(String filter)
+			throws InvalidSyntaxException {
+		try {
+			try {
+				return (Filter) ImplHolder.createFilter
+						.invoke(null, new Object[] {filter});
+			}
+			catch (InvocationTargetException e) {
+				throw e.getTargetException();
+			}
+		}
+		catch (InvalidSyntaxException e) {
+			throw e;
+		}
+		catch (Error e) {
+			throw e;
+		}
+		catch (RuntimeException e) {
+			throw e;
+		}
+		catch (Throwable e) {
+			throw new RuntimeException(e.toString());
+		}
+	}
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/InvalidSyntaxException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/InvalidSyntaxException.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/InvalidSyntaxException.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/InvalidSyntaxException.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,121 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/InvalidSyntaxException.java,v 1.16 2007/02/20 00:15:00 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2000, 2007). 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.framework;
+
+/**
+ * A Framework exception used to indicate that a filter string has an invalid
+ * syntax.
+ * 
+ * <p>
+ * An <code>InvalidSyntaxException</code> object indicates that a filter
+ * string parameter has an invalid syntax and cannot be parsed. See
+ * {@link Filter} for a description of the filter string syntax.
+ * 
+ * <p>
+ * This exception is updated to conform to the general purpose exception
+ * chaining mechanism.
+ * 
+ * @version $Revision: 1.16 $
+ */
+
+public class InvalidSyntaxException extends Exception {
+	static final long		serialVersionUID	= -4295194420816491875L;
+	/**
+	 * The invalid filter string.
+	 */
+	private final String	filter;
+	/**
+	 * Nested exception.
+	 */
+	private final Throwable	cause;
+
+	/**
+	 * Creates an exception of type <code>InvalidSyntaxException</code>.
+	 * 
+	 * <p>
+	 * This method creates an <code>InvalidSyntaxException</code> object with
+	 * the specified message and the filter string which generated the
+	 * exception.
+	 * 
+	 * @param msg The message.
+	 * @param filter The invalid filter string.
+	 */
+	public InvalidSyntaxException(String msg, String filter) {
+		super(msg);
+		this.filter = filter;
+		this.cause = null;
+	}
+
+	/**
+	 * Creates an exception of type <code>InvalidSyntaxException</code>.
+	 * 
+	 * <p>
+	 * This method creates an <code>InvalidSyntaxException</code> object with
+	 * the specified message and the filter string which generated the
+	 * exception.
+	 * 
+	 * @param msg The message.
+	 * @param filter The invalid filter string.
+	 * @param cause The cause of this exception.
+	 * @since 1.3
+	 */
+	public InvalidSyntaxException(String msg, String filter, Throwable cause) {
+		super(msg);
+		this.filter = filter;
+		this.cause = cause;
+	}
+
+	/**
+	 * Returns the filter string that generated the
+	 * <code>InvalidSyntaxException</code> object.
+	 * 
+	 * @return The invalid filter string.
+	 * @see BundleContext#getServiceReferences
+	 * @see BundleContext#addServiceListener(ServiceListener,String)
+	 */
+	public String getFilter() {
+		return filter;
+	}
+
+	/**
+	 * Returns the cause of this exception or <code>null</code> if no cause
+	 * was specified when this exception was created.
+	 * 
+	 * @return The cause of this exception or <code>null</code> if no cause
+	 *         was specified.
+	 * @since 1.3
+	 */
+	public Throwable getCause() {
+		return cause;
+	}
+
+	/**
+	 * The cause of this exception can only be set when constructed.
+	 * 
+	 * @param cause Cause of the exception.
+	 * @return This object.
+	 * @throws java.lang.IllegalStateException This method will always throw an
+	 *         <code>IllegalStateException</code> since the cause of this
+	 *         exception can only be set when constructed.
+	 * @since 1.3
+	 */
+	public Throwable initCause(Throwable cause) {
+		throw new IllegalStateException();
+	}
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/InvalidSyntaxException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,541 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/PackagePermission.java,v 1.14 2006/06/16 16:31:18 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2000, 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.framework;
+
+import java.io.IOException;
+import java.security.*;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+/**
+ * A bundle's authority to import or export a package.
+ * 
+ * <p>
+ * A package is a dot-separated string that defines a fully qualified Java
+ * package.
+ * <p>
+ * For example:
+ * 
+ * <pre>
+ * <code>
+ * org.osgi.service.http
+ * </code>
+ * </pre>
+ * 
+ * <p>
+ * <code>PackagePermission</code> has two actions: <code>EXPORT</code> and
+ * <code>IMPORT</code>. The <code>EXPORT</code> action implies the
+ * <code>IMPORT</code> action.
+ * 
+ * @version $Revision: 1.14 $
+ */
+
+public final class PackagePermission extends BasicPermission {
+	static final long			serialVersionUID	= -5107705877071099135L;
+	/**
+	 * The action string <code>export</code>.
+	 */
+	public final static String	EXPORT				= "export";
+
+	/**
+	 * The action string <code>import</code>.
+	 */
+	public final static String	IMPORT				= "import";
+
+	private final static int	ACTION_EXPORT		= 0x00000001;
+	private final static int	ACTION_IMPORT		= 0x00000002;
+	private final static int	ACTION_ALL			= ACTION_EXPORT
+															| ACTION_IMPORT;
+	private final static int	ACTION_NONE			= 0;
+	/**
+	 * The actions mask.
+	 */
+	private transient int		action_mask			= ACTION_NONE;
+
+	/**
+	 * The actions in canonical form.
+	 * 
+	 * @serial
+	 */
+	private String				actions				= null;
+
+	/**
+	 * Defines the authority to import and/or export a package within the OSGi
+	 * environment.
+	 * <p>
+	 * The name is specified as a normal Java package name: a dot-separated
+	 * string. Wildcards may be used. For example:
+	 * 
+	 * <pre>
+	 * org.osgi.service.http
+	 * javax.servlet.*
+	 * *
+	 * </pre>
+	 * 
+	 * <p>
+	 * Package Permissions are granted over all possible versions of a package.
+	 * 
+	 * A bundle that needs to export a package must have the appropriate
+	 * <code>PackagePermission</code> for that package; similarly, a bundle
+	 * that needs to import a package must have the appropriate
+	 * <code>PackagePermssion</code> for that package.
+	 * <p>
+	 * Permission is granted for both classes and resources.
+	 * 
+	 * @param name Package name.
+	 * @param actions <code>EXPORT</code>,<code>IMPORT</code> (canonical
+	 *        order).
+	 */
+
+	public PackagePermission(String name, String actions) {
+		this(name, getMask(actions));
+	}
+
+	/**
+	 * Package private constructor used by PackagePermissionCollection.
+	 * 
+	 * @param name class name
+	 * @param mask action mask
+	 */
+	PackagePermission(String name, int mask) {
+		super(name);
+		init(mask);
+	}
+
+	/**
+	 * Called by constructors and when deserialized.
+	 * 
+	 * @param mask action mask
+	 */
+	private void init(int mask) {
+		if ((mask == ACTION_NONE) || ((mask & ACTION_ALL) != mask)) {
+			throw new IllegalArgumentException("invalid action string");
+		}
+
+		action_mask = mask;
+	}
+
+	/**
+	 * Parse action string into action mask.
+	 * 
+	 * @param actions Action string.
+	 * @return action mask.
+	 */
+	private static int getMask(String actions) {
+		boolean seencomma = false;
+
+		int mask = ACTION_NONE;
+
+		if (actions == null) {
+			return (mask);
+		}
+
+		char[] a = actions.toCharArray();
+
+		int i = a.length - 1;
+		if (i < 0)
+			return (mask);
+
+		while (i != -1) {
+			char c;
+
+			// skip whitespace
+			while ((i != -1)
+					&& ((c = a[i]) == ' ' || c == '\r' || c == '\n'
+							|| c == '\f' || c == '\t'))
+				i--;
+
+			// check for the known strings
+			int matchlen;
+
+			if (i >= 5 && (a[i - 5] == 'i' || a[i - 5] == 'I')
+					&& (a[i - 4] == 'm' || a[i - 4] == 'M')
+					&& (a[i - 3] == 'p' || a[i - 3] == 'P')
+					&& (a[i - 2] == 'o' || a[i - 2] == 'O')
+					&& (a[i - 1] == 'r' || a[i - 1] == 'R')
+					&& (a[i] == 't' || a[i] == 'T')) {
+				matchlen = 6;
+				mask |= ACTION_IMPORT;
+
+			}
+			else
+				if (i >= 5 && (a[i - 5] == 'e' || a[i - 5] == 'E')
+						&& (a[i - 4] == 'x' || a[i - 4] == 'X')
+						&& (a[i - 3] == 'p' || a[i - 3] == 'P')
+						&& (a[i - 2] == 'o' || a[i - 2] == 'O')
+						&& (a[i - 1] == 'r' || a[i - 1] == 'R')
+						&& (a[i] == 't' || a[i] == 'T')) {
+					matchlen = 6;
+					mask |= ACTION_EXPORT | ACTION_IMPORT;
+
+				}
+				else {
+					// parse error
+					throw new IllegalArgumentException("invalid permission: "
+							+ actions);
+				}
+
+			// make sure we didn't just match the tail of a word
+			// like "ackbarfimport". Also, skip to the comma.
+			seencomma = false;
+			while (i >= matchlen && !seencomma) {
+				switch (a[i - matchlen]) {
+					case ',' :
+						seencomma = true;
+					/* FALLTHROUGH */
+					case ' ' :
+					case '\r' :
+					case '\n' :
+					case '\f' :
+					case '\t' :
+						break;
+					default :
+						throw new IllegalArgumentException(
+								"invalid permission: " + actions);
+				}
+				i--;
+			}
+
+			// point i at the location of the comma minus one (or -1).
+			i -= matchlen;
+		}
+
+		if (seencomma) {
+			throw new IllegalArgumentException("invalid permission: " + actions);
+		}
+
+		return (mask);
+	}
+
+	/**
+	 * Determines if the specified permission is implied by this object.
+	 * 
+	 * <p>
+	 * This method checks that the package name of the target is implied by the
+	 * package name of this object. The list of <code>PackagePermission</code>
+	 * actions must either match or allow for the list of the target object to
+	 * imply the target <code>PackagePermission</code> action.
+	 * <p>
+	 * The permission to export a package implies the permission to import the
+	 * named package.
+	 * 
+	 * <pre>
+	 * x.y.*,&quot;export&quot; -&gt; x.y.z,&quot;export&quot; is true
+	 * *,&quot;import&quot; -&gt; x.y, &quot;import&quot;      is true
+	 * *,&quot;export&quot; -&gt; x.y, &quot;import&quot;      is true
+	 * x.y,&quot;export&quot; -&gt; x.y.z, &quot;export&quot;  is false
+	 * </pre>
+	 * 
+	 * @param p The target permission to interrogate.
+	 * @return <code>true</code> if the specified
+	 *         <code>PackagePermission</code> action is implied by this
+	 *         object; <code>false</code> otherwise.
+	 */
+
+	public boolean implies(Permission p) {
+		if (p instanceof PackagePermission) {
+			PackagePermission target = (PackagePermission) p;
+
+			return (((action_mask & target.action_mask) == target.action_mask) && super
+					.implies(p));
+		}
+
+		return (false);
+	}
+
+	/**
+	 * Returns the canonical string representation of the
+	 * <code>PackagePermission</code> actions.
+	 * 
+	 * <p>
+	 * Always returns present <code>PackagePermission</code> actions in the
+	 * following order: <code>EXPORT</code>,<code>IMPORT</code>.
+	 * 
+	 * @return Canonical string representation of the
+	 *         <code>PackagePermission</code> actions.
+	 */
+
+	public String getActions() {
+		if (actions == null) {
+			StringBuffer sb = new StringBuffer();
+			boolean comma = false;
+
+			if ((action_mask & ACTION_EXPORT) == ACTION_EXPORT) {
+				sb.append(EXPORT);
+				comma = true;
+			}
+
+			if ((action_mask & ACTION_IMPORT) == ACTION_IMPORT) {
+				if (comma)
+					sb.append(',');
+				sb.append(IMPORT);
+			}
+
+			actions = sb.toString();
+		}
+
+		return (actions);
+	}
+
+	/**
+	 * Returns a new <code>PermissionCollection</code> object suitable for
+	 * storing <code>PackagePermission</code> objects.
+	 * 
+	 * @return A new <code>PermissionCollection</code> object.
+	 */
+	public PermissionCollection newPermissionCollection() {
+		return (new PackagePermissionCollection());
+	}
+
+	/**
+	 * Determines the equality of two <code>PackagePermission</code> objects.
+	 * 
+	 * This method checks that specified package has the same package name and
+	 * <code>PackagePermission</code> actions as this
+	 * <code>PackagePermission</code> object.
+	 * 
+	 * @param obj The object to test for equality with this
+	 *        <code>PackagePermission</code> object.
+	 * @return <code>true</code> if <code>obj</code> is a
+	 *         <code>PackagePermission</code>, and has the same package name
+	 *         and actions as this <code>PackagePermission</code> object;
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean equals(Object obj) {
+		if (obj == this) {
+			return (true);
+		}
+
+		if (!(obj instanceof PackagePermission)) {
+			return (false);
+		}
+
+		PackagePermission p = (PackagePermission) obj;
+
+		return ((action_mask == p.action_mask) && getName().equals(p.getName()));
+	}
+
+	/**
+	 * Returns the hash code value for this object.
+	 * 
+	 * @return A hash code value for this object.
+	 */
+
+	public int hashCode() {
+		return (getName().hashCode() ^ getActions().hashCode());
+	}
+
+	/**
+	 * Returns the current action mask.
+	 * <p>
+	 * Used by the PackagePermissionCollection class.
+	 * 
+	 * @return Current action mask.
+	 */
+	int getMask() {
+		return (action_mask);
+	}
+
+	/**
+	 * WriteObject is called to save the state of this permission object to a
+	 * stream. The actions are serialized, and the superclass takes care of the
+	 * name.
+	 */
+
+	private synchronized void writeObject(java.io.ObjectOutputStream s)
+			throws IOException {
+		// Write out the actions. The superclass takes care of the name
+		// call getActions to make sure actions field is initialized
+		if (actions == null)
+			getActions();
+		s.defaultWriteObject();
+	}
+
+	/**
+	 * readObject is called to restore the state of this permission from a
+	 * stream.
+	 */
+	private synchronized void readObject(java.io.ObjectInputStream s)
+			throws IOException, ClassNotFoundException {
+		// Read in the action, then initialize the rest
+		s.defaultReadObject();
+		init(getMask(actions));
+	}
+}
+
+/**
+ * Stores a set of <code>PackagePermission</code> permissions.
+ * 
+ * @see java.security.Permission
+ * @see java.security.Permissions
+ * @see java.security.PermissionCollection
+ */
+
+final class PackagePermissionCollection extends PermissionCollection {
+	static final long	serialVersionUID	= -3350758995234427603L;
+	/**
+	 * Table of permissions.
+	 * 
+	 * @serial
+	 */
+	private Hashtable	permissions;
+
+	/**
+	 * Boolean saying if "*" is in the collection.
+	 * 
+	 * @serial
+	 */
+	private boolean		all_allowed;
+
+	/**
+	 * Create an empty PackagePermissions object.
+	 */
+
+	public PackagePermissionCollection() {
+		permissions = new Hashtable();
+		all_allowed = false;
+	}
+
+	/**
+	 * Adds a permission to the <code>PackagePermission</code> objects. The
+	 * key for the hash is the name.
+	 * 
+	 * @param permission The <code>PackagePermission</code> object to add.
+	 * 
+	 * @throws IllegalArgumentException If the permission is not a
+	 *         <code>PackagePermission</code> instance.
+	 * 
+	 * @throws SecurityException If this
+	 *         <code>PackagePermissionCollection</code> object has been marked
+	 *         read-only.
+	 */
+
+	public void add(Permission permission) {
+		if (!(permission instanceof PackagePermission))
+			throw new IllegalArgumentException("invalid permission: "
+					+ permission);
+		if (isReadOnly())
+			throw new SecurityException("attempt to add a Permission to a "
+					+ "readonly PermissionCollection");
+
+		PackagePermission pp = (PackagePermission) permission;
+		String name = pp.getName();
+
+		PackagePermission existing = (PackagePermission) permissions.get(name);
+
+		if (existing != null) {
+			int oldMask = existing.getMask();
+			int newMask = pp.getMask();
+			if (oldMask != newMask) {
+				permissions.put(name, new PackagePermission(name, oldMask
+						| newMask));
+
+			}
+		}
+		else {
+			permissions.put(name, permission);
+		}
+
+		if (!all_allowed) {
+			if (name.equals("*"))
+				all_allowed = true;
+		}
+	}
+
+	/**
+	 * Determines if the specified permissions implies the permissions expressed
+	 * in <code>permission</code>.
+	 * 
+	 * @param permission The Permission object to compare with this
+	 *        <code>PackagePermission</code> object.
+	 * 
+	 * @return <code>true</code> if <code>permission</code> is a proper
+	 *         subset of a permission in the set; <code>false</code>
+	 *         otherwise.
+	 */
+
+	public boolean implies(Permission permission) {
+		if (!(permission instanceof PackagePermission))
+			return (false);
+
+		PackagePermission pp = (PackagePermission) permission;
+		PackagePermission x;
+
+		int desired = pp.getMask();
+		int effective = 0;
+
+		// short circuit if the "*" Permission was added
+		if (all_allowed) {
+			x = (PackagePermission) permissions.get("*");
+			if (x != null) {
+				effective |= x.getMask();
+				if ((effective & desired) == desired)
+					return (true);
+			}
+		}
+
+		// strategy:
+		// Check for full match first. Then work our way up the
+		// name looking for matches on a.b.*
+
+		String name = pp.getName();
+
+		x = (PackagePermission) permissions.get(name);
+
+		if (x != null) {
+			// we have a direct hit!
+			effective |= x.getMask();
+			if ((effective & desired) == desired)
+				return (true);
+		}
+
+		// work our way up the tree...
+		int last, offset;
+
+		offset = name.length() - 1;
+
+		while ((last = name.lastIndexOf(".", offset)) != -1) {
+
+			name = name.substring(0, last + 1) + "*";
+			x = (PackagePermission) permissions.get(name);
+
+			if (x != null) {
+				effective |= x.getMask();
+				if ((effective & desired) == desired)
+					return (true);
+			}
+			offset = last - 1;
+		}
+
+		// we don't have to check for "*" as it was already checked
+		// at the top (all_allowed), so we just return false
+		return (false);
+	}
+
+	/**
+	 * Returns an enumeration of all <code>PackagePermission</code> objects in
+	 * the container.
+	 * 
+	 * @return Enumeration of all <code>PackagePermission</code> objects.
+	 */
+
+	public Enumeration elements() {
+		return (permissions.elements());
+	}
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceEvent.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceEvent.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceEvent.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceEvent.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,138 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceEvent.java,v 1.15 2007/02/20 00:14:12 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2000, 2007). 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.framework;
+
+import java.util.EventObject;
+
+/**
+ * An event from the Framework describing a service lifecycle change.
+ * <p>
+ * <code>ServiceEvent</code> objects are delivered to
+ * <code>ServiceListener</code>s and <code>AllServiceListener</code>s when
+ * a change occurs in this service's lifecycle. A type code is used to identify
+ * the event type for future extendability.
+ * 
+ * <p>
+ * OSGi Alliance reserves the right to extend the set of types.
+ * 
+ * @Immutable
+ * @see ServiceListener
+ * @see AllServiceListener
+ * @version $Revision: 1.15 $
+ */
+
+public class ServiceEvent extends EventObject {
+	static final long				serialVersionUID	= 8792901483909409299L;
+	/**
+	 * Reference to the service that had a change occur in its lifecycle.
+	 */
+	private final ServiceReference	reference;
+
+	/**
+	 * Type of service lifecycle change.
+	 */
+	private final int				type;
+
+	/**
+	 * This service has been registered.
+	 * <p>
+	 * This event is synchronously delivered <strong>after</strong> the service
+	 * has been registered with the Framework.
+	 * 
+	 * <p>
+	 * The value of <code>REGISTERED</code> is 0x00000001.
+	 * 
+	 * @see BundleContext#registerService(String[],Object,java.util.Dictionary)
+	 */
+	public final static int			REGISTERED			= 0x00000001;
+
+	/**
+	 * The properties of a registered service have been modified.
+	 * <p>
+	 * This event is synchronously delivered <strong>after</strong> the service
+	 * properties have been modified.
+	 * 
+	 * <p>
+	 * The value of <code>MODIFIED</code> is 0x00000002.
+	 * 
+	 * @see ServiceRegistration#setProperties
+	 */
+	public final static int			MODIFIED			= 0x00000002;
+
+	/**
+	 * This service is in the process of being unregistered.
+	 * <p>
+	 * This event is synchronously delivered <strong>before</strong> the
+	 * service has completed unregistering.
+	 * 
+	 * <p>
+	 * If a bundle is using a service that is <code>UNREGISTERING</code>, the
+	 * bundle should release its use of the service when it receives this event.
+	 * If the bundle does not release its use of the service when it receives
+	 * this event, the Framework will automatically release the bundle's use of
+	 * the service while completing the service unregistration operation.
+	 * 
+	 * <p>
+	 * The value of UNREGISTERING is 0x00000004.
+	 * 
+	 * @see ServiceRegistration#unregister
+	 * @see BundleContext#ungetService
+	 */
+	public final static int			UNREGISTERING		= 0x00000004;
+
+	/**
+	 * Creates a new service event object.
+	 * 
+	 * @param type The event type.
+	 * @param reference A <code>ServiceReference</code> object to the service
+	 *        that had a lifecycle change.
+	 */
+	public ServiceEvent(int type, ServiceReference reference) {
+		super(reference);
+		this.reference = reference;
+		this.type = type;
+	}
+
+	/**
+	 * Returns a reference to the service that had a change occur in its
+	 * lifecycle.
+	 * <p>
+	 * This reference is the source of the event.
+	 * 
+	 * @return Reference to the service that had a lifecycle change.
+	 */
+	public ServiceReference getServiceReference() {
+		return reference;
+	}
+
+	/**
+	 * Returns the type of event. The event type values are:
+	 * <ul>
+	 * <li>{@link #REGISTERED}
+	 * <li>{@link #MODIFIED}
+	 * <li>{@link #UNREGISTERING}
+	 * </ul>
+	 * 
+	 * @return Type of service lifecycle change.
+	 */
+
+	public int getType() {
+		return type;
+	}
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceFactory.java?rev=737043&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceFactory.java (added)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceFactory.java Fri Jan 23 07:05:47 2009
@@ -0,0 +1,100 @@
+/*
+ * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceFactory.java,v 1.10 2007/02/20 00:16:30 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2000, 2007). 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.framework;
+
+/**
+ * Allows services to provide customized service objects in the OSGi
+ * environment.
+ * 
+ * <p>
+ * When registering a service, a <code>ServiceFactory</code> object can be
+ * used instead of a service object, so that the bundle developer can gain
+ * control of the specific service object granted to a bundle that is using the
+ * service.
+ * 
+ * <p>
+ * When this happens, the
+ * <code>BundleContext.getService(ServiceReference)</code> method calls the
+ * <code>ServiceFactory.getService</code> method to create a service object
+ * specifically for the requesting bundle. The service object returned by the
+ * <code>ServiceFactory</code> is cached by the Framework until the bundle
+ * releases its use of the service.
+ * 
+ * <p>
+ * When the bundle's use count for the service equals zero (including the bundle
+ * stopping or the service being unregistered), the
+ * <code>ServiceFactory.ungetService</code> method is called.
+ * 
+ * <p>
+ * <code>ServiceFactory</code> objects are only used by the Framework and are
+ * not made available to other bundles in the OSGi environment. The Framework
+ * may concurrently call a <code>ServiceFactory</code>.
+ * 
+ * @see BundleContext#getService
+ * @ThreadSafe
+ * @version $Revision: 1.10 $
+ */
+
+public interface ServiceFactory {
+	/**
+	 * Creates a new service object.
+	 * 
+	 * <p>
+	 * The Framework invokes this method the first time the specified
+	 * <code>bundle</code> requests a service object using the
+	 * <code>BundleContext.getService(ServiceReference)</code> method. The
+	 * service factory can then return a specific service object for each
+	 * bundle.
+	 * 
+	 * <p>
+	 * The Framework caches the value returned (unless it is <code>null</code>),
+	 * and will return the same service object on any future call to
+	 * <code>BundleContext.getService</code> from the same bundle.
+	 * 
+	 * <p>
+	 * The Framework will check if the returned service object is an instance of
+	 * all the classes named when the service was registered. If not, then
+	 * <code>null</code> is returned to the bundle.
+	 * 
+	 * @param bundle The bundle using the service.
+	 * @param registration The <code>ServiceRegistration</code> object for the
+	 *        service.
+	 * @return A service object that <strong>must </strong> be an instance of
+	 *         all the classes named when the service was registered.
+	 * @see BundleContext#getService
+	 */
+	public Object getService(Bundle bundle, ServiceRegistration registration);
+
+	/**
+	 * Releases a service object.
+	 * 
+	 * <p>
+	 * The Framework invokes this method when a service has been released by a
+	 * bundle. The service object may then be destroyed.
+	 * 
+	 * @param bundle The bundle releasing the service.
+	 * @param registration The <code>ServiceRegistration</code> object for the
+	 *        service.
+	 * @param service The service object returned by a previous call to the
+	 *        <code>ServiceFactory.getService</code> method.
+	 * @see BundleContext#ungetService
+	 */
+	public void ungetService(Bundle bundle, ServiceRegistration registration,
+			Object service);
+}

Propchange: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServiceFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message