Class WadlUtils
java.lang.Object
org.glassfish.jersey.server.wadl.internal.WadlUtils
Utils for wadl processing.
- Author:
- Miroslav Fuksa
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of the query parameter that allows generation of full WADL includingextended resource
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isDetailedWadlRequested
(UriInfo uriInfo) Returntrue
if generation of full WADL withextended resources
is requested.static <T> T
unmarshall
(InputStream inputStream, SAXParserFactory saxParserFactory, Class<T> resultClass) Unmarshal a jaxb bean into a type ofresultClass
from the giveninputStream
.
-
Field Details
-
DETAILED_WADL_QUERY_PARAM
Name of the query parameter that allows generation of full WADL includingextended resource
.- See Also:
-
-
Constructor Details
-
WadlUtils
public WadlUtils()
-
-
Method Details
-
unmarshall
public static <T> T unmarshall(InputStream inputStream, SAXParserFactory saxParserFactory, Class<T> resultClass) throws jakarta.xml.bind.JAXBException, ParserConfigurationException, SAXException Unmarshal a jaxb bean into a type ofresultClass
from the giveninputStream
.- Type Parameters:
T
- Type of the result jaxb bean.- Parameters:
inputStream
- Input stream that contains input xml that should be processed.saxParserFactory
- Sax parser factory for unmarshalling xml.resultClass
- Class of the result bean into which the content ofinputStream
should be unmarshalled.- Returns:
- Unmarshalled jaxb bean.
- Throws:
jakarta.xml.bind.JAXBException
- In case of jaxb problem.ParserConfigurationException
- In case of problem with parsing xml.SAXException
- In case of problem with parsing xml.
-
isDetailedWadlRequested
Returntrue
if generation of full WADL withextended resources
is requested.- Parameters:
uriInfo
- URI info of the request.- Returns:
true
if full detailed WADL should be generated; false otherwise.
-