Search in sources :

Example 46 with Resource

use of org.glassfish.jersey.server.model.Resource in project graylog2-server by Graylog2.

the class PrintModelProcessor method findChildResources.

private List<Resource> findChildResources(Resource parentResource) {
    final List<Resource> childResources = new ArrayList<>();
    for (Resource resource : parentResource.getChildResources()) {
        childResources.add(resource);
        childResources.addAll(findChildResources(resource));
    }
    return childResources;
}
Also used : Resource(org.glassfish.jersey.server.model.Resource) ArrayList(java.util.ArrayList)

Aggregations

Resource (org.glassfish.jersey.server.model.Resource)46 ResourceConfig (org.glassfish.jersey.server.ResourceConfig)13 ResourceModel (org.glassfish.jersey.server.model.ResourceModel)13 Test (org.junit.Test)11 ResourceMethod (org.glassfish.jersey.server.model.ResourceMethod)10 ContainerRequestContext (javax.ws.rs.container.ContainerRequestContext)7 ArrayList (java.util.ArrayList)6 Response (javax.ws.rs.core.Response)6 HashSet (java.util.HashSet)4 RuntimeResource (org.glassfish.jersey.server.model.RuntimeResource)4 Inflector (org.glassfish.jersey.process.Inflector)3 ContainerRequest (org.glassfish.jersey.server.ContainerRequest)3 ExceptionMetered (com.codahale.metrics.annotation.ExceptionMetered)2 Metered (com.codahale.metrics.annotation.Metered)2 ResponseMetered (com.codahale.metrics.annotation.ResponseMetered)2 Timed (com.codahale.metrics.annotation.Timed)2 Type (java.lang.reflect.Type)2 LinkedList (java.util.LinkedList)2 List (java.util.List)2 Map (java.util.Map)2