Package io.wcm.caravan.jaxrs.publisher
Class ApplicationPath
- java.lang.Object
-
- io.wcm.caravan.jaxrs.publisher.ApplicationPath
-
@ProviderType public final class ApplicationPath extends Object
Gets JAX-RS application path (URI prefix) from OSGi header of the current bundle.
-
-
Field Summary
Fields Modifier and Type Field Description static String
HEADER_APPLICATON_PATH
OSGi bundle header name that defines the "application path" (URI prefix) for all JAX-RS services in the bundle.static String
PROPERTY_APPLICATON_PATH
OSGi service property name that defines the "application path" (URI prefix).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
get(org.osgi.framework.Bundle bundle)
Get JAX-RS application path for bundle.static String
get(org.osgi.framework.BundleContext bundleContext)
Get JAX-RS application path for bundle or bundle context.static String
get(org.osgi.service.component.ComponentContext componentContext)
Get JAX-RS application path for bundle of component context.
-
-
-
Field Detail
-
HEADER_APPLICATON_PATH
public static final String HEADER_APPLICATON_PATH
OSGi bundle header name that defines the "application path" (URI prefix) for all JAX-RS services in the bundle.- See Also:
- Constant Field Values
-
PROPERTY_APPLICATON_PATH
public static final String PROPERTY_APPLICATON_PATH
OSGi service property name that defines the "application path" (URI prefix). This property set is automatically set for "global" JAX-RS components.- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static String get(org.osgi.framework.Bundle bundle)
Get JAX-RS application path for bundle.- Parameters:
bundle
- Bundle- Returns:
- Application path or null if not defined
-
get
public static String get(org.osgi.framework.BundleContext bundleContext)
Get JAX-RS application path for bundle or bundle context.- Parameters:
bundleContext
- Bundle context- Returns:
- Application path or null if not defined
-
get
public static String get(org.osgi.service.component.ComponentContext componentContext)
Get JAX-RS application path for bundle of component context. If the component context is from an "global" JAx-RS Component the application path for which the service instance was created is returned.- Parameters:
componentContext
- Component Context- Returns:
- Application path or null if not defined
-
-