public interface WadlGenerator
Modifier and Type | Interface and Description |
---|---|
static class |
WadlGenerator.Environment
A method parameter to make it easier to supply more environmental
information later without break the existing API.
|
static class |
WadlGenerator.ExternalGrammarDefinition
And internal storage object to store the grammar definitions and
any type resolvers that are created along the way.
|
static interface |
WadlGenerator.Resolver
Call back interface that the create external grammar can use
to allow other parts of the code to attach the correct grammar information
|
Modifier and Type | Method and Description |
---|---|
void |
attachTypes(ApplicationDescription description)
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 setWadlGeneratorDelegate(WadlGenerator) .If you do not use custom jaxb beans, then simply return _delegate.getRequiredJaxbContextPath() ,
otherwise return the delegate's getRequiredJaxbContextPath() together with
your required context path (separated by a colon): |
void |
init()
Invoked before all methods related to wadl-building are invoked.
|
void |
setEnvironment(WadlGenerator.Environment env)
Provides the WadlGenerator with the current generating environment.
|
void |
setWadlGeneratorDelegate(WadlGenerator delegate)
Sets the delegate that is decorated by this wadl generator.
|
void setWadlGeneratorDelegate(WadlGenerator delegate)
init()
or any setter method is invoked.delegate
- the wadl generator to decoratevoid init() throws java.lang.Exception
this.delegate.init()
.java.lang.Exception
java.lang.String getRequiredJaxbContextPath()
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()
of the delegate or the
getRequiredJaxbContextPath()
+ ":" + ${yourContextPath}.void setEnvironment(WadlGenerator.Environment env)
this.delegate.setEnvironment(env)
.com.sun.research.ws.wadl.Application createApplication(UriInfo requestInfo)
com.sun.research.ws.wadl.Resources createResources()
com.sun.research.ws.wadl.Resource createResource(AbstractResource r, java.lang.String path)
com.sun.research.ws.wadl.Method createMethod(AbstractResource r, AbstractResourceMethod m)
com.sun.research.ws.wadl.Request createRequest(AbstractResource r, AbstractResourceMethod m)
com.sun.research.ws.wadl.Representation createRequestRepresentation(AbstractResource r, AbstractResourceMethod m, MediaType mediaType)
java.util.List<com.sun.research.ws.wadl.Response> createResponses(AbstractResource r, AbstractResourceMethod m)
com.sun.research.ws.wadl.Param createParam(AbstractResource r, AbstractMethod m, Parameter p)
WadlGenerator.ExternalGrammarDefinition createExternalGrammar()
java.lang.Exception
void attachTypes(ApplicationDescription description)
description
- The root description used to resolve these entriesCopyright © 2016 Oracle Corporation. All Rights Reserved.