Examples of PathMatching


Examples of org.apache.clerezza.triaxrs.util.PathMatching

              subPathParam);
          continue;
        }
        break;
      }
      PathMatching subPathMatching = currentUriTemplate.match(remainingPath);
      if (subPathMatching == null) {
        continue;
      }
      subPathParam = new HashMap<String, String>(inheritedPathParams);
      subPathParam.putAll(subPathMatching.getParameters());
      if (methodDescriptor.isSubResourceLocator()) {
        return getCandidateMethods(request, getSubResource(
            instance, methodDescriptor.getMethod(), request,
            subPathMatching), subPathMatching.getRemainingURIPath(), method2PathParams,
            subPathParam);
      }
      if (subPathMatching.isSlashOrEmpty()) {
        if (!methodDescriptor.isSubResourceLocator()) {
          Method method = methodDescriptor.getMethod();
          result.add(method);
          uriTemplateOfFirstMatchingRM = currentUriTemplate;
          method2PathParams.put(method, subPathParam);
View Full Code Here

Examples of org.apache.clerezza.triaxrs.util.PathMatching

        try {
          resourceAndPathMatching = rootResources.getResourceAndPathMatching(request);
        } finally {
          configLock.readLock().unlock();
        }
        final PathMatching pathMatching = resourceAndPathMatching.getPathMatching();

        methodResponse = resourceExecutor.execute(
            request, resourceAndPathMatching.getRootResource(),
            pathMatching.getRemainingURIPath(), pathMatching.getParameters());
      }
      ProcessableResponse processableResponse;
      try {
        processableResponse = (ProcessableResponse) methodResponse;
      } catch (ClassCastException e) {
View Full Code Here

Examples of org.apache.clerezza.triaxrs.util.PathMatching

   * @return the matching root-resource or null if no root resources matches
   */
  public RootResourceDescriptor getDescriptor(String uriPath) {
    for (RootResourceDescriptor descriptor : rootResourceDescriptors) {

      PathMatching pathMatching = descriptor.getUriTemplate().match(
          uriPath);
      if (pathMatching != null) {
        return descriptor;
      }
    }
View Full Code Here

Examples of org.apache.clerezza.triaxrs.util.PathMatching

    } catch (UriException ex) {
      throw new RuntimeException(ex);
    }
    requestUri.set(uriPath);

    PathMatching pathMatching = null;
    RootResourceDescriptor descriptor = null;
    Iterator<RootResourceDescriptor> descriptorIter = rootResourceDescriptors
        .iterator();
    while (descriptorIter.hasNext()) {
      descriptor = descriptorIter.next();
      pathMatching = descriptor.getUriTemplate().match(uriPath);
      if (pathMatching != null) {
        break;
      }
    }

    if (pathMatching == null) {
      throw new NoMatchingRootResourceException();
    }
    return new ResourceAndPathMatching(descriptor.getInstance(request,
        pathMatching.getParameters()), pathMatching);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.