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

java.lang.Object
  extended by com.sun.ws.rest.api.core.DefaultResourceConfig
All Implemented Interfaces:
ResourceConfig
Direct Known Subclasses:
ClasspathResourceConfig, PackagesResourceConfig

public class DefaultResourceConfig
extends java.lang.Object
implements ResourceConfig

A mutable implementation of ResourceConfig that declares default values for features.

The set of features and properties may be modified by modifying the instances returned from the methods ResourceConfig.getFeatures() and ResourceConfig.getProperties() respectively.


Field Summary
 
Fields inherited from interface com.sun.ws.rest.api.core.ResourceConfig
FEATURE_CANONICALIZE_URI_PATH, FEATURE_IMPLICIT_VIEWABLES, FEATURE_MATCH_MATRIX_PARAMS, FEATURE_NORMALIZE_URI, FEATURE_REDIRECT, PROPERTY_DEFAULT_RESOURCE_PROVIDER_CLASS
 
Constructor Summary
DefaultResourceConfig()
           
DefaultResourceConfig(java.lang.Class... resources)
           
DefaultResourceConfig(java.util.Set<java.lang.Class> resources)
           
 
Method Summary
 boolean getFeature(java.lang.String featureName)
          Get the value of a feature.
 java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
          Get the map of features associated with the Web application.
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Get the map of properties associated with the Web application.
 java.lang.Object getProperty(java.lang.String propertyName)
          Get the value of a property.
 java.util.Set<java.lang.Class> getProviderClasses()
          Get the set of provider classes to be instantiated in the scope of the Web application.
 java.util.Set<java.lang.Class> getResourceClasses()
          Get the set of root resource classes to be deployed by the Web application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceConfig

public DefaultResourceConfig()

DefaultResourceConfig

public DefaultResourceConfig(java.lang.Class... resources)
Parameters:
resources - the initial set of root resource classes

DefaultResourceConfig

public DefaultResourceConfig(java.util.Set<java.lang.Class> resources)
Parameters:
resources - the initial set of root resource classes
Method Detail

getResourceClasses

public java.util.Set<java.lang.Class> getResourceClasses()
Description copied from interface: ResourceConfig
Get the set of root resource classes to be deployed by the Web application.

A root resource class is a Java class with a Path annotation declared on the class.

Specified by:
getResourceClasses in interface ResourceConfig
Returns:
the set of root resource classes. The returned value shall never be null.

getProviderClasses

public java.util.Set<java.lang.Class> getProviderClasses()
Description copied from interface: ResourceConfig
Get the set of provider classes to be instantiated in the scope of the Web application.

A provider class is a Java class with a Provider annotation declared on the class that implements a specific service interface.

Specified by:
getProviderClasses in interface ResourceConfig
Returns:
the set of provider classes. The returned value shall never be null.

getFeatures

public java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
Description copied from interface: ResourceConfig
Get the map of features associated with the Web application.

Specified by:
getFeatures in interface ResourceConfig
Returns:
the features. The returned value shall never be null.

getFeature

public boolean getFeature(java.lang.String featureName)
Description copied from interface: ResourceConfig
Get the value of a feature.

Specified by:
getFeature in interface ResourceConfig
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 java.util.Map<java.lang.String,java.lang.Object> getProperties()
Description copied from interface: ResourceConfig
Get the map of properties associated with the Web application.

Specified by:
getProperties in interface ResourceConfig
Returns:
the properties. The returned value shall never be null.

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Description copied from interface: ResourceConfig
Get the value of a property.

Specified by:
getProperty in interface ResourceConfig
Parameters:
propertyName - the property name.
Returns:
the property, or null if there is no property present for the given property name.