felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r389891 [3/9] - in /incubator/felix/trunk/org.osgi.compendium: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/osgi/ src/main/java/org/osgi/service/ src/main/java/org/osgi/service/cm/ src/main/java/org/osgi/service/com...
Date Wed, 29 Mar 2006 21:05:18 GMT
Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/HttpService.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/HttpService.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/HttpService.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/HttpService.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,177 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.http/src/org/osgi/service/http/HttpService.java,v 1.10 2006/03/14 01:20:39 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2000, 2005). 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.http;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import java.util.Dictionary;
+
+/**
+ * The Http Service allows other bundles in the OSGi environment to dynamically
+ * register resources and servlets into the URI namespace of Http Service. A
+ * bundle may later unregister its resources or servlets.
+ * 
+ * @version $Revision: 1.10 $
+ * @see HttpContext
+ */
+public interface HttpService {
+	/**
+	 * Registers a servlet into the URI namespace.
+	 * 
+	 * <p>
+	 * The alias is the name in the URI namespace of the Http Service at which
+	 * the registration will be mapped.
+	 * 
+	 * <p>
+	 * An alias must begin with slash ('/') and must not end with slash ('/'),
+	 * with the exception that an alias of the form &quot;/&quot; is used to
+	 * denote the root alias. See the specification text for details on how HTTP
+	 * requests are mapped to servlet and resource registrations.
+	 * 
+	 * <p>
+	 * The Http Service will call the servlet's <code>init</code> method before
+	 * returning.
+	 * 
+	 * <pre>
+	 * httpService.registerServlet(&quot;/myservlet&quot;, servlet, initparams, context);
+	 * </pre>
+	 * 
+	 * <p>
+	 * Servlets registered with the same <code>HttpContext</code> object will
+	 * share the same <code>ServletContext</code>. The Http Service will call the
+	 * <code>context</code> argument to support the <code>ServletContext</code>
+	 * methods <code>getResource</code>,<code>getResourceAsStream</code> and
+	 * <code>getMimeType</code>, and to handle security for requests. If the
+	 * <code>context</code> argument is <code>null</code>, a default
+	 * <code>HttpContext</code> object is used (see
+	 * {@link #createDefaultHttpContext}).
+	 * 
+	 * @param alias name in the URI namespace at which the servlet is registered
+	 * @param servlet the servlet object to register
+	 * @param initparams initialization arguments for the servlet or
+	 *        <code>null</code> if there are none. This argument is used by the
+	 *        servlet's <code>ServletConfig</code> object.
+	 * @param context the <code>HttpContext</code> object for the registered
+	 *        servlet, or <code>null</code> if a default <code>HttpContext</code> is
+	 *        to be created and used.
+	 * @throws NamespaceException if the registration fails because the alias
+	 *            is already in use.
+	 * @throws javax.servlet.ServletException if the servlet's <code>init</code>
+	 *            method throws an exception, or the given servlet object has
+	 *            already been registered at a different alias.
+	 * @throws java.lang.IllegalArgumentException if any of the arguments are
+	 *            invalid
+	 */
+	public void registerServlet(String alias, Servlet servlet,
+			Dictionary initparams, HttpContext context)
+			throws ServletException, NamespaceException;
+
+	/**
+	 * Registers resources into the URI namespace.
+	 * 
+	 * <p>
+	 * The alias is the name in the URI namespace of the Http Service at which
+	 * the registration will be mapped. An alias must begin with slash ('/') and
+	 * must not end with slash ('/'), with the exception that an alias of the
+	 * form &quot;/&quot; is used to denote the root alias. The name parameter
+	 * must also not end with slash ('/'). See the specification text for
+	 * details on how HTTP requests are mapped to servlet and resource
+	 * registrations.
+	 * <p>
+	 * For example, suppose the resource name /tmp is registered to the alias
+	 * /files. A request for /files/foo.txt will map to the resource name
+	 * /tmp/foo.txt.
+	 * 
+	 * <pre>
+	 * httpservice.registerResources(&quot;/files&quot;, &quot;/tmp&quot;, context);
+	 * </pre>
+	 * 
+	 * The Http Service will call the <code>HttpContext</code> argument to map
+	 * resource names to URLs and MIME types and to handle security for
+	 * requests. If the <code>HttpContext</code> argument is <code>null</code>, a
+	 * default <code>HttpContext</code> is used (see
+	 * {@link #createDefaultHttpContext}).
+	 * 
+	 * @param alias name in the URI namespace at which the resources are
+	 *        registered
+	 * @param name the base name of the resources that will be registered
+	 * @param context the <code>HttpContext</code> object for the registered
+	 *        resources, or <code>null</code> if a default <code>HttpContext</code>
+	 *        is to be created and used.
+	 * @throws NamespaceException if the registration fails because the alias
+	 *            is already in use.
+	 * @throws java.lang.IllegalArgumentException if any of the parameters
+	 *            are invalid
+	 */
+	public void registerResources(String alias, String name,
+			HttpContext context) throws NamespaceException;
+
+	/**
+	 * Unregisters a previous registration done by <code>registerServlet</code> or
+	 * <code>registerResources</code> methods.
+	 * 
+	 * <p>
+	 * After this call, the registered alias in the URI name-space will no
+	 * longer be available. If the registration was for a servlet, the Http
+	 * Service must call the <code>destroy</code> method of the servlet before
+	 * returning.
+	 * <p>
+	 * If the bundle which performed the registration is stopped or otherwise
+	 * "unget"s the Http Service without calling {@link #unregister}then Http
+	 * Service must automatically unregister the registration. However, if the
+	 * registration was for a servlet, the <code>destroy</code> method of the
+	 * servlet will not be called in this case since the bundle may be stopped.
+	 * {@link #unregister}must be explicitly called to cause the
+	 * <code>destroy</code> method of the servlet to be called. This can be done
+	 * in the <code>BundleActivator.stop</code> method of the
+	 * bundle registering the servlet.
+	 * 
+	 * @param alias name in the URI name-space of the registration to unregister
+	 * @throws java.lang.IllegalArgumentException if there is no registration
+	 *            for the alias or the calling bundle was not the bundle which
+	 *            registered the alias.
+	 */
+	public void unregister(String alias);
+
+	/**
+	 * Creates a default <code>HttpContext</code> for registering servlets or
+	 * resources with the HttpService, a new <code>HttpContext</code> object is
+	 * created each time this method is called.
+	 * 
+	 * <p>
+	 * The behavior of the methods on the default <code>HttpContext</code> is
+	 * defined as follows:
+	 * <ul>
+	 * <li><code>getMimeType</code>- Does not define any customized MIME types
+	 * for the Content-Type header in the response, and always returns
+	 * <code>null</code>.
+	 * <li><code>handleSecurity</code>- Performs implementation-defined
+	 * authentication on the request.
+	 * <li><code>getResource</code>- Assumes the named resource is in the
+	 * context bundle; this method calls the context bundle's
+	 * <code>Bundle.getResource</code> method, and returns the appropriate URL to
+	 * access the resource. On a Java runtime environment that supports
+	 * permissions, the Http Service needs to be granted 
+	 * <code>org.osgi.framework.AdminPermission[*,RESOURCE]</code>.
+	 * </ul>
+	 * 
+	 * @return a default <code>HttpContext</code> object.
+	 * @since 1.1
+	 */
+	public HttpContext createDefaultHttpContext();
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/HttpService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/NamespaceException.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/NamespaceException.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/NamespaceException.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/NamespaceException.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,95 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.http/src/org/osgi/service/http/NamespaceException.java,v 1.9 2006/03/14 01:20:39 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2000, 2005). 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.http;
+
+/**
+ * A NamespaceException is thrown to indicate an error with the caller's request
+ * to register a servlet or resources into the URI namespace of the Http
+ * Service. This exception indicates that the requested alias already is in use.
+ * 
+ * @version $Revision: 1.9 $
+ */
+public class NamespaceException extends Exception {
+    static final long serialVersionUID = 7235606031147877747L;
+	/**
+	 * Nested exception.
+	 */
+	private Throwable	cause;
+
+	/**
+	 * Construct a <code>NamespaceException</code> object with a detail message.
+	 * 
+	 * @param message the detail message
+	 */
+	public NamespaceException(String message) {
+		super(message);
+		cause = null;
+	}
+
+	/**
+	 * Construct a <code>NamespaceException</code> object with a detail message
+	 * and a nested exception.
+	 * 
+	 * @param message The detail message.
+	 * @param cause The nested exception.
+	 */
+	public NamespaceException(String message, Throwable cause) {
+		super(message);
+		this.cause = cause;
+	}
+
+	/**
+	 * Returns the nested exception.
+	 *
+     * <p>This method predates the general purpose exception chaining mechanism.
+     * The {@link #getCause()} method is now the preferred means of
+     * obtaining this information.
+	 * 
+	 * @return the nested exception or <code>null</code> if there is no nested
+	 *         exception.
+	 */
+	public Throwable getException() {
+		return cause;
+	}
+
+	/**
+	 * 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.2 
+	 */
+	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.2 
+	 */
+	public Throwable initCause(Throwable cause) {
+		throw new IllegalStateException();
+	}
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/NamespaceException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/package.html
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/package.html?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/package.html (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/package.html Wed Mar 29 13:05:08 2006
@@ -0,0 +1,10 @@
+<!-- $Header: /cvshome/build/org.osgi.service.http/src/org/osgi/service/http/package.html,v 1.3 2004/12/09 19:44:20 hargrave Exp $ -->
+<BODY>
+<P>The OSGi Http Service Package. Specification Version 1.2.
+<p>Bundles wishing to use this package must list the package
+in the <TT>Import-Package</TT> header of the bundle's manifest.
+For example:
+<pre>
+Import-Package: org.osgi.service.http; version=1.2
+</pre>
+</BODY>

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/packageinfo
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/packageinfo?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/packageinfo (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/packageinfo Wed Mar 29 13:05:08 2006
@@ -0,0 +1 @@
+version 1.2

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/http/packageinfo
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectionFactory.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectionFactory.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectionFactory.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectionFactory.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,61 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.io/src/org/osgi/service/io/ConnectionFactory.java,v 1.6 2006/03/14 01:20:44 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2002, 2005). 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.io;
+
+import javax.microedition.io.*;
+import java.io.*;
+
+/**
+ * A Connection Factory service is called by the implementation of the Connector
+ * Service to create <code>javax.microedition.io.Connection</code> objects which
+ * implement the scheme named by <code>IO_SCHEME</code>.
+ * 
+ * When a <code>ConnectorService.open</code> method is called, the implementation
+ * of the Connector Service will examine the specified name for a scheme. The
+ * Connector Service will then look for a Connection Factory service which is
+ * registered with the service property <code>IO_SCHEME</code> which matches the
+ * scheme. The {@link #createConnection}method of the selected Connection
+ * Factory will then be called to create the actual <code>Connection</code>
+ * object.
+ * 
+ * @version $Revision: 1.6 $
+ */
+public interface ConnectionFactory {
+	/**
+	 * Service property containing the scheme(s) for which this Connection
+	 * Factory can create <code>Connection</code> objects. This property is of
+	 * type <code>String[]</code>.
+	 */
+	public static final String	IO_SCHEME	= "io.scheme";
+
+	/**
+	 * Create a new <code>Connection</code> object for the specified URI.
+	 * 
+	 * @param name The full URI passed to the <code>ConnectorService.open</code>
+	 *        method
+	 * @param mode The mode parameter passed to the
+	 *        <code>ConnectorService.open</code> method
+	 * @param timeouts The timeouts parameter passed to the
+	 *        <code>ConnectorService.open</code> method
+	 * @return A new <code>javax.microedition.io.Connection</code> object.
+	 * @throws IOException If a <code>javax.microedition.io.Connection</code>
+	 *         object can not not be created.
+	 */
+	public Connection createConnection(String name, int mode, boolean timeouts)
+			throws IOException;
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectorService.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectorService.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectorService.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectorService.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,165 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.io/src/org/osgi/service/io/ConnectorService.java,v 1.7 2006/03/14 01:20:44 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2002, 2005). 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.io;
+
+import java.io.*;
+import javax.microedition.io.*;
+
+/**
+ * The Connector Service should be called to create and open
+ * <code>javax.microedition.io.Connection</code> objects.
+ * 
+ * When an <code>open*</code> method is called, the implementation of the
+ * Connector Service will examine the specified name for a scheme. The Connector
+ * Service will then look for a Connection Factory service which is registered
+ * with the service property <code>IO_SCHEME</code> which matches the scheme. The
+ * <code>createConnection</code> method of the selected Connection Factory will
+ * then be called to create the actual <code>Connection</code> object.
+ * 
+ * <p>
+ * If more than one Connection Factory service is registered for a particular
+ * scheme, the service with the highest ranking (as specified in its
+ * <code>service.ranking</code> property) is called. If there is a tie in ranking,
+ * the service with the lowest service ID (as specified in its
+ * <code>service.id</code> property), that is the service that was registered
+ * first, is called. This is the same algorithm used by
+ * <code>BundleContext.getServiceReference</code>.
+ * 
+ * @version $Revision: 1.7 $
+ */
+public interface ConnectorService {
+	/**
+	 * Read access mode.
+	 * 
+	 * @see "javax.microedition.io.Connector.READ"
+	 */
+	public static final int	READ		= Connector.READ;
+	/**
+	 * Write access mode.
+	 * 
+	 * @see "javax.microedition.io.Connector.WRITE"
+	 */
+	public static final int	WRITE		= Connector.WRITE;
+	/**
+	 * Read/Write access mode.
+	 * 
+	 * @see "javax.microedition.io.Connector.READ_WRITE"
+	 */
+	public static final int	READ_WRITE	= Connector.READ_WRITE;
+
+	/**
+	 * Create and open a <code>Connection</code> object for the specified name.
+	 * 
+	 * @param name The URI for the connection.
+	 * @return A new <code>javax.microedition.io.Connection</code> object.
+	 * @throws IllegalArgumentException If a parameter is invalid.
+	 * @throws javax.microedition.io.ConnectionNotFoundException If the
+	 *         connection cannot be found.
+	 * @throws IOException If some other kind of I/O error occurs.
+	 * @see "javax.microedition.io.Connector.open(String name)"
+	 */
+	public Connection open(String name) throws IOException;
+
+	/**
+	 * Create and open a <code>Connection</code> object for the specified name and
+	 * access mode.
+	 * 
+	 * @param name The URI for the connection.
+	 * @param mode The access mode.
+	 * @return A new <code>javax.microedition.io.Connection</code> object.
+	 * @throws IllegalArgumentException If a parameter is invalid.
+	 * @throws javax.microedition.io.ConnectionNotFoundException If the
+	 *         connection cannot be found.
+	 * @throws IOException If some other kind of I/O error occurs.
+	 * @see "javax.microedition.io.Connector.open(String name, int mode)"
+	 */
+	public Connection open(String name, int mode) throws IOException;
+
+	/**
+	 * Create and open a <code>Connection</code> object for the specified name,
+	 * access mode and timeouts.
+	 * 
+	 * @param name The URI for the connection.
+	 * @param mode The access mode.
+	 * @param timeouts A flag to indicate that the caller wants timeout
+	 *        exceptions.
+	 * @return A new <code>javax.microedition.io.Connection</code> object.
+	 * @throws IllegalArgumentException If a parameter is invalid.
+	 * @throws javax.microedition.io.ConnectionNotFoundException If the
+	 *         connection cannot be found.
+	 * @throws IOException If some other kind of I/O error occurs.
+	 * @see "<code>javax.microedition.io.Connector.open</code>"
+	 */
+	public Connection open(String name, int mode, boolean timeouts)
+			throws IOException;
+
+	/**
+	 * Create and open an <code>InputStream</code> object for the specified name.
+	 * 
+	 * @param name The URI for the connection.
+	 * @return An <code>InputStream</code> object.
+	 * @throws IllegalArgumentException If a parameter is invalid.
+	 * @throws javax.microedition.io.ConnectionNotFoundException If the
+	 *         connection cannot be found.
+	 * @throws IOException If some other kind of I/O error occurs.
+	 * @see "javax.microedition.io.Connector.openInputStream(String name)"
+	 */
+	public InputStream openInputStream(String name) throws IOException;
+
+	/**
+	 * Create and open a <code>DataInputStream</code> object for the specified
+	 * name.
+	 * 
+	 * @param name The URI for the connection.
+	 * @return A <code>DataInputStream</code> object.
+	 * @throws IllegalArgumentException If a parameter is invalid.
+	 * @throws javax.microedition.io.ConnectionNotFoundException If the
+	 *         connection cannot be found.
+	 * @throws IOException If some other kind of I/O error occurs.
+	 * @see "javax.microedition.io.Connector.openDataInputStream(String name)"
+	 */
+	public DataInputStream openDataInputStream(String name) throws IOException;
+
+	/**
+	 * Create and open an <code>OutputStream</code> object for the specified name.
+	 * 
+	 * @param name The URI for the connection.
+	 * @return An <code>OutputStream</code> object.
+	 * @throws IllegalArgumentException If a parameter is invalid.
+	 * @throws javax.microedition.io.ConnectionNotFoundException If the
+	 *         connection cannot be found.
+	 * @throws IOException If some other kind of I/O error occurs.
+	 * @see "javax.microedition.io.Connector.openOutputStream(String name)"
+	 */
+	public OutputStream openOutputStream(String name) throws IOException;
+
+	/**
+	 * Create and open a <code>DataOutputStream</code> object for the specified
+	 * name.
+	 * 
+	 * @param name The URI for the connection.
+	 * @return A <code>DataOutputStream</code> object.
+	 * @throws IllegalArgumentException If a parameter is invalid.
+	 * @throws javax.microedition.io.ConnectionNotFoundException If the
+	 *         connection cannot be found.
+	 * @throws IOException If some other kind of I/O error occurs.
+	 * @see "javax.microedition.io.Connector.openDataOutputStream(String name)"
+	 */
+	public DataOutputStream openDataOutputStream(String name)
+			throws IOException;
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/ConnectorService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/package.html
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/package.html?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/package.html (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/package.html Wed Mar 29 13:05:08 2006
@@ -0,0 +1,10 @@
+<!-- $Header: /cvshome/build/org.osgi.service.io/src/org/osgi/service/io/package.html,v 1.2 2004/12/01 19:01:26 hargrave Exp $ -->
+<BODY>
+<P>The OSGi IO Connector Specification Version 1.0.
+<p>Bundles wishing to use this package must list the package
+in the <TT>Import-Package</TT> header of the bundle's manifest.
+For example:
+<pre>
+Import-Package: org.osgi.service.io; version=1.0, javax.microedition.io
+</pre>
+</BODY>

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/packageinfo
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/packageinfo?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/packageinfo (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/packageinfo Wed Mar 29 13:05:08 2006
@@ -0,0 +1 @@
+version 1.0

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/io/packageinfo
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogEntry.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogEntry.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogEntry.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogEntry.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,109 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.log/src/org/osgi/service/log/LogEntry.java,v 1.8 2006/03/14 01:21:24 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2000, 2005). 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.log;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Provides methods to access the information contained in an individual Log
+ * Service log entry.
+ * 
+ * <p>
+ * A <code>LogEntry</code> object may be acquired from the
+ * <code>LogReaderService.getLog</code> method or by registering a
+ * <code>LogListener</code> object.
+ * 
+ * @version $Revision: 1.8 $
+ * @see LogReaderService#getLog
+ * @see LogListener
+ */
+public interface LogEntry {
+	/**
+	 * Returns the bundle that created this <code>LogEntry</code> object.
+	 * 
+	 * @return The bundle that created this <code>LogEntry</code> object;
+	 *         <code>null</code> if no bundle is associated with this
+	 *         <code>LogEntry</code> object.
+	 */
+	public Bundle getBundle();
+
+	/**
+	 * Returns the <code>ServiceReference</code> object for the service associated
+	 * with this <code>LogEntry</code> object.
+	 * 
+	 * @return <code>ServiceReference</code> object for the service associated
+	 *         with this <code>LogEntry</code> object; <code>null</code> if no
+	 *         <code>ServiceReference</code> object was provided.
+	 */
+	public ServiceReference getServiceReference();
+
+	/**
+	 * Returns the severity level of this <code>LogEntry</code> object.
+	 * 
+	 * <p>
+	 * This is one of the severity levels defined by the <code>LogService</code>
+	 * interface.
+	 * 
+	 * @return Severity level of this <code>LogEntry</code> object.
+	 * 
+	 * @see LogService#LOG_ERROR
+	 * @see LogService#LOG_WARNING
+	 * @see LogService#LOG_INFO
+	 * @see LogService#LOG_DEBUG
+	 */
+	public int getLevel();
+
+	/**
+	 * Returns the human readable message associated with this <code>LogEntry</code>
+	 * object.
+	 * 
+	 * @return <code>String</code> containing the message associated with this
+	 *         <code>LogEntry</code> object.
+	 */
+	public String getMessage();
+
+	/**
+	 * Returns the exception object associated with this <code>LogEntry</code>
+	 * object.
+	 * 
+	 * <p>
+	 * In some implementations, the returned exception may not be the original
+	 * exception. To avoid references to a bundle defined exception class, thus
+	 * preventing an uninstalled bundle from being garbage collected, the Log
+	 * Service may return an exception object of an implementation defined
+	 * Throwable subclass. The returned object will attempt to provide as much
+	 * information as possible from the original exception object such as the
+	 * message and stack trace.
+	 * 
+	 * @return <code>Throwable</code> object of the exception associated with this
+	 *         <code>LogEntry</code>;<code>null</code> if no exception is
+	 *         associated with this <code>LogEntry</code> object.
+	 */
+	public Throwable getException();
+
+	/**
+	 * Returns the value of <code>currentTimeMillis()</code> at the time this
+	 * <code>LogEntry</code> object was created.
+	 * 
+	 * @return The system time in milliseconds when this <code>LogEntry</code>
+	 *         object was created.
+	 * @see "System.currentTimeMillis()"
+	 */
+	public long getTime();
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogListener.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogListener.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogListener.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogListener.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,51 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.log/src/org/osgi/service/log/LogListener.java,v 1.8 2006/03/14 01:21:24 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2000, 2005). 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.log;
+
+import java.util.EventListener;
+
+/**
+ * Subscribes to <code>LogEntry</code> objects from the <code>LogReaderService</code>.
+ * 
+ * <p>
+ * A <code>LogListener</code> object may be registered with the Log Reader Service
+ * using the <code>LogReaderService.addLogListener</code> method. After the
+ * listener is registered, the <code>logged</code> method will be called for each
+ * <code>LogEntry</code> object created. The <code>LogListener</code> object may be
+ * unregistered by calling the <code>LogReaderService.removeLogListener</code>
+ * method.
+ * 
+ * @version $Revision: 1.8 $
+ * @see LogReaderService
+ * @see LogEntry
+ * @see LogReaderService#addLogListener(LogListener)
+ * @see LogReaderService#removeLogListener(LogListener)
+ */
+public interface LogListener extends EventListener {
+	/**
+	 * Listener method called for each LogEntry object created.
+	 * 
+	 * <p>
+	 * As with all event listeners, this method should return to its caller as
+	 * soon as possible.
+	 * 
+	 * @param entry A <code>LogEntry</code> object containing log information.
+	 * @see LogEntry
+	 */
+	public void logged(LogEntry entry);
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogReaderService.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogReaderService.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogReaderService.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogReaderService.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,98 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.log/src/org/osgi/service/log/LogReaderService.java,v 1.9 2006/03/14 01:21:24 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2000, 2005). 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.log;
+
+import java.util.Enumeration;
+
+/**
+ * Provides methods to retrieve <code>LogEntry</code> objects from the log.
+ * <p>
+ * There are two ways to retrieve <code>LogEntry</code> objects:
+ * <ul>
+ * <li>The primary way to retrieve <code>LogEntry</code> objects is to register a
+ * <code>LogListener</code> object whose <code>LogListener.logged</code> method will
+ * be called for each entry added to the log.
+ * <li>To retrieve past <code>LogEntry</code> objects, the <code>getLog</code>
+ * method can be called which will return an <code>Enumeration</code> of all
+ * <code>LogEntry</code> objects in the log.
+ * 
+ * @version $Revision: 1.9 $
+ * @see LogEntry
+ * @see LogListener
+ * @see LogListener#logged(LogEntry)
+ */
+public interface LogReaderService {
+	/**
+	 * Subscribes to <code>LogEntry</code> objects.
+	 * 
+	 * <p>
+	 * This method registers a <code>LogListener</code> object with the Log Reader
+	 * Service. The <code>LogListener.logged(LogEntry)</code> method will be
+	 * called for each <code>LogEntry</code> object placed into the log.
+	 * 
+	 * <p>
+	 * When a bundle which registers a <code>LogListener</code> object is stopped
+	 * or otherwise releases the Log Reader Service, the Log Reader Service must
+	 * remove all of the bundle's listeners.
+	 * 
+	 * <p>
+	 * If this Log Reader Service's list of listeners already contains a
+	 * listener <code>l</code> such that <code>(l==listener)</code>, this method
+	 * does nothing.
+	 * 
+	 * @param listener A <code>LogListener</code> object to register; the
+	 *        <code>LogListener</code> object is used to receive <code>LogEntry</code>
+	 *        objects.
+	 * @see LogListener
+	 * @see LogEntry
+	 * @see LogListener#logged(LogEntry)
+	 */
+	public void addLogListener(LogListener listener);
+
+	/**
+	 * Unsubscribes to <code>LogEntry</code> objects.
+	 * 
+	 * <p>
+	 * This method unregisters a <code>LogListener</code> object from the Log
+	 * Reader Service.
+	 * 
+	 * <p>
+	 * If <code>listener</code> is not contained in this Log Reader Service's list
+	 * of listeners, this method does nothing.
+	 * 
+	 * @param listener A <code>LogListener</code> object to unregister.
+	 * @see LogListener
+	 */
+	public void removeLogListener(LogListener listener);
+
+	/**
+	 * Returns an <code>Enumeration</code> of all <code>LogEntry</code> objects in
+	 * the log.
+	 * 
+	 * <p>
+	 * Each element of the enumeration is a <code>LogEntry</code> object, ordered
+	 * with the most recent entry first. Whether the enumeration is of all
+	 * <code>LogEntry</code> objects since the Log Service was started or some
+	 * recent past is implementation-specific. Also implementation-specific is
+	 * whether informational and debug <code>LogEntry</code> objects are included
+	 * in the enumeration.
+	 * @return An <code>Enumeration</code> of all <code>LogEntry</code> objects in
+	 * the log.
+	 */
+	public Enumeration getLog();
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogReaderService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogService.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogService.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogService.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogService.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,156 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.log/src/org/osgi/service/log/LogService.java,v 1.8 2006/03/14 01:21:24 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2000, 2005). 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.log;
+
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Provides methods for bundles to write messages to the log.
+ * 
+ * <p>
+ * <code>LogService</code> methods are provided to log messages; optionally with a
+ * <code>ServiceReference</code> object or an exception.
+ * 
+ * <p>
+ * Bundles must log messages in the OSGi environment with a severity level
+ * according to the following hierarchy:
+ * <ol>
+ * <li>{@link #LOG_ERROR}
+ * <li>{@link #LOG_WARNING}
+ * <li>{@link #LOG_INFO}
+ * <li>{@link #LOG_DEBUG}
+ * </ol>
+ * 
+ * @version $Revision: 1.8 $
+ */
+public interface LogService {
+	/**
+	 * An error message (Value 1).
+	 * 
+	 * <p>
+	 * This log entry indicates the bundle or service may not be functional.
+	 */
+	public static final int	LOG_ERROR	= 1;
+	/**
+	 * A warning message (Value 2).
+	 * 
+	 * <p>
+	 * This log entry indicates a bundle or service is still functioning but may
+	 * experience problems in the future because of the warning condition.
+	 */
+	public static final int	LOG_WARNING	= 2;
+	/**
+	 * An informational message (Value 3).
+	 * 
+	 * <p>
+	 * This log entry may be the result of any change in the bundle or service
+	 * and does not indicate a problem.
+	 */
+	public static final int	LOG_INFO	= 3;
+	/**
+	 * A debugging message (Value 4).
+	 * 
+	 * <p>
+	 * This log entry is used for problem determination and may be irrelevant to
+	 * anyone but the bundle developer.
+	 */
+	public static final int	LOG_DEBUG	= 4;
+
+	/**
+	 * Logs a message.
+	 * 
+	 * <p>
+	 * The <code>ServiceReference</code> field and the <code>Throwable</code> field
+	 * of the <code>LogEntry</code> object will be set to <code>null</code>.
+	 * 
+	 * @param level The severity of the message. This should be one of the
+	 *        defined log levels but may be any integer that is interpreted in a
+	 *        user defined way.
+	 * @param message Human readable string describing the condition or
+	 *        <code>null</code>.
+	 * @see #LOG_ERROR
+	 * @see #LOG_WARNING
+	 * @see #LOG_INFO
+	 * @see #LOG_DEBUG
+	 */
+	public void log(int level, String message);
+
+	/**
+	 * Logs a message with an exception.
+	 * 
+	 * <p>
+	 * The <code>ServiceReference</code> field of the <code>LogEntry</code> object
+	 * will be set to <code>null</code>.
+	 * 
+	 * @param level The severity of the message. This should be one of the
+	 *        defined log levels but may be any integer that is interpreted in a
+	 *        user defined way.
+	 * @param message The human readable string describing the condition or
+	 *        <code>null</code>.
+	 * @param exception The exception that reflects the condition or
+	 *        <code>null</code>.
+	 * @see #LOG_ERROR
+	 * @see #LOG_WARNING
+	 * @see #LOG_INFO
+	 * @see #LOG_DEBUG
+	 */
+	public void log(int level, String message, Throwable exception);
+
+	/**
+	 * Logs a message associated with a specific <code>ServiceReference</code>
+	 * object.
+	 * 
+	 * <p>
+	 * The <code>Throwable</code> field of the <code>LogEntry</code> will be set to
+	 * <code>null</code>.
+	 * 
+	 * @param sr The <code>ServiceReference</code> object of the service that this
+	 *        message is associated with or <code>null</code>.
+	 * @param level The severity of the message. This should be one of the
+	 *        defined log levels but may be any integer that is interpreted in a
+	 *        user defined way.
+	 * @param message Human readable string describing the condition or
+	 *        <code>null</code>.
+	 * @see #LOG_ERROR
+	 * @see #LOG_WARNING
+	 * @see #LOG_INFO
+	 * @see #LOG_DEBUG
+	 */
+	public void log(ServiceReference sr, int level, String message);
+
+	/**
+	 * Logs a message with an exception associated and a
+	 * <code>ServiceReference</code> object.
+	 * 
+	 * @param sr The <code>ServiceReference</code> object of the service that this
+	 *        message is associated with.
+	 * @param level The severity of the message. This should be one of the
+	 *        defined log levels but may be any integer that is interpreted in a
+	 *        user defined way.
+	 * @param message Human readable string describing the condition or
+	 *        <code>null</code>.
+	 * @param exception The exception that reflects the condition or
+	 *        <code>null</code>.
+	 * @see #LOG_ERROR
+	 * @see #LOG_WARNING
+	 * @see #LOG_INFO
+	 * @see #LOG_DEBUG
+	 */
+	public void log(ServiceReference sr, int level, String message,
+			Throwable exception);
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/LogService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/package.html
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/package.html?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/package.html (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/package.html Wed Mar 29 13:05:08 2006
@@ -0,0 +1,11 @@
+<!-- $Header: /cvshome/build/org.osgi.service.log/src/org/osgi/service/log/package.html,v 1.3 2005/08/10 01:43:20 hargrave Exp $ -->
+<BODY>
+<P>The OSGi Log Service Package. Specification Version 1.3.
+<p>Bundles wishing to use this package must list the package
+in the Import-Package header of the bundle's manifest.
+For example:
+<pre>
+Import-Package: org.osgi.service.log; version=1.3
+</pre>
+</BODY>
+

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/packageinfo
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/packageinfo?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/packageinfo (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/packageinfo Wed Mar 29 13:05:08 2006
@@ -0,0 +1 @@
+version 1.3

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/log/packageinfo
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/AttributeDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/AttributeDefinition.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/AttributeDefinition.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/AttributeDefinition.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,279 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/AttributeDefinition.java,v 1.11 2006/03/14 01:20:46 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2001, 2005). 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.metatype;
+
+/**
+ * An interface to describe an attribute.
+ * 
+ * <p>
+ * An <code>AttributeDefinition</code> object defines a description of the data
+ * type of a property/attribute.
+ * 
+ * @version $Revision: 1.11 $
+ */
+public interface AttributeDefinition {
+	/**
+	 * The <code>STRING</code> (1) type.
+	 * 
+	 * <p>
+	 * Attributes of this type should be stored as <code>String</code>,
+	 * <code>Vector</code> with <code>String</code> or <code>String[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	STRING		= 1;
+	/**
+	 * The <code>LONG</code> (2) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Long</code>,
+	 * <code>Vector</code> with <code>Long</code> or <code>long[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	LONG		= 2;
+	/**
+	 * The <code>INTEGER</code> (3) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Integer</code>,
+	 * <code>Vector</code> with <code>Integer</code> or <code>int[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	INTEGER		= 3;
+	/**
+	 * The <code>SHORT</code> (4) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Short</code>,
+	 * <code>Vector</code> with <code>Short</code> or <code>short[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	SHORT		= 4;
+	/**
+	 * The <code>CHARACTER</code> (5) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Character</code>,
+	 * <code>Vector</code> with <code>Character</code> or <code>char[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	CHARACTER	= 5;
+	/**
+	 * The <code>BYTE</code> (6) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Byte</code>,
+	 * <code>Vector</code> with <code>Byte</code> or <code>byte[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	BYTE		= 6;
+	/**
+	 * The <code>DOUBLE</code> (7) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Double</code>,
+	 * <code>Vector</code> with <code>Double</code> or <code>double[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	DOUBLE		= 7;
+	/**
+	 * The <code>FLOAT</code> (8) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Float</code>,
+	 * <code>Vector</code> with <code>Float</code> or <code>float[]</code> objects,
+	 * depending on the <code>getCardinality()</code> value.
+	 */
+	public static final int	FLOAT		= 8;
+	/**
+	 * The <code>BIGINTEGER</code> (9) type.
+	 * 
+	 * Attributes of this type should be stored as <code>BigInteger</code>,
+	 * <code>Vector</code> with <code>BigInteger</code> or <code>BigInteger[]</code>
+	 * objects, depending on the <code>getCardinality()</code> value.
+	 * 
+	 * @deprecated Since 1.1
+	 */
+	public static final int	BIGINTEGER	= 9;
+	/**
+	 * The <code>BIGDECIMAL</code> (10) type.
+	 * 
+	 * Attributes of this type should be stored as <code>BigDecimal</code>,
+	 * <code>Vector</code> with <code>BigDecimal</code> or <code>BigDecimal[]</code>
+	 * objects depending on <code>getCardinality()</code>.
+	 * 
+	 * @deprecated Since 1.1
+	 */
+	public static final int	BIGDECIMAL	= 10;
+	/**
+	 * The <code>BOOLEAN</code> (11) type.
+	 * 
+	 * Attributes of this type should be stored as <code>Boolean</code>,
+	 * <code>Vector</code> with <code>Boolean</code> or <code>boolean[]</code> objects
+	 * depending on <code>getCardinality()</code>.
+	 */
+	public static final int	BOOLEAN		= 11;
+
+	/**
+	 * Get the name of the attribute. This name may be localized.
+	 * 
+	 * @return The localized name of the definition.
+	 */
+	public String getName();
+
+	/**
+	 * Unique identity for this attribute.
+	 * 
+	 * Attributes share a global namespace in the registry. E.g. an attribute
+	 * <code>cn</code> or <code>commonName</code> must always be a <code>String</code>
+	 * and the semantics are always a name of some object. They share this
+	 * aspect with LDAP/X.500 attributes. In these standards the OSI Object
+	 * Identifier (OID) is used to uniquely identify an attribute. If such an
+	 * OID exists, (which can be requested at several standard organisations and
+	 * many companies already have a node in the tree) it can be returned here.
+	 * Otherwise, a unique id should be returned which can be a Java class name
+	 * (reverse domain name) or generated with a GUID algorithm. Note that all
+	 * LDAP defined attributes already have an OID. It is strongly advised to
+	 * define the attributes from existing LDAP schemes which will give the OID.
+	 * Many such schemes exist ranging from postal addresses to DHCP parameters.
+	 * 
+	 * @return The id or oid
+	 */
+	public String getID();
+
+	/**
+	 * Return a description of this attribute.
+	 * 
+	 * The description may be localized and must describe the semantics of this
+	 * type and any constraints.
+	 * 
+	 * @return The localized description of the definition.
+	 */
+	public String getDescription();
+
+	/**
+	 * Return the cardinality of this attribute.
+	 * 
+	 * The OSGi environment handles multi valued attributes in arrays ([]) or in
+	 * <code>Vector</code> objects. The return value is defined as follows:
+	 * 
+	 * <pre>
+	 * 
+	 *    x = Integer.MIN_VALUE    no limit, but use Vector
+	 *    x &lt; 0                    -x = max occurrences, store in Vector
+	 *    x &gt; 0                     x = max occurrences, store in array []
+	 *    x = Integer.MAX_VALUE    no limit, but use array []
+	 *    x = 0                     1 occurrence required
+	 *  
+	 * </pre>
+	 * 
+	 * @return The cardinality of this attribute. 
+	 */
+	public int getCardinality();
+
+	/**
+	 * Return the type for this attribute.
+	 * 
+	 * <p>
+	 * Defined in the following constants which map to the appropriate Java
+	 * type. <code>STRING</code>,<code>LONG</code>,<code>INTEGER</code>,
+	 * <code>CHAR</code>,<code>BYTE</code>,<code>DOUBLE</code>,<code>FLOAT</code>,
+	 * <code>BOOLEAN</code>.
+	 *
+	 * @return The type for this attribute.
+	 */
+	public int getType();
+
+	/**
+	 * Return a list of option values that this attribute can take.
+	 * 
+	 * <p>
+	 * If the function returns <code>null</code>, there are no option values
+	 * available.
+	 * 
+	 * <p>
+	 * Each value must be acceptable to validate() (return "") and must be a
+	 * <code>String</code> object that can be converted to the data type defined
+	 * by getType() for this attribute.
+	 * 
+	 * <p>
+	 * This list must be in the same sequence as <code>getOptionLabels()</code>.
+	 * I.e. for each index i in <code>getOptionValues</code>, i in
+	 * <code>getOptionLabels()</code> should be the label.
+	 * 
+	 * <p>
+	 * For example, if an attribute can have the value male, female, unknown,
+	 * this list can return
+	 * <code>new String[] { "male", "female", "unknown" }</code>.
+	 * 
+	 * @return A list values
+	 */
+	public String[] getOptionValues();
+
+	/**
+	 * Return a list of labels of option values.
+	 * 
+	 * <p>
+	 * The purpose of this method is to allow menus with localized labels. It is
+	 * associated with <code>getOptionValues</code>. The labels returned here are
+	 * ordered in the same way as the values in that method.
+	 * 
+	 * <p>
+	 * If the function returns <code>null</code>, there are no option labels
+	 * available.
+	 * <p>
+	 * This list must be in the same sequence as the <code>getOptionValues()</code>
+	 * method. I.e. for each index i in <code>getOptionLabels</code>, i in
+	 * <code>getOptionValues()</code> should be the associated value.
+	 * 
+	 * <p>
+	 * For example, if an attribute can have the value male, female, unknown,
+	 * this list can return (for dutch)
+	 * <code>new String[] { "Man", "Vrouw", "Onbekend" }</code>.
+	 * 
+	 * @return A list values
+	 */
+	public String[] getOptionLabels();
+
+	/**
+	 * Validate an attribute in <code>String</code> form.
+	 * 
+	 * An attribute might be further constrained in value. This method will
+	 * attempt to validate the attribute according to these constraints. It can
+	 * return three different values:
+	 * 
+	 * <pre>
+	 *  null           No validation present
+	 *  ""             No problems detected
+	 *  "..."          A localized description of why the value is wrong
+	 * </pre>
+	 * 
+	 * @param value The value before turning it into the basic data type
+	 * @return <code>null</code>, "", or another string
+	 */
+	public String validate(String value);
+
+	/**
+	 * Return a default for this attribute.
+	 * 
+	 * The object must be of the appropriate type as defined by the cardinality
+	 * and <code>getType()</code>. The return type is a list of <code>String</code>
+	 * objects that can be converted to the appropriate type. The cardinality of
+	 * the return array must follow the absolute cardinality of this type. E.g.
+	 * if the cardinality = 0, the array must contain 1 element. If the
+	 * cardinality is 1, it must contain 0 or 1 elements. If it is -5, it must
+	 * contain from 0 to max 5 elements. Note that the special case of a 0
+	 * cardinality, meaning a single value, does not allow arrays or vectors of
+	 * 0 elements.
+	 * 
+	 * @return Return a default value or <code>null</code> if no default exists.
+	 */
+	public String[] getDefaultValue();
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/AttributeDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeInformation.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeInformation.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeInformation.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeInformation.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,52 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/MetaTypeInformation.java,v 1.7 2006/03/14 01:20:46 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2005). 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.metatype;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * A MetaType Information object is created by the MetaTypeService to return
+ * meta type information for a specific bundle.
+ * 
+ * @version $Revision: 1.7 $
+ * @since 1.1
+ */
+public interface MetaTypeInformation extends MetaTypeProvider {
+	/**
+	 * Return the PIDs (for ManagedServices) for which ObjectClassDefinition
+	 * information is available.
+	 * 
+	 * @return Array of PIDs.
+	 */
+	public String[] getPids();
+
+	/**
+	 * Return the Factory PIDs (for ManagedServiceFactories) for which
+	 * ObjectClassDefinition information is available.
+	 * 
+	 * @return Array of Factory PIDs.
+	 */
+	public String[] getFactoryPids();
+
+	/**
+	 * Return the bundle for which this object provides meta type information.
+	 * 
+	 * @return Bundle for which this object provides meta type information.
+	 */
+	public Bundle getBundle();
+}
\ No newline at end of file

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeInformation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeProvider.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeProvider.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeProvider.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeProvider.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,57 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/MetaTypeProvider.java,v 1.10 2006/03/14 01:20:46 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2001, 2005). 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.metatype;
+
+/**
+ * Provides access to metatypes.
+ * 
+ * @version $Revision: 1.10 $
+ */
+public interface MetaTypeProvider {
+	/**
+	 * Returns an object class definition for the specified id localized to the
+	 * specified locale.
+	 * 
+	 * <p>
+	 * The locale parameter must be a name that consists of <code>language</code>[
+	 * "_" <code>country</code>[ "_" <code>variation</code>] ] as is customary in
+	 * the <code>Locale</code> class. This <code>Locale</code> class is not used
+	 * because certain profiles do not contain it.
+	 * 
+	 * @param id The ID of the requested object class. This can be a pid or
+	 *        factory pid returned by getPids or getFactoryPids.
+	 * @param locale The locale of the definition or <code>null</code> for default
+	 *        locale.
+	 * @return A <code>ObjectClassDefinition</code> object.
+	 * @throws IllegalArgumentException If the id or locale arguments are not
+	 *         valid
+	 */
+	public ObjectClassDefinition getObjectClassDefinition(String id, String locale);
+
+	/**
+	 * Return a list of available locales.
+	 * 
+	 * The results must be names that consists of language [ _ country [ _
+	 * variation ]] as is customary in the <code>Locale</code> class.
+	 * 
+	 * @return An array of locale strings or <code>null</code> if there is no
+	 *         locale specific localization can be found.
+	 *  
+	 */
+	public String[] getLocales();
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeService.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeService.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeService.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeService.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,53 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/MetaTypeService.java,v 1.9 2006/03/14 01:20:46 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2005). 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.metatype;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * The MetaType Service can be used to obtain meta type information for a
+ * bundle. The MetaType Service will examine the specified bundle for meta type
+ * documents to create the returned <code>MetaTypeInformation</code> object.
+ * 
+ * <p>
+ * If the specified bundle does not contain any meta type documents, then a
+ * <code>MetaTypeInformation</code> object will be returned that wrappers any
+ * <code>ManagedService</code> or <code>ManagedServiceFactory</code>
+ * services registered by the specified bundle that implement
+ * <code>MetaTypeProvider</code>. Thus the MetaType Service can be used to
+ * retrieve meta type information for bundles which contain a meta type
+ * documents or which provide their own <code>MetaTypeProvider</code> objects.
+ * 
+ * @version $Revision: 1.9 $
+ * @since 1.1
+ */
+public interface MetaTypeService {
+	/**
+	 * Return the MetaType information for the specified bundle.
+	 * 
+	 * @param bundle The bundle for which meta type information is requested.
+	 * @return A MetaTypeInformation object for the specified bundle.
+	 */
+	public MetaTypeInformation getMetaTypeInformation(Bundle bundle);
+
+	/**
+	 * Location of meta type documents. The MetaType Service will process each
+	 * entry in the meta type documents directory.
+	 */
+	public final static String	METATYPE_DOCUMENTS_LOCATION	= "OSGI-INF/metatype";
+}
\ No newline at end of file

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/MetaTypeService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/ObjectClassDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/ObjectClassDefinition.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/ObjectClassDefinition.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/ObjectClassDefinition.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,121 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/ObjectClassDefinition.java,v 1.10 2006/03/14 01:20:46 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2001, 2005). 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.metatype;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Description for the data type information of an objectclass.
+ * 
+ * @version $Revision: 1.10 $
+ */
+public interface ObjectClassDefinition {
+	/**
+	 * Argument for <code>getAttributeDefinitions(int)</code>.
+	 * <p>
+	 * <code>REQUIRED</code> indicates that only the required definitions are
+	 * returned. The value is 1.
+	 */
+	public static final int	REQUIRED	= 1;
+	/**
+	 * Argument for <code>getAttributeDefinitions(int)</code>.
+	 * <p>
+	 * <code>OPTIONAL</code> indicates that only the optional definitions are
+	 * returned. The value is 2.
+	 */
+	public static final int	OPTIONAL	= 2;
+	/**
+	 * Argument for <code>getAttributeDefinitions(int)</code>.
+	 * <p>
+	 * <code>ALL</code> indicates that all the definitions are returned. The value
+	 * is -1.
+	 */
+	public static final int	ALL			= 0xFFFFFFFF;
+
+	/**
+	 * Return the name of this object class.
+	 * 
+	 * The name may be localized.
+	 * 
+	 * @return The name of this object class.
+	 */
+	public String getName();
+
+	/**
+	 * Return the id of this object class.
+	 * 
+	 * <p>
+	 * <code>ObjectDefintion</code> objects share a global namespace in the
+	 * registry. They share this aspect with LDAP/X.500 attributes. In these
+	 * standards the OSI Object Identifier (OID) is used to uniquely identify
+	 * object classes. If such an OID exists, (which can be requested at several
+	 * standard organisations and many companies already have a node in the
+	 * tree) it can be returned here. Otherwise, a unique id should be returned
+	 * which can be a java class name (reverse domain name) or generated with a
+	 * GUID algorithm. Note that all LDAP defined object classes already have an
+	 * OID associated. It is strongly advised to define the object classes from
+	 * existing LDAP schemes which will give the OID for free. Many such schemes
+	 * exist ranging from postal addresses to DHCP parameters.
+	 * 
+	 * @return The id of this object class.
+	 */
+	public String getID();
+
+	/**
+	 * Return a description of this object class.
+	 * 
+	 * The description may be localized.
+	 * 
+	 * @return The description of this object class.
+	 */
+	public String getDescription();
+
+	/**
+	 * Return the attribute definitions for this object class.
+	 * 
+	 * <p>
+	 * Return a set of attributes. The filter parameter can distinguish between
+	 * <code>ALL</code>,<code>REQUIRED</code> or the <code>OPTIONAL</code>
+	 * attributes.
+	 * 
+	 * @param filter <code>ALL</code>,<code>REQUIRED</code>,<code>OPTIONAL</code>
+	 * @return An array of attribute definitions or <code>null</code> if no
+	 *         attributes are selected
+	 */
+	public AttributeDefinition[] getAttributeDefinitions(int filter);
+
+	/**
+	 * Return an <code>InputStream</code> object that can be used to create an
+	 * icon from.
+	 * 
+	 * <p>
+	 * Indicate the size and return an <code>InputStream</code> object containing
+	 * an icon. The returned icon maybe larger or smaller than the indicated
+	 * size.
+	 * 
+	 * <p>
+	 * The icon may depend on the localization.
+	 * 
+	 * @param size Requested size of an icon, e.g. a 16x16 pixels icon then size =
+	 *        16
+	 * @return An InputStream representing an icon or <code>null</code>
+	 * @throws IOException If the <code>InputStream</code> cannot be returned.
+	 */
+	public InputStream getIcon(int size) throws IOException;
+}

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/ObjectClassDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/package.html
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/package.html?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/package.html (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/package.html Wed Mar 29 13:05:08 2006
@@ -0,0 +1,11 @@
+<!-- $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/package.html,v 1.4 2004/12/01 19:01:48 hargrave Exp $ -->
+<BODY>
+<P>The OSGi Metatype Package. Specification Version 1.1.
+<p>Bundles wishing to use this package must list the package
+in the <TT>Import-Package</TT> header of the bundle's manifest.
+For example:
+<pre>
+Import-Package: org.osgi.service.metatype; version=1.1
+</pre>
+</BODY>
+

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/packageinfo
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/packageinfo?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/packageinfo (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/packageinfo Wed Mar 29 13:05:08 2006
@@ -0,0 +1 @@
+version 1.1

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/metatype/packageinfo
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/prefs/BackingStoreException.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/prefs/BackingStoreException.java?rev=389891&view=auto
==============================================================================
--- incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/prefs/BackingStoreException.java (added)
+++ incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/prefs/BackingStoreException.java Wed Mar 29 13:05:08 2006
@@ -0,0 +1,82 @@
+/*
+ * $Header: /cvshome/build/org.osgi.service.prefs/src/org/osgi/service/prefs/BackingStoreException.java,v 1.10 2006/03/14 01:21:15 hargrave Exp $
+ * 
+ * Copyright (c) OSGi Alliance (2001, 2005). 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.prefs;
+
+/**
+ * Thrown to indicate that a preferences operation could not complete because of
+ * a failure in the backing store, or a failure to contact the backing store.
+ * 
+ * @version $Revision: 1.10 $
+ */
+public class BackingStoreException extends Exception {
+    static final long serialVersionUID = -1415637364122829574L;
+	/**
+	 * Nested exception.
+	 */
+	private Throwable	cause;
+
+	/**
+	 * Constructs a <code>BackingStoreException</code> with the specified detail
+	 * message.
+	 * 
+	 * @param s The detail message.
+	 */
+	public BackingStoreException(String s) {
+		super(s);
+	}
+	
+	/**
+	 * Constructs a <code>BackingStoreException</code> with the specified detail
+	 * message.
+	 * 
+	 * @param s The detail message.
+	 * @param cause The cause of the exception. May be <code>null</code>.
+	 * @since 1.1 
+	 */
+	public BackingStoreException(String s, Throwable cause) {
+		super(s);
+		this.cause = cause;
+	}
+	
+	/**
+	 * 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.1 
+	 */
+	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.1 
+	 */
+	public Throwable initCause(Throwable cause) {
+		throw new IllegalStateException();
+	}
+
+}
\ No newline at end of file

Propchange: incubator/felix/trunk/org.osgi.compendium/src/main/java/org/osgi/service/prefs/BackingStoreException.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message