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();
}
Aggregations