public class WadlGeneratorJAXBGrammarGenerator extends Object implements WadlGenerator
WadlGenerator
generates a XML Schema content model based on
referenced java beans.
Created on: Jun 22, 2011WadlGenerator.ExternalGrammarDefinition, WadlGenerator.Resolver
Constructor and Description |
---|
WadlGeneratorJAXBGrammarGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
attachTypes(ApplicationDescription introspector)
Process the elements in the WADL definition to attach schema types
as required.
|
Application |
createApplication() |
WadlGenerator.ExternalGrammarDefinition |
createExternalGrammar()
Perform any post create functions such as generating grammars.
|
Method |
createMethod(Resource ar,
ResourceMethod arm) |
Param |
createParam(Resource ar,
ResourceMethod am,
Parameter p) |
Request |
createRequest(Resource ar,
ResourceMethod arm) |
Representation |
createRequestRepresentation(Resource ar,
ResourceMethod arm,
MediaType mt) |
Resource |
createResource(Resource ar,
String path) |
Resources |
createResources() |
List<Response> |
createResponses(Resource resource,
ResourceMethod resourceMethod) |
String |
getRequiredJaxbContextPath()
The jaxb context path that is used when the generated wadl application is marshalled
to a file.
|
void |
init()
Invoked before all methods related to wadl-building are invoked.
|
void |
setWadlGeneratorDelegate(WadlGenerator delegate)
Sets the delegate that is decorated by this wadl generator.
|
public void setWadlGeneratorDelegate(WadlGenerator delegate)
WadlGenerator
WadlGenerator.init()
or any setter method is invoked.setWadlGeneratorDelegate
in interface WadlGenerator
delegate
- the wadl generator to decoratepublic String getRequiredJaxbContextPath()
WadlGenerator
WadlGenerator.setWadlGeneratorDelegate(WadlGenerator)
._delegate.getRequiredJaxbContextPath()
,
otherwise return the delegate's #getRequiredJaxbContextPath() together with
your required context path (separated by a colon):_delegate.getRequiredJaxbContextPath() == null ? ${yourContextPath} : _delegate.getRequiredJaxbContextPath() + ":" + ${yourContextPath};If you add the path for your custom jaxb beans, don't forget to add an ObjectFactory (annotated with
XmlRegistry
) to this package.getRequiredJaxbContextPath
in interface WadlGenerator
getRequiredJaxbContextPath()
of the delegate or the
getRequiredJaxbContextPath() + ":" + ${yourContextPath}
.public void init() throws Exception
WadlGenerator
this.delegate.init()
.init
in interface WadlGenerator
IllegalStateException
jakarta.xml.bind.JAXBException
Exception
public Application createApplication()
createApplication
in interface WadlGenerator
WadlGenerator.createApplication()
public Method createMethod(Resource ar, ResourceMethod arm)
createMethod
in interface WadlGenerator
ar
- abstract resourcearm
- abstract resource methodWadlGenerator.createMethod(org.glassfish.jersey.server.model.Resource,
org.glassfish.jersey.server.model.ResourceMethod)
public Request createRequest(Resource ar, ResourceMethod arm)
createRequest
in interface WadlGenerator
ar
- abstract resourcearm
- abstract resource methodWadlGenerator.createRequest(org.glassfish.jersey.server.model.Resource,
org.glassfish.jersey.server.model.ResourceMethod)
public Param createParam(Resource ar, ResourceMethod am, Parameter p)
createParam
in interface WadlGenerator
ar
- abstract resourceam
- abstract methodp
- parameterWadlGenerator.createParam(org.glassfish.jersey.server.model.Resource,
org.glassfish.jersey.server.model.ResourceMethod, org.glassfish.jersey.server.model.Parameter)
public Representation createRequestRepresentation(Resource ar, ResourceMethod arm, MediaType mt)
createRequestRepresentation
in interface WadlGenerator
ar
- abstract resourcearm
- abstract resource methodmt
- media typeWadlGenerator.createRequestRepresentation(org.glassfish.jersey.server.model.Resource,
org.glassfish.jersey.server.model.ResourceMethod, jakarta.ws.rs.core.MediaType)
public Resource createResource(Resource ar, String path)
createResource
in interface WadlGenerator
ar
- abstract resourcepath
- resources pathWadlGenerator.createResource(org.glassfish.jersey.server.model.Resource, String)
public Resources createResources()
createResources
in interface WadlGenerator
WadlGenerator.createResources()
public List<Response> createResponses(Resource resource, ResourceMethod resourceMethod)
createResponses
in interface WadlGenerator
resource
- abstract resourceresourceMethod
- abstract resource methodWadlGenerator.createResponses(org.glassfish.jersey.server.model.Resource,
org.glassfish.jersey.server.model.ResourceMethod)
public WadlGenerator.ExternalGrammarDefinition createExternalGrammar()
WadlGenerator
createExternalGrammar
in interface WadlGenerator
public void attachTypes(ApplicationDescription introspector)
WadlGenerator
attachTypes
in interface WadlGenerator
introspector
- The root description used to resolve these entriesCopyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.