diff options
author | Thomas Watson | 2015-04-27 13:24:51 +0000 |
---|---|---|
committer | Thomas Watson | 2015-04-27 13:24:51 +0000 |
commit | 744da9f96e2bf1b211ec976f8f8938095efbdaf1 (patch) | |
tree | dd9fbac094356d5fcfc6a1b826fb8246e7dd3b83 /bundles | |
parent | d246db1ff19232d211254bf9e4b6c2f14ebac00b (diff) | |
download | rt.equinox.framework-744da9f96e2bf1b211ec976f8f8938095efbdaf1.tar.gz rt.equinox.framework-744da9f96e2bf1b211ec976f8f8938095efbdaf1.tar.xz rt.equinox.framework-744da9f96e2bf1b211ec976f8f8938095efbdaf1.zip |
Update OSGi APIs to the latest
Diffstat (limited to 'bundles')
15 files changed, 190 insertions, 200 deletions
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ConfigurationAdmin.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ConfigurationAdmin.java index ead1a221a..caf295a2a 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ConfigurationAdmin.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ConfigurationAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2001, 2013). All Rights Reserved. + * Copyright (c) OSGi Alliance (2001, 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. @@ -129,7 +129,7 @@ public interface ConfigurationAdmin { public final static String SERVICE_FACTORYPID = "service.factoryPid"; /** * Configuration property naming the location of the bundle that is - * associated with a a {@code Configuration} object. This property can be + * associated with a {@code Configuration} object. This property can be * searched for but must not appear in the configuration dictionary for * security reason. The property's value is of type {@code String}. * diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ManagedService.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ManagedService.java index 69ba242e0..b85f71d92 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ManagedService.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/cm/ManagedService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2001, 2013). All Rights Reserved. + * Copyright (c) OSGi Alliance (2001, 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. @@ -133,9 +133,9 @@ public interface ManagedService { * method. * * <p> - * If the the location allows multiple managed services to be called back - * for a single configuration then the callbacks must occur in service - * ranking order. Changes in the location must be reflected by deleting the + * If the location allows multiple managed services to be called back for a + * single configuration then the callbacks must occur in service ranking + * order. Changes in the location must be reflected by deleting the * configuration if the configuration is no longer visible and updating when * it becomes visible. * diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/event/TopicPermission.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/event/TopicPermission.java index ad379bde2..dbe0829e7 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/event/TopicPermission.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/event/TopicPermission.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. @@ -81,7 +81,7 @@ public final class TopicPermission extends Permission { private volatile String actions = null; /** - * Defines the authority to publich and/or subscribe to a topic within the + * Defines the authority to publish and/or subscribe to a topic within the * EventAdmin service. * <p> * The name is specified as a slash-separated string. Wildcards may be used. 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 a75d2d089..9e6f2e833 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 @@ -19,7 +19,7 @@ package org.osgi.service.http.context; import java.io.IOException; import java.net.URL; import java.util.Enumeration; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -32,31 +32,33 @@ import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; * to serve HTTP requests. * * <p> - * This service defines methods that the Http Whiteboard Implementation may call + * This service defines methods that the Http Whiteboard implementation may call * to get information for a request when dealing with whiteboard services. * * <p> * Each {@code ServletContextHelper} is registered with a - * {@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. + * {@link HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_NAME + * "osgi.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 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 HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_PATH + * "osgi.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 HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT associated} - * with a {@code ServletContextHelper} service. If the referenced + * associated with a {@code ServletContextHelper} service with the + * {@link HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT + * "osgi.http.whiteboard.context.select"} service property. 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. @@ -64,11 +66,11 @@ import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; * <p> * If no {@code ServletContextHelper} service is associated, that is no * {@link HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT - * HTTP_WHITEBOARD_CONTEXT_SELECT} is configured for a whiteboard service, a - * default {@code ServletContextHelper} is used. + * "osgi.http.whiteboard.context.select"} service property is configured for a + * whiteboard service, a default {@code ServletContextHelper} is used. * * <p> - * Those whiteboard services that are associated using the same + * Those whiteboard services that are associated with the same * {@code ServletContextHelper} object will share the same * {@code ServletContext} object. * @@ -76,23 +78,22 @@ import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; * The behavior of the methods on the default {@code ServletContextHelper} is * defined as follows: * <ul> - * <li>{@code getMimeType} - Does not define any customized MIME types for the - * {@code Content-Type} header in the response, and always returns {@code null}. - * </li> - * <li>{@code handleSecurity} - Performs implementation-defined authentication - * on the request.</li> - * <li>{@code getResource} - Assumes the named resource is in the bundle of the - * whiteboard service, addressed from the root. This method calls the whiteboard - * service bundle's {@code Bundle.getEntry} method, and returns the appropriate - * URL to access the resource. On a Java runtime environment that supports - * permissions, the Http Whiteboard Implementation needs to be granted - * {@code org.osgi.framework.AdminPermission[*,RESOURCE]}.</li> - * <li>{@code getResourcePaths} - Assumes that the resources are in the bundle - * of the whiteboard service. This method calls {@code Bundle.findEntries} - * method, and returns the found entries. On a Java runtime environment that - * supports permissions, the Http Whiteboard Implementation needs to be granted + * <li>{@link #getMimeType(String) getMimeType} - Always returns {@code null}.</li> + * <li>{@link #handleSecurity(HttpServletRequest, HttpServletResponse) + * handleSecurity} - Always returns {@code true}.</li> + * <li>{@link #getResource(String) getResource} - Assumes the named resource is + * in the bundle of the whiteboard service, addressed from the root. This method + * calls the whiteboard service bundle's {@code Bundle.getEntry} method, and + * returns the appropriate URL to access the resource. On a Java runtime + * environment that supports permissions, the Http Whiteboard implementation + * needs to be granted {@code org.osgi.framework.AdminPermission[*,RESOURCE]}.</li> + * <li>{@link #getResourcePaths(String) getResourcePaths} - Assumes that the + * resources are in the bundle of the whiteboard service. This method calls + * {@code Bundle.findEntries} method, and returns the found entries. On a Java + * runtime environment that supports permissions, the Http Whiteboard + * implementation needs to be granted * {@code org.osgi.framework.AdminPermission[*,RESOURCE]}.</li> - * <li>{@code getRealPath} - This method returns {@code null}.</li> + * <li>{@link #getRealPath(String) getRealPath} - Always returns {@code null}.</li> * </ul> * * @ThreadSafe @@ -105,23 +106,21 @@ public abstract class ServletContextHelper { /** * {@code HttpServletRequest} attribute specifying the name of the * authenticated user. The value of the attribute can be retrieved by - * {@code HttpServletRequest.getRemoteUser}. This attribute name is - * {@code org.osgi.service.http.authentication.remote.user}. + * {@code HttpServletRequest.getRemoteUser}. */ public static final String REMOTE_USER = "org.osgi.service.http.authentication.remote.user"; /** * {@code HttpServletRequest} attribute specifying the scheme used in * authentication. The value of the attribute can be retrieved by - * {@code HttpServletRequest.getAuthType}. This attribute name is - * {@code org.osgi.service.http.authentication.type}. + * {@code HttpServletRequest.getAuthType}. */ public static final String AUTHENTICATION_TYPE = "org.osgi.service.http.authentication.type"; /** * {@code HttpServletRequest} attribute specifying the {@code Authorization} * object obtained from the {@code org.osgi.service.useradmin.UserAdmin} * service. The value of the attribute can be retrieved by - * {@code HttpServletRequest.getAttribute(HttpContext.AUTHORIZATION)}. This - * attribute name is {@code org.osgi.service.useradmin.authorization}. + * {@code HttpServletRequest.getAttribute(ServletContextHelper.AUTHORIZATION)} + * . */ public static final String AUTHORIZATION = "org.osgi.service.useradmin.authorization"; @@ -129,38 +128,40 @@ public abstract class ServletContextHelper { private final Bundle bundle; /** - * Default constructor + * Construct a new context helper. + * + * <p> + * If needed, the subclass will have to handle the association with a + * specific bundle. */ public ServletContextHelper() { - // default constructor this(null); } /** - * Construct a new context helper and set the bundle associated with this - * context. + * Construct a new context helper associated with the specified bundle. * - * @param b The bundle + * @param bundle The bundle to be associated with this context helper. */ - public ServletContextHelper(final Bundle b) { - this.bundle = b; + public ServletContextHelper(final Bundle bundle) { + this.bundle = bundle; } /** * Handles security for the specified request. * * <p> - * The Http Whiteboard Implementation calls this method prior to servicing + * The Http Whiteboard implementation calls this method prior to servicing * the specified request. This method controls whether the request is * processed in the normal manner or an error is returned. * * <p> - * If the request requires authentication and the Authorization header in - * the request is missing or not acceptable, then this method should set the - * WWW-Authenticate header in the response object, set the status in the - * response object to Unauthorized(401) and return {@code false}. See also - * RFC 2617: <i>HTTP Authentication: Basic and Digest Access Authentication - * </i> (available at http://www.ietf.org/rfc/rfc2617.txt). + * If the request requires authentication and the {@code Authorization} + * header in the request is missing or not acceptable, then this method + * should set the {@code WWW-Authenticate} header in the response object, + * set the status in the response object to Unauthorized(401) and return + * {@code false}. See also <a href="http://www.ietf.org/rfc/rfc2617.txt">RFC + * 2617: HTTP Authentication: Basic and Digest Access Authentication</a>. * * <p> * If the request requires a secure connection and the {@code getScheme} @@ -170,9 +171,9 @@ public abstract class ServletContextHelper { * * <p> * When this method returns {@code false}, the Http Whiteboard - * Implementation will send the response back to the client, thereby + * implementation will send the response back to the client, thereby * completing the request. When this method returns {@code true}, the Http - * Whitboard Implementation will proceed with servicing the request. + * Whiteboard implementation will proceed with servicing the request. * * <p> * If the specified request has been authenticated, this method must set the @@ -198,13 +199,13 @@ public abstract class ServletContextHelper { * @param response The HTTP response. * @return {@code true} if the request should be serviced, {@code false} if * the request should not be serviced and Http Whiteboard - * Implementation will send the response back to the client. - * @throws java.io.IOException may be thrown by this method. If this occurs, - * the Http Whiteboard Implementation will terminate the request and + * implementation will send the response back to the client. + * @throws java.io.IOException May be thrown by this method. If this occurs, + * the Http Whiteboard implementation will terminate the request and * close the socket. */ public boolean handleSecurity(final HttpServletRequest request, - final HttpServletResponse response) + final HttpServletResponse response) throws IOException { return true; } @@ -213,31 +214,30 @@ public abstract class ServletContextHelper { * Maps a resource name to a URL. * * <p> - * Called by the Http Whiteboard Implementation to map the specified - * resource name to a URL. For servlets, the Http Whiteboard Implementation + * Called by the Http Whiteboard implementation to map the specified + * resource name to a URL. For servlets, the Http Whiteboard implementation * will call this method to support the {@code ServletContext} methods * {@code getResource} and {@code getResourceAsStream}. For resources, the - * Http Whiteboard Implementation will call this method to locate the named + * Http Whiteboard implementation will call this method to locate the named * resource. * * <p> * The context can control from where resources come. For example, the * resource can be mapped to a file in the bundle's persistent storage area - * via {@code bundleContext.getDataFile(name).toURL()} or to a resource in - * the context's bundle via {@code getClass().getResource(name)} + * via {@code BundleContext.getDataFile(name).toURI().toURL()} or to a + * resource in the context's bundle via {@code getClass().getResource(name)} * * @param name The name of the requested resource. - * @return A URL that a Http Whiteboard Implementation can use to read the + * @return A URL that a Http Whiteboard implementation can use to read the * resource or {@code null} if the resource does not exist. */ public URL getResource(String name) { - final Bundle localBundle = this.bundle; - if (name != null && localBundle != null) { + if ((name != null) && (bundle != null)) { if (name.startsWith("/")) { name = name.substring(1); } - return this.bundle.getEntry(name); + return bundle.getEntry(name); } return null; } @@ -246,17 +246,17 @@ public abstract class ServletContextHelper { * Maps a name to a MIME type. * * <p> - * Called by the Http Whiteboard Implementation to determine the MIME type + * Called by the Http Whiteboard implementation to determine the MIME type * for the specified name. For whiteboard services, the Http Whiteboard - * Implementation will call this method to support the + * implementation will call this method to support the * {@code ServletContext} method {@code getMimeType}. For resource servlets, - * the Http Whiteboard Implementation will call this method to determine the + * the Http Whiteboard implementation will call this method to determine the * MIME type for the {@code Content-Type} header in the response. * * @param name The name for which to determine the MIME type. * @return The MIME type (e.g. text/html) of the specified name or - * {@code null} to indicate that the Http Service should determine - * the MIME type itself. + * {@code null} to indicate that the Http Whiteboard implementation + * should determine the MIME type itself. */ public String getMimeType(final String name) { return null; @@ -268,22 +268,21 @@ public abstract class ServletContextHelper { * argument. * * <p> - * Called by the Http Whiteboard Implementation to support the + * Called by the Http Whiteboard implementation to support the * {@code ServletContext} method {@code getResourcePaths} for whiteboard * services. * - * @param path the partial path used to match the resources, which must - * start with a / - * @return a Set containing the directory listing, or null if there are no - * resources in the web application whose path begins with the - * supplied path. + * @param path The partial path used to match the resources, which must + * start with a /. + * @return A Set containing the directory listing, or {@code null} if there + * are no resources in the web application whose path begins with + * the supplied path. */ public Set<String> getResourcePaths(final String path) { - final Bundle localBundle = this.bundle; - if (path != null && localBundle != null) { - final Enumeration<URL> e = localBundle.findEntries(path, null, false); + if ((path != null) && (bundle != null)) { + final Enumeration<URL> e = bundle.findEntries(path, null, false); if (e != null) { - final Set<String> result = new HashSet<String>(); + final Set<String> result = new LinkedHashSet<String>(); while (e.hasMoreElements()) { result.add(e.nextElement().getPath()); } @@ -297,12 +296,13 @@ public abstract class ServletContextHelper { * Gets the real path corresponding to the given virtual path. * * <p> - * Called by the Http Whiteboard Implementation to support the + * Called by the Http Whiteboard implementation to support the * {@code ServletContext} method {@code getRealPath} for whiteboard * services. * - * @param path the virtual path to be translated to a real path - * @return the real path, or null if the translation cannot be performed + * @param path The virtual path to be translated to a real path. + * @return The real path, or {@code null} if the translation cannot be + * performed. */ public String getRealPath(final String path) { return null; diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/package-info.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/package-info.java index 906ef6142..b6795f268 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/package-info.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/context/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2010, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2010, 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. @@ -15,7 +15,7 @@ */ /** - * Http Service Context Package Version 1.0. + * Http Whiteboard Context Package Version 1.0. * * <p> * Bundles wishing to use this package must list the package in the diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntime.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntime.java index d854f839a..09d6cb78e 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntime.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2012, 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. @@ -21,15 +21,15 @@ import org.osgi.service.http.runtime.dto.RequestInfoDTO; import org.osgi.service.http.runtime.dto.RuntimeDTO; /** - * The {@code HttpServiceRuntime} service represents the runtime information of - * a Http (Whiteboard) Implementation. + * The HttpServiceRuntime service represents the runtime information of an Http + * Whiteboard implementation. * * <p> * It provides access to DTOs representing the current state of the service. * <p> - * The {@code HttpServiceRuntime} service must at least be registered with the - * {@link HttpServiceRuntimeConstants#HTTP_SERVICE_ENDPOINT_ATTRIBUTE} - * attribute. + * The HttpServiceRuntime service must be registered with the + * {@link HttpServiceRuntimeConstants#HTTP_SERVICE_ENDPOINT} service + * property. * * @ThreadSafe * @author $Id$ @@ -39,17 +39,18 @@ public interface HttpServiceRuntime { /** * Return the runtime DTO representing the current state. - * @return The runtime DTO + * + * @return The runtime DTO. */ public RuntimeDTO getRuntimeDTO(); - + /** - * Return a request info DTO containing the services - * involved with processing a request for the given - * path. - * @param path The request path, relative to the root of the - * Http (Whiteboard) Service. - * @return A request info DTO + * Return a request info DTO containing the services involved with + * processing a request for the specified path. + * + * @param path The request path, relative to the root of the Http Whiteboard + * implementation. + * @return The request info DTO for the specified path. */ public RequestInfoDTO calculateRequestInfoDTO(String path); } diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntimeConstants.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntimeConstants.java index 7853f0ddc..264c3ae61 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntimeConstants.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/HttpServiceRuntimeConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2012, 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. @@ -16,7 +16,6 @@ package org.osgi.service.http.runtime; - /** * Defines standard names for Http Runtime Service constants. * @@ -28,38 +27,40 @@ public final class HttpServiceRuntimeConstants { } /** - * Http Runtime Service registration property specifying the endpoints upon - * which the Http Service Runtime is listening. + * Http Runtime Service service property specifying the endpoints upon which + * the Http Whiteboard implementation is listening. * * <p> - * An endpoint value is a URL or a relative path, to which the Http service - * runtime is listening. For example, {@code http://192.168.1.10:8080/} or - * {@code /myapp/}. A relative path may be used if the scheme and authority - * parts of the URL are not known, e.g. in a bridged Http Service - * implementation. If the Http Service implementation is serving the root - * context and neither scheme nor authority is known, the value of the - * property is "/". Both, a URL and a relative path, must end with a slash. + * An endpoint value is a URL or a relative path, to which the Http + * Whiteboard implementation is listening. For example, + * {@code http://192.168.1.10:8080/} or {@code /myapp/}. A relative path may + * be used if the scheme and authority parts of the URL are not known, e.g. + * in a bridged Http Whiteboard implementation. If the Http Whiteboard + * implementation is serving the root context and neither scheme nor + * authority is known, the value of the property is "/". Both, a URL and a + * relative path, must end with a slash. * <p> - * An Http Service Runtime can be listening on multiple endpoints. + * An Http Whiteboard implementation can be listening on multiple endpoints. * * <p> - * The value of this attribute must be of type {@code String}, + * The value of this service property must be of type {@code String}, * {@code String[]}, or {@code Collection<String>}. */ - public static final String HTTP_SERVICE_ENDPOINT_ATTRIBUTE = "osgi.http.endpoint"; + public static final String HTTP_SERVICE_ENDPOINT = "osgi.http.endpoint"; /** - * Http Runtime Service registration property to associate the Http Runtime - * Service with one or more Http Service registrations. + * Http Runtime Service service property to associate the Http Runtime + * Service with one or more HttpService services. * * <p> * If this Http Whiteboard implementation also implements the Http Service - * Specification this property is set to a collection of {@code service.id} - * for the {@code HttpService} registrations provided by this - * implementation. + * Specification, this service property is set to a collection of + * {@code service.id} for the {@code HttpService} services registered by + * this implementation. * * <p> - * The value of this attribute must be of type {@code Collection<Long>}. + * The value of this service property must be of type + * {@code Collection<Long>}. */ - public static final String HTTP_SERVICE_ID_ATTRIBUTE = "osgi.http.service.id"; + public static final String HTTP_SERVICE_ID = "osgi.http.service.id"; } diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/DTOConstants.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/DTOConstants.java index 69942753b..52e5fed38 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/DTOConstants.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/DTOConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2012, 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,65 +25,52 @@ public final class DTOConstants { } /** - * Failure reason is unknown - * <p> - * The value of {@code FAILURE_REASON_UNKNOWN} is 0. + * Failure reason is unknown. */ - public static final int FAILURE_REASON_UNKNOWN = 0; + public static final int FAILURE_REASON_UNKNOWN = 0; /** * No matching {@code ServletContextHelper}. - * <p> - * The value of {@code FAILURE_REASON_NO_SERVLET_CONTEXT_MATCHING} is 1. **/ public static final int FAILURE_REASON_NO_SERVLET_CONTEXT_MATCHING = 1; /** * Matching {@code ServletContextHelper}, but the context is not used due to * a problem with the context. - * <p> - * The value of {@code FAILURE_REASON_SERVLET_CONTEXT_FAILURE} is 2. */ public static final int FAILURE_REASON_SERVLET_CONTEXT_FAILURE = 2; /** - * Service is shadowed by another service, e.g. a service with the same - * registration properties but a higher service ranking. + * Service is shadowed by another service. * <p> - * The value of {@code FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE} is 3. + * For example, a service with the same service properties but a higher + * service ranking. */ public static final int FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE = 3; /** - * An exception occurred during initializing of the service. This reason can - * only happen for servlets and servlet filters. + * An exception occurred during initializing of the service. * <p> - * The value of {@code FAILURE_REASON_EXCEPTION_ON_INIT} is 4. + * This reason can only happen for servlets and servlet filters. */ public static final int FAILURE_REASON_EXCEPTION_ON_INIT = 4; /** * The service is registered in the service registry but getting the service * fails as it returns {@code null}. - * <p> - * The value of {@code FAILURE_REASON_SERVICE_NOT_GETTABLE} is 5. */ public static final int FAILURE_REASON_SERVICE_NOT_GETTABLE = 5; /** - * The service is registered in the service registry but the provided - * registration properties are invalid. - * <p> - * The value of {@code FAILURE_REASON_VALIDATION_FAILED} is 6. + * The service is registered in the service registry but the service + * properties are invalid. */ public static final int FAILURE_REASON_VALIDATION_FAILED = 6; /** * The service is not registered as a prototype scoped service and is - * already used with one servlet context and therefore can't be used with + * already in use with a servlet context and therefore can't be used with * another servlet context. - * <p> - * The value of {@code FAILURE_REASON_SERVICE_ALREAY_USED} is 7. */ - public static final int FAILURE_REASON_SERVICE_ALREAY_USED = 7; + public static final int FAILURE_REASON_SERVICE_IN_USE = 7; } diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/package-info.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/package-info.java index 77c57c18e..f1721da50 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/package-info.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/dto/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2010, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2010, 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. @@ -15,7 +15,7 @@ */ /** - * Http Service Runtime DTO Package Version 1.0. + * Http Runtime DTO Package Version 1.0. * * <p> * Bundles wishing to use this package must list the package in the diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/package-info.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/package-info.java index 80f86d1fe..77af772c1 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/package-info.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/runtime/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2010, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2010, 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. @@ -15,7 +15,7 @@ */ /** - * Http Service Runtime Package Version 1.0. + * Http Runtime Package Version 1.0. * * <p> * Bundles wishing to use this package must list the package in the 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 dd4a0f8f2..e92aca8f2 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 @@ -22,7 +22,7 @@ import org.osgi.service.http.context.ServletContextHelper; import org.osgi.service.http.runtime.HttpServiceRuntimeConstants; /** - * Defines standard constants for the whiteboard services. + * Defines standard constants for the Http Whiteboard services. * * @author $Id$ */ @@ -54,7 +54,7 @@ public final class HttpWhiteboardConstants { * @see #HTTP_WHITEBOARD_CONTEXT_SELECT * @see #HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME */ - public static final String HTTP_WHITEBOARD_CONTEXT_NAME = "osgi.http.whiteboard.context.name"; + public static final String HTTP_WHITEBOARD_CONTEXT_NAME = "osgi.http.whiteboard.context.name"; /** * The name of the default {@link ServletContextHelper}. If a service is @@ -63,7 +63,7 @@ public final class HttpWhiteboardConstants { * * @see #HTTP_WHITEBOARD_CONTEXT_NAME */ - public static final String HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME = "default"; + public static final String HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME = "default"; /** * Service property specifying the path of an {@link ServletContextHelper} @@ -88,7 +88,7 @@ public final class HttpWhiteboardConstants { * @see #HTTP_WHITEBOARD_CONTEXT_NAME * @see #HTTP_WHITEBOARD_CONTEXT_SELECT */ - public static final String HTTP_WHITEBOARD_CONTEXT_PATH = "osgi.http.whiteboard.context.path"; + public static final String HTTP_WHITEBOARD_CONTEXT_PATH = "osgi.http.whiteboard.context.path"; /** * Service property prefix referencing a {@link ServletContextHelper} @@ -132,7 +132,7 @@ public final class HttpWhiteboardConstants { * @see #HTTP_WHITEBOARD_CONTEXT_NAME * @see #HTTP_WHITEBOARD_CONTEXT_PATH */ - public static final String HTTP_WHITEBOARD_CONTEXT_SELECT = "osgi.http.whiteboard.context.select"; + public static final String HTTP_WHITEBOARD_CONTEXT_SELECT = "osgi.http.whiteboard.context.select"; /** * Service property specifying the servlet name of a {@code Servlet} @@ -155,7 +155,7 @@ public final class HttpWhiteboardConstants { * <p> * The value of this service property must be of type {@code String}. */ - public static final String HTTP_WHITEBOARD_SERVLET_NAME = "osgi.http.whiteboard.servlet.name"; + public static final String HTTP_WHITEBOARD_SERVLET_NAME = "osgi.http.whiteboard.servlet.name"; /** * Service property specifying the request mappings for a {@code Servlet} @@ -172,7 +172,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 12.2 Specification of Mappings" */ - public static final String HTTP_WHITEBOARD_SERVLET_PATTERN = "osgi.http.whiteboard.servlet.pattern"; + public static final String HTTP_WHITEBOARD_SERVLET_PATTERN = "osgi.http.whiteboard.servlet.pattern"; /** * Service property specifying whether a {@code Servlet} service acts as an @@ -190,7 +190,7 @@ public final class HttpWhiteboardConstants { * The value of this service property must be of type {@code String}, * {@code String[]}, or {@code Collection<String>}. */ - public static final String HTTP_WHITEBOARD_SERVLET_ERROR_PAGE = "osgi.http.whiteboard.servlet.errorPage"; + public static final String HTTP_WHITEBOARD_SERVLET_ERROR_PAGE = "osgi.http.whiteboard.servlet.errorPage"; /** * Service property specifying whether a {@code Servlet} service supports @@ -204,7 +204,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 2.3.3.3 Asynchronous Processing" */ - public static final String HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED = "osgi.http.whiteboard.servlet.asyncSupported"; + public static final String HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED = "osgi.http.whiteboard.servlet.asyncSupported"; /** * Service property prefix referencing a {@link Servlet} service. @@ -242,7 +242,7 @@ public final class HttpWhiteboardConstants { * <p> * The value of this service property must be of type {@code String}. */ - public static final String HTTP_WHITEBOARD_FILTER_NAME = "osgi.http.whiteboard.filter.name"; + public static final String HTTP_WHITEBOARD_FILTER_NAME = "osgi.http.whiteboard.filter.name"; /** * Service property specifying the request mappings for a {@code Filter} @@ -260,7 +260,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 12.2 Specification of Mappings" */ - public static final String HTTP_WHITEBOARD_FILTER_PATTERN = "osgi.http.whiteboard.filter.pattern"; + public static final String HTTP_WHITEBOARD_FILTER_PATTERN = "osgi.http.whiteboard.filter.pattern"; /** * Service property specifying the {@link #HTTP_WHITEBOARD_SERVLET_NAME @@ -270,13 +270,13 @@ public final class HttpWhiteboardConstants { * The specified names are used to determine the servlets whose requests * should be mapped to the servlet filter. Servlet filter services without * this service property or the {@link #HTTP_WHITEBOARD_FILTER_PATTERN} or - * the {@link #HTTP_WHITEBOARD_FILTER_REGEX} service propertyare ignored. + * the {@link #HTTP_WHITEBOARD_FILTER_REGEX} service property are ignored. * * <p> * The value of this service property must be of type {@code String}, * {@code String[]}, or {@code Collection<String>}. */ - public static final String HTTP_WHITEBOARD_FILTER_SERVLET = "osgi.http.whiteboard.filter.servlet"; + public static final String HTTP_WHITEBOARD_FILTER_SERVLET = "osgi.http.whiteboard.filter.servlet"; /** * Service property specifying the request mappings for a servlet @@ -296,7 +296,7 @@ public final class HttpWhiteboardConstants { * * @see "java.util.regex.Pattern" */ - public static final String HTTP_WHITEBOARD_FILTER_REGEX = "osgi.http.whiteboard.filter.regex"; + public static final String HTTP_WHITEBOARD_FILTER_REGEX = "osgi.http.whiteboard.filter.regex"; /** * Service property specifying whether a servlet {@code Filter} service @@ -311,7 +311,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 2.3.3.3 Asynchronous Processing" */ - public static final String HTTP_WHITEBOARD_FILTER_ASYNC_SUPPORTED = "osgi.http.whiteboard.filter.asyncSupported"; + public static final String HTTP_WHITEBOARD_FILTER_ASYNC_SUPPORTED = "osgi.http.whiteboard.filter.asyncSupported"; /** * Service property specifying the dispatcher handling of a servlet @@ -330,7 +330,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 6.2.5 Filters and the RequestDispatcher" */ - public static final String HTTP_WHITEBOARD_FILTER_DISPATCHER = "osgi.http.whiteboard.filter.dispatcher"; + public static final String HTTP_WHITEBOARD_FILTER_DISPATCHER = "osgi.http.whiteboard.filter.dispatcher"; /** * Service property prefix referencing a {@link Filter} service. @@ -369,7 +369,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 6.2.5 Filters and the RequestDispatcher" */ - public static final String DISPATCHER_REQUEST = "REQUEST"; + public static final String DISPATCHER_REQUEST = "REQUEST"; /** * Possible value for the {@link #HTTP_WHITEBOARD_FILTER_DISPATCHER} @@ -378,7 +378,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 6.2.5 Filters and the RequestDispatcher" */ - public static final String DISPATCHER_INCLUDE = "INCLUDE"; + public static final String DISPATCHER_INCLUDE = "INCLUDE"; /** * Possible value for the {@link #HTTP_WHITEBOARD_FILTER_DISPATCHER} @@ -387,7 +387,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 6.2.5 Filters and the RequestDispatcher" */ - public static final String DISPATCHER_FORWARD = "FORWARD"; + public static final String DISPATCHER_FORWARD = "FORWARD"; /** * Possible value for the {@link #HTTP_WHITEBOARD_FILTER_DISPATCHER} @@ -396,7 +396,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 6.2.5 Filters and the RequestDispatcher" */ - public static final String DISPATCHER_ASYNC = "ASYNC"; + public static final String DISPATCHER_ASYNC = "ASYNC"; /** * Possible value for the {@link #HTTP_WHITEBOARD_FILTER_DISPATCHER} @@ -405,7 +405,7 @@ public final class HttpWhiteboardConstants { * * @see "Java Servlet Specification Version 3.0, Section 6.2.5 Filters and the RequestDispatcher" */ - public static final String DISPATCHER_ERROR = "ERROR"; + public static final String DISPATCHER_ERROR = "ERROR"; /** * Service property specifying the request mappings for resources. @@ -422,7 +422,7 @@ public final class HttpWhiteboardConstants { * @see "Java Servlet Specification Version 3.0, Section 12.2 Specification of Mappings" * @see #HTTP_WHITEBOARD_RESOURCE_PREFIX */ - public static final String HTTP_WHITEBOARD_RESOURCE_PATTERN = "osgi.http.whiteboard.resource.pattern"; + public static final String HTTP_WHITEBOARD_RESOURCE_PATTERN = "osgi.http.whiteboard.resource.pattern"; /** * Service property specifying the resource entry prefix for a resource @@ -444,26 +444,27 @@ public final class HttpWhiteboardConstants { * * @see #HTTP_WHITEBOARD_RESOURCE_PATTERN */ - public static final String HTTP_WHITEBOARD_RESOURCE_PREFIX = "osgi.http.whiteboard.resource.prefix"; + public static final String HTTP_WHITEBOARD_RESOURCE_PREFIX = "osgi.http.whiteboard.resource.prefix"; /** * Service property specifying the target filter to select the Http - * Whiteboard Implementation to process the service. + * Whiteboard implementation to process the service. * * <p> - * An Http Whiteboard Implementation can define any number of attributes - * which can be referenced by the target filter. The attributes should - * always include the - * {@link HttpServiceRuntimeConstants#HTTP_SERVICE_ENDPOINT_ATTRIBUTE - * osgi.http.endpoint} attribute if the endpoint information is known. + * An Http Whiteboard implementation can define any number of service + * properties which can be referenced by the target filter. The service + * properties should always include the + * {@link HttpServiceRuntimeConstants#HTTP_SERVICE_ENDPOINT + * osgi.http.endpoint} service property if the endpoint information is + * known. * * <p> * If this service property is not specified, then all Http Whiteboard - * Implementations can process the service. + * implementations can process the service. * * <p> * The value of this service property must be of type {@code String} and be * a valid {@link Filter filter string}. */ - public static final String HTTP_WHITEBOARD_TARGET = "osgi.http.whiteboard.target"; + public static final String HTTP_WHITEBOARD_TARGET = "osgi.http.whiteboard.target"; } diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/package-info.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/package-info.java index ed71ba3bf..033e5c048 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/package-info.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/http/whiteboard/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2010, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2010, 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. @@ -15,7 +15,7 @@ */ /** - * Http Service Whiteboard Package Version 1.0. + * Http Whiteboard Package Version 1.0. * * <p> * Bundles wishing to use this package must list the package in the diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/AttributeDefinition.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/AttributeDefinition.java index 33ebf7fd6..057587a3c 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/AttributeDefinition.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/AttributeDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2001, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2001, 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. @@ -153,7 +153,7 @@ public interface AttributeDefinition { * 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 + * organizations 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 diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/ObjectClassDefinition.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/ObjectClassDefinition.java index 263c105a1..0db886aca 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/ObjectClassDefinition.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/metatype/ObjectClassDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2001, 2014). All Rights Reserved. + * Copyright (c) OSGi Alliance (2001, 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. @@ -67,7 +67,7 @@ public interface ObjectClassDefinition { * 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 + * organizations 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 diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/provisioning/ProvisioningService.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/provisioning/ProvisioningService.java index 50e49f069..475106113 100644 --- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/provisioning/ProvisioningService.java +++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/provisioning/ProvisioningService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2002, 2013). All Rights Reserved. + * Copyright (c) OSGi Alliance (2002, 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. @@ -115,8 +115,8 @@ public interface ProvisioningService { public final static String MIME_STRING = "text/plain;charset=utf-8"; /** - * MIME type to be stored stored in the extra field of a {@code ZipEntry} - * object for {@code byte[]} data. + * MIME type to be stored in the extra field of a {@code ZipEntry} object + * for {@code byte[]} data. */ public final static String MIME_BYTE_ARRAY = "application/octet-stream"; |