Commit 7f05589c authored by Adrien's avatar Adrien Committed by Romain Bioteau
Browse files

fix(import) remove unwanted conflicts (#470)

* phone number in default orga isn't generated randomly anymore
* special conflict checker for database connector properties, in order
to don't take into account comments
	
closes [BS-16599](https://bonitasoft.atlassian.net/browse/BS-16599)
parent 54868d16
......@@ -14,9 +14,6 @@
*/
package org.bonitasoft.studio.actors.repository;
import java.text.NumberFormat;
import java.util.Random;
import org.bonitasoft.studio.actors.i18n.Messages;
import org.bonitasoft.studio.actors.model.organization.ContactData;
import org.bonitasoft.studio.actors.model.organization.Group;
......@@ -73,7 +70,8 @@ public class DefaultOrganizationContribution implements IFileStoreContribution {
organization.setMemberships(memberships);
final IRepositoryFileStore file = repository
.createRepositoryFileStore(OrganizationPreferenceConstants.DEFAULT_ORGANIZATION_NAME + "." + OrganizationRepositoryStore.ORGANIZATION_EXT);
.createRepositoryFileStore(OrganizationPreferenceConstants.DEFAULT_ORGANIZATION_NAME + "."
+ OrganizationRepositoryStore.ORGANIZATION_EXT);
file.save(organization);
}
......@@ -122,38 +120,59 @@ public class DefaultOrganizationContribution implements IFileStoreContribution {
final String mr = "Mr";
final String mrs = "Mrs";
userList.add(createUser(mr, "william.jobs", "William", "Jobs", "bpm", "WilliamJobs@acme.com", null, "Chief Executive Officer"));
userList.add(createUser(mr, "william.jobs", "William", "Jobs", "bpm", "WilliamJobs@acme.com", null,
"Chief Executive Officer"));
userList.add(createUser(mrs, "april.sanchez", "April", "Sanchez", "bpm", "AprilGSanchez@acme.com", "helen.kelly", "Compensation specialist"));
userList.add(createUser(mrs, "helen.kelly", "Helen", "Kelly", "bpm", "HelenKelly@acme.com", "william.jobs", "Human resource manager"));
userList.add(createUser(mr, "walter.bates", "Walter", "Bates", "bpm", "WalterRBates@acme.com", "helen.kelly", "Human resources benefits"));
userList.add(createUser(mrs, "april.sanchez", "April", "Sanchez", "bpm", "AprilGSanchez@acme.com", "helen.kelly",
"Compensation specialist"));
userList.add(createUser(mrs, "helen.kelly", "Helen", "Kelly", "bpm", "HelenKelly@acme.com", "william.jobs",
"Human resource manager"));
userList.add(createUser(mr, "walter.bates", "Walter", "Bates", "bpm", "WalterRBates@acme.com", "helen.kelly",
"Human resources benefits"));
userList.add(
createUser(mr, "zachary.williamson", "Zachary", "Williamson", "bpm", "ZacharyWilliamson@acme.com", "william.jobs", "Chief Financial Officer"));
createUser(mr, "zachary.williamson", "Zachary", "Williamson", "bpm", "ZacharyWilliamson@acme.com",
"william.jobs", "Chief Financial Officer"));
userList.add(
createUser(mr, "patrick.gardenier", "Patrick", "Gardenier", "bpm", "PatrickGardenier@acme.com", "zachary.williamson", "Financial controller"));
userList.add(createUser(mrs, "virginie.jomphe", "Virgine", "Jomphe", "bpm", "VirginieJomphe@acme.com", "zachary.williamson", "Accountant"));
userList.add(createUser(mr, "thorsten.hartmann", "Thorsten", "Hartmann", "bpm", "ThorstenHartmann@acme.com", "zachary.williamson",
createUser(mr, "patrick.gardenier", "Patrick", "Gardenier", "bpm", "PatrickGardenier@acme.com",
"zachary.williamson", "Financial controller"));
userList.add(createUser(mrs, "virginie.jomphe", "Virgine", "Jomphe", "bpm", "VirginieJomphe@acme.com",
"zachary.williamson", "Accountant"));
userList.add(createUser(mr, "thorsten.hartmann", "Thorsten", "Hartmann", "bpm", "ThorstenHartmann@acme.com",
"zachary.williamson",
"Financial planning manager"));
userList.add(createUser(mr, "jan.fisher", "Jan", "Fisher", "bpm", "JanFisher@acme.com", "favio.riviera", "Infrastucture specialist"));
userList.add(createUser(mr, "jan.fisher", "Jan", "Fisher", "bpm", "JanFisher@acme.com", "favio.riviera",
"Infrastucture specialist"));
userList.add(
createUser(mrs, "isabel.bleasdale", "Isabel", "Bleasdale", "bpm", "IsabelBleasdale@acme.com", "favio.riviera", "Product marketing manager"));
userList.add(createUser(mr, "favio.riviera", "Favio", "Riviera", "bpm", "FavioRiviera@acme.com", "william.jobs", "Vice President of Marketing"));
userList.add(createUser(mr, "michael.morrison", "Michael", "Morrison", "bpm", "MichaelMorrison@acme.com", "william.jobs", "Chief Technical Officer"));
userList.add(createUser(mr, "marc.marseau", "Marc", "Marseau", "bpm", "MarcMarseau@acme.com", "michael.morrison", "Engineer"));
userList.add(createUser(mr, "joseph.hovell", "Joseph", "Hovell", "bpm", "JosephHovell@acme.com", "michael.morrison", "Engineer"));
userList.add(createUser(mr, "mauro.zetticci", "Mauro", "Zetticci", "bpm", "MauroZetticci@acme.com", "michael.morrison", "Consultant"));
userList.add(createUser(mr, "thomas.wallis", "Thomas", "Wallis", "bpm", "ThomasWallis@acme.com", "michael.morrison", "Consultant"));
userList.add(createUser(mrs, "daniela.angelo", "Daniela", "Angelo", "bpm", "DanielaAngelo@acme.com", "william.jobs", "Vice President of Sales"));
userList.add(createUser(mr, "anthony.nichols", "Anthony", "Nichols", "bpm", "AnthonyNicholls@acme.com", "daniela.angelo", "Account manager"));
userList.add(createUser(mrs, "misa.kumagai", "Misa", "Kumagai", "bpm", "MisaKumagai@acme.com", "daniela.angelo", "Account manager"));
userList.add(createUser(mr, "norio.yamazaki", "Norio", "Yamazaki", "bpm", "NorioYamazaki@acme.com", "daniela.angelo", "Account manager"));
userList.add(createUser(mrs, "giovanna.almeida", "Giovanna", "Almeida", "bpm", "GiovannaRochaAlmeida@acme.com", "daniela.angelo", "Account manager"));
createUser(mrs, "isabel.bleasdale", "Isabel", "Bleasdale", "bpm", "IsabelBleasdale@acme.com",
"favio.riviera", "Product marketing manager"));
userList.add(createUser(mr, "favio.riviera", "Favio", "Riviera", "bpm", "FavioRiviera@acme.com", "william.jobs",
"Vice President of Marketing"));
userList.add(createUser(mr, "michael.morrison", "Michael", "Morrison", "bpm", "MichaelMorrison@acme.com",
"william.jobs", "Chief Technical Officer"));
userList.add(createUser(mr, "marc.marseau", "Marc", "Marseau", "bpm", "MarcMarseau@acme.com", "michael.morrison",
"Engineer"));
userList.add(createUser(mr, "joseph.hovell", "Joseph", "Hovell", "bpm", "JosephHovell@acme.com", "michael.morrison",
"Engineer"));
userList.add(createUser(mr, "mauro.zetticci", "Mauro", "Zetticci", "bpm", "MauroZetticci@acme.com",
"michael.morrison", "Consultant"));
userList.add(createUser(mr, "thomas.wallis", "Thomas", "Wallis", "bpm", "ThomasWallis@acme.com", "michael.morrison",
"Consultant"));
userList.add(createUser(mrs, "daniela.angelo", "Daniela", "Angelo", "bpm", "DanielaAngelo@acme.com", "william.jobs",
"Vice President of Sales"));
userList.add(createUser(mr, "anthony.nichols", "Anthony", "Nichols", "bpm", "AnthonyNicholls@acme.com",
"daniela.angelo", "Account manager"));
userList.add(createUser(mrs, "misa.kumagai", "Misa", "Kumagai", "bpm", "MisaKumagai@acme.com", "daniela.angelo",
"Account manager"));
userList.add(createUser(mr, "norio.yamazaki", "Norio", "Yamazaki", "bpm", "NorioYamazaki@acme.com", "daniela.angelo",
"Account manager"));
userList.add(createUser(mrs, "giovanna.almeida", "Giovanna", "Almeida", "bpm", "GiovannaRochaAlmeida@acme.com",
"daniela.angelo", "Account manager"));
return users;
}
......@@ -185,7 +204,8 @@ public class DefaultOrganizationContribution implements IFileStoreContribution {
return r;
}
private Membership createMembership(final String username, final String parentGroupPath, final String groupName, final String roleName) {
private Membership createMembership(final String username, final String parentGroupPath, final String groupName,
final String roleName) {
final Membership membership = OrganizationFactory.eINSTANCE.createMembership();
membership.setGroupParentPath(parentGroupPath);
membership.setGroupName(groupName);
......@@ -198,12 +218,14 @@ public class DefaultOrganizationContribution implements IFileStoreContribution {
final Group group = OrganizationFactory.eINSTANCE.createGroup();
group.setName(name);
group.setParentPath(parentPath);
group.setDescription("This group represents the " + displayName.toLowerCase() + " department of the ACME organization");
group.setDescription(
"This group represents the " + displayName.toLowerCase() + " department of the ACME organization");
group.setDisplayName(displayName);
return group;
}
private User createUser(final String title, final String username, final String firstname, final String lastname, final String password, final String email,
private User createUser(final String title, final String username, final String firstname, final String lastname,
final String password, final String email,
final String manager, final String jobTitle) {
final User user = OrganizationFactory.eINSTANCE.createUser();
user.setTitle(title);
......@@ -220,13 +242,8 @@ public class DefaultOrganizationContribution implements IFileStoreContribution {
data.setBuilding("70");
data.setCity("Philadelphia");
final Random r = new Random(System.currentTimeMillis());
final NumberFormat format = NumberFormat.getIntegerInstance();
format.setMaximumIntegerDigits(3);
format.setMinimumIntegerDigits(3);
final String lastDigits = format.format(Math.abs(r.nextLong()));
data.setPhoneNumber("484-302-5" + lastDigits);
data.setFaxNumber("484-302-0" + lastDigits);
data.setPhoneNumber("484-302-5000");
data.setFaxNumber("484-302-0000");
data.setZipCode("19108");
data.setCountry("United States");
data.setState("PA");
......
......@@ -5,14 +5,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.connectors.repository;
......@@ -28,64 +26,68 @@ import org.eclipse.swt.graphics.Image;
/**
* @author Aurelie Zara
*
*/
public class DatabaseConnectorPropertiesRepositoryStore extends AbstractRepositoryStore<DatabaseConnectorPropertiesFileStore> {
private static final String STORE_NAME = "database_connectors_properties" ;
public static final String CONF_EXT = "properties" ;
private static final Set<String> extensions = new HashSet<String>() ;
static{
extensions.add(CONF_EXT) ;
public class DatabaseConnectorPropertiesRepositoryStore
extends AbstractRepositoryStore<DatabaseConnectorPropertiesFileStore> {
public static final String STORE_NAME = "database_connectors_properties";
public static final String CONF_EXT = "properties";
private static final Set<String> extensions = new HashSet<String>();
static {
extensions.add(CONF_EXT);
}
/* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getName()
*/
@Override
public String getName() {
return STORE_NAME;
}
@Override
public boolean canBeExported() {
return super.canBeExported();
}
/* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getDisplayName()
*/
@Override
public String getDisplayName() {
return Messages.databaseConnectorsProperties;
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getName()
*/
@Override
public String getName() {
return STORE_NAME;
}
/* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getIcon()
*/
@Override
public Image getIcon() {
return Pics.getImage("databases_driver.png",ConnectorPlugin.getDefault());
}
@Override
public boolean canBeExported() {
return super.canBeExported();
}
/* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getCompatibleExtensions()
*/
@Override
public Set<String> getCompatibleExtensions() {
return extensions;
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getDisplayName()
*/
@Override
public String getDisplayName() {
return Messages.databaseConnectorsProperties;
}
/* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.store.AbstractRepositoryStore#createRepositoryFileStore(java.lang.String)
*/
@Override
public DatabaseConnectorPropertiesFileStore createRepositoryFileStore(String fileName) {
if(fileName != null && !fileName.endsWith("."+CONF_EXT)){
fileName = fileName + "." + CONF_EXT;
}
return new DatabaseConnectorPropertiesFileStore(fileName, this);
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getIcon()
*/
@Override
public Image getIcon() {
return Pics.getImage("databases_driver.png", ConnectorPlugin.getDefault());
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.model.IRepositoryStore#getCompatibleExtensions()
*/
@Override
public Set<String> getCompatibleExtensions() {
return extensions;
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.common.repository.store.AbstractRepositoryStore#createRepositoryFileStore(java.lang.String)
*/
@Override
public DatabaseConnectorPropertiesFileStore createRepositoryFileStore(String fileName) {
if (fileName != null && !fileName.endsWith("." + CONF_EXT)) {
fileName = fileName + "." + CONF_EXT;
}
return new DatabaseConnectorPropertiesFileStore(fileName, this);
}
}
......@@ -38,7 +38,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.e4.ui.model.workbench;bundle-version="1.1.0.v20140512-1820",
org.eclipse.e4.core.di,
org.json,
org.eclipse.jface.databinding
org.eclipse.jface.databinding,
org.bonitasoft.studio.connectors
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Import-Package: org.bonitasoft.engine.bpm.bar,
......
package org.bonitasoft.studio.importer.bos.operation;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Properties;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import org.bonitasoft.studio.common.repository.Repository;
import org.bonitasoft.studio.common.repository.model.IRepositoryFileStore;
import org.bonitasoft.studio.common.repository.model.IRepositoryStore;
import org.bonitasoft.studio.connectors.repository.DatabaseConnectorPropertiesFileStore;
import org.bonitasoft.studio.connectors.repository.DatabaseConnectorPropertiesRepositoryStore;
import org.bonitasoft.studio.importer.bos.model.AbstractFileModel;
import org.bonitasoft.studio.importer.bos.model.AbstractFolderModel;
import org.bonitasoft.studio.importer.bos.model.BosArchive;
import org.bonitasoft.studio.importer.bos.model.BosArchiveTest;
import org.bonitasoft.studio.importer.bos.model.ConflictStatus;
import org.bonitasoft.studio.importer.bos.model.ImportAction;
import org.bonitasoft.studio.importer.bos.model.ImportArchiveModel;
import org.bonitasoft.studio.importer.bos.model.ImportStoreModel;
......@@ -54,6 +65,19 @@ public class ImportConflictsCheckerTest {
.as("File with same checksum should have KEEP import policy").isEqualTo(ImportAction.KEEP);
}
@Test
public void should_not_find_conflicts_on_databaseConnectors() throws Exception {
final ImportConflictsChecker conflictsChecker = new ImportConflictsChecker(createRepository());
DatabaseConnectorPropertiesRepositoryStore repositoryStore = createDatabaseConnectorPropertiesRepositoryStore();
AbstractFolderModel folderModel = createAbstractFolderModelWithDatabaseConnectorProperties();
try (InputStream inputstream = new FileInputStream(loadFile("/database-h2_bis.properties"))) {
conflictsChecker.compareDatabaseConnectorProperties(repositoryStore,
folderModel, createBosArchiveWithdatabaseConnectorProperties(inputstream));
}
AbstractFileModel importedPropertiesFile = folderModel.getFiles().get(0);
verify(importedPropertiesFile).setStatus(ConflictStatus.SAME_CONTENT);
}
private boolean isConflicting(Optional<ImportStoreModel> store) throws Exception {
return store.orElseThrow(() -> new Exception("store not found")).isConflicting();
}
......@@ -95,6 +119,46 @@ public class ImportConflictsCheckerTest {
return repo;
}
private DatabaseConnectorPropertiesRepositoryStore createDatabaseConnectorPropertiesRepositoryStore() throws Exception {
Properties properties = new Properties();
File propertiesFile = loadFile("/database-h2.properties");
try (InputStream is = new FileInputStream(propertiesFile)) {
properties.load(is);
}
final DatabaseConnectorPropertiesFileStore fileStore = mock(DatabaseConnectorPropertiesFileStore.class);
when(fileStore.getName()).thenReturn("database-h2.properties");
when(fileStore.getContent()).thenReturn(properties);
final DatabaseConnectorPropertiesRepositoryStore repo = mock(DatabaseConnectorPropertiesRepositoryStore.class);
when(repo.getChildren()).thenReturn(Arrays.asList(fileStore));
return repo;
}
private AbstractFolderModel createAbstractFolderModelWithDatabaseConnectorProperties() {
AbstractFileModel fileModel = mock(AbstractFileModel.class);
when(fileModel.getPath()).thenReturn("path");
when(fileModel.getFileName()).thenReturn("database-h2.properties");
AbstractFolderModel folderModel = mock(AbstractFolderModel.class);
when(folderModel.getFiles()).thenReturn(Arrays.asList(fileModel));
return folderModel;
}
private BosArchive createBosArchiveWithdatabaseConnectorProperties(InputStream inputStream) throws Exception {
ZipEntry entry = mock(ZipEntry.class);
ZipFile zipFile = mock(ZipFile.class);
when(zipFile.getInputStream(any())).thenReturn(inputStream);
BosArchive bosArchive = mock(BosArchive.class);
when(bosArchive.getEntry("path")).thenReturn(entry);
when(bosArchive.getZipFile()).thenReturn(zipFile);
return bosArchive;
}
private BosArchive newBosArchive(File archiveFile) throws ZipException, IOException {
final BosArchive bosArchive = spy(new BosArchive(archiveFile));
doReturn(Arrays.asList(createRepositoryStore("application_resources"), createRepositoryStore("diagrams"),
......
#Wed May 17 14:26:10 CEST 2017
jars=h2-1.3.170.jar
default=h2-1.3.170.jar
auto=true
#Mon May 15 11:32:38 CEST 2017
jars=h2-1.3.170.jar
default=h2-1.3.170.jar
auto=true
......@@ -3,15 +3,23 @@ package org.bonitasoft.studio.importer.bos.operation;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Properties;
import java.util.function.Predicate;
import java.util.stream.Stream;
import java.util.zip.CRC32;
import java.util.zip.CheckedInputStream;
import java.util.zip.ZipEntry;
import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.common.repository.Repository;
import org.bonitasoft.studio.common.repository.model.IRepositoryFileStore;
import org.bonitasoft.studio.common.repository.model.IRepositoryStore;
import org.bonitasoft.studio.connectors.repository.DatabaseConnectorPropertiesFileStore;
import org.bonitasoft.studio.connectors.repository.DatabaseConnectorPropertiesRepositoryStore;
import org.bonitasoft.studio.importer.bos.i18n.Messages;
import org.bonitasoft.studio.importer.bos.model.AbstractFileModel;
import org.bonitasoft.studio.importer.bos.model.AbstractFolderModel;
......@@ -50,12 +58,60 @@ public class ImportConflictsChecker {
.filter(aStoreInCurrentRepo -> Objects.equals(aStoreInCurrentRepo.getName(), importedStore.getFolderName()))
.findFirst()
.ifPresent(storeInCurrentRepo -> {
final File file = storeInCurrentRepo.getResource().getLocation().toFile();
compareFolders(bosArchive, file.listFiles(), importedStore.getFolders());
compareFiles(bosArchive, file.listFiles(), importedStore.getFiles());
if (Objects.equals(storeInCurrentRepo.getName(),
DatabaseConnectorPropertiesRepositoryStore.STORE_NAME)) {
compareDatabaseConnectorProperties(storeInCurrentRepo, importedStore, bosArchive);
} else {
final File file = storeInCurrentRepo.getResource().getLocation().toFile();
compareFolders(bosArchive, file.listFiles(), importedStore.getFolders());
compareFiles(bosArchive, file.listFiles(), importedStore.getFiles());
}
});
}
// We can't use checksum to compare .properties file because there is always a comment with the creation date at the top of the .properties file -> always conflicting.
protected void compareDatabaseConnectorProperties(IRepositoryStore<? extends IRepositoryFileStore> storeInCurrentRepo,
AbstractFolderModel importedStore, BosArchive bosArchive) {
List<DatabaseConnectorPropertiesFileStore> currentPropertiesFiles = (List<DatabaseConnectorPropertiesFileStore>) storeInCurrentRepo
.getChildren();
importedStore.getFiles().stream()
.forEach(importedPropertiesFile -> {
findConflinctingDatabaseConnectorPropertiesInCurrentRepo(importedPropertiesFile, currentPropertiesFiles,
bosArchive).ifPresent(currentPropertiesFile -> {
compareConflinctingDatabaseConnectorPropertiesfiles(bosArchive, importedPropertiesFile,
currentPropertiesFile);
});
});
}
private Optional<DatabaseConnectorPropertiesFileStore> findConflinctingDatabaseConnectorPropertiesInCurrentRepo(
AbstractFileModel importedPropertiesFile,
List<DatabaseConnectorPropertiesFileStore> currentPropertiesFiles, BosArchive bosArchive) {
return currentPropertiesFiles.stream()
.filter(currentPropertiesFile -> Objects.equals(currentPropertiesFile.getName(),
importedPropertiesFile.getFileName()))
.findFirst();
}
private void compareConflinctingDatabaseConnectorPropertiesfiles(BosArchive bosArchive,
AbstractFileModel importedPropertiesFile, DatabaseConnectorPropertiesFileStore currentPropertiesFile) {
ZipEntry entry = bosArchive.getEntry(importedPropertiesFile.getPath());
try (InputStream inputStream = bosArchive.getZipFile().getInputStream(entry)) {
Properties properties = new Properties();
properties.load(inputStream);
importedPropertiesFile.setStatus(properties.equals(currentPropertiesFile.getContent())
? ConflictStatus.SAME_CONTENT
: ConflictStatus.CONFLICTING);
importedPropertiesFile.setImportAction(importedPropertiesFile.isConflicting()
? ImportAction.KEEP
: ImportAction.OVERWRITE);
} catch (IOException e) {
BonitaStudioLog.error(
"An error occured while comparing databaseConnectorProperties during import", e);
importedPropertiesFile.setStatus(ConflictStatus.CONFLICTING);
} ;
}
private void compareFolders(BosArchive bosArchive, File[] foldersFromCurrentRepo,
List<AbstractFolderModel> foldersFromArchive) {
foldersFromArchive.stream()
......
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