Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ExportedService.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ExportedService.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ExportedService.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ExportedService.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,104 @@ +/* + * Copyright (c) OSGi Alliance (2016, 2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.framework.Constants; +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.cdi.annotations.FactoryComponent; +import org.osgi.service.cdi.annotations.Service; +import org.osgi.service.cdi.annotations.SingleComponent; + +/** + * Component Property Type for the remote service properties for an exported + * service. + * <p> + * This annotation can be used with {@link SingleComponent}, + * {@link FactoryComponent} or {@link Service} to declare the value of + * the remote service properties for an exported service. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface ExportedService { + /** + * Service property marking the service for export. It defines the + * interfaces under which the service can be exported. + * <p> + * If an empty array is specified, the property is not added to the + * component description. + * + * @return The exported service interfaces. + * @see Constants#SERVICE_EXPORTED_INTERFACES + */ + Class< ? >[] service_exported_interfaces(); + + /** + * Service property identifying the configuration types that should be used + * to export the service. + * <p> + * If an empty array is specified, the default value, the property is not + * added to the component description. + * + * @return The configuration types. + * @see Constants#SERVICE_EXPORTED_CONFIGS + */ + String[] service_exported_configs() default {}; + + /** + * Service property identifying the intents that the distribution provider + * must implement to distribute the service. + * <p> + * If an empty array is specified, the default value, the property is not + * added to the component description. + * + * @return The intents that the distribution provider must implement to + * distribute the service. + * @see Constants#SERVICE_EXPORTED_INTENTS + */ + String[] service_exported_intents() default {}; + + /** + * Service property identifying the extra intents that the distribution + * provider must implement to distribute the service. + * <p> + * If an empty array is specified, the default value, the property is not + * added to the component description. + * + * @return The extra intents that the distribution provider must implement + * to distribute the service. + * @see Constants#SERVICE_EXPORTED_INTENTS_EXTRA + */ + String[] service_exported_intents_extra() default {}; + + /** + * Service property identifying the intents that the distribution provider + * must implement to distribute the service. + * <p> + * If an empty array is specified, the default value, the property is not + * added to the component description. + * + * @return The intents that the service implements. + * @see Constants#SERVICE_INTENTS + */ + String[] service_intents() default {}; +}
Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContext.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContext.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContext.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContext.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,68 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.context.name} and + * {@code osgi.http.whiteboard.context.path} service properties. + * <p> + * This annotation can be used on a + * {@link org.osgi.service.http.context.ServletContextHelper + * ServletContextHelper} to declare the values of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_NAME + * HTTP_WHITEBOARD_CONTEXT_NAME} and + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_PATH + * HTTP_WHITEBOARD_CONTEXT_PATH} service properties. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardContext { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi.http.whiteboard.context."; + + /** + * Service property identifying a servlet context helper name. + * + * @return The context name. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_NAME + * HTTP_WHITEBOARD_CONTEXT_NAME + */ + String name(); + + /** + * Service property identifying a servlet context helper path. + * + * @return The context path. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_PATH + * HTTP_WHITEBOARD_CONTEXT_PATH + */ + String path(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContextSelect.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContextSelect.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContextSelect.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContextSelect.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,55 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.context.select} + * service property. + * <p> + * This annotation can be used on a Http Whiteboard component to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT + * HTTP_WHITEBOARD_CONTEXT_SELECT} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardContextSelect { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying the select property of a Http Whiteboard + * component. + * + * @return The filter expression. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_CONTEXT_SELECT + * HTTP_WHITEBOARD_CONTEXT_SELECT + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterAsyncSupported.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterAsyncSupported.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterAsyncSupported.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterAsyncSupported.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the + * {@code osgi.http.whiteboard.filter.asyncSupported} service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Filter} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_ASYNC_SUPPORTED + * HTTP_WHITEBOARD_FILTER_ASYNC_SUPPORTED} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardFilterAsyncSupported { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi.http.whiteboard.filter."; + + /** + * Service property identifying the asynchronous support of a filter. + * + * @return Whether the filter supports asynchronous processing. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_ASYNC_SUPPORTED + * HTTP_WHITEBOARD_FILTER_ASYNC_SUPPORTED + */ + boolean asyncSupported() default true; +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterDispatcher.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterDispatcher.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterDispatcher.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterDispatcher.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.servlet.DispatcherType; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the + * {@code osgi.http.whiteboard.filter.dispatcher} service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Filter} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_DISPATCHER + * HTTP_WHITEBOARD_FILTER_DISPATCHER} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardFilterDispatcher { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying dispatcher values for the filter. + * + * @return The dispatcher values for the filter. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_DISPATCHER + * HTTP_WHITEBOARD_FILTER_DISPATCHER + */ + DispatcherType[] value() default DispatcherType.REQUEST; +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterName.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterName.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterName.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterName.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.filter.name} + * service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Filter} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_NAME + * HTTP_WHITEBOARD_FILTER_NAME} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardFilterName { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying a filter name. + * + * @return The filter name. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_NAME + * HTTP_WHITEBOARD_FILTER_NAME + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterPattern.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterPattern.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterPattern.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterPattern.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.filter.pattern} + * service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Filter} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_PATTERN + * HTTP_WHITEBOARD_FILTER_PATTERN} service property. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardFilterPattern { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying filter patterns. + * + * @return The filter patterns. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_PATTERN + * HTTP_WHITEBOARD_FILTER_PATTERN + */ + String[] value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterRegex.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterRegex.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterRegex.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterRegex.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.filter.regex} + * service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Filter} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_REGEX + * HTTP_WHITEBOARD_FILTER_REGEX} service property. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardFilterRegex { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying filter regular expressions. + * + * @return The regular expressions for the filter. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_REGEX + * HTTP_WHITEBOARD_FILTER_REGEX + */ + String[] value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterServlet.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterServlet.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterServlet.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterServlet.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.filter.servlet} + * service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Filter} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_SERVLET + * HTTP_WHITEBOARD_FILTER_SERVLET} service property. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardFilterServlet { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying the servlets for the filter. + * + * @return The servlet names. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_SERVLET + * HTTP_WHITEBOARD_FILTER_SERVLET + */ + String[] value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardListener.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardListener.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardListener.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardListener.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,47 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.listener} service + * property. + * <p> + * This annotation can be used on a Http Whiteboard listener to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_LISTENER + * HTTP_WHITEBOARD_LISTENER} service property as being {@code Boolean.TRUE}. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardListener { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardResource.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardResource.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardResource.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardResource.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,66 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.resource.pattern} + * and {@code osgi.http.whiteboard.resource.prefix} service properties. + * <p> + * This annotation can be used on any service to declare the values of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_RESOURCE_PATTERN + * HTTP_WHITEBOARD_RESOURCE_PATTERN} and + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_RESOURCE_PREFIX + * HTTP_WHITEBOARD_RESOURCE_PREFIX} service properties. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardResource { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi.http.whiteboard.resource."; + + /** + * Service property identifying resource patterns. + * + * @return The resource patterns. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_RESOURCE_PATTERN + * HTTP_WHITEBOARD_RESOURCE_PATTERN + */ + String[] pattern(); + + /** + * Service property identifying resource prefix. + * + * @return The resource patterns. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_RESOURCE_PREFIX + * HTTP_WHITEBOARD_RESOURCE_PREFIX + */ + String prefix(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletAsyncSupported.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletAsyncSupported.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletAsyncSupported.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletAsyncSupported.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the + * {@code osgi.http.whiteboard.servlet.asyncSupported} service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Servlet} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED + * HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardServletAsyncSupported { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi.http.whiteboard.servlet."; + + /** + * Service property identifying the asynchronous support of a servlet. + * + * @return Whether the servlet supports asynchronous processing. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED + * HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED + */ + boolean asyncSupported() default true; +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletErrorPage.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletErrorPage.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletErrorPage.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletErrorPage.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the + * {@code osgi.http.whiteboard.servlet.errorPage} service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Servlet} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_ERROR_PAGE + * HTTP_WHITEBOARD_SERVLET_ERROR_PAGE} service property. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardServletErrorPage { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi.http.whiteboard.servlet."; + + /** + * Service property identifying the error pages of a servlet. + * + * @return The servlet error pages. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_ERROR_PAGE + * HTTP_WHITEBOARD_SERVLET_ERROR_PAGE + */ + String[] errorPage(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletMultipart.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletMultipart.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletMultipart.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletMultipart.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,107 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the + * {@code osgi.http.whiteboard.servlet.multipart.enabled}, + * {@code osgi.http.whiteboard.servlet.multipart.fileSizeThreshold}, + * {@code osgi.http.whiteboard.servlet.multipart.location}, + * {@code osgi.http.whiteboard.servlet.multipart.maxFileSize}, and + * {@code osgi.http.whiteboard.servlet.multipart.maxRequestSize} service + * properties. + * <p> + * This annotation can be used on a {@link javax.servlet.Servlet} to declare the + * values of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_ENABLED + * HTTP_WHITEBOARD_SERVLET_MULTIPART_ENABLED}, + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_FILESIZETHRESHOLD + * HTTP_WHITEBOARD_SERVLET_MULTIPART_FILESIZETHRESHOLD}, + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_LOCATION + * HTTP_WHITEBOARD_SERVLET_MULTIPART_LOCATION}, + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXFILESIZE + * HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXFILESIZE}, and + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXREQUESTSIZE + * HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXREQUESTSIZE} service properties. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardServletMultipart { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi.http.whiteboard.servlet.multipart."; + + /** + * Service property identifying the multipart handling of a servlet. + * + * @return Whether the servlet supports multipart handling. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_ENABLED + * HTTP_WHITEBOARD_SERVLET_MULTIPART_ENABLED + */ + boolean enabled() default true; + + /** + * Service property identifying the file size threshold for a multipart + * request handled by a servlet. + * + * @return The file size threshold for a multipart request.. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_FILESIZETHRESHOLD + * HTTP_WHITEBOARD_SERVLET_MULTIPART_FILESIZETHRESHOLD + */ + int fileSizeThreshold() default 0; + + /** + * Service property identifying the location for a multipart request handled + * by a servlet. + * + * @return The location for a multipart request.. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_LOCATION + * HTTP_WHITEBOARD_SERVLET_MULTIPART_LOCATION + */ + String location() default ""; + + /** + * Service property identifying the max file size for a multipart request + * handled by a servlet. + * + * @return The max file size for a multipart request.. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXFILESIZE + * HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXFILESIZE + */ + long maxFileSize() default -1; + + /** + * Service property identifying the max request size for a multipart request + * handled by a servlet. + * + * @return The max request size for a multipart request.. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXREQUESTSIZE + * HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXREQUESTSIZE + */ + long maxRequestSize() default -1; +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletName.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletName.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletName.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletName.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.servlet.name} + * service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Servlet} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_NAME + * HTTP_WHITEBOARD_SERVLET_NAME} service property. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardServletName { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying a servlet name. + * + * @return The servlet name. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_NAME + * HTTP_WHITEBOARD_SERVLET_NAME + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletPattern.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletPattern.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletPattern.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletPattern.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.http.whiteboard.annotations.RequireHttpWhiteboard; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.servlet.pattern} + * service property. + * <p> + * This annotation can be used on a {@link javax.servlet.Servlet} to declare the + * value of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_PATTERN + * HTTP_WHITEBOARD_SERVLET_PATTERN} service property. + */ +@ComponentPropertyType +@RequireHttpWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardServletPattern { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying servlet patterns. + * + * @return The servlet patterns. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_SERVLET_PATTERN + * HTTP_WHITEBOARD_SERVLET_PATTERN + */ + String[] value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardTarget.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardTarget.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardTarget.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardTarget.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.http.whiteboard.target} service + * property. + * <p> + * This annotation can be used on a Http Whiteboard service to declare the value + * of the + * {@link org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_TARGET + * HTTP_WHITEBOARD_TARGET} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface HttpWhiteboardTarget { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying the Http Whiteboard target. + * + * @return The Http Whiteboard target filter expression. + * @see org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_WHITEBOARD_TARGET + * HTTP_WHITEBOARD_TARGET + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JSONRequired.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JSONRequired.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JSONRequired.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JSONRequired.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,69 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; +import static javax.ws.rs.core.MediaType.*; +import static org.osgi.annotation.bundle.Requirement.Resolution.*; +import static org.osgi.namespace.service.ServiceNamespace.*; +import static org.osgi.resource.Namespace.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.annotation.bundle.Requirement; +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants; +import org.osgi.service.jaxrs.whiteboard.annotations.RequireJaxrsWhiteboard; + +/** + * Component Property Type for requiring JSON media type support using the + * {@link JaxrsWhiteboardConstants#JAX_RS_MEDIA_TYPE} service property. + * <p> + * This annotation can be used on a JAX-RS resource to declare require that JSON + * support is available before the resource becomes active. It also adds an + * optional {@link Requirement} for a service providing this media type to aid + * with provisioning. + */ +@ComponentPropertyType +@RequireJaxrsWhiteboard +@Requirement( + namespace = SERVICE_NAMESPACE, // + filter = JSONRequired.FILTER, // + resolution = OPTIONAL, // + effective = EFFECTIVE_ACTIVE +) +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JSONRequired { + /** + * A filter requiring an <code>osgi.jaxrs.media.type</code> of + * <code>application/json</code> + */ + public static final String FILTER = "(osgi.jaxrs.media.type=" + + APPLICATION_JSON + ")"; + + /** + * Provides an extension selection filter for an extension supporting the + * JSON media type + * + * @return A filter requiring an <code>osgi.jaxrs.media.type</code> of + * <code>application/json</code> + */ + String osgi_jaxrs_extension_select() default FILTER; +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationBase.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationBase.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationBase.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationBase.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,56 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.jaxrs.whiteboard.annotations.RequireJaxrsWhiteboard; + +/** + * Component Property Type for the {@code osgi.jaxrs.application.base} service + * property. + * <p> + * This annotation can be used on a JAX-RS resource or extension to declare the + * value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_APPLICATION_BASE} + * service property. + */ +@ComponentPropertyType +@RequireJaxrsWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsApplicationBase { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property providing a base context URI for a JAX-RS whiteboard + * application. + * + * @return The base URI for this application. + * @see org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_APPLICATION_BASE + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationSelect.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationSelect.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationSelect.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationSelect.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.jaxrs.application.select} service + * property. + * <p> + * This annotation can be used on a JAX-RS resource or extension to declare the + * value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_APPLICATION_SELECT} + * service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsApplicationSelect { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property providing an OSGi filter identifying the application(s) + * to which this service should be bound. + * + * @return The filter for selecting the applications to bind to. + * @see org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_APPLICATION_SELECT + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtension.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtension.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtension.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtension.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,48 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.jaxrs.whiteboard.annotations.RequireJaxrsWhiteboard; + +/** + * Component Property Type for the {@code osgi.jaxrs.extension} service + * property. + * <p> + * This annotation can be used on a JAX-RS service to declare the value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_EXTENSION} + * service property. + */ +@ComponentPropertyType +@RequireJaxrsWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsExtension { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + // This is a marker annotation. +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtensionSelect.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtensionSelect.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtensionSelect.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtensionSelect.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.jaxrs.extension.select} service + * property. + * <p> + * This annotation can be used on a JAX-RS resource or extension to declare the + * value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_EXTENSION_SELECT} + * service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsExtensionSelect { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property providing one or more OSGi filters identifying the + * extension(s) or application features which this service requires to work. + * + * @return The filters for selecting the extensions to require. + * @see org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_EXTENSION_SELECT + */ + String[] value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsMediaType.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsMediaType.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsMediaType.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsMediaType.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.jaxrs.media.type} service + * property. + * <p> + * This annotation can be used on a JAX-RS extension or application to declare + * the value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_MEDIA_TYPE} + * service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsMediaType { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying the name(s) of media types supported by this + * service. + * + * @return The JAX-RS media types supported. + * @see org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_MEDIA_TYPE + */ + String[] value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsName.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsName.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsName.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsName.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,52 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.jaxrs.name} service property. + * <p> + * This annotation can be used on a JAX-RS service to declare the value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_NAME} + * service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsName { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property identifying the name of a JAX-RS service for processing + * by the whiteboard. + * + * @return The JAX-RS service name. + * @see org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_NAME + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsResource.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsResource.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsResource.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsResource.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,47 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.jaxrs.whiteboard.annotations.RequireJaxrsWhiteboard; + +/** + * Component Property Type for the {@code osgi.jaxrs.resource} service property. + * <p> + * This annotation can be used on a JAX-RS resource to declare the value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_RESOURCE} + * service property. + */ +@ComponentPropertyType +@RequireJaxrsWhiteboard +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsResource { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + // This is a marker annotation. +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsWhiteboardTarget.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsWhiteboardTarget.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsWhiteboardTarget.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsWhiteboardTarget.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,54 @@ +/* + * Copyright (c) OSGi Alliance (2017, 2018). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.service.cdi.annotations.ComponentPropertyType; + +/** + * Component Property Type for the {@code osgi.jaxrs.whiteboard.target} service + * property. + * <p> + * This annotation can be used on a JAX-RS resource or extension to declare the + * value of the + * {@link org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_WHITEBOARD_TARGET} + * service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface JaxrsWhiteboardTarget { + /** + * Prefix for the property name. This value is prepended to each property + * name. + */ + String PREFIX_ = "osgi."; + + /** + * Service property providing an OSGi filter identifying the whiteboard(s) + * to which this service should be bound. + * + * @return The filter for selecting the whiteboards to bind to. + * @see org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants#JAX_RS_WHITEBOARD_TARGET + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceDescription.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceDescription.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceDescription.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceDescription.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,49 @@ +/* + * Copyright (c) OSGi Alliance (2016, 2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.framework.Constants; +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.cdi.annotations.FactoryComponent; +import org.osgi.service.cdi.annotations.Service; +import org.osgi.service.cdi.annotations.SingleComponent; + +/** + * Component Property Type for the {@code service.description} service property. + * <p> + * This annotation can be used with {@link SingleComponent}, + * {@link FactoryComponent} or {@link Service} to declare the value of + * the {@link Constants#SERVICE_DESCRIPTION} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface ServiceDescription { + /** + * Service property identifying a service's description. + * + * @return The service description. + * @see Constants#SERVICE_DESCRIPTION + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceRanking.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceRanking.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceRanking.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceRanking.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,49 @@ +/* + * Copyright (c) OSGi Alliance (2016, 2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.framework.Constants; +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.cdi.annotations.FactoryComponent; +import org.osgi.service.cdi.annotations.Service; +import org.osgi.service.cdi.annotations.SingleComponent; + +/** + * Component Property Type for the {@code service.ranking} service property. + * <p> + * This annotation can be used with {@link SingleComponent}, + * {@link FactoryComponent} or {@link Service} to declare the value of + * the {@link Constants#SERVICE_RANKING} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface ServiceRanking { + /** + * Service property identifying a service's ranking. + * + * @return The service ranking. + * @see Constants#SERVICE_RANKING + */ + int value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceVendor.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceVendor.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceVendor.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceVendor.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,49 @@ +/* + * Copyright (c) OSGi Alliance (2016, 2017). 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.apache.aries.cdi.extra.propertytypes; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.osgi.framework.Constants; +import org.osgi.service.cdi.annotations.ComponentPropertyType; +import org.osgi.service.cdi.annotations.FactoryComponent; +import org.osgi.service.cdi.annotations.Service; +import org.osgi.service.cdi.annotations.SingleComponent; + +/** + * Component Property Type for the {@code service.vendor} service property. + * <p> + * This annotation can be used with {@link SingleComponent}, + * {@link FactoryComponent} or {@link Service} to declare the value of + * the {@link Constants#SERVICE_VENDOR} service property. + */ +@ComponentPropertyType +@Retention(RUNTIME) +@Target({FIELD, METHOD, TYPE}) +public @interface ServiceVendor { + /** + * Service property identifying a service's vendor. + * + * @return The service vendor. + * @see Constants#SERVICE_VENDOR + */ + String value(); +} Added: aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/package-info.java URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/package-info.java?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/package-info.java (added) +++ aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/package-info.java Sat Apr 14 01:10:27 2018 @@ -0,0 +1,2 @@ +@org.osgi.annotation.versioning.Version("1.0.0") +package org.apache.aries.cdi.extra.propertytypes; \ No newline at end of file Modified: aries/trunk/cdi/cdi-itests/bnd.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd.bnd Sat Apr 14 01:10:27 2018 @@ -1,12 +1,6 @@ Bundle-Description: Integration Test bundle for the CDI Extender Export-Package: ${p}.cases.*,${p}.interfaces.* -Require-Capability:\ - osgi.cdi.extension;filter:='(&(osgi.cdi.extension=http)(version>=0.0.1)(!(version>=1.0.0)))',\ - osgi.cdi.extension;filter:='(&(osgi.cdi.extension=jndi)(version>=0.0.1)(!(version>=1.0.0)))',\ - osgi.service;filter:="(objectClass=org.osgi.service.cm.ConfigurationAdmin)";effective:=active -Test-Cases: \ - ${classes;CONCRETE;EXTENDS;${p}.cases.AbstractTestCase},\ - ${classes;CONCRETE;ANNOTATED;org.junit.Test} +Test-Cases: ${classes;CONCRETE;ANNOTATED;org.junit.Test} ## ## All of remainder is to make bnd's `-make` function work in our maven project. @@ -31,7 +25,11 @@ p = org.apache.aries.cdi.test tb3.jar,\ tb4.jar,\ tb5.jar,\ - tb6.jar + tb6.jar,\ + tb7.jar,\ + tb8.jar,\ + tb9.jar,\ + tb10.jar # Don't forget that we had to coax the `maven-jar-plugin` NOT to include the `sub-bundle` packages in # the root bundle: Modified: aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd Sat Apr 14 01:10:27 2018 @@ -1,5 +1,6 @@ -Export-Package: ${p}.beans.* +Export-Package: ${p}.beans.*;-split-package:=first Require-Capability:\ - osgi.extender;filter:='(&(osgi.extender=osgi.cdi)(version>=0.0.1)(!(version>=1.0.0)))',\ - osgi.cdi.extension;filter:='(&(osgi.cdi.extension=jndi)(version>=0.0.1)(!(version>=1.0.0)))' --includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/basic-beans.xml \ No newline at end of file + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + extensions:List<String>='(osgi.cdi.extension=aries.cdi.jndi)';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.beans.*}' \ No newline at end of file Modified: aries/trunk/cdi/cdi-itests/bnd/services-one.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/services-one.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/services-one.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/services-one.bnd Sat Apr 14 01:10:27 2018 @@ -1 +1 @@ -Export-Package: ${p}.components.* \ No newline at end of file +Export-Package: ${p}.components.*;-split-package:=first \ No newline at end of file Modified: aries/trunk/cdi/cdi-itests/bnd/tb1.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb1.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb1.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/tb1.bnd Sat Apr 14 01:10:27 2018 @@ -1,3 +1,5 @@ -Export-Package: ${p}.tb1.* -Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)' --includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb1-beans.xml \ No newline at end of file +Export-Package: ${p}.tb1.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb1.*}' \ No newline at end of file Added: aries/trunk/cdi/cdi-itests/bnd/tb10.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb10.bnd?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb10.bnd (added) +++ aries/trunk/cdi/cdi-itests/bnd/tb10.bnd Sat Apr 14 01:10:27 2018 @@ -0,0 +1,5 @@ +Export-Package: ${p}.tb10.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb10.*}' Modified: aries/trunk/cdi/cdi-itests/bnd/tb2.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb2.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb2.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/tb2.bnd Sat Apr 14 01:10:27 2018 @@ -1,3 +1,5 @@ -Export-Package: ${p}.tb2.* -Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)' --includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb2-beans.xml \ No newline at end of file +Export-Package: ${p}.tb2.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb2.*}' \ No newline at end of file Modified: aries/trunk/cdi/cdi-itests/bnd/tb3.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb3.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb3.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/tb3.bnd Sat Apr 14 01:10:27 2018 @@ -1,3 +1,5 @@ -Export-Package: ${p}.tb3.* -Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)' --includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb3-beans.xml \ No newline at end of file +Export-Package: ${p}.tb3.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb3.*}' \ No newline at end of file Modified: aries/trunk/cdi/cdi-itests/bnd/tb4.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb4.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb4.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/tb4.bnd Sat Apr 14 01:10:27 2018 @@ -1,3 +1,5 @@ -Export-Package: ${p}.tb4.* -Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)' --includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb4-beans.xml \ No newline at end of file +Export-Package: ${p}.tb4.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb4.*}' \ No newline at end of file Modified: aries/trunk/cdi/cdi-itests/bnd/tb5.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb5.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb5.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/tb5.bnd Sat Apr 14 01:10:27 2018 @@ -1,3 +1,5 @@ -Export-Package: ${p}.tb5.* -Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)' --includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb5-beans.xml \ No newline at end of file +Export-Package: ${p}.tb5.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb5.*}' \ No newline at end of file Modified: aries/trunk/cdi/cdi-itests/bnd/tb6.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb6.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb6.bnd (original) +++ aries/trunk/cdi/cdi-itests/bnd/tb6.bnd Sat Apr 14 01:10:27 2018 @@ -1,5 +1,6 @@ -Export-Package: ${p}.tb6.* +Export-Package: ${p}.tb6.*;-split-package:=first Require-Capability:\ - osgi.extender;filter:='(&(osgi.extender=osgi.cdi)(version>=0.0.1)(!(version>=1.0.0)))',\ - osgi.cdi.extension;filter:='(&(osgi.cdi.extension=http)(version>=0.0.1)(!(version>=1.0.0)))' --includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb6-beans.xml \ No newline at end of file + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + extensions:List<String>='(osgi.cdi.extension=aries.cdi.http)';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb6.*}' Added: aries/trunk/cdi/cdi-itests/bnd/tb7.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb7.bnd?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb7.bnd (added) +++ aries/trunk/cdi/cdi-itests/bnd/tb7.bnd Sat Apr 14 01:10:27 2018 @@ -0,0 +1,5 @@ +Export-Package: ${p}.tb7.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb7.*}' Added: aries/trunk/cdi/cdi-itests/bnd/tb8.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb8.bnd?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb8.bnd (added) +++ aries/trunk/cdi/cdi-itests/bnd/tb8.bnd Sat Apr 14 01:10:27 2018 @@ -0,0 +1,5 @@ +Export-Package: ${p}.tb8.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb8.*}' Added: aries/trunk/cdi/cdi-itests/bnd/tb9.bnd URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb9.bnd?rev=1829115&view=auto ============================================================================== --- aries/trunk/cdi/cdi-itests/bnd/tb9.bnd (added) +++ aries/trunk/cdi/cdi-itests/bnd/tb9.bnd Sat Apr 14 01:10:27 2018 @@ -0,0 +1,5 @@ +Export-Package: ${p}.tb9.*;-split-package:=first +Require-Capability:\ + osgi.extender;\ + filter:='(&(osgi.extender=osgi.cdi)(version>=1.0.0)(!(version>=2.0.0)))';\ + osgi.beans:List<String>='${classes;PUBLIC;CONCRETE;NAMED;${p}.tb9.*}'