Search in sources :

Example 1 with WadlResource

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

the class WadlModelProcessor method processResourceModel.

@Override
public ResourceModel processResourceModel(final ResourceModel resourceModel, final Configuration configuration) {
    final boolean disabled = PropertiesHelper.isProperty(configuration.getProperty(ServerProperties.WADL_FEATURE_DISABLE));
    if (disabled) {
        return resourceModel;
    }
    final ResourceModel.Builder builder = ModelProcessorUtil.enhanceResourceModel(resourceModel, false, methodList, true);
    // Do not add WadlResource if already present in the classes (i.e. added during scanning).
    if (!configuration.getClasses().contains(WadlResource.class)) {
        final Resource wadlResource = Resource.builder(WadlResource.class).build();
        builder.addResource(wadlResource);
    }
    return builder.build();
}
Also used : WadlResource(org.glassfish.jersey.server.wadl.internal.WadlResource) Resource(org.glassfish.jersey.server.model.Resource) RuntimeResource(org.glassfish.jersey.server.model.RuntimeResource) ResourceModel(org.glassfish.jersey.server.model.ResourceModel) WadlResource(org.glassfish.jersey.server.wadl.internal.WadlResource)

Aggregations

Resource (org.glassfish.jersey.server.model.Resource)1 ResourceModel (org.glassfish.jersey.server.model.ResourceModel)1 RuntimeResource (org.glassfish.jersey.server.model.RuntimeResource)1 WadlResource (org.glassfish.jersey.server.wadl.internal.WadlResource)1