Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2015-02-17 16:31:58 -0500
committerThomas Watson2015-02-17 16:31:58 -0500
commit20498a2046e9057162d528aa90e474d98b04640a (patch)
tree1c68080e22ccf62a0ed26600147d1a071cfc36c4
parent8e8c08baff77f3aa4c02db0b3137a53422d5f718 (diff)
downloadrt.equinox.framework-20498a2046e9057162d528aa90e474d98b04640a.tar.gz
rt.equinox.framework-20498a2046e9057162d528aa90e474d98b04640a.tar.xz
rt.equinox.framework-20498a2046e9057162d528aa90e474d98b04640a.zip
Update the OSGi API to the latest
-rw-r--r--bundles/org.eclipse.osgi.services/.settings/.api_filters16
-rw-r--r--bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/ServletContextHelper.java36
-rw-r--r--bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java68
-rw-r--r--bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/MetaTypeService.java18
4 files changed, 111 insertions, 27 deletions
diff --git a/bundles/org.eclipse.osgi.services/.settings/.api_filters b/bundles/org.eclipse.osgi.services/.settings/.api_filters
index 8501d69d2..9f93e63d2 100644
--- a/bundles/org.eclipse.osgi.services/.settings/.api_filters
+++ b/bundles/org.eclipse.osgi.services/.settings/.api_filters
@@ -47,13 +47,6 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/osgi/service/http/context/ServletContextHelperContext.java" type="org.osgi.service.http.context.ServletContextHelperContext">
- <filter comment="Ignore OSGi API" id="1110441988">
- <message_arguments>
- <message_argument value="org.osgi.service.http.context.ServletContextHelperContext"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/osgi/service/http/runtime/HttpServiceRuntime.java" type="org.osgi.service.http.runtime.HttpServiceRuntime">
<filter comment="Ignore OSGi API" id="1110441988">
<message_arguments>
@@ -187,4 +180,13 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/osgi/service/metatype/MetaTypeService.java" type="org.osgi.service.metatype.MetaTypeService">
+ <filter comment="Ignore OSGi API" id="1209008130">
+ <message_arguments>
+ <message_argument value="1.3"/>
+ <message_argument value="3.5"/>
+ <message_argument value="METATYPE_CAPABILITY_NAME"/>
+ </message_arguments>
+ </filter>
+ </resource>
</component>
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/ServletContextHelper.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/ServletContextHelper.java
index a6d9e57fe..a75d2d089 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/ServletContextHelper.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/ServletContextHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2015). 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.
@@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.Bundle;
+import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
/**
* Helper service for a servlet context used by a Http Whiteboard implementation
@@ -36,32 +37,33 @@ import org.osgi.framework.Bundle;
*
* <p>
* Each {@code ServletContextHelper} is registered with a
- * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_NAME
- * service property} containing a name to reference by servlets, servlet
- * filters, resources, and listeners. If there is more than one
- * {@code ServletContextHelper} registered with the same context name, the one
- * with the highest service ranking is active, the others are inactive.
+ * {@link HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_NAME service property}
+ * containing a name to reference by servlets, servlet filters, resources, and
+ * listeners. If there is more than one {@code ServletContextHelper} registered
+ * with the same context name, the one with the highest service ranking is
+ * active, the others are inactive.
*
* <p>
* A context is registered with the
- * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_PATH
- * service property} to define a path under which all services registered with this context are
- * reachable. If there is more than one {@code ServletContextHelper} registered with the same
- * path, each duplicate context path is searched by service ranking order according to
- * {@link org.osgi.framework.ServiceReference#compareTo(Object)} until a matching servlet or
- * resource is found.
+ * {@link HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_PATH service property}
+ * to define a path under which all services registered with this context are
+ * reachable. If there is more than one {@code ServletContextHelper} registered
+ * with the same path, each duplicate context path is searched by service
+ * ranking order according to
+ * {@link org.osgi.framework.ServiceReference#compareTo(Object)} until a
+ * matching servlet or resource is found.
*
* <p>
* Servlets, servlet filters, resources, and listeners services may be
- * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT
- * associated} with a {@code ServletContextHelper} service. If the referenced
+ * {@link HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT associated}
+ * with a {@code ServletContextHelper} service. If the referenced
* {@code ServletContextHelper} service does not exist or is currently not
* active, the whiteboard services for that {@code ServletContextHelper} are not
* active either.
*
* <p>
* If no {@code ServletContextHelper} service is associated, that is no
- * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT
+ * {@link HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT
* HTTP_WHITEBOARD_CONTEXT_SELECT} is configured for a whiteboard service, a
* default {@code ServletContextHelper} is used.
*
@@ -95,8 +97,8 @@ import org.osgi.framework.Bundle;
*
* @ThreadSafe
* @author $Id$
- * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_NAME
- * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_PATH
+ * @see HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_NAME
+ * @see HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_PATH
*/
@ConsumerType
public abstract class ServletContextHelper {
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java
index 8f2496a1a..2c9b7de2c 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java
@@ -16,6 +16,7 @@
package org.osgi.service.http.whiteboard;
+import javax.servlet.Servlet;
import org.osgi.framework.Filter;
import org.osgi.service.http.context.ServletContextHelper;
import org.osgi.service.http.runtime.HttpServiceRuntimeConstants;
@@ -90,6 +91,23 @@ public final class HttpWhiteboardConstants {
public static final String HTTP_WHITEBOARD_CONTEXT_PATH = "osgi.http.whiteboard.context.path";
/**
+ * Service property prefix referencing a {@link ServletContextHelper}
+ * service.
+ *
+ * <p>
+ * For {@link ServletContextHelper} services this prefix can be used for
+ * service properties to mark them as initialization parameters which can be
+ * retrieved from the associated servlet context. The prefix is removed from
+ * the service property name to build the initialization parameter name.
+ *
+ * <p>
+ * For {@link ServletContextHelper} services, the value of each
+ * initialization parameter service property must be of type {@code String}.
+ *
+ */
+ public static final String HTTP_WHITEBOARD_CONTEXT_INIT_PARAM_PREFIX = "context.init.";
+
+ /**
* Service property referencing a {@link ServletContextHelper} service.
*
* <p>
@@ -189,6 +207,22 @@ public final class HttpWhiteboardConstants {
public static final String HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED = "osgi.http.whiteboard.servlet.asyncSupported";
/**
+ * Service property prefix referencing a {@link Servlet} service.
+ *
+ * <p>
+ * For {@link Servlet} services this prefix can be used for service
+ * properties to mark them as initialization parameters which can be
+ * retrieved from the associated servlet config. The prefix is removed from
+ * the service property name to build the initialization parameter name.
+ *
+ * <p>
+ * For {@link Servlet} services, the value of each initialization parameter
+ * service property must be of type {@code String}.
+ *
+ */
+ public static final String HTTP_WHITEBOARD_SERVLET_INIT_PARAM_PREFIX = "servlet.init.";
+
+ /**
* Service property specifying the servlet filter name of a {@code Filter}
* service.
*
@@ -299,6 +333,37 @@ public final class HttpWhiteboardConstants {
public static final String HTTP_WHITEBOARD_FILTER_DISPATCHER = "osgi.http.whiteboard.filter.dispatcher";
/**
+ * Service property prefix referencing a {@link Filter} service.
+ *
+ * <p>
+ * For {@link Filter} services this prefix can be used for service
+ * properties to mark them as initialization parameters which can be
+ * retrieved from the associated filter config. The prefix is removed from
+ * the service property name to build the initialization parameter name.
+ *
+ * <p>
+ * For {@link Filter} services, the value of each initialization parameter
+ * service property must be of type {@code String}.
+ *
+ */
+ public static final String HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX = "filter.init.";
+
+ /**
+ * Service property to mark a Listener service as a Whiteboard service.
+ * Listener services with this property set to the string value "true" will
+ * be treated as Whiteboard services opting in to being handled by the Http
+ * Whiteboard implementation. If the value "false" is specified, the service
+ * is opting out and this case is treated exactly the same as if this
+ * property is missing. If an invalid value is specified this is treated as
+ * a failure.
+ *
+ * <p>
+ * The value of this service property must be of type {@code String}. Valid
+ * values are "true" and "false" ignoring case.
+ */
+ public static final String HTTP_WHITEBOARD_LISTENER = "osgi.http.whiteboard.listener";
+
+ /**
* Possible value for the {@link #HTTP_WHITEBOARD_FILTER_DISPATCHER}
* property indicating the servlet filter is applied to client requests.
*
@@ -375,8 +440,7 @@ public final class HttpWhiteboardConstants {
* mapped.
*
* <p>
- * The value of this service property must be of type {@code String},
- * {@code String[]}, or {@code Collection<String>}.
+ * The value of this service property must be of type {@code String}.
*
* @see #HTTP_WHITEBOARD_RESOURCE_PATTERN
*/
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/MetaTypeService.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/MetaTypeService.java
index ce3d84b6c..3a507c14a 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/MetaTypeService.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/MetaTypeService.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2015). 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.
@@ -52,4 +52,20 @@ public interface MetaTypeService {
* entry in the meta type documents directory.
*/
public final static String METATYPE_DOCUMENTS_LOCATION = "OSGI-INF/metatype";
+
+ /**
+ * Capability name for meta type document processors.
+ *
+ * <p>
+ * Used in {@code Provide-Capability} and {@code Require-Capability}
+ * manifest headers with the {@code osgi.extender} namespace. For example:
+ *
+ * <pre>
+ * Require-Capability: osgi.extender;
+ * filter:="(&amp;(osgi.extender=osgi.metatype)(version&gt;=1.3)(!(version&gt;=2.0)))"
+ * </pre>
+ *
+ * @since 1.3
+ */
+ public static final String METATYPE_CAPABILITY_NAME = "osgi.metatype";
}

Back to the top