--- /dev/null
+package org.simantics.db.procore.ui;\r
+\r
+import java.io.File;\r
+\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.simantics.db.exception.InternalException;\r
+import org.simantics.db.procore.ui.internal.UI;\r
+\r
+public class Auxiliary {\r
+ /**\r
+ * @param shell for the user interface.\r
+ * @param exception thrown from server.\r
+ * @return true if server can be started.\r
+ */\r
+ public static boolean beforeStart(Shell shell, File folder) throws InternalException {\r
+ boolean skipPurge = "true".equals(System.getProperty("org.simantics.db.procore.ui.skipPurge"));\r
+ if (skipPurge)\r
+ return true;\r
+ return UI.purge(shell, folder);\r
+ }\r
+ /**\r
+ * @param shell for the user interface.\r
+ * @param exception thrown from server start.\r
+ * @return true if problem with server start was successfully fixed.\r
+ */\r
+ public static boolean handleStart(Shell shell, InternalException exception) throws InternalException {\r
+ return UI.handleStart(shell, exception);\r
+ }\r
+ /**\r
+ * @param shell for the user interface.\r
+ * @param folder of the database.\r
+ * @return true if deletion was successful.\r
+ */\r
+ public static boolean delete(Shell shell, File folder) {\r
+ return UI.delete(shell, folder);\r
+ }\r
+ /**\r
+ * @param shell for the user interface.\r
+ * @param folder of the database.\r
+ * @return true if purge was successful.\r
+ */\r
+ public static boolean purge(Shell shell, File folder) {\r
+ return UI.purge(shell, folder);\r
+ }\r
+}\r