org.glassfish.jersey.server.wadl.processor

## Class WadlModelProcessor

- java.lang.Object
- - org.glassfish.jersey.server.wadl.processor.WadlModelProcessor

All Implemented Interfaces:
  ModelProcessor

    @Priority(value=10000)
    public class WadlModelProcessor
    extends Object
    implements ModelProcessor

WADL `model processor` which enhance resource model by WADL related resources (like "/application.wadl"). The provider should be registered using `WadlAutoDiscoverable` or by `WadlFeature` if auto-discovery is disabled.

Author:
  Miroslav Fuksa

### Nested Class Summary

Nested Classes
`static class` `WadlModelProcessor.OptionsHandler` OPTIONS resource method handler that serves resource WADL.

### Constructor Summary

Constructors
Constructor and Description
`WadlModelProcessor()` Create new WADL model processor instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`ResourceModel` `processResourceModel(ResourceModel resourceModel, jakarta.ws.rs.core.Configuration configuration)` Process `resourceModel` and return the processed model.
`ResourceModel` `processSubResource(ResourceModel resourceModel, jakarta.ws.rs.core.Configuration configuration)` Process `subResourceModel` which was returned a sub resource locator.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### WadlModelProcessor

    public WadlModelProcessor()

Create new WADL model processor instance.

### Method Detail

#### processResourceModel

    public ResourceModel processResourceModel(ResourceModel resourceModel,
                                              jakarta.ws.rs.core.Configuration configuration)

Description copied from interface: `ModelProcessor`
Process `resourceModel` and return the processed model. Returning input `resourceModel` will cause no effect on the final resource model.

Specified by:
  `processResourceModel` in interface `ModelProcessor`
Parameters:
  `resourceModel` - Input resource model to be processed.
  `configuration` - Runtime configuration.
Returns:
  Processed resource model containing root resources. Non root resources will be ignored.

#### processSubResource

    public ResourceModel processSubResource(ResourceModel resourceModel,
                                            jakarta.ws.rs.core.Configuration configuration)

Description copied from interface: `ModelProcessor`
Process `subResourceModel` which was returned a sub resource locator.

The `subResourceModel` contains only one `resource` representing model that should be processed by further matching. The method must return also exactly one resource in the model. Returning input `subResourceModel` instance will cause no effect on the final sub resource model.

Specified by:
  `processSubResource` in interface `ModelProcessor`
Parameters:
  `resourceModel` - `Sub resource` which is based on sub resource returned from sub resource locator.
  `configuration` - Runtime configuration.
Returns:
  Processed resource model with one `resource` which should be used for handling sub resource.