|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Contract @ConstrainedTo(value=SERVER) public interface ModelProcessor
Contract for a model processors that processes resource models during application initialization
and resource returned by sub resource locators. Even though model processors can
completely change the resource model, the standard use case it to enhance the current resource model by
additional methods and resources (like for example adding OPTIONS http methods for every URI endpoint).
binding priority
to define the order in which they are executed (processors with a lower priority is invoked
before processor with a higher priority). The highest possible priority (Integer.MAX_VALUE) is used for
model processor which enhance resource models by the default OPTIONS method defined by JAX-RS specification and therefore
this priority should not be used.
| Method Summary | |
|---|---|
ResourceModel |
processResourceModel(ResourceModel resourceModel,
javax.ws.rs.core.Configuration configuration)
Process resourceModel and return the processed model. |
ResourceModel |
processSubResource(ResourceModel subResourceModel,
javax.ws.rs.core.Configuration configuration)
Process subResourceModel which was returned a sub resource locator. |
| Method Detail |
|---|
ResourceModel processResourceModel(ResourceModel resourceModel,
javax.ws.rs.core.Configuration configuration)
resourceModel and return the processed model. Returning input resourceModel will cause
no effect on the final resource model.
resourceModel - Input resource model to be processed.configuration - Runtime configuration.
ResourceModel processSubResource(ResourceModel subResourceModel,
javax.ws.rs.core.Configuration configuration)
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.
subResourceModel - Sub resource which is based on sub resource returned from sub resource locator.configuration - Runtime configuration.
resource which should be used for handling sub resource.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||