List of usage examples for org.springframework.data.rest.core.mapping MethodResourceMapping getMethod
Method getMethod();
From source file:springfox.documentation.spring.data.rest.EntitySearchRequestTemplate.java
Collection<? extends RequestHandler> operations() { List<RequestHandler> requestHandlers = newArrayList(); boolean collectionHandlerAdded = false; for (ResourceMetadata resource : mappings) { for (MethodResourceMapping searchResource : resource.getSearchResourceMappings()) { EntitySearchRequestHandler handler = new EntitySearchRequestHandler(resolver, requestMapping, new HandlerMethod(searchResource.getMethod().getClass(), searchResource.getMethod()), searchResource, resource); if (handler.resourceType() == ResourceType.ITEM || !collectionHandlerAdded) { requestHandlers.add(handler); if (!collectionHandlerAdded) { collectionHandlerAdded = (handler.resourceType() == ResourceType.COLLECTION); }//from w ww.j ava 2 s. c om } } } return requestHandlers; }