private Resource generateSubResource(AbstractResource r, String path) { Resource wadlResource = new Resource(); if (r.isRootResource()) { StringBuilder b = new StringBuilder(r.getPath().getValue()); if (!(r.getPath().getValue().endsWith("/") || path.startsWith("/"))) { b.append("/"); } b.append(path); wadlResource.setPath(b.toString()); } // for each sub-resource method Map<String, Param> wadlSubResourceParams = new HashMap<String, Param>(); for (AbstractSubResourceMethod m : r.getSubResourceMethods()) { // find or create sub resource for uri template String template = m.getPath().getValue(); if (!template.equals(path) && !template.equals('/' + path)) { continue; } com.sun.research.ws.wadl.Method wadlMethod = generateMethod(r, wadlSubResourceParams, m); wadlResource.getMethodOrResource().add(wadlMethod); } // add parameters that are associated with each sub-resource method PATH template for (Param wadlParam : wadlSubResourceParams.values()) { wadlResource.getParam().add(wadlParam); } return wadlResource; }
wadlResource.getMethodOrResource().add(wadlMethod); wadlSubResourceParams = new HashMap<String, Param>(); wadlSubResourcesParams.put(template, wadlSubResourceParams); wadlResource.getMethodOrResource().add(wadlSubResource); wadlSubResource.getMethodOrResource().add(wadlMethod); Resource wadlSubResource = generateResource(subResource, l.getPath().getValue(), visitedClasses); wadlResource.getMethodOrResource().add(wadlSubResource);
wadlResource.getMethodOrResource().add(wadlMethod); continue; wadlResource.getMethodOrResource().add(childWadlResource);
wadlResource.getMethodOrResource().add(wadlMethod); continue; wadlResource.getMethodOrResource().add(childWadlResource);
wadlResource.getMethodOrResource().add(wadlMethod); continue; wadlResource.getMethodOrResource().add(childWadlResource);
String path = appResource.getPath(); if (RestPaths.SLIDER_CONTEXT_ROOT.equals(path)) { List<Object> sliderResources = appResource.getMethodOrResource(); Iterator<Object> itor = sliderResources.iterator(); while (itor.hasNext()) {
String path = appResource.getPath(); if (RestPaths.SLIDER_CONTEXT_ROOT.equals(path)) { List<Object> sliderResources = appResource.getMethodOrResource(); Iterator<Object> itor = sliderResources.iterator(); while (itor.hasNext()) {
private Resource generateSubResource(AbstractResource r, String path) { Resource wadlResource = new Resource(); if (r.isRootResource()) { StringBuilder b = new StringBuilder(r.getPath().getValue()); if (!(r.getPath().getValue().endsWith("/") || path.startsWith("/"))) { b.append("/"); } b.append(path); wadlResource.setPath(b.toString()); } // for each sub-resource method Map<String, Param> wadlSubResourceParams = new HashMap<String, Param>(); for (AbstractSubResourceMethod m : r.getSubResourceMethods()) { // find or create sub resource for uri template String template = m.getPath().getValue(); if (!template.equals(path) && !template.equals('/' + path)) { continue; } com.sun.research.ws.wadl.Method wadlMethod = generateMethod(r, wadlSubResourceParams, m); wadlResource.getMethodOrResource().add(wadlMethod); } // add parameters that are associated with each sub-resource method PATH template for (Param wadlParam : wadlSubResourceParams.values()) { wadlResource.getParam().add(wadlParam); } return wadlResource; }
private Resource generateSubResource(AbstractResource r, String path) { Resource wadlResource = new Resource(); if (r.isRootResource()) { StringBuilder b = new StringBuilder(r.getPath().getValue()); if (!(r.getPath().getValue().endsWith("/") || path.startsWith("/"))) { b.append("/"); } b.append(path); wadlResource.setPath(b.toString()); } // for each sub-resource method Map<String, Param> wadlSubResourceParams = new HashMap<String, Param>(); for (AbstractSubResourceMethod m : r.getSubResourceMethods()) { // find or create sub resource for uri template String template = m.getPath().getValue(); if (!template.equals(path) && !template.equals('/' + path)) { continue; } com.sun.research.ws.wadl.Method wadlMethod = generateMethod(r, wadlSubResourceParams, m); wadlResource.getMethodOrResource().add(wadlMethod); } // add parameters that are associated with each sub-resource method PATH template for (Param wadlParam : wadlSubResourceParams.values()) { wadlResource.getParam().add(wadlParam); } return wadlResource; }
wadlResource.getMethodOrResource().add(wadlMethod); wadlSubResourceParams = new HashMap<String, Param>(); wadlSubResourcesParams.put(template, wadlSubResourceParams); wadlResource.getMethodOrResource().add(wadlSubResource); wadlSubResource.getMethodOrResource().add(wadlMethod); Resource wadlSubResource = generateResource(subResource, l.getPath().getValue(), visitedClasses); wadlResource.getMethodOrResource().add(wadlSubResource);
wadlResource.getMethodOrResource().add(wadlMethod); wadlSubResourceParams = new HashMap<String, Param>(); wadlSubResourcesParams.put(template, wadlSubResourceParams); wadlResource.getMethodOrResource().add(wadlSubResource); wadlSubResource.getMethodOrResource().add(wadlMethod); Resource wadlSubResource = generateResource(subResource, l.getPath().getValue(), visitedClasses); wadlResource.getMethodOrResource().add(wadlSubResource);
wadlResource.getMethodOrResource().add(wadlMethod); continue; wadlResource.getMethodOrResource().add(childWadlResource);
wadlResource.getMethodOrResource().add(wadlMethod); continue; wadlResource.getMethodOrResource().add(childWadlResource);
wadlResource.getMethodOrResource().add(wadlMethod); continue; wadlResource.getMethodOrResource().add(childWadlResource);
wadlResource.getMethodOrResource().add(wadlMethod); continue; wadlResource.getMethodOrResource().add(childWadlResource);