Class WadlApplicationContextImpl
java.lang.Object
org.glassfish.jersey.server.wadl.internal.WadlApplicationContextImpl
- All Implemented Interfaces:
WadlApplicationContext
WADL application context implementation.
- Author:
- Paul Sandoz
-
Constructor Summary
ConstructorsConstructorDescriptionWadlApplicationContextImpl(InjectionManager injectionManager, Configuration configuration, ExtendedResourceContext resourceContext) Injection constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetApplication(UriInfo uriInfo, boolean detailedWadl) Get a new instance of aApplicationDescriptioncorresponding to all the root resource classes, and configure the base URI.getApplication(UriInfo info, Resource resource, boolean detailedWadl) Get a new instance ofApplicationfor a particular resource.jakarta.xml.bind.JAXBContextGet the default JAXB context associated with theWadlGeneratorfor the Web application.static jakarta.xml.bind.JAXBContextgetJAXBContextFromWadlGenerator(WadlGenerator wadlGenerator) static booleanbooleanGet WADL generation status.voidsetWadlGenerationEnabled(boolean wadlGenerationEnabled) Enable/disable WADL generation.
-
Constructor Details
-
WadlApplicationContextImpl
@Inject public WadlApplicationContextImpl(InjectionManager injectionManager, Configuration configuration, ExtendedResourceContext resourceContext) Injection constructor.- Parameters:
injectionManager- injection manager.configuration- runtime application configuration.resourceContext- extended resource context.
-
-
Method Details
-
getJAXBContextFromWadlGenerator
public static jakarta.xml.bind.JAXBContext getJAXBContextFromWadlGenerator(WadlGenerator wadlGenerator) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
getApplication
Description copied from interface:WadlApplicationContextGet a new instance of aApplicationDescriptioncorresponding to all the root resource classes, and configure the base URI.- Specified by:
getApplicationin 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
Description copied from interface:WadlApplicationContextGet a new instance ofApplicationfor a particular resource.- Specified by:
getApplicationin 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
public jakarta.xml.bind.JAXBContext getJAXBContext()Description copied from interface:WadlApplicationContextGet the default JAXB context associated with theWadlGeneratorfor the Web application.- Specified by:
getJAXBContextin interfaceWadlApplicationContext- Returns:
- the default JAXB context.
-
setWadlGenerationEnabled
public void setWadlGenerationEnabled(boolean wadlGenerationEnabled) Description copied from interface:WadlApplicationContextEnable/disable WADL generation.- Specified by:
setWadlGenerationEnabledin interfaceWadlApplicationContext- Parameters:
wadlGenerationEnabled- if wadlGenerationEnabled is true andServerProperties.WADL_FEATURE_DISABLEis false, WADL generation is enabled. In all other cases is disabled.
-
isWadlGenerationEnabled
public boolean isWadlGenerationEnabled()Description copied from interface:WadlApplicationContextGet WADL generation status.- Specified by:
isWadlGenerationEnabledin interfaceWadlApplicationContext- Returns:
- true when WADL generation is enabled. Does not take
ServerProperties.WADL_FEATURE_DISABLE
-
isJaxbImplAvailable
public static boolean isJaxbImplAvailable()
-