Package org.springframework.web.util

Examples of org.springframework.web.util.UriTemplate$Parser


        super.setUp();
        WorkspaceImpl wsp = (WorkspaceImpl) superuser.getWorkspace();
        QueryManagerImpl qm = (QueryManagerImpl) wsp.getQueryManager();
        QueryObjectModelFactoryImpl factory = (QueryObjectModelFactoryImpl) qm
                .getQOMFactory();
        parser = new Parser(factory, superuser.getValueFactory());
    }
View Full Code Here


  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

    if (mapping.length == 0) {
      return builder;
    }

    UriTemplate template = new UriTemplate(mapping[0]);
    return builder.slash(template.expand(parameters));
  }
View Full Code Here

    this.bookRepository.save(book);
  }


  private URI childLocation(StringBuffer parentUri, Object childId) {
    UriTemplate uri = new UriTemplate(parentUri.append("/{childId}").toString());
    return uri.expand(childId);
  }
View Full Code Here

        }
    }
   
    public DropboxFile getThumbnail(String path) {
      try {
        UriTemplate uriTemplate = new UriTemplate(THUMBNAILS_URL);
      URI uri = uriTemplate.expand(appFolderUrl, path);
        ClientHttpResponse response = getRestTemplate().getRequestFactory().createRequest(uri, HttpMethod.GET).execute();
        HttpHeaders headers = response.getHeaders();
       
        return new DropboxFile(
            headers.getContentType().toString(),
View Full Code Here

      }
    }
   
    public DropboxFile getFile(String path) {
      try {
      UriTemplate uriTemplate = new UriTemplate(FILE_URL);
    URI uri = uriTemplate.expand(appFolderUrl, path);
      ClientHttpResponse response = getRestTemplate().getRequestFactory().createRequest(uri, HttpMethod.GET).execute();
      HttpHeaders headers = response.getHeaders();
     
      return new DropboxFile(
          headers.getContentType().toString(),
View Full Code Here

    public FileUrl getShare(String path) {
      return getRestTemplate().getForObject(SHARES_URL, FileUrl.class, appFolderUrl, path);
    }
   
    public Metadata putFile(String path, byte[] file) {
      UriTemplate uriTemplate = new UriTemplate(FILE_PUT_URL);
    URI uri = uriTemplate.expand(appFolderUrl, path);
     
    try {
        ClientHttpRequest request = getRestTemplate().getRequestFactory().createRequest(uri, HttpMethod.PUT);
        request.getBody().write(file);
       
View Full Code Here

  // general execution

  public <T> T execute(String url, HttpMethod method, RequestCallback requestCallback,
      ResponseExtractor<T> responseExtractor, Object... urlVariables) throws RestClientException {

    UriTemplate uriTemplate = new HttpUrlTemplate(url);
    URI expanded = uriTemplate.expand(urlVariables);
    return doExecute(expanded, method, requestCallback, responseExtractor);
  }
View Full Code Here

  }

  public <T> T execute(String url, HttpMethod method, RequestCallback requestCallback,
      ResponseExtractor<T> responseExtractor, Map<String, ?> urlVariables) throws RestClientException {

    UriTemplate uriTemplate = new HttpUrlTemplate(url);
    URI expanded = uriTemplate.expand(urlVariables);
    return doExecute(expanded, method, requestCallback, responseExtractor);
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.util.UriTemplate$Parser

Copyright © 2018 www.massapicom. 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.