Commit c813b570 authored by Romain Bioteau's avatar Romain Bioteau Committed by GitHub
Browse files

fix(export) avoid computing page dependencies for each configuration (#2282)

* add a flag for file store provider

Closes STUDIO-3530
parent 4adfcd7b
......@@ -44,6 +44,11 @@ public class BusinessObjectBOSArchiveProvider implements IBOSArchiveFileStorePro
}
return result;
}
@Override
public boolean distinctByConfiguration() {
return false;
}
protected BusinessObjectModelRepositoryStore<BusinessObjectModelFileStore> getBusinessObjectDefinitionStore() {
return RepositoryManager.getInstance().getRepositoryStore(BusinessObjectModelRepositoryStore.class);
......
......@@ -31,4 +31,8 @@ public interface IBOSArchiveFileStoreProvider {
Set<IRepositoryFileStore> getFileStoreForConfiguration(AbstractProcess process, Configuration configuration);
default boolean distinctByConfiguration() {
return true;
}
}
......@@ -79,6 +79,11 @@ public class WebFormBOSArchiveFileStoreProvider implements IBOSArchiveFileStoreP
this.repositoryAccessor = repositoryAccessor;
this.customPageBarResourceFactory = customPageBarResourceFactory;
}
@Override
public boolean distinctByConfiguration() {
return false;
}
@Override
public Set<IRepositoryFileStore> getFileStoreForConfiguration(final AbstractProcess process,
......
......@@ -137,8 +137,10 @@ public class ExportBosArchiveHandler {
final Configuration conf = getConfiguration(p, ConfigurationPreferenceConstants.LOCAL_CONFIGURAITON);
for (final IBOSArchiveFileStoreProvider provider : fileStoreProvider) {
result.addAll(provider.getFileStoreForConfiguration(p, conf));
for (final Configuration config : p.getConfigurations()) {
result.addAll(provider.getFileStoreForConfiguration(p, config));
if(provider.distinctByConfiguration()) {
for (final Configuration config : p.getConfigurations()) {
result.addAll(provider.getFileStoreForConfiguration(p, config));
}
}
}
}
......
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