Class WadlApplicationContextImpl
- java.lang.Object
-
- org.glassfish.jersey.server.wadl.internal.WadlApplicationContextImpl
-
- All Implemented Interfaces:
WadlApplicationContext
public final class WadlApplicationContextImpl extends java.lang.Object implements WadlApplicationContext
WADL application context implementation.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static javax.xml.bind.JAXBElementEXTENDED_ELEMENTJersey WADL extension XML element.private InjectionManagerinjectionManagerprivate javax.xml.bind.JAXBContextjaxbContextprivate static java.util.logging.LoggerLOGGERprivate ExtendedResourceContextresourceContext(package private) static java.lang.StringWADL_JERSEY_NAMESPACEJersey WADL extension XML namespace.private booleanwadlGenerationEnabledprivate WadlGeneratorConfigwadlGeneratorConfig
-
Constructor Summary
Constructors Constructor Description WadlApplicationContextImpl(InjectionManager injectionManager, javax.ws.rs.core.Configuration configuration, ExtendedResourceContext resourceContext)Injection constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidattachExternalGrammar(Application application, ApplicationDescription applicationDescription, java.net.URI requestURI)Update the application object to include the generated grammar objects.ApplicationDescriptiongetApplication(javax.ws.rs.core.UriInfo uriInfo, boolean detailedWadl)Get a new instance of aApplicationDescriptioncorresponding to all the root resource classes, and configure the base URI.ApplicationgetApplication(javax.ws.rs.core.UriInfo info, Resource resource, boolean detailedWadl)Get a new instance ofApplicationfor a particular resource.javax.xml.bind.JAXBContextgetJAXBContext()Get the default JAXB context associated with theWadlGeneratorfor the Web application.private WadlBuildergetWadlBuilder(boolean detailedWadl, javax.ws.rs.core.UriInfo uriInfo)booleanisWadlGenerationEnabled()Get WADL generation status.voidsetWadlGenerationEnabled(boolean wadlGenerationEnabled)Enable/disable WADL generation.
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
WADL_JERSEY_NAMESPACE
static final java.lang.String WADL_JERSEY_NAMESPACE
Jersey WADL extension XML namespace.- See Also:
- Constant Field Values
-
EXTENDED_ELEMENT
static final javax.xml.bind.JAXBElement EXTENDED_ELEMENT
Jersey WADL extension XML element.
-
resourceContext
private final ExtendedResourceContext resourceContext
-
injectionManager
private final InjectionManager injectionManager
-
wadlGeneratorConfig
private final WadlGeneratorConfig wadlGeneratorConfig
-
jaxbContext
private final javax.xml.bind.JAXBContext jaxbContext
-
wadlGenerationEnabled
private volatile boolean wadlGenerationEnabled
-
-
Constructor Detail
-
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 Detail
-
getApplication
public ApplicationDescription getApplication(javax.ws.rs.core.UriInfo uriInfo, boolean detailedWadl)
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
public Application getApplication(javax.ws.rs.core.UriInfo info, Resource resource, boolean detailedWadl)
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 javax.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.
-
getWadlBuilder
private WadlBuilder getWadlBuilder(boolean detailedWadl, javax.ws.rs.core.UriInfo uriInfo)
-
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
-
attachExternalGrammar
private void attachExternalGrammar(Application application, ApplicationDescription applicationDescription, java.net.URI requestURI)
Update the application object to include the generated grammar objects.
-
-