Package org.springframework.batch.admin.service

Examples of org.springframework.batch.admin.service.FileInfo


  @Qualifier("files.json")
  private View view;

  @Test
  public void testListViewWithJobs() throws Exception {
    model.put("files", Arrays.asList(new FileInfo("foo"), new FileInfo("bar")));
    model.put("baseUrl", "http://localhost:8080/springsource");
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
View Full Code Here


      list(model, startFile, pageSize);
      return "files";
    }

    try {
      FileInfo dest = fileService.createFile(path + "/" + originalFilename);
      file.transferTo(fileService.getResource(dest.getPath()).getFile());
      fileService.publish(dest);
      model.put("uploaded", dest.getPath());
    }
    catch (IOException e) {
      errors.reject("file.upload.failed", new Object[] { originalFilename }, "File upload failed for "
          + HtmlUtils.htmlEscape(originalFilename));
    }
View Full Code Here

  @Qualifier("files")
  private View view;

  @Test
  public void testFiles() throws Exception {
    model.put("files", Arrays.asList(new FileInfo("foo")));
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    assertTrue(content.contains("<div id=\"secondary-navigation\">"));
    assertTrue(content.matches("(?s).*<td>.*foo.*</td>.*</tr>.*"));
 
View Full Code Here

TOP

Related Classes of org.springframework.batch.admin.service.FileInfo

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.