Class WadlApplicationContextImpl
java.lang.Object
org.glassfish.jersey.server.wadl.internal.WadlApplicationContextImpl
- All Implemented Interfaces:
WadlApplicationContext
WADL application context implementation.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final JAXBElement
Jersey WADL extension XML element.private final InjectionManager
private final JAXBContext
private static final Logger
private final ExtendedResourceContext
(package private) static final String
Jersey WADL extension XML namespace.private boolean
private final WadlGeneratorConfig
-
Constructor Summary
ConstructorsConstructorDescriptionWadlApplicationContextImpl
(InjectionManager injectionManager, javax.ws.rs.core.Configuration configuration, ExtendedResourceContext resourceContext) Injection constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
attachExternalGrammar
(Application application, ApplicationDescription applicationDescription, URI requestURI) Update the application object to include the generated grammar objects.getApplication
(javax.ws.rs.core.UriInfo uriInfo, boolean detailedWadl) Get a new instance of aApplicationDescription
corresponding to all the root resource classes, and configure the base URI.getApplication
(javax.ws.rs.core.UriInfo info, Resource resource, boolean detailedWadl) Get a new instance ofApplication
for a particular resource.Get the default JAXB context associated with theWadlGenerator
for the Web application.private WadlBuilder
getWadlBuilder
(boolean detailedWadl, javax.ws.rs.core.UriInfo uriInfo) boolean
Get WADL generation status.void
setWadlGenerationEnabled
(boolean wadlGenerationEnabled) Enable/disable WADL generation.
-
Field Details
-
LOGGER
-
WADL_JERSEY_NAMESPACE
Jersey WADL extension XML namespace.- See Also:
-
EXTENDED_ELEMENT
Jersey WADL extension XML element. -
resourceContext
-
injectionManager
-
wadlGeneratorConfig
-
jaxbContext
-
wadlGenerationEnabled
private volatile boolean wadlGenerationEnabled
-
-
Constructor Details
-
WadlApplicationContextImpl
@Inject public WadlApplicationContextImpl(InjectionManager injectionManager, javax.ws.rs.core.Configuration configuration, ExtendedResourceContext resourceContext) Injection constructor.- Parameters:
injectionManager
- injection manager.configuration
- runtime application configuration.resourceContext
- extended resource context.
-
-
Method Details
-
getApplication
public ApplicationDescription getApplication(javax.ws.rs.core.UriInfo uriInfo, boolean detailedWadl) Description copied from interface:WadlApplicationContext
Get a new instance of aApplicationDescription
corresponding to all the root resource classes, and configure the base URI.- Specified by:
getApplication
in interfaceWadlApplicationContext
- Parameters:
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.- Returns:
- the application description, the contents may be modified.
-
getApplication
public Application getApplication(javax.ws.rs.core.UriInfo info, Resource resource, boolean detailedWadl) Description copied from interface:WadlApplicationContext
Get a new instance ofApplication
for a particular resource.- Specified by:
getApplication
in interfaceWadlApplicationContext
- Parameters:
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.- Returns:
- the application for this resource
-
getJAXBContext
Description copied from interface:WadlApplicationContext
Get the default JAXB context associated with theWadlGenerator
for the Web application.- Specified by:
getJAXBContext
in interfaceWadlApplicationContext
- Returns:
- the default JAXB context.
-
getWadlBuilder
-
setWadlGenerationEnabled
public void setWadlGenerationEnabled(boolean wadlGenerationEnabled) Description copied from interface:WadlApplicationContext
Enable/disable WADL generation.- Specified by:
setWadlGenerationEnabled
in interfaceWadlApplicationContext
- Parameters:
wadlGenerationEnabled
- if wadlGenerationEnabled is true andServerProperties.WADL_FEATURE_DISABLE
is false, WADL generation is enabled. In all other cases is disabled.
-
isWadlGenerationEnabled
public boolean isWadlGenerationEnabled()Description copied from interface:WadlApplicationContext
Get WADL generation status.- Specified by:
isWadlGenerationEnabled
in interfaceWadlApplicationContext
- Returns:
- true when WADL generation is enabled. Does not take
ServerProperties.WADL_FEATURE_DISABLE
-
attachExternalGrammar
private void attachExternalGrammar(Application application, ApplicationDescription applicationDescription, URI requestURI) Update the application object to include the generated grammar objects.
-