public final class WadlApplicationContextImpl extends java.lang.Object implements WadlApplicationContext
Modifier and Type | Field and Description |
---|---|
(package private) static javax.xml.bind.JAXBElement |
EXTENDED_ELEMENT
Jersey WADL extension XML element.
|
private InjectionManager |
injectionManager |
private javax.xml.bind.JAXBContext |
jaxbContext |
private static java.util.logging.Logger |
LOGGER |
private ExtendedResourceContext |
resourceContext |
(package private) static java.lang.String |
WADL_JERSEY_NAMESPACE
Jersey WADL extension XML namespace.
|
private boolean |
wadlGenerationEnabled |
private WadlGeneratorConfig |
wadlGeneratorConfig |
Constructor and Description |
---|
WadlApplicationContextImpl(InjectionManager injectionManager,
javax.ws.rs.core.Configuration configuration,
ExtendedResourceContext resourceContext)
Injection constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
attachExternalGrammar(Application application,
ApplicationDescription applicationDescription,
java.net.URI requestURI)
Update the application object to include the generated grammar objects.
|
ApplicationDescription |
getApplication(javax.ws.rs.core.UriInfo uriInfo,
boolean detailedWadl)
Get a new instance of a
ApplicationDescription corresponding to all
the root resource classes, and configure the base URI. |
Application |
getApplication(javax.ws.rs.core.UriInfo info,
Resource resource,
boolean detailedWadl)
Get a new instance of
Application for a particular resource. |
javax.xml.bind.JAXBContext |
getJAXBContext()
Get the default JAXB context associated with the
WadlGenerator
for the Web application. |
private WadlBuilder |
getWadlBuilder(boolean detailedWadl,
javax.ws.rs.core.UriInfo uriInfo) |
boolean |
isWadlGenerationEnabled()
Get WADL generation status.
|
void |
setWadlGenerationEnabled(boolean wadlGenerationEnabled)
Enable/disable WADL generation.
|
private static final java.util.logging.Logger LOGGER
static final java.lang.String WADL_JERSEY_NAMESPACE
static final javax.xml.bind.JAXBElement EXTENDED_ELEMENT
private final ExtendedResourceContext resourceContext
private final InjectionManager injectionManager
private final WadlGeneratorConfig wadlGeneratorConfig
private final javax.xml.bind.JAXBContext jaxbContext
private volatile boolean wadlGenerationEnabled
@Inject public WadlApplicationContextImpl(InjectionManager injectionManager, javax.ws.rs.core.Configuration configuration, ExtendedResourceContext resourceContext)
injectionManager
- injection manager.configuration
- runtime application configuration.resourceContext
- extended resource context.public ApplicationDescription getApplication(javax.ws.rs.core.UriInfo uriInfo, boolean detailedWadl)
WadlApplicationContext
ApplicationDescription
corresponding to all
the root resource classes, and configure the base URI.getApplication
in interface WadlApplicationContext
uriInfo
- the URI information from which the base URI is set on the
WADL application.detailedWadl
- flag indicating whether or not detailed WADL should be generated.public Application getApplication(javax.ws.rs.core.UriInfo info, Resource resource, boolean detailedWadl)
WadlApplicationContext
Application
for a particular resource.getApplication
in interface WadlApplicationContext
info
- the URI information from which the base URI is set on the
WADL application.resource
- the resource to build the Application fordetailedWadl
- flag indicating whether or not detailed WADL should be generated.public javax.xml.bind.JAXBContext getJAXBContext()
WadlApplicationContext
WadlGenerator
for the Web application.getJAXBContext
in interface WadlApplicationContext
private WadlBuilder getWadlBuilder(boolean detailedWadl, javax.ws.rs.core.UriInfo uriInfo)
public void setWadlGenerationEnabled(boolean wadlGenerationEnabled)
WadlApplicationContext
setWadlGenerationEnabled
in interface WadlApplicationContext
wadlGenerationEnabled
- if wadlGenerationEnabled is true and
ServerProperties.WADL_FEATURE_DISABLE
is false, WADL generation is enabled. In all other cases is disabled.public boolean isWadlGenerationEnabled()
WadlApplicationContext
isWadlGenerationEnabled
in interface WadlApplicationContext
ServerProperties.WADL_FEATURE_DISABLE
private void attachExternalGrammar(Application application, ApplicationDescription applicationDescription, java.net.URI requestURI)