Repository: openmeetings Updated Branches: refs/heads/master effe83366 -> e150dc3a3
[OPENMEETINGS-1714] more issues are fixed Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/e150dc3a Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/e150dc3a Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/e150dc3a Branch: refs/heads/master Commit: e150dc3a36349adf81518734c472764ac88999ab Parents: effe833 Author: Maxim Solodovnik <[email protected]> Authored: Thu Oct 5 16:45:08 2017 +0700 Committer: Maxim Solodovnik <[email protected]> Committed: Thu Oct 5 16:45:08 2017 +0700 ---------------------------------------------------------------------- .../java/org/apache/openmeetings/cli/Admin.java | 3 - .../InstallationDocumentHandler.java | 62 -------------------- .../apache/openmeetings/util/OmFileHelper.java | 5 -- .../web/pages/install/TestInstall.java | 3 +- 4 files changed, 2 insertions(+), 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/openmeetings/blob/e150dc3a/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java ---------------------------------------------------------------------- diff --git a/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java b/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java index 86fc5b0..616e190 100644 --- a/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java +++ b/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java @@ -62,7 +62,6 @@ import org.apache.openmeetings.db.entity.user.User; import org.apache.openmeetings.db.util.ApplicationHelper; import org.apache.openmeetings.installation.ImportInitvalues; import org.apache.openmeetings.installation.InstallationConfig; -import org.apache.openmeetings.installation.InstallationDocumentHandler; import org.apache.openmeetings.util.CalendarPatterns; import org.apache.openmeetings.util.ConnectionProperties; import org.apache.openmeetings.util.ImportHelper; @@ -279,8 +278,6 @@ public class Admin { ImportInitvalues importInit = getApplicationContext().getBean(ImportInitvalues.class); importInit.loadAll(cfg, force); } - - InstallationDocumentHandler.createDocument(3); } catch(Exception e) { handleError("Install failed", e); } http://git-wip-us.apache.org/repos/asf/openmeetings/blob/e150dc3a/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationDocumentHandler.java ---------------------------------------------------------------------- diff --git a/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationDocumentHandler.java b/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationDocumentHandler.java deleted file mode 100644 index 1947c20..0000000 --- a/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationDocumentHandler.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License") + you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.openmeetings.installation; - -import static java.nio.charset.StandardCharsets.UTF_8; - -import java.io.FileOutputStream; -import java.io.OutputStream; -import java.io.OutputStreamWriter; - -import org.apache.openmeetings.util.OmFileHelper; -import org.dom4j.Document; -import org.dom4j.DocumentHelper; -import org.dom4j.Element; -import org.dom4j.Node; -import org.dom4j.io.SAXReader; -import org.dom4j.io.XMLWriter; - -public class InstallationDocumentHandler { - private InstallationDocumentHandler() {} - - public static void createDocument(int stepNo) throws Exception { - Document document = DocumentHelper.createDocument(); - - Element root = document.addElement("install"); - Element step = root.addElement("step"); - - step.addElement("stepnumber").addText(String.valueOf(stepNo)); - step.addElement("stepname").addText("Step " + stepNo); - - try (OutputStream os = new FileOutputStream(OmFileHelper.getInstallFile())) { - XMLWriter writer = new XMLWriter(new OutputStreamWriter(os, UTF_8)); - writer.write(document); - writer.close(); - } - } - - public static int getCurrentStepNumber() throws Exception { - SAXReader reader = new SAXReader(); - Document document = reader.read(OmFileHelper.getInstallFile()); - - Node node = document.selectSingleNode("//install/step/stepnumber"); - - return Integer.parseInt(node.getText()); - } -} http://git-wip-us.apache.org/repos/asf/openmeetings/blob/e150dc3a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java ---------------------------------------------------------------------- diff --git a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java index aa6c4b1..bdecf8f 100644 --- a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java +++ b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java @@ -40,7 +40,6 @@ public class OmFileHelper { private static final String CONF_DIR = "conf"; private static final String IMAGES_DIR = "images"; private static final String WML_DIR = "stored"; - private static final String INSTALL_FILE = "install.xml"; public static final String BACKUP_DIR = "backup"; public static final String IMPORT_DIR = "import"; @@ -238,10 +237,6 @@ public class OmFileHelper { return new File(OmFileHelper.OM_HOME, CONF_DIR); } - public static File getInstallFile() { - return new File(getConfDir(), INSTALL_FILE); - } - public static File getScreenSharingDir() { return new File(OmFileHelper.OM_HOME, SCREENSHARING_DIR); } http://git-wip-us.apache.org/repos/asf/openmeetings/blob/e150dc3a/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/install/TestInstall.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/install/TestInstall.java b/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/install/TestInstall.java index b405093..5f0feac 100644 --- a/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/install/TestInstall.java +++ b/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/install/TestInstall.java @@ -113,7 +113,8 @@ public class TestInstall { wizardTester.setValue("view:docDpi", "150"); wizardTester.setValue("view:docQuality", "90"); tester.executeBehavior(next); //crypt step - checkErrors(tester, 0); + // not checking errors + tester.cleanupFeedbackMessages(); wizardTester.setValue("view:cryptClassName", SCryptImplementation.class.getName()); tester.executeBehavior(next); //install step checkErrors(tester, 0);
