Search in sources :

Example 11 with Resource

use of com.webcohesion.enunciate.api.resources.Resource in project enunciate by stoicflame.

the class PathBasedResourceGroupImpl method getPaths.

@Override
public List<PathSummary> getPaths() {
    Set<String> methods = new TreeSet<String>();
    Set<String> styles = new TreeSet<String>();
    for (Resource resource : this.resources) {
        for (Method method : resource.getMethods()) {
            methods.add(method.getHttpMethod());
            styles.addAll(method.getStyles());
        }
    }
    return Arrays.asList((PathSummary) new PathSummaryImpl(this.path, methods, styles));
}
Also used : Resource(com.webcohesion.enunciate.api.resources.Resource) Method(com.webcohesion.enunciate.api.resources.Method)

Aggregations

Method (com.webcohesion.enunciate.api.resources.Method)11 Resource (com.webcohesion.enunciate.api.resources.Resource)11 PathSummary (com.webcohesion.enunciate.api.PathSummary)4 TypeElementComparator (com.webcohesion.enunciate.javac.TypeElementComparator)4 PathSummaryComparator (com.webcohesion.enunciate.util.PathSummaryComparator)4 SpringController (com.webcohesion.enunciate.modules.spring_web.model.SpringController)2 Parameter (com.webcohesion.enunciate.api.resources.Parameter)1 ResourceMethod (com.webcohesion.enunciate.modules.jaxrs.model.ResourceMethod)1 TemplateModel (freemarker.template.TemplateModel)1 TemplateModelException (freemarker.template.TemplateModelException)1 HashMap (java.util.HashMap)1