On Mon, 2008-07-28 at 10:58 +0200, Paul Sandoz wrote:
> Hi Martin,
>
> Can this property be declared as property using ResourceConfig?
>
> The WADL code can get the ResourceConfig instance and get the
> "com.sun.jersey.config.property.wadlGeneratorConfigClass" from that.
>
> Such properties will also work when declared as Servlet init-params.
Ok.
What is the best way if I want to provide a WadlGeneratorConfiguration
that can be configured via a special servlet init-param?
My WadlGeneratorConfiguration primarily must return a list of
WadlGeneratorDescriptions. A WadlGeneratorDescription provides the
class(name) of an implementation of WadlGenerator plus a Properties
instance that is used to init the WadlGenerator.
Therefore I thought about s.th. like a servlet init-param
"com.sun.jersey.config.property.wadlGeneratorDescriptions" with a
possible value like
com.sun.jersey.impl.wadl.generators.WadlGeneratorApplicationDoc[applicationDocsFile=classpath:/src/main/api-doc/application-doc.xml];
com.sun.jersey.impl.wadl.generators.WadlGeneratorGrammarsSupport[grammarsFile=classpath:/src/main/api-doc/application-grammars.xml];
...
This would be interpreted by e.g. a
ConfigurableWadlGeneratorConfiguration.
What do you think?
Thanx && cheers,
Martin
>
> Paul.
>
> Martin Grotzke wrote:
> > Hi Paul,
> >
> > I want to add some WadlGenerationConfiguration to jersey, so that one
> > can configure the wadl-generation stuff like the maven-wadl-plugin.
> > There should be some property like
> >
> > com.sun.jersey.config.property.wadlGeneratorConfigClass
> >
> > that allows the user to specify some class, that provides the required
> > configuration properties.
> >
> > I would have a look at how PackagesResourceConfig is used. Do you have
> > another thing that provides a good start for this?
> >
> > Cheers,
> > Martin
> >
> >