Search in sources :

Example 1 with WadlGeneratorJAXBGrammarGenerator

use of org.glassfish.jersey.server.wadl.internal.generators.WadlGeneratorJAXBGrammarGenerator in project jersey by jersey.

the class WadlGeneratorLoader method loadWadlGenerators.

static WadlGenerator loadWadlGenerators(List<WadlGenerator> wadlGenerators) throws Exception {
    WadlGenerator wadlGenerator = new WadlGeneratorJAXBGrammarGenerator();
    if (wadlGenerators != null && !wadlGenerators.isEmpty()) {
        for (WadlGenerator generator : wadlGenerators) {
            generator.setWadlGeneratorDelegate(wadlGenerator);
            wadlGenerator = generator;
        }
    }
    wadlGenerator.init();
    return wadlGenerator;
}
Also used : WadlGenerator(org.glassfish.jersey.server.wadl.WadlGenerator) WadlGeneratorJAXBGrammarGenerator(org.glassfish.jersey.server.wadl.internal.generators.WadlGeneratorJAXBGrammarGenerator)

Example 2 with WadlGeneratorJAXBGrammarGenerator

use of org.glassfish.jersey.server.wadl.internal.generators.WadlGeneratorJAXBGrammarGenerator in project jersey by jersey.

the class WadlGeneratorLoader method loadWadlGeneratorDescriptions.

static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, List<WadlGeneratorDescription> wadlGeneratorDescriptions) throws Exception {
    WadlGenerator wadlGenerator = new WadlGeneratorJAXBGrammarGenerator();
    final CallbackList callbacks = new CallbackList();
    try {
        if (wadlGeneratorDescriptions != null && !wadlGeneratorDescriptions.isEmpty()) {
            for (WadlGeneratorDescription wadlGeneratorDescription : wadlGeneratorDescriptions) {
                final WadlGeneratorControl control = loadWadlGenerator(injectionManager, wadlGeneratorDescription, wadlGenerator);
                wadlGenerator = control.wadlGenerator;
                callbacks.add(control.callback);
            }
        }
        wadlGenerator.init();
    } finally {
        callbacks.callback();
    }
    return wadlGenerator;
}
Also used : WadlGenerator(org.glassfish.jersey.server.wadl.WadlGenerator) WadlGeneratorJAXBGrammarGenerator(org.glassfish.jersey.server.wadl.internal.generators.WadlGeneratorJAXBGrammarGenerator)

Aggregations

WadlGenerator (org.glassfish.jersey.server.wadl.WadlGenerator)2 WadlGeneratorJAXBGrammarGenerator (org.glassfish.jersey.server.wadl.internal.generators.WadlGeneratorJAXBGrammarGenerator)2