X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=org.argeo.suite.workbench.rap%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fworkbench%2Fcommands%2FImportEntities.java;h=b9906e912aaae9b4e2e5e266e73573b931851a7d;hp=39655065d427137e3556d4c6a4566a5a0f1f980c;hb=e80a8ae5c0b59bac7e83733458bf18eb097653d8;hpb=294a3c05c54676ce508e5e6d1f7d26fb4701e675 diff --git a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java index 3965506..b9906e9 100644 --- a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java +++ b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java @@ -1,7 +1,7 @@ package org.argeo.suite.workbench.commands; -import static org.argeo.connect.util.JxlUtils.getStringValue; import static org.argeo.eclipse.ui.EclipseUiUtils.notEmpty; +import static org.argeo.suite.workbench.commands.JxlUtils.getStringValue; import java.io.File; import java.io.FileInputStream; @@ -31,7 +31,6 @@ import org.argeo.connect.ConnectNames; import org.argeo.connect.resources.ResourcesNames; import org.argeo.connect.resources.ResourcesService; import org.argeo.connect.util.ConnectJcrUtils; -import org.argeo.connect.util.JxlUtils; import org.argeo.eclipse.ui.EclipseUiUtils; import org.argeo.jcr.JcrUtils; import org.argeo.people.ContactValueCatalogs; @@ -41,7 +40,7 @@ import org.argeo.people.PeopleService; import org.argeo.people.PeopleTypes; import org.argeo.people.util.PeopleJcrUtils; import org.argeo.people.util.PersonJcrUtils; -import org.argeo.suite.SuiteException; +import org.argeo.suite.workbench.SuiteWorkbenchException; import org.argeo.suite.workbench.AsUiPlugin; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; @@ -130,7 +129,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { userInputPage = new UserInputPage("User input page"); addPage(userInputPage); } catch (Exception e) { - throw new SuiteException("Cannot add page to wizard", e); + throw new SuiteWorkbenchException("Cannot add page to wizard", e); } } @@ -147,7 +146,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { else if (PeopleTypes.PEOPLE_PERSON.equals(type)) importDefaultPersonFile(in); } catch (IOException e) { - throw new SuiteException("Cannot import mapping file", e); + throw new SuiteWorkbenchException("Cannot import mapping file", e); } finally { IOUtils.closeQuietly(in); } @@ -400,7 +399,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { resourcesService.refreshKnownTags(mlParent); } catch (PeopleException | RepositoryException e) { - throw new SuiteException("Cannot import mapping file, error at line: " + (i + 1), e); + throw new SuiteWorkbenchException("Cannot import mapping file, error at line: " + (i + 1), e); } finally { JcrUtils.logoutQuietly(session); } @@ -570,7 +569,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { String message = "Cannot import mapping file, error at line: " + (i + 1); // TODO Check why the error is swallowed. log.error(message, e); - throw new SuiteException(message, e); + throw new SuiteWorkbenchException(message, e); } finally { JcrUtils.logoutQuietly(session); }