public class WadlGeneratorApplicationDoc extends java.lang.Object implements WadlGenerator
WadlGenerator
adds all doc elements provided by ApplicationDocs.getDocs()
to the generated wadl-file.
The ApplicationDocs
content can either be provided via a File
reference
(setApplicationDocsFile(File)
) or
via an InputStream
(setApplicationDocsStream(InputStream)
).
The File
should be used when using the maven-wadl-plugin for generating wadl offline,
the InputStream
should be used when the extended wadl is generated by jersey at runtime, e.g.
using the WadlGeneratorConfig
for configuration.
WadlGenerator.Environment, WadlGenerator.ExternalGrammarDefinition, WadlGenerator.Resolver
Constructor and Description |
---|
WadlGeneratorApplicationDoc() |
WadlGeneratorApplicationDoc(WadlGenerator wadlGenerator,
ApplicationDocs applicationDocs) |
Modifier and Type | Method and Description |
---|---|
void |
attachTypes(ApplicationDescription egd)
Process the elements in the WADL definition to attach schema types
as required.
|
com.sun.research.ws.wadl.Application |
createApplication(UriInfo requestInfo) |
WadlGenerator.ExternalGrammarDefinition |
createExternalGrammar()
Perform any post create functions such as generating grammars.
|
com.sun.research.ws.wadl.Method |
createMethod(AbstractResource r,
AbstractResourceMethod m) |
com.sun.research.ws.wadl.Param |
createParam(AbstractResource r,
AbstractMethod m,
Parameter p) |
com.sun.research.ws.wadl.Request |
createRequest(AbstractResource r,
AbstractResourceMethod m) |
com.sun.research.ws.wadl.Representation |
createRequestRepresentation(AbstractResource r,
AbstractResourceMethod m,
MediaType mediaType) |
com.sun.research.ws.wadl.Resource |
createResource(AbstractResource r,
java.lang.String path) |
com.sun.research.ws.wadl.Resources |
createResources() |
java.util.List<com.sun.research.ws.wadl.Response> |
createResponses(AbstractResource r,
AbstractResourceMethod m) |
java.lang.String |
getRequiredJaxbContextPath()
The jaxb context path that is used when the generated wadl application is marshalled
to a file.
This method is used in a decorator like manner. The result return the path (or a colon-separated list of package names) containing jaxb-beans that are added to wadl elements by this WadlGenerator, additionally to the context path of the decorated WadlGenerator (set by WadlGenerator.setWadlGeneratorDelegate(WadlGenerator) .If you do not use custom jaxb beans, then simply return _delegate.getRequiredJaxbContextPath() ,
otherwise return the delegate's WadlGenerator.getRequiredJaxbContextPath() together with
your required context path (separated by a colon): |
void |
init()
Invoked before all methods related to wadl-building are invoked.
|
void |
setApplicationDocsFile(java.io.File applicationDocsFile) |
void |
setApplicationDocsStream(java.io.InputStream applicationDocsStream) |
void |
setEnvironment(WadlGenerator.Environment env)
Delegates the setting of the environment
|
void |
setWadlGeneratorDelegate(WadlGenerator delegate)
Sets the delegate that is decorated by this wadl generator.
|
public WadlGeneratorApplicationDoc()
public WadlGeneratorApplicationDoc(WadlGenerator wadlGenerator, ApplicationDocs applicationDocs)
public void setWadlGeneratorDelegate(WadlGenerator delegate)
WadlGenerator
WadlGenerator.init()
or any setter method is invoked.setWadlGeneratorDelegate
in interface WadlGenerator
delegate
- the wadl generator to decoratepublic java.lang.String getRequiredJaxbContextPath()
WadlGenerator
WadlGenerator.setWadlGeneratorDelegate(WadlGenerator)
._delegate.getRequiredJaxbContextPath()
,
otherwise return the delegate's WadlGenerator.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
WadlGenerator.getRequiredJaxbContextPath()
of the delegate or the
WadlGenerator.getRequiredJaxbContextPath()
+ ":" + ${yourContextPath}.public void setEnvironment(WadlGenerator.Environment env)
setEnvironment
in interface WadlGenerator
public void setApplicationDocsFile(java.io.File applicationDocsFile)
public void setApplicationDocsStream(java.io.InputStream applicationDocsStream)
public void init() throws java.lang.Exception
WadlGenerator
this.delegate.init()
.init
in interface WadlGenerator
java.lang.Exception
public com.sun.research.ws.wadl.Application createApplication(UriInfo requestInfo)
createApplication
in interface WadlGenerator
com.sun.jersey.server.wadl.WadlGenerator#createApplication()
public com.sun.research.ws.wadl.Method createMethod(AbstractResource r, AbstractResourceMethod m)
createMethod
in interface WadlGenerator
r
- m
- WadlGenerator.createMethod(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractResourceMethod)
public com.sun.research.ws.wadl.Representation createRequestRepresentation(AbstractResource r, AbstractResourceMethod m, MediaType mediaType)
createRequestRepresentation
in interface WadlGenerator
r
- m
- mediaType
- WadlGenerator.createRequestRepresentation(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractResourceMethod, javax.ws.rs.core.MediaType)
public com.sun.research.ws.wadl.Request createRequest(AbstractResource r, AbstractResourceMethod m)
createRequest
in interface WadlGenerator
r
- m
- WadlGenerator.createRequest(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractResourceMethod)
public com.sun.research.ws.wadl.Param createParam(AbstractResource r, AbstractMethod m, Parameter p)
createParam
in interface WadlGenerator
r
- m
- p
- WadlGenerator.createParam(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractMethod, com.sun.jersey.api.model.Parameter)
public com.sun.research.ws.wadl.Resource createResource(AbstractResource r, java.lang.String path)
createResource
in interface WadlGenerator
r
- path
- WadlGenerator.createResource(com.sun.jersey.api.model.AbstractResource, java.lang.String)
public java.util.List<com.sun.research.ws.wadl.Response> createResponses(AbstractResource r, AbstractResourceMethod m)
createResponses
in interface WadlGenerator
r
- m
- com.sun.jersey.server.wadl.WadlGenerator#createResponse(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractResourceMethod)
public com.sun.research.ws.wadl.Resources createResources()
createResources
in interface WadlGenerator
WadlGenerator.createResources()
public WadlGenerator.ExternalGrammarDefinition createExternalGrammar()
WadlGenerator
createExternalGrammar
in interface WadlGenerator
public void attachTypes(ApplicationDescription egd)
WadlGenerator
attachTypes
in interface WadlGenerator
egd
- The root description used to resolve these entriesCopyright © 2016 Oracle Corporation. All Rights Reserved.