folder.setName("UnamedDocument");
folder.setParentCollection((Collection) CollectionDao.createInstance().getRootCollection().getCollections().get(0));
folder.setDatestamp(new GregorianCalendar());
folderDao.save(folder);
for (Iterator it = this.files.values().iterator(); it.hasNext();) {
UploadedFile currentFile = (UploadedFile) it.next();
List storedFiles = new ArrayList();
StoredFile newFile = new StoredFileImpl();
newFile.setName("content" + Math.random() + ".doc");
newFile.setParent(folder);
try {
newFile.setData(currentFile.getInputStream());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
newFile.setMimeType("application/msword");