Commit 5afcb13f authored by Aurelien Pupier's avatar Aurelien Pupier
Browse files

Merge pull request #288 from bonitasoft/fix/BS-14324-exportLocalEnvironments

BS-14324: Local environment configurations are needed when importing
parents c2f341ea 7001c538
......@@ -502,12 +502,25 @@ public class Repository implements IRepository, IJavaContainer {
final Set<IResource> allResources = new HashSet<IResource>();
for (final IRepositoryStore<?> store : getAllExportableStores()) {
allResources.add(store.getResource());
allResources.addAll(allRelatedResources(store));
}
operation.setResources(allResources);
final IStatus status = operation.run(NULL_PROGRESS_MONITOR);
if (!status.isOK()) {
logErrorStatus(status);
} else {
BonitaStudioLog.info(String.format("%s archive exported successfully.", fileName), CommonRepositoryPlugin.PLUGIN_ID);
}
}
private List<IResource> allRelatedResources(final IRepositoryStore<?> store) {
final List<IResource> relatedResources = new ArrayList<IResource>();
for (final IRepositoryFileStore fs : store.getChildren()) {
for (final IRepositoryFileStore related : fs.getRelatedFileStore()) {
relatedResources.add(related.getResource());
}
}
return relatedResources;
}
protected void logErrorStatus(final IStatus status) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment