Package com.linkedin.jersey.api.uri

Examples of com.linkedin.jersey.api.uri.UriTemplate.createURI()


  public static String[] extractPathComponentsFromUriTemplate(String uriTemplate)
  {
    final String normalizedUriTemplate = uriTemplate.replaceAll("(^/|/$)", "");
    final UriTemplate template = new UriTemplate(normalizedUriTemplate);
    final String uri = template.createURI(_EMPTY_STRING_ARRAY);
    return uri.replaceAll("/+", "/").split("/");
  }
}
View Full Code Here


  @Deprecated
  public List<String> getResourcePath()
  {
    UriTemplate template = new UriTemplate(_baseUriTemplate);
    List<String> resourcePath = new ArrayList<String>(1);
    String[] pathParts = SLASH_PATTERN.split(template.createURI(Collections.<String, String>emptyMap()));

    for (String pathPart : pathParts)
    {
      if (!pathPart.equals(""))
      {
View Full Code Here

        throw new IllegalArgumentException("Missing value for path key " + entry.getKey());
      }
      escapedKeys.put(entry.getKey(), value);
    }

    return template.createURI(escapedKeys);
  }

  private final String addPrefix(String uri)
  {
    return _uriPrefix + uri;
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.