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 javax.xml.bind.JAXBContext |
jaxbContext |
private static java.util.logging.Logger |
LOGGER |
private ExtendedResourceContext |
resourceContext |
private org.glassfish.hk2.api.ServiceLocator |
serviceLocator |
(package private) static java.lang.String |
WADL_JERSEY_NAMESPACE
Jersey WADL extension XML namespace.
|
private boolean |
wadlGenerationEnabled |
private WadlGeneratorConfig |
wadlGeneratorConfig |
| Constructor and Description |
|---|
WadlApplicationContextImpl(org.glassfish.hk2.api.ServiceLocator serviceLocator,
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 org.glassfish.hk2.api.ServiceLocator serviceLocator
private final WadlGeneratorConfig wadlGeneratorConfig
private final javax.xml.bind.JAXBContext jaxbContext
private volatile boolean wadlGenerationEnabled
@Inject
public WadlApplicationContextImpl(org.glassfish.hk2.api.ServiceLocator serviceLocator,
javax.ws.rs.core.Configuration configuration,
ExtendedResourceContext resourceContext)
serviceLocator - HK2 service locator.configuration - runtime application configuration.resourceContext - extended resource context.public ApplicationDescription getApplication(javax.ws.rs.core.UriInfo uriInfo, boolean detailedWadl)
WadlApplicationContextApplicationDescription corresponding to all
the root resource classes, and configure the base URI.getApplication in interface WadlApplicationContexturiInfo - 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)
WadlApplicationContextApplication for a particular resource.getApplication in interface WadlApplicationContextinfo - 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()
WadlApplicationContextWadlGenerator
for the Web application.getJAXBContext in interface WadlApplicationContextprivate WadlBuilder getWadlBuilder(boolean detailedWadl, javax.ws.rs.core.UriInfo uriInfo)
public void setWadlGenerationEnabled(boolean wadlGenerationEnabled)
WadlApplicationContextsetWadlGenerationEnabled in interface WadlApplicationContextwadlGenerationEnabled - if wadlGenerationEnabled is true and
ServerProperties.WADL_FEATURE_DISABLE
is false, WADL generation is enabled. In all other cases is disabled.public boolean isWadlGenerationEnabled()
WadlApplicationContextisWadlGenerationEnabled in interface WadlApplicationContextServerProperties.WADL_FEATURE_DISABLEprivate void attachExternalGrammar(Application application, ApplicationDescription applicationDescription, java.net.URI requestURI)