com.sun.ws.rest.api.core
Class ResourceConfig

java.lang.Object
  extended by javax.ws.rs.core.ApplicationConfig
      extended by com.sun.ws.rest.api.core.ResourceConfig
Direct Known Subclasses:
DefaultResourceConfig

public abstract class ResourceConfig
extends javax.ws.rs.core.ApplicationConfig

The resource configuration for configuring a web application.


Field Summary
static java.lang.String FEATURE_CANONICALIZE_URI_PATH
          If true the request URI path component will be canonicalized by removing contiguous slashes (i.e.
static java.lang.String FEATURE_IMPLICIT_VIEWABLES
          If true then the matching algorithm will attempt to match and accept any static content or templates associated with a resource that were not explicitly decared by that resource.
static java.lang.String FEATURE_MATCH_MATRIX_PARAMS
          If true matrix parameters (if present) in the request URI path component will be ignored when matching the path to URI templates declared by resource classes.
static java.lang.String FEATURE_NORMALIZE_URI
          If true the request URI will be normalized as specified by URI.normalize().
static java.lang.String FEATURE_REDIRECT
          If true, and either NORMALIZE_URI or CANONICALIZE_URI_PATH is true, and the normalization and/or path canonicalization operations on the request URI result in a new URI that is not equal to the request URI, then the client is (temporarily) redirected to the new URI.
static java.lang.String PROPERTY_CONTAINER_NOTIFIER
          If set the instance of ContainerNotifier to register ContainerListener instances.
static java.lang.String PROPERTY_DEFAULT_RESOURCE_PROVIDER_CLASS
          If set the default resource provider to be used by the ResourceProviderFactory.
 
Constructor Summary
ResourceConfig()
           
 
Method Summary
abstract  boolean getFeature(java.lang.String featureName)
          Get the value of a feature.
abstract  java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
          Get the map of features associated with the Web application.
abstract  java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Get the map of properties associated with the Web application.
abstract  java.lang.Object getProperty(java.lang.String propertyName)
          Get the value of a property.
 
Methods inherited from class javax.ws.rs.core.ApplicationConfig
getExtensionMappings, getLanguageMappings, getProviderClasses, getResourceClasses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FEATURE_NORMALIZE_URI

public static final java.lang.String FEATURE_NORMALIZE_URI
If true the request URI will be normalized as specified by URI.normalize(). If not true the request URI is not modified.

The default value is false.

See Also:
Constant Field Values

FEATURE_CANONICALIZE_URI_PATH

public static final java.lang.String FEATURE_CANONICALIZE_URI_PATH
If true the request URI path component will be canonicalized by removing contiguous slashes (i.e. all /+ will be replaced by /). If not true the request URI path component is mot modified.

The default value is false.

See Also:
Constant Field Values

FEATURE_REDIRECT

public static final java.lang.String FEATURE_REDIRECT
If true, and either NORMALIZE_URI or CANONICALIZE_URI_PATH is true, and the normalization and/or path canonicalization operations on the request URI result in a new URI that is not equal to the request URI, then the client is (temporarily) redirected to the new URI. Otherwise the request URI is set to be the new URI.

If true, and the path value of a Path annotation ends in a slash, the request URI path does not end in a '/' and would otherwise match the path value if it did, then the client is (temporarily) redirected to a new URI that is the request URI with a '/' appended to the the end of the path.

The default value is false.

See Also:
Constant Field Values

FEATURE_MATCH_MATRIX_PARAMS

public static final java.lang.String FEATURE_MATCH_MATRIX_PARAMS
If true matrix parameters (if present) in the request URI path component will be ignored when matching the path to URI templates declared by resource classes.

The default value is false.

See Also:
Constant Field Values

FEATURE_IMPLICIT_VIEWABLES

public static final java.lang.String FEATURE_IMPLICIT_VIEWABLES
If true then the matching algorithm will attempt to match and accept any static content or templates associated with a resource that were not explicitly decared by that resource.

If a template is matched then the model for the viewable will be the resource instance associated with the template.

The default value is false.

See Also:
Constant Field Values

PROPERTY_DEFAULT_RESOURCE_PROVIDER_CLASS

public static final java.lang.String PROPERTY_DEFAULT_RESOURCE_PROVIDER_CLASS
If set the default resource provider to be used by the ResourceProviderFactory.

The type of this property must be a Java class that implementations ResourceProvider.

If not set the default resource provider will be the per-request resource provider

See Also:
Constant Field Values

PROPERTY_CONTAINER_NOTIFIER

public static final java.lang.String PROPERTY_CONTAINER_NOTIFIER
If set the instance of ContainerNotifier to register ContainerListener instances.

If the instance does not implement the ContainerNotifier then the property is ignored.

See Also:
Constant Field Values
Constructor Detail

ResourceConfig

public ResourceConfig()
Method Detail

getFeatures

public abstract java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
Get the map of features associated with the Web application.

Returns:
the features. The returned value shall never be null.

getFeature

public abstract boolean getFeature(java.lang.String featureName)
Get the value of a feature.

Parameters:
featureName - the feature name.
Returns:
true if the feature is present and set to true, otherwise false if the feature is present and set to false or the feature is not present.

getProperties

public abstract java.util.Map<java.lang.String,java.lang.Object> getProperties()
Get the map of properties associated with the Web application.

Returns:
the properties. The returned value shall never be null.

getProperty

public abstract java.lang.Object getProperty(java.lang.String propertyName)
Get the value of a property.

Parameters:
propertyName - the property name.
Returns:
the property, or null if there is no property present for the given property name.