"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/openkm/util/impexp/RepositoryExporter.java" between
OpenKM-document-management-system-6.3.10.tar.gz and OpenKM-document-management-system-6.3.11.tar.gz

About: OpenKM (Knowledge Management) is a document management system that allows easy management of documents, users, roles and finding your enterprise documents and records. Community version (source code).

RepositoryExporter.java  (OpenKM-document-management-system-6.3.10):RepositoryExporter.java  (OpenKM-document-management-system-6.3.11)
skipping to change at line 230 skipping to change at line 230
stats.setOk(stats.isOk() && tmp.isOk()); stats.setOk(stats.isOk() && tmp.isOk());
} }
log.debug("exportDocumentsHelper: {}", stats); log.debug("exportDocumentsHelper: {}", stats);
return stats; return stats;
} }
/** /**
* Export mail from OpenKM repository to filesystem. * Export mail from OpenKM repository to filesystem.
*/ */
public static ImpExpStats exportMail(String token, String mailPath, Strin public static ImpExpStats exportMail(String token, String mailPath, String d
g destPath, boolean metadata, estPath, boolean metadata, Writer out,
Writer out, InfoDecorator deco) thro InfoDecorator deco) throws PathNotFoundException, RepositoryExceptio
ws PathNotFoundException, RepositoryException, DatabaseException, n, DatabaseException, IOException,
IOException, AccessDeniedException, ParseException, NoSuc AccessDeniedException, ParseException, NoSuchGroupException, Messagi
hGroupException, MessagingException { ngException, LockException {
MailModule mm = ModuleManager.getMailModule(); MailModule mm = ModuleManager.getMailModule();
MetadataAdapter ma = MetadataAdapter.getInstance(token); MetadataAdapter ma = MetadataAdapter.getInstance(token);
Mail mailChild = mm.getProperties(token, mailPath); Mail mailChild = mm.getProperties(token, mailPath);
Gson gson = new Gson(); Gson gson = new Gson();
ImpExpStats stats = new ImpExpStats(); ImpExpStats stats = new ImpExpStats();
MimeMessage msg = MailUtils.create(token, mailChild); MimeMessage msg = MailUtils.create(token, mailChild);
FileOutputStream fos = new FileOutputStream(destPath); FileOutputStream fos = new FileOutputStream(destPath);
msg.writeTo(fos); msg.writeTo(fos);
IOUtils.closeQuietly(fos); IOUtils.closeQuietly(fos);
FileLogger.info(BASE_NAME, "Created document ''{0}''", mailChild. getPath()); FileLogger.info(BASE_NAME, "Created document ''{0}''", mailChild. getPath());
skipping to change at line 269 skipping to change at line 269
stats.setSize(stats.getSize() + mailChild.getSize()); stats.setSize(stats.getSize() + mailChild.getSize());
stats.setMails(stats.getMails() + 1); stats.setMails(stats.getMails() + 1);
return stats; return stats;
} }
/** /**
* Export document from OpenKM repository to filesystem. * Export document from OpenKM repository to filesystem.
*/ */
public static ImpExpStats exportDocument(String token, String docPath, St ring destPath, boolean metadata, public static ImpExpStats exportDocument(String token, String docPath, St ring destPath, boolean metadata,
boolean history, Writer out, Inf boolean history, Writer out, InfoDecorator deco) throws P
oDecorator deco) throws PathNotFoundException, RepositoryException, athNotFoundException, RepositoryException,
DatabaseException, IOException, AccessDeniedException, Pa DatabaseException, IOException, AccessDeniedException, Pa
rseException, NoSuchGroupException { rseException, NoSuchGroupException, LockException {
DocumentModule dm = ModuleManager.getDocumentModule(); DocumentModule dm = ModuleManager.getDocumentModule();
MetadataAdapter ma = MetadataAdapter.getInstance(token); MetadataAdapter ma = MetadataAdapter.getInstance(token);
Document docChild = dm.getProperties(token, docPath); Document docChild = dm.getProperties(token, docPath);
Gson gson = new Gson(); Gson gson = new Gson();
ImpExpStats stats = new ImpExpStats(); ImpExpStats stats = new ImpExpStats();
// Version history // Version history
if (history) { if (history) {
// Create dummy document file // Create dummy document file
new File(destPath).createNewFile(); new File(destPath).createNewFile();
 End of changes. 2 change blocks. 
10 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)