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;
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;
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;
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);
}
}
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);
}
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);
}
PeopleJcrUtils.createContact(resourcesService, peopleService, tmpPerson,
PeopleTypes.PEOPLE_MAIL, value, false, ContactValueCatalogs.CONTACT_CAT_MAIN,
null);
-
}
}
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);
}