@Test public void testFileRenameBean() { DefaultVirtualFile dvf = new DefaultVirtualFile(); dvf.setDatasetName("foo"); dvf.setOriginator("bar"); Date time = Calendar.getInstance().getTime(); dvf.setDateTime(time); String name = new FileRenameBean().renameFile(dvf); String string = new String(Long.toString(time.getTime(), 16) + "_bar_foo"); Assert.assertEquals(string, name); }
public String renameFile(VirtualFile vf) { StringBuilder filename = new StringBuilder(); filename.append(TIMESTAMP.format(vf.getDateTime())); filename.append(SEP).append(vf.getDestination()); filename.append(SEP).append(vf.getOriginator()); filename.append(SEP).append(vf.getDatasetName()); return filename.toString(); }
FileRenameBean { public String renameFile(VirtualFile vf) { StringBuilder filename = new StringBuilder(); filename.append(TIMESTAMP.format(vf.getDateTime())); filename.append(SEP).append(vf.getDestination()); filename.append(SEP).append(vf.getOriginator()); filename.append(SEP).append(vf.getDatasetName()); return filename.toString(); } }
FileRenameBean { public String renameFile(VirtualFile vf) { StringBuilder filename = new StringBuilder(); filename.append(TIMESTAMP.format(vf.getDateTime())); filename.append(SEP).append(vf.getDestination()); filename.append(SEP).append(vf.getOriginator()); filename.append(SEP).append(vf.getDatasetName()); return filename.toString(); }  }
FileRenameBean { public String renameFile(VirtualFile vf) { StringBuilder filename = new StringBuilder(); filename.append(TIMESTAMP.format(vf.getDateTime())); filename.append(SEP).append(vf.getDestination()); filename.append(SEP).append(vf.getOriginator()); filename.append(SEP).append(vf.getDatasetName()); return filename.toString(); }  String renameFile(VirtualFile vf); }
FileRenameBean { public String renameFile(VirtualFile vf) { StringBuilder filename = new StringBuilder(); filename.append(TIMESTAMP.format(vf.getDateTime())); filename.append(SEP).append(vf.getDestination()); filename.append(SEP).append(vf.getOriginator()); filename.append(SEP).append(vf.getDatasetName()); return filename.toString(); }  String renameFile(VirtualFile vf);  }