"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/openkm/util/backup/RepositoryS3Backup.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).

RepositoryS3Backup.java  (OpenKM-document-management-system-6.3.10):RepositoryS3Backup.java  (OpenKM-document-management-system-6.3.11)
skipping to change at line 63 skipping to change at line 63
} }
public boolean isRunning() { public boolean isRunning() {
return running; return running;
} }
/** /**
* Performs a recursive repository content export with metadata * Performs a recursive repository content export with metadata
*/ */
public static ImpExpStats backup(String token, String fldPath, String buc ket, boolean metadata, Writer out, public static ImpExpStats backup(String token, String fldPath, String buc ket, boolean metadata, Writer out,
InfoDecorator deco) throws PathNotFoundE InfoDecorator deco) throws PathNotFoundException, AccessD
xception, AccessDeniedException, RepositoryException, eniedException, RepositoryException, ParseException,
FileNotFoundException, ParseException, NoSuchGroupExcepti NoSuchGroupException, IOException, DatabaseException, Gen
on, IOException, DatabaseException, eralException, LockException {
GeneralException { log.debug("backup({}, {}, {}, {}, {}, {})", token, fldPath, bucke
log.debug("backup({}, {}, {}, {}, {}, {})", new Object[]{token, f t, metadata, out, deco);
ldPath, bucket, metadata, out, deco});
ImpExpStats stats = null; ImpExpStats stats = null;
if (running) { if (running) {
throw new GeneralException("Backup in progress"); throw new GeneralException("Backup in progress");
} else { } else {
running = true; running = true;
try { try {
if (!Config.AMAZON_ACCESS_KEY.equals("") && !Conf ig.AMAZON_SECRET_KEY.equals("")) { if (!Config.AMAZON_ACCESS_KEY.equals("") && !Conf ig.AMAZON_SECRET_KEY.equals("")) {
AmazonS3 s3 = new AmazonS3Client(new Basi cAWSCredentials(Config.AMAZON_ACCESS_KEY, AmazonS3 s3 = new AmazonS3Client(new Basi cAWSCredentials(Config.AMAZON_ACCESS_KEY,
skipping to change at line 101 skipping to change at line 100
} }
log.debug("exportDocuments: {}", stats); log.debug("exportDocuments: {}", stats);
return stats; return stats;
} }
/** /**
* Performs a recursive repository content export with metadata * Performs a recursive repository content export with metadata
*/ */
private static ImpExpStats backupHelper(String token, String fldPath, Ama zonS3 s3, String bucket, boolean metadata, private static ImpExpStats backupHelper(String token, String fldPath, Ama zonS3 s3, String bucket, boolean metadata,
Writer out, InfoDecorator deco) t Writer out, InfoDecorator deco) throws PathNotFoundExcept
hrows FileNotFoundException, PathNotFoundException, AccessDeniedException, ion, AccessDeniedException, ParseException,
ParseException, NoSuchGroupException, RepositoryException NoSuchGroupException, RepositoryException, IOException, D
, IOException, DatabaseException { atabaseException, LockException {
log.info("backup({}, {}, {}, {}, {}, {})", new Object[]{token, fl log.info("backup({}, {}, {}, {}, {}, {})", token, fldPath, bucket
dPath, bucket, metadata, out, deco}); , metadata, out, deco);
ImpExpStats stats = new ImpExpStats(); ImpExpStats stats = new ImpExpStats();
DocumentModule dm = ModuleManager.getDocumentModule(); DocumentModule dm = ModuleManager.getDocumentModule();
FolderModule fm = ModuleManager.getFolderModule(); FolderModule fm = ModuleManager.getFolderModule();
MetadataAdapter ma = MetadataAdapter.getInstance(token); MetadataAdapter ma = MetadataAdapter.getInstance(token);
Gson gson = new Gson(); Gson gson = new Gson();
for (Iterator<Document> it = dm.getChildren(token, fldPath).itera tor(); it.hasNext(); ) { for (Iterator<Document> it = dm.getChildren(token, fldPath).itera tor(); it.hasNext(); ) {
File tmpDoc = null; File tmpDoc = null;
InputStream is = null; InputStream is = null;
FileOutputStream fos = null; FileOutputStream fos = null;
 End of changes. 2 change blocks. 
13 lines changed or deleted 12 lines changed or added

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