org.glassfish.jersey.server.model

## Class ResourceModel

- java.lang.Object
- - org.glassfish.jersey.server.model.ResourceModel

All Implemented Interfaces:
  ResourceModelComponent

    public class ResourceModel
    extends Object
    implements ResourceModelComponent

Resource model of the deployed application which contains set of root resources. As it implements `ResourceModelComponent` it can be validated by `component model validator` which will perform validation of the entire resource model including all sub components (`resources`, `resource methods` ...).

Author:
  Miroslav Fuksa

### Nested Class Summary

Nested Classes
`static class` `ResourceModel.Builder` Builder used to create `resource model` instances.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `accept(ResourceModelVisitor visitor)` A component should call the visitor back with an appropriate visitor interface method to give it a chance to process.
`List<? extends ResourceModelComponent>` `getComponents()` Should return all existing resource model sub-components.
`List<Resource>` `getResources()` Return all resources from this resource model.
`List<Resource>` `getRootResources()` Return root resources from this resource model.
`RuntimeResourceModel` `getRuntimeResourceModel()` Return `runtime resource model` based on this this resource model.

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

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

### Method Detail

#### getRootResources

    public List<Resource> getRootResources()

Return root resources from this resource model.

Returns:
  List of root resources.

#### getResources

    public List<Resource> getResources()

Return all resources from this resource model.

Returns:
  List of all resources (root and non root resources).

#### accept

    public void accept(ResourceModelVisitor visitor)

Description copied from interface: `ResourceModelComponent`
A component should call the visitor back with an appropriate visitor interface method to give it a chance to process.

Specified by:
  `accept` in interface `ResourceModelComponent`
Parameters:
  `visitor` - resource model visitor.

#### getComponents

    public List<? extends ResourceModelComponent> getComponents()

Description copied from interface: `ResourceModelComponent`
Should return all existing resource model sub-components.

Specified by:
  `getComponents` in interface `ResourceModelComponent`
Returns:
  list of all sub-components

#### getRuntimeResourceModel

    public RuntimeResourceModel getRuntimeResourceModel()

Return `runtime resource model` based on this this resource model.

Returns:
  Runtime resource model created from this resource model.