org.apache.clerezza.triaxrs.prefixmanager
Class TriaxrsPrefixManager

java.lang.Object
  extended by org.apache.clerezza.triaxrs.prefixmanager.TriaxrsPrefixManager
All Implemented Interfaces:
org.apache.clerezza.jaxrs.extensions.prefixmanager.BundlePrefixManager

public class TriaxrsPrefixManager
extends Object
implements org.apache.clerezza.jaxrs.extensions.prefixmanager.BundlePrefixManager

This class provides a function to get the appropriate path prefix for a given bundle.

Author:
mir

Field Summary
static String TRIAXRS_MAPPINGS
          Service property header, which contains the mappings between bundle symbolic names and bundle prefixes.
static String TRIAXRS_USE_CUSTOM_PREFIXES
          Service property header which specifies if the custom path prefix of bundles is used.
static String TRIAXRS_USE_DEFAULT_PREFIXES
          Service property header which specifies, if the default path prefix of bundles is used.
 
Constructor Summary
TriaxrsPrefixManager()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext componentContext)
          The activate method is called when SCR activates the component configuration
protected  void bindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
           
 String getPrefix(org.osgi.framework.Bundle bundle)
          Return the appropriate path prefix for the given bundle
static Dictionary<String,String> parseMappings(String[] mappings)
           
protected  void unbindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
           
static String[] unparseMappings(Dictionary mappings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRIAXRS_MAPPINGS

public static final String TRIAXRS_MAPPINGS
Service property header, which contains the mappings between bundle symbolic names and bundle prefixes.

See Also:
Constant Field Values

TRIAXRS_USE_DEFAULT_PREFIXES

public static final String TRIAXRS_USE_DEFAULT_PREFIXES
Service property header which specifies, if the default path prefix of bundles is used. If the header is not set, the value "true" is assumed.

See Also:
Constant Field Values

TRIAXRS_USE_CUSTOM_PREFIXES

public static final String TRIAXRS_USE_CUSTOM_PREFIXES
Service property header which specifies if the custom path prefix of bundles is used. If the header is not set, the value "true" is assumed.

See Also:
Constant Field Values
Constructor Detail

TriaxrsPrefixManager

public TriaxrsPrefixManager()
Method Detail

getPrefix

public String getPrefix(org.osgi.framework.Bundle bundle)
Return the appropriate path prefix for the given bundle

Specified by:
getPrefix in interface org.apache.clerezza.jaxrs.extensions.prefixmanager.BundlePrefixManager
Parameters:
bundle -
Returns:

parseMappings

public static Dictionary<String,String> parseMappings(String[] mappings)

unparseMappings

public static String[] unparseMappings(Dictionary mappings)

bindConfigurationAdmin

protected void bindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)

unbindConfigurationAdmin

protected void unbindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)

activate

protected void activate(org.osgi.service.component.ComponentContext componentContext)
The activate method is called when SCR activates the component configuration

Parameters:
componentContext -


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.