From 4acdc0b994073b8f899ec4a497a48a1eb7f31976 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 25 Jul 2015 13:17:53 -0300 Subject: [PATCH 1/8] Minor java 8 refactors. --- .../exporter/FreemindExporter.java | 14 +++---------- .../java/com/wisemapping/mail/Mailer.java | 21 +++++++------------ .../com/wisemapping/model/MindmapIcons.java | 2 +- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java index 39474edf..8dd352bd 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -63,10 +63,10 @@ public class FreemindExporter export(map.getUnzipXml(), outputStream); } - public void export(byte[] xml, @NotNull OutputStream outputStream) throws ExportException { + public void export(@NotNull byte[] xml, @NotNull OutputStream outputStream) throws ExportException { objectFactory = new com.wisemapping.jaxb.freemind.ObjectFactory(); - nodesMap = new HashMap(); + nodesMap = new HashMap<>(); final com.wisemapping.jaxb.wisemap.Map mindmapMap; try { @@ -124,15 +124,7 @@ public class FreemindExporter } JAXBUtils.saveMap(freemindMap, outputStream); - } catch (JAXBException e) { - throw new ExportException(e); - } catch (UnsupportedEncodingException e) { - throw new ExportException(e); - } catch (SAXException e) { - throw new ExportException(e); - } catch (ParserConfigurationException e) { - throw new ExportException(e); - } catch (IOException e) { + } catch (JAXBException | SAXException | IOException | ParserConfigurationException e) { throw new ExportException(e); } } diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java b/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java index e935b577..be7fc416 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java @@ -53,21 +53,16 @@ public final class Mailer { public void sendEmail(final String from, final String to, final String subject, final Map model, @NotNull final String templateMail) { - final MimeMessagePreparator preparator = - new MimeMessagePreparator() { - public void prepare(MimeMessage mimeMessage) - throws Exception { - final MimeMessageHelper message = new MimeMessageHelper(mimeMessage); - message.setTo(to); - message.setFrom(from); - message.setSubject(subject); - final String messageBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "/mail/" + templateMail, model); - message.setText(messageBody, true); - } - }; + this.mailSender.send(mimeMessage -> { + final MimeMessageHelper message = new MimeMessageHelper(mimeMessage); + message.setTo(to); + message.setFrom(from); + message.setSubject(subject); - this.mailSender.send(preparator); + final String messageBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "/mail/" + templateMail, model); + message.setText(messageBody, true); + }); } public void setMailSender(JavaMailSender mailer) { diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java b/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java index 6284c7b2..734f141c 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java @@ -215,7 +215,7 @@ public class MindmapIcons { private static void load() { try { if (iconsByFamily == null) { - iconsByFamily = new TreeMap>(); + iconsByFamily = new TreeMap<>(); Field[] fields = MindmapIcons.class.getDeclaredFields(); for (Field field : fields) { From a5ee4475e1a1b78459115e97402c3a86f95219b4 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 1 Nov 2015 21:53:38 -0300 Subject: [PATCH 2/8] Fix typo... --- wise-webapp/src/main/resources/messages_en.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index 1d5427f4..3722a39c 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -218,7 +218,7 @@ DESELECT_ALL_TOPIC=Deselect All Topic SHORTCUTS=Shortcuts COLLAPSE_CHILDREN=Collapse Children KEYBOARD_SHORTCUTS_MSG=Keyboard shortcuts can help you save time by allowing you to never take your hands off the keyboard to use the mouse. -COPY_AND_PASTE_TOPICS=Copy and Page Topics +COPY_AND_PASTE_TOPICS=Copy and Paste Topics MULTIPLE_LINES=Add multiple text lines TERM_OF_USE=Terms and Conditions From 5db868bb56b50023b1f4a477562326dfefd4b49d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 2 Nov 2015 08:57:12 -0300 Subject: [PATCH 3/8] Return to java 1.7 --- pom.xml | 4 ++-- .../java/com/wisemapping/mail/Mailer.java | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 63eeccd4..5c191319 100644 --- a/pom.xml +++ b/pom.xml @@ -119,8 +119,8 @@ maven-compiler-plugin 3.1 - 1.8 - 1.8 + 1.7 + 1.7 UTF-8 diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java b/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java index be7fc416..e935b577 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java @@ -53,16 +53,21 @@ public final class Mailer { public void sendEmail(final String from, final String to, final String subject, final Map model, @NotNull final String templateMail) { + final MimeMessagePreparator preparator = + new MimeMessagePreparator() { + public void prepare(MimeMessage mimeMessage) + throws Exception { + final MimeMessageHelper message = new MimeMessageHelper(mimeMessage); + message.setTo(to); + message.setFrom(from); + message.setSubject(subject); - this.mailSender.send(mimeMessage -> { - final MimeMessageHelper message = new MimeMessageHelper(mimeMessage); - message.setTo(to); - message.setFrom(from); - message.setSubject(subject); + final String messageBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "/mail/" + templateMail, model); + message.setText(messageBody, true); + } + }; - final String messageBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "/mail/" + templateMail, model); - message.setText(messageBody, true); - }); + this.mailSender.send(preparator); } public void setMailSender(JavaMailSender mailer) { From 4824d7643d7c63db6aab77a11ec036661e478507 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 2 Nov 2015 08:57:21 -0300 Subject: [PATCH 4/8] Return to java 1.7. Why ?. Spring does not like it. --- phantomjsdriver.log | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 phantomjsdriver.log diff --git a/phantomjsdriver.log b/phantomjsdriver.log new file mode 100644 index 00000000..8dd20693 --- /dev/null +++ b/phantomjsdriver.log @@ -0,0 +1,14 @@ +[INFO - 2015-11-02T11:53:26.059Z] GhostDriver - Main - running on port 23859 +[INFO - 2015-11-02T11:53:26.556Z] Session [53aba090-8158-11e5-b4b7-df7d699a4283] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true} +[INFO - 2015-11-02T11:53:26.556Z] Session [53aba090-8158-11e5-b4b7-df7d699a4283] - page.customHeaders: - {} +[INFO - 2015-11-02T11:53:26.556Z] Session [53aba090-8158-11e5-b4b7-df7d699a4283] - CONSTRUCTOR - Desired Capabilities: {"phantomjs.binary.path":"/Users/pveiga/repo/wisemapping/mindplot/target/phantomjs-maven-plugin/phantomjs-1.9.2-macosx/bin/phantomjs","javascriptEnabled":true} +[INFO - 2015-11-02T11:53:26.556Z] Session [53aba090-8158-11e5-b4b7-df7d699a4283] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2015-11-02T11:53:26.556Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 53aba090-8158-11e5-b4b7-df7d699a4283 +[INFO - 2015-11-02T11:53:30.454Z] ShutdownReqHand - _handle - About to shutdown +[INFO - 2015-11-02T11:56:02.272Z] GhostDriver - Main - running on port 47468 +[INFO - 2015-11-02T11:56:02.546Z] Session [b0a5cff0-8158-11e5-b537-631f7ef82703] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true} +[INFO - 2015-11-02T11:56:02.546Z] Session [b0a5cff0-8158-11e5-b537-631f7ef82703] - page.customHeaders: - {} +[INFO - 2015-11-02T11:56:02.546Z] Session [b0a5cff0-8158-11e5-b537-631f7ef82703] - CONSTRUCTOR - Desired Capabilities: {"phantomjs.binary.path":"/Users/pveiga/repo/wisemapping/mindplot/target/phantomjs-maven-plugin/phantomjs-1.9.2-macosx/bin/phantomjs","javascriptEnabled":true} +[INFO - 2015-11-02T11:56:02.546Z] Session [b0a5cff0-8158-11e5-b537-631f7ef82703] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2015-11-02T11:56:02.546Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: b0a5cff0-8158-11e5-b537-631f7ef82703 +[INFO - 2015-11-02T11:56:04.055Z] ShutdownReqHand - _handle - About to shutdown From 1068ed499dd4987fcdae61b84b323d44890d45a9 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Fri, 14 Sep 2018 13:44:24 -0700 Subject: [PATCH 5/8] Try push --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 60901fad..18ede305 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ The goal of this project is to provide a high quality product that can be deploy The following products must be installed: - * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) - * Maven 3.x or higher ([http://maven.apache.org/]) + * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) + * Maven 3.x or higher ([http://maven.apache.org/]) ### Compiling From 8be186d90e15ab5e16946baf74f60042044937b0 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Fri, 14 Sep 2018 13:45:03 -0700 Subject: [PATCH 6/8] Revert "Try push" This reverts commit f9acc51888df986b289a5772ff82821e525e2a6b. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 18ede305..60901fad 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ The goal of this project is to provide a high quality product that can be deploy The following products must be installed: - * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) - * Maven 3.x or higher ([http://maven.apache.org/]) + * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) + * Maven 3.x or higher ([http://maven.apache.org/]) ### Compiling From 57b2e79c0de97f79072ee18a42b6c2d35a62f3c3 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Fri, 14 Sep 2018 17:21:44 -0700 Subject: [PATCH 7/8] Update batik library. Fix sample SVG tests. --- README.md | 2 +- mindplot/pom.xml | 53 +++++++++---------- pom.xml | 2 +- wise-webapp/pom.xml | 27 ++++++---- .../webapp/WEB-INF/classes/log4j.properties | 12 ++--- .../test/export/ExportSVGBasedTest.java | 4 +- .../test/export/ExportXsltBasedTest.java | 3 +- .../src/test/resources/data/export/bigmap.doc | 2 +- .../src/test/resources/data/export/bigmap.odt | 2 +- .../src/test/resources/data/export/bug2.doc | 2 +- .../src/test/resources/data/export/bug2.odt | 2 +- .../src/test/resources/data/export/bug3.doc | 2 +- .../src/test/resources/data/export/bug3.odt | 2 +- .../resources/data/export/cdata-support.doc | 2 +- .../resources/data/export/cdata-support.odt | 2 +- .../test/resources/data/export/complex.doc | 2 +- .../test/resources/data/export/complex.odt | 2 +- .../test/resources/data/export/emptyNodes.doc | 2 +- .../test/resources/data/export/emptyNodes.odt | 2 +- .../src/test/resources/data/export/enc.doc | 2 +- .../src/test/resources/data/export/enc.odt | 2 +- .../src/test/resources/data/export/huge.doc | 2 +- .../src/test/resources/data/export/huge.odt | 2 +- .../src/test/resources/data/export/i18n.doc | 2 +- .../src/test/resources/data/export/i18n.odt | 2 +- .../src/test/resources/data/export/i18n2.doc | 2 +- .../src/test/resources/data/export/i18n2.odt | 2 +- .../src/test/resources/data/export/issue.doc | 2 +- .../src/test/resources/data/export/issue.odt | 2 +- .../test/resources/data/export/longnodes.doc | 2 +- .../test/resources/data/export/longnodes.odt | 2 +- .../src/test/resources/data/export/npe.doc | 2 +- .../src/test/resources/data/export/npe.odt | 2 +- .../test/resources/data/export/process.doc | 2 +- .../test/resources/data/export/process.odt | 2 +- .../test/resources/data/export/sample2.doc | 2 +- .../test/resources/data/export/sample2.odt | 2 +- .../test/resources/data/export/sample3.doc | 2 +- .../test/resources/data/export/sample3.odt | 2 +- .../test/resources/data/export/sample4.doc | 2 +- .../test/resources/data/export/sample4.odt | 2 +- .../resources/data/export/simple-maps.doc | 2 +- .../resources/data/export/simple-maps.odt | 2 +- .../data/export/welcome-reloaded.doc | 2 +- .../data/export/welcome-reloaded.odt | 2 +- .../test/resources/data/export/welcome.doc | 2 +- .../test/resources/data/export/welcome.odt | 2 +- .../test/resources/data/svg/bug-nbsp-exp.svg | 2 +- .../src/test/resources/data/svg/bug-nbsp.svg | 2 +- .../src/test/resources/data/svg/bug1-exp.svg | 2 +- .../src/test/resources/data/svg/bug1.svg | 2 +- .../src/test/resources/data/svg/bug3-exp.svg | 2 +- .../src/test/resources/data/svg/bug3.svg | 2 +- .../test/resources/data/svg/export-exp.svg | 2 +- .../src/test/resources/data/svg/export.svg | 2 +- .../test/resources/data/svg/map-3.0-exp.svg | 2 +- .../src/test/resources/data/svg/map-3.0.svg | 2 +- .../src/test/resources/data/svg/map1-exp.svg | 2 +- .../src/test/resources/data/svg/map1.svg | 2 +- .../src/test/resources/data/svg/map2-exp.svg | 2 +- .../src/test/resources/data/svg/map2.svg | 2 +- .../src/test/resources/data/svg/map3-exp.svg | 2 +- .../src/test/resources/data/svg/map3.svg | 2 +- .../src/test/resources/data/svg/map4-exp.svg | 2 +- .../src/test/resources/data/svg/map4.svg | 2 +- .../src/test/resources/data/svg/map5-exp.svg | 2 +- .../src/test/resources/data/svg/map5.svg | 2 +- .../src/test/resources/data/svg/map6-exp.svg | 2 +- .../src/test/resources/data/svg/map6.svg | 2 +- 69 files changed, 116 insertions(+), 111 deletions(-) diff --git a/README.md b/README.md index 60901fad..48d834c0 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The previously generated war can be deployed locally executing within the direct `cd wise-webapp;mvn jetty:run-war` -This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user. +This will start the application on the URL: [http://localhost:8080/] using file based database.. User: test@wisemapping.org Password: test diff --git a/mindplot/pom.xml b/mindplot/pom.xml index d12df9c6..ae777c5b 100644 --- a/mindplot/pom.xml +++ b/mindplot/pom.xml @@ -50,28 +50,27 @@ def outdir = new File(project.basedir, 'src/main/javascript'); - if (project.packaging != 'pom') - { - def dir = new File(project.basedir, 'src/main/resources/'); + if (project.packaging != 'pom') { + def dir = new File(project.basedir, 'src/main/resources/'); - dir.eachFile { file -> - def matcher = file.name =~ /messages_(.+)\.properties/; - def lang = matcher[0][1]; - def outfile = new File(outdir, "MessageBundle_${lang}.js"); - println "Converting ${file.name} to ${outfile.name}"; + dir.eachFile { file -> + def matcher = file.name =~ /messages_(.+)\.properties/; + def lang = matcher[0][1]; + def outfile = new File(outdir, "MessageBundle_${lang}.js"); + println "Converting ${file.name} to ${outfile.name}"; - outfile.withWriter('UTF-8') { out -> - out.writeLine "mindplot.Messages.BUNDLES['${lang.toLowerCase()}'] = { "; - file.eachLine('UTF-8') { line -> - if( line.trim()!="" && line[0]!='#' ) { - matcher = line =~ /(.+)=(.+)/; - out.writeLine("'${matcher[0][1]}' : \"${matcher[0][2]}\","); - } - } - out.writeLine("'DUMMY' : '' "); - out.writeLine "};" - } - } + outfile.withWriter('UTF-8') { out -> + out.writeLine "mindplot.Messages.BUNDLES['${lang.toLowerCase()}'] = { "; + file.eachLine('UTF-8') { line -> + if (line.trim() != "" && line[0] != '#') { + matcher = line =~ /(.+)=(.+)/; + out.writeLine("'${matcher[0][1]}' : \"${matcher[0][2]}\","); + } + } + out.writeLine("'DUMMY' : '' "); + out.writeLine "};" + } + } } @@ -258,13 +257,13 @@ com.github.searls jasmine-maven-plugin 1.3.1.5 - - - - test - - - + + + + + + + net.sourceforge.htmlunit diff --git a/pom.xml b/pom.xml index 5c191319..ff8eda62 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,7 @@ org.apache.maven.plugins maven-dependency-plugin - 2.5 + 2.10 org.jvnet.jaxb2.maven2 diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index d0717085..4ff898ea 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -28,7 +28,8 @@ - 3.1.3.RELEASE + 3.2.18.RELEASE + 3.2.10.RELEASE @@ -61,9 +62,8 @@ org.testng testng - 5.8 + 6.9.8 test - jdk15 com.intellij @@ -80,13 +80,13 @@ org.springframework.security spring-security-ldap - ${org.springframework.version} + ${org.springframework.addons} compile org.springframework.security spring-security-openid - ${org.springframework.version} + ${org.springframework.addons} compile @@ -122,7 +122,7 @@ org.apache.xmlgraphics fop - 0.94 + 2.3 org.springframework @@ -163,19 +163,19 @@ org.springframework.security spring-security-web - ${org.springframework.version} + ${org.springframework.addons} compile org.springframework.security spring-security-core - ${org.springframework.version} + ${org.springframework.addons} compile org.springframework.security spring-security-config - ${org.springframework.version} + ${org.springframework.addons} runtime @@ -205,7 +205,7 @@ org.apache.xmlgraphics batik-transcoder - 1.7 + 1.9.1 compile @@ -217,8 +217,13 @@ org.apache.xmlgraphics batik-codec - 1.7 + 1.9.1 + + + + + javax javaee-api diff --git a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties index 8895dae4..e44a9c52 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties @@ -1,9 +1,9 @@ -log4j.rootLogger=WARN, stdout, R -log4j.logger.com.wisemapping=WARN,stdout,R -log4j.logger.org.springframework=WARN,stdout,R -log4j.logger.org.codehaus.jackson=WARN,stdout,R -log4j.logger.org.hibernate=WARN,stdout,R -log4j.logger.org.hibernate.engine.StatefulPersistenceContext=ERROR,stdout,R +log4j.rootLogger=DEBUG, stdout, R +log4j.logger.com.wisemapping=DEBUG,stdout,R +log4j.logger.org.springframework=DEBUG,stdout,R +log4j.logger.org.codehaus.jackson=DEBUG,stdout,R +log4j.logger.org.hibernate=DEBUG,stdout,R +log4j.logger.org.hibernate.engine.StatefulPersistenceContext=DEBUG,stdout,R #log4j.logger.org.hibernate.SQL=WARN,stdout,R diff --git a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportSVGBasedTest.java b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportSVGBasedTest.java index ddb366c5..55b6f5cd 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportSVGBasedTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportSVGBasedTest.java @@ -92,11 +92,11 @@ public class ExportSVGBasedTest { final File[] svgFile = dataDir.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { - return name.endsWith(".svg") && !name.contains( "-exp.svg"); + return name.endsWith(".svg") && !name.contains("-exp.svg"); } }); - if(svgFile==null){ + if (svgFile == null) { throw new IllegalArgumentException("Wrong based path specified. Change based path..."); } diff --git a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java index 30c209c1..f6f69d3b 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java @@ -13,6 +13,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.io.*; +import java.nio.charset.StandardCharsets; @Test public class ExportXsltBasedTest { @@ -32,7 +33,7 @@ public class ExportXsltBasedTest { // Export mile content ... final ByteArrayOutputStream bos = new ByteArrayOutputStream(); exporter.export(wiseMapContent, bos); - final String exportContent = new String(bos.toByteArray(), ENC_UTF_8); + final String exportContent = new String(bos.toByteArray(), StandardCharsets.UTF_8); Assert.assertEquals(exportContent, recContent); } else { diff --git a/wise-webapp/src/test/resources/data/export/bigmap.doc b/wise-webapp/src/test/resources/data/export/bigmap.doc index debdbe7d..daa5ee47 100644 --- a/wise-webapp/src/test/resources/data/export/bigmap.doc +++ b/wise-webapp/src/test/resources/data/export/bigmap.doc @@ -1,5 +1,5 @@ - + corona diff --git a/wise-webapp/src/test/resources/data/export/bigmap.odt b/wise-webapp/src/test/resources/data/export/bigmap.odt index 31ff1723..4a1baee6 100644 --- a/wise-webapp/src/test/resources/data/export/bigmap.odt +++ b/wise-webapp/src/test/resources/data/export/bigmap.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/bug2.doc b/wise-webapp/src/test/resources/data/export/bug2.doc index c6ec5345..147d968e 100644 --- a/wise-webapp/src/test/resources/data/export/bug2.doc +++ b/wise-webapp/src/test/resources/data/export/bug2.doc @@ -1,5 +1,5 @@ - + SaberMás diff --git a/wise-webapp/src/test/resources/data/export/bug2.odt b/wise-webapp/src/test/resources/data/export/bug2.odt index 7b67b000..fd67cef8 100644 --- a/wise-webapp/src/test/resources/data/export/bug2.odt +++ b/wise-webapp/src/test/resources/data/export/bug2.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/bug3.doc b/wise-webapp/src/test/resources/data/export/bug3.doc index 85002d6c..1820b1b1 100644 --- a/wise-webapp/src/test/resources/data/export/bug3.doc +++ b/wise-webapp/src/test/resources/data/export/bug3.doc @@ -1,5 +1,5 @@ - + Indicator needs diff --git a/wise-webapp/src/test/resources/data/export/bug3.odt b/wise-webapp/src/test/resources/data/export/bug3.odt index 29c594b0..4ad9a778 100644 --- a/wise-webapp/src/test/resources/data/export/bug3.odt +++ b/wise-webapp/src/test/resources/data/export/bug3.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/cdata-support.doc b/wise-webapp/src/test/resources/data/export/cdata-support.doc index 8b0214ed..c8243d2f 100644 --- a/wise-webapp/src/test/resources/data/export/cdata-support.doc +++ b/wise-webapp/src/test/resources/data/export/cdata-support.doc @@ -1,5 +1,5 @@ - + Observation diff --git a/wise-webapp/src/test/resources/data/export/cdata-support.odt b/wise-webapp/src/test/resources/data/export/cdata-support.odt index e65ecaaa..9d5f03b2 100644 --- a/wise-webapp/src/test/resources/data/export/cdata-support.odt +++ b/wise-webapp/src/test/resources/data/export/cdata-support.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/complex.doc b/wise-webapp/src/test/resources/data/export/complex.doc index abf358a4..c95e10c7 100644 --- a/wise-webapp/src/test/resources/data/export/complex.doc +++ b/wise-webapp/src/test/resources/data/export/complex.doc @@ -1,5 +1,5 @@ - + PPM Plan diff --git a/wise-webapp/src/test/resources/data/export/complex.odt b/wise-webapp/src/test/resources/data/export/complex.odt index d62aed5b..37ec42dc 100644 --- a/wise-webapp/src/test/resources/data/export/complex.odt +++ b/wise-webapp/src/test/resources/data/export/complex.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/emptyNodes.doc b/wise-webapp/src/test/resources/data/export/emptyNodes.doc index d221f1e8..a16a19e7 100644 --- a/wise-webapp/src/test/resources/data/export/emptyNodes.doc +++ b/wise-webapp/src/test/resources/data/export/emptyNodes.doc @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/emptyNodes.odt b/wise-webapp/src/test/resources/data/export/emptyNodes.odt index 0e2130b4..b0f24a78 100644 --- a/wise-webapp/src/test/resources/data/export/emptyNodes.odt +++ b/wise-webapp/src/test/resources/data/export/emptyNodes.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/enc.doc b/wise-webapp/src/test/resources/data/export/enc.doc index 19651805..3d54144e 100644 --- a/wise-webapp/src/test/resources/data/export/enc.doc +++ b/wise-webapp/src/test/resources/data/export/enc.doc @@ -1,5 +1,5 @@ - + Artigos GF comentários interessantes diff --git a/wise-webapp/src/test/resources/data/export/enc.odt b/wise-webapp/src/test/resources/data/export/enc.odt index a7100900..a4385daa 100644 --- a/wise-webapp/src/test/resources/data/export/enc.odt +++ b/wise-webapp/src/test/resources/data/export/enc.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/huge.doc b/wise-webapp/src/test/resources/data/export/huge.doc index 90abe479..070b5c69 100644 --- a/wise-webapp/src/test/resources/data/export/huge.doc +++ b/wise-webapp/src/test/resources/data/export/huge.doc @@ -1,5 +1,5 @@ - + I Care diff --git a/wise-webapp/src/test/resources/data/export/huge.odt b/wise-webapp/src/test/resources/data/export/huge.odt index 0aa3d597..a53dde74 100644 --- a/wise-webapp/src/test/resources/data/export/huge.odt +++ b/wise-webapp/src/test/resources/data/export/huge.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/i18n.doc b/wise-webapp/src/test/resources/data/export/i18n.doc index 5f83488d..404ebad5 100644 --- a/wise-webapp/src/test/resources/data/export/i18n.doc +++ b/wise-webapp/src/test/resources/data/export/i18n.doc @@ -1,5 +1,5 @@ - + i18n diff --git a/wise-webapp/src/test/resources/data/export/i18n.odt b/wise-webapp/src/test/resources/data/export/i18n.odt index a2b546f0..f44e2a1c 100644 --- a/wise-webapp/src/test/resources/data/export/i18n.odt +++ b/wise-webapp/src/test/resources/data/export/i18n.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/i18n2.doc b/wise-webapp/src/test/resources/data/export/i18n2.doc index 535cf40b..8ee52ce3 100644 --- a/wise-webapp/src/test/resources/data/export/i18n2.doc +++ b/wise-webapp/src/test/resources/data/export/i18n2.doc @@ -1,5 +1,5 @@ - + أَبْجَدِيَّة عَرَبِيَّة diff --git a/wise-webapp/src/test/resources/data/export/i18n2.odt b/wise-webapp/src/test/resources/data/export/i18n2.odt index 310878c4..e96249d3 100644 --- a/wise-webapp/src/test/resources/data/export/i18n2.odt +++ b/wise-webapp/src/test/resources/data/export/i18n2.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/issue.doc b/wise-webapp/src/test/resources/data/export/issue.doc index f5facc32..5dcb7e80 100644 --- a/wise-webapp/src/test/resources/data/export/issue.doc +++ b/wise-webapp/src/test/resources/data/export/issue.doc @@ -1,5 +1,5 @@ - + La computadora diff --git a/wise-webapp/src/test/resources/data/export/issue.odt b/wise-webapp/src/test/resources/data/export/issue.odt index 3d60e4ff..5b2b219a 100644 --- a/wise-webapp/src/test/resources/data/export/issue.odt +++ b/wise-webapp/src/test/resources/data/export/issue.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/longnodes.doc b/wise-webapp/src/test/resources/data/export/longnodes.doc index f941de58..2f07d341 100644 --- a/wise-webapp/src/test/resources/data/export/longnodes.doc +++ b/wise-webapp/src/test/resources/data/export/longnodes.doc @@ -1,5 +1,5 @@ - + I have HTML In Nodes diff --git a/wise-webapp/src/test/resources/data/export/longnodes.odt b/wise-webapp/src/test/resources/data/export/longnodes.odt index 142de546..39b1f25c 100644 --- a/wise-webapp/src/test/resources/data/export/longnodes.odt +++ b/wise-webapp/src/test/resources/data/export/longnodes.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/npe.doc b/wise-webapp/src/test/resources/data/export/npe.doc index db2317d1..680f69cd 100644 --- a/wise-webapp/src/test/resources/data/export/npe.doc +++ b/wise-webapp/src/test/resources/data/export/npe.doc @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/npe.odt b/wise-webapp/src/test/resources/data/export/npe.odt index 64e1ffe9..bf4fe10d 100644 --- a/wise-webapp/src/test/resources/data/export/npe.odt +++ b/wise-webapp/src/test/resources/data/export/npe.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/process.doc b/wise-webapp/src/test/resources/data/export/process.doc index ff0d04a4..2a7af7b1 100644 --- a/wise-webapp/src/test/resources/data/export/process.doc +++ b/wise-webapp/src/test/resources/data/export/process.doc @@ -1,5 +1,5 @@ - + California diff --git a/wise-webapp/src/test/resources/data/export/process.odt b/wise-webapp/src/test/resources/data/export/process.odt index 4e678b46..98d0e14c 100644 --- a/wise-webapp/src/test/resources/data/export/process.odt +++ b/wise-webapp/src/test/resources/data/export/process.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/sample2.doc b/wise-webapp/src/test/resources/data/export/sample2.doc index 23f8e3c6..e0dfab7a 100644 --- a/wise-webapp/src/test/resources/data/export/sample2.doc +++ b/wise-webapp/src/test/resources/data/export/sample2.doc @@ -1,5 +1,5 @@ - + Prospace diff --git a/wise-webapp/src/test/resources/data/export/sample2.odt b/wise-webapp/src/test/resources/data/export/sample2.odt index 194834ab..88e617dc 100644 --- a/wise-webapp/src/test/resources/data/export/sample2.odt +++ b/wise-webapp/src/test/resources/data/export/sample2.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/sample3.doc b/wise-webapp/src/test/resources/data/export/sample3.doc index 8a7243be..53f81500 100644 --- a/wise-webapp/src/test/resources/data/export/sample3.doc +++ b/wise-webapp/src/test/resources/data/export/sample3.doc @@ -1,5 +1,5 @@ - + Clickview Overview diff --git a/wise-webapp/src/test/resources/data/export/sample3.odt b/wise-webapp/src/test/resources/data/export/sample3.odt index b471cbbc..9eff6452 100644 --- a/wise-webapp/src/test/resources/data/export/sample3.odt +++ b/wise-webapp/src/test/resources/data/export/sample3.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/sample4.doc b/wise-webapp/src/test/resources/data/export/sample4.doc index 8a7243be..53f81500 100644 --- a/wise-webapp/src/test/resources/data/export/sample4.doc +++ b/wise-webapp/src/test/resources/data/export/sample4.doc @@ -1,5 +1,5 @@ - + Clickview Overview diff --git a/wise-webapp/src/test/resources/data/export/sample4.odt b/wise-webapp/src/test/resources/data/export/sample4.odt index b471cbbc..9eff6452 100644 --- a/wise-webapp/src/test/resources/data/export/sample4.odt +++ b/wise-webapp/src/test/resources/data/export/sample4.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/simple-maps.doc b/wise-webapp/src/test/resources/data/export/simple-maps.doc index ff20e22a..9259dff0 100644 --- a/wise-webapp/src/test/resources/data/export/simple-maps.doc +++ b/wise-webapp/src/test/resources/data/export/simple-maps.doc @@ -1,5 +1,5 @@ - + Así que quieres recorrer Medellín... diff --git a/wise-webapp/src/test/resources/data/export/simple-maps.odt b/wise-webapp/src/test/resources/data/export/simple-maps.odt index bb16851b..ba73df7f 100644 --- a/wise-webapp/src/test/resources/data/export/simple-maps.odt +++ b/wise-webapp/src/test/resources/data/export/simple-maps.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/welcome-reloaded.doc b/wise-webapp/src/test/resources/data/export/welcome-reloaded.doc index 35eaab6b..08e7633e 100644 --- a/wise-webapp/src/test/resources/data/export/welcome-reloaded.doc +++ b/wise-webapp/src/test/resources/data/export/welcome-reloaded.doc @@ -1,5 +1,5 @@ - + Welcome To WiseMapping diff --git a/wise-webapp/src/test/resources/data/export/welcome-reloaded.odt b/wise-webapp/src/test/resources/data/export/welcome-reloaded.odt index 73a0f1c2..ded05c65 100644 --- a/wise-webapp/src/test/resources/data/export/welcome-reloaded.odt +++ b/wise-webapp/src/test/resources/data/export/welcome-reloaded.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/welcome.doc b/wise-webapp/src/test/resources/data/export/welcome.doc index 09881a30..5d3c917a 100644 --- a/wise-webapp/src/test/resources/data/export/welcome.doc +++ b/wise-webapp/src/test/resources/data/export/welcome.doc @@ -1,5 +1,5 @@ - + Welcome To WiseMapping diff --git a/wise-webapp/src/test/resources/data/export/welcome.odt b/wise-webapp/src/test/resources/data/export/welcome.odt index d376e0ad..c2d4b9e8 100644 --- a/wise-webapp/src/test/resources/data/export/welcome.odt +++ b/wise-webapp/src/test/resources/data/export/welcome.odt @@ -1,4 +1,4 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/bug-nbsp-exp.svg b/wise-webapp/src/test/resources/data/svg/bug-nbsp-exp.svg index a0e50f43..648b34b5 100644 --- a/wise-webapp/src/test/resources/data/svg/bug-nbsp-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/bug-nbsp-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg b/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg index 13df10ec..e74e5a98 100644 --- a/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg +++ b/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg @@ -1,4 +1,4 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/bug1-exp.svg b/wise-webapp/src/test/resources/data/svg/bug1-exp.svg index 8ce2d310..0e8315f4 100644 --- a/wise-webapp/src/test/resources/data/svg/bug1-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/bug1-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/bug1.svg b/wise-webapp/src/test/resources/data/svg/bug1.svg index 70a750aa..8c3f48ff 100644 --- a/wise-webapp/src/test/resources/data/svg/bug1.svg +++ b/wise-webapp/src/test/resources/data/svg/bug1.svg @@ -1,6 +1,6 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/bug3-exp.svg b/wise-webapp/src/test/resources/data/svg/bug3-exp.svg index aaa3d425..32a25e4a 100644 --- a/wise-webapp/src/test/resources/data/svg/bug3-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/bug3-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/bug3.svg b/wise-webapp/src/test/resources/data/svg/bug3.svg index cff6fb03..30c91767 100644 --- a/wise-webapp/src/test/resources/data/svg/bug3.svg +++ b/wise-webapp/src/test/resources/data/svg/bug3.svg @@ -1,4 +1,4 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/export-exp.svg b/wise-webapp/src/test/resources/data/svg/export-exp.svg index 6ce13459..fafcc654 100644 --- a/wise-webapp/src/test/resources/data/svg/export-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/export-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/export.svg b/wise-webapp/src/test/resources/data/svg/export.svg index d9e5e626..d7e40660 100644 --- a/wise-webapp/src/test/resources/data/svg/export.svg +++ b/wise-webapp/src/test/resources/data/svg/export.svg @@ -1,2 +1,2 @@ -Comment démarrer ?Propriétés des noeudsAjouter des liens vers des pages webAjouter NotesIcônes fantaisieMultiples Styles de TexteCouleurs de caractèresStyles de caractèresTypes de caractèresDifferentes FormesEdition avec le clavierSe déplacer entre les noeuds avec les flèchesPour éditer, commencer à taper du texteAppuyer sur Ctrl/Meta+Enter pour ajouter un noeud enfantAppuyer sur Enter pour ajouter un noeud de même niveauPlus de ?. Cliquer sur les raccourcisPartageInviter des amisEncapsuler dans un blogPublier votre carteEdition avec la sourisDouble-Clic sur un noeud : édite le texteDouble-Clic sur le fond : créer un noeud Déplacer la position des noeudsUtiliser la barre d'outils +Comment démarrer ?Propriétés des noeudsAjouter des liens vers des pages webAjouter NotesIcônes fantaisieMultiples Styles de TexteCouleurs de caractèresStyles de caractèresTypes de caractèresDifferentes FormesEdition avec le clavierSe déplacer entre les noeuds avec les flèchesPour éditer, commencer à taper du texteAppuyer sur Ctrl/Meta+Enter pour ajouter un noeud enfantAppuyer sur Enter pour ajouter un noeud de même niveauPlus de ?. Cliquer sur les raccourcisPartageInviter des amisEncapsuler dans un blogPublier votre carteEdition avec la sourisDouble-Clic sur un noeud : édite le texteDouble-Clic sur le fond : créer un noeud Déplacer la position des noeudsUtiliser la barre d'outils diff --git a/wise-webapp/src/test/resources/data/svg/map-3.0-exp.svg b/wise-webapp/src/test/resources/data/svg/map-3.0-exp.svg index 04864e90..638b2ab7 100644 --- a/wise-webapp/src/test/resources/data/svg/map-3.0-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/map-3.0-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/map-3.0.svg b/wise-webapp/src/test/resources/data/svg/map-3.0.svg index 99e8804a..f7de595c 100644 --- a/wise-webapp/src/test/resources/data/svg/map-3.0.svg +++ b/wise-webapp/src/test/resources/data/svg/map-3.0.svg @@ -1,5 +1,5 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/map1-exp.svg b/wise-webapp/src/test/resources/data/svg/map1-exp.svg index b8202e2f..a399e0ea 100644 --- a/wise-webapp/src/test/resources/data/svg/map1-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/map1-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/map1.svg b/wise-webapp/src/test/resources/data/svg/map1.svg index daa5d473..a57bd095 100644 --- a/wise-webapp/src/test/resources/data/svg/map1.svg +++ b/wise-webapp/src/test/resources/data/svg/map1.svg @@ -1,4 +1,4 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/map2-exp.svg b/wise-webapp/src/test/resources/data/svg/map2-exp.svg index 9d77b509..bcd40a6b 100644 --- a/wise-webapp/src/test/resources/data/svg/map2-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/map2-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/map2.svg b/wise-webapp/src/test/resources/data/svg/map2.svg index 82409864..b77a981a 100644 --- a/wise-webapp/src/test/resources/data/svg/map2.svg +++ b/wise-webapp/src/test/resources/data/svg/map2.svg @@ -1,4 +1,4 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/map3-exp.svg b/wise-webapp/src/test/resources/data/svg/map3-exp.svg index a78df387..a9923f14 100644 --- a/wise-webapp/src/test/resources/data/svg/map3-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/map3-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/map3.svg b/wise-webapp/src/test/resources/data/svg/map3.svg index e714af28..d5619565 100644 --- a/wise-webapp/src/test/resources/data/svg/map3.svg +++ b/wise-webapp/src/test/resources/data/svg/map3.svg @@ -1,4 +1,4 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/map4-exp.svg b/wise-webapp/src/test/resources/data/svg/map4-exp.svg index 1d759bc3..43905182 100644 --- a/wise-webapp/src/test/resources/data/svg/map4-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/map4-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/map4.svg b/wise-webapp/src/test/resources/data/svg/map4.svg index 4e68c232..236e065c 100644 --- a/wise-webapp/src/test/resources/data/svg/map4.svg +++ b/wise-webapp/src/test/resources/data/svg/map4.svg @@ -1,4 +1,4 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/map5-exp.svg b/wise-webapp/src/test/resources/data/svg/map5-exp.svg index bff86d45..9456291f 100644 --- a/wise-webapp/src/test/resources/data/svg/map5-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/map5-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/map5.svg b/wise-webapp/src/test/resources/data/svg/map5.svg index 74b77730..dcccd3e8 100644 --- a/wise-webapp/src/test/resources/data/svg/map5.svg +++ b/wise-webapp/src/test/resources/data/svg/map5.svg @@ -1,4 +1,4 @@ - diff --git a/wise-webapp/src/test/resources/data/svg/map6-exp.svg b/wise-webapp/src/test/resources/data/svg/map6-exp.svg index 13026a18..dad6979d 100644 --- a/wise-webapp/src/test/resources/data/svg/map6-exp.svg +++ b/wise-webapp/src/test/resources/data/svg/map6-exp.svg @@ -1,5 +1,5 @@ - + diff --git a/wise-webapp/src/test/resources/data/svg/map6.svg b/wise-webapp/src/test/resources/data/svg/map6.svg index 3cf30098..29656793 100644 --- a/wise-webapp/src/test/resources/data/svg/map6.svg +++ b/wise-webapp/src/test/resources/data/svg/map6.svg @@ -1,4 +1,4 @@ - Date: Fri, 14 Sep 2018 17:50:27 -0700 Subject: [PATCH 8/8] Upgrade Spring version. Fix failing export tests --- distribution/docker-conf/app.properties | 6 +- pom.xml | 4 +- wise-webapp/pom.xml | 33 ++++--- .../wisemapping/exporter/ExporterFactory.java | 4 + .../rest/TransformerController.java | 6 +- .../wisemapping/service/RecaptchaService.java | 92 +++++++++++++++++++ .../com/wisemapping/validator/Messages.java | 1 - .../wisemapping/validator/UserValidator.java | 8 +- .../wisemapping/webmvc/UsersController.java | 75 +++++++-------- .../src/main/resources/messages_ca.properties | 1 - .../src/main/resources/messages_de.properties | 1 - .../src/main/resources/messages_en.properties | 1 - .../src/main/resources/messages_es.properties | 1 - .../src/main/resources/messages_fr.properties | 1 - .../src/main/resources/messages_it.properties | 1 - .../main/resources/messages_pt_BR.properties | 1 - .../main/resources/messages_zh_CN.properties | 1 - .../main/resources/messages_zh_TW.properties | 1 - .../src/main/webapp/WEB-INF/app.properties | 6 +- .../webapp/WEB-INF/classes/log4j.properties | 13 +-- .../src/main/webapp/WEB-INF/heroku.properties | 62 ------------- .../WEB-INF/wisemapping-security-db.xml | 2 +- .../WEB-INF/wisemapping-security-ldap.xml | 2 +- .../webapp/WEB-INF/wisemapping-security.xml | 2 +- .../webapp/WEB-INF/wisemapping-service.xml | 4 + .../webapp/WEB-INF/wisemapping-servlet.xml | 6 -- wise-webapp/src/main/webapp/jsp/template.jsp | 3 +- .../src/main/webapp/jsp/userRegistration.jsp | 8 +- .../src/test/resources/data/svg/bug-nbsp.svg | 2 +- .../src/test/resources/data/svg/bug1.svg | 2 +- 30 files changed, 187 insertions(+), 163 deletions(-) create mode 100644 wise-webapp/src/main/java/com/wisemapping/service/RecaptchaService.java delete mode 100644 wise-webapp/src/main/webapp/WEB-INF/heroku.properties diff --git a/distribution/docker-conf/app.properties b/distribution/docker-conf/app.properties index 8928c4b0..db8ada22 100644 --- a/distribution/docker-conf/app.properties +++ b/distribution/docker-conf/app.properties @@ -65,12 +65,12 @@ mail.errorReporterEmail= ################################################################################## # Enable captcha confirmation -google.recaptcha.enabled = true +google.recaptcha2.enabled = true # ReCaptcha is the default captcha. Public and private keys are required. # More Info: http://www.google.com/recaptcha . -google.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK -google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr +google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI +google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe ################################################################################## # Site configuration diff --git a/pom.xml b/pom.xml index ff8eda62..bb24c32d 100644 --- a/pom.xml +++ b/pom.xml @@ -119,8 +119,8 @@ maven-compiler-plugin 3.1 - 1.7 - 1.7 + 1.8 + 1.8 UTF-8 diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 4ff898ea..796efcab 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -110,7 +110,7 @@ org.slf4j slf4j-log4j12 - 1.7.2 + 1.7.25 runtime @@ -145,8 +145,14 @@ org.apache.tiles tiles-jsp - 2.1.4 + 2.2.2 runtime + + + org.slf4j + jcl-over-slf4j + + org.springframework @@ -280,7 +286,7 @@ org.slf4j slf4j-api - 1.7.2 + 1.7.25 runtime @@ -289,12 +295,6 @@ 2.10.0 compile - - net.tanesha.recaptcha4j - recaptcha4j - 0.0.7 - compile - org.jsoup @@ -316,7 +316,16 @@ jstl 1.2 - + + org.apache.httpcomponents + fluent-hc + 4.5.5 + + + org.apache.httpcomponents + httpclient + 4.5.5 + @@ -561,9 +570,9 @@ - org.mortbay.jetty + org.eclipse.jetty jetty-maven-plugin - 8.1.14.v20131031 + 9.4.12.v20180830 false foo diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java index ffdf8db7..a2ffd1f8 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java @@ -167,6 +167,10 @@ public class ExporterFactory { svgXml = svgXml.replaceFirst(" values = new HashMap(); if (content == null || content.length() == 0) { throw new IllegalArgumentException("Body can not be null."); @@ -53,7 +53,7 @@ public class TransformerController extends BaseController { @RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"image/svg+xml"}, consumes = {"image/svg+xml"}) @ResponseBody - public ModelAndView transformSvg(@RequestBody @Nullable final String content) throws IOException { + public ModelAndView transformSvg(@RequestBody @Nullable final String content) { final Map values = new HashMap(); if (content == null || content.length() == 0) { throw new IllegalArgumentException("Body can not be null."); @@ -65,7 +65,7 @@ public class TransformerController extends BaseController { @RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"image/png"}, consumes = {"image/svg+xml"}) @ResponseBody - public ModelAndView transformPng(@RequestBody @Nullable final String content) throws IOException { + public ModelAndView transformPng(@RequestBody @Nullable final String content) { final Map values = new HashMap(); if (content == null || content.length() == 0) { throw new IllegalArgumentException("Body can not be null."); diff --git a/wise-webapp/src/main/java/com/wisemapping/service/RecaptchaService.java b/wise-webapp/src/main/java/com/wisemapping/service/RecaptchaService.java new file mode 100644 index 00000000..c8a7f466 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/service/RecaptchaService.java @@ -0,0 +1,92 @@ +package com.wisemapping.service; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.lang.StringUtils; +import org.apache.http.NameValuePair; +import org.apache.http.client.fluent.Form; +import org.apache.http.client.fluent.Request; +import org.apache.log4j.Logger; +import org.springframework.beans.factory.annotation.Value; + +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class RecaptchaService { + + final private static Logger logger = Logger.getLogger(RecaptchaService.class); + final private static String GOOGLE_RECAPTCHA_VERIFY_URL = + "https://www.google.com/recaptcha/api/siteverify"; + + private final static ObjectMapper objectMapper = new ObjectMapper(); + private String recaptchaSecret; + + public String verifyRecaptcha(String ip, String recaptchaResponse) { + + final List build = Form.form() + .add("secret", recaptchaSecret) + .add("response", recaptchaResponse) + .add("remoteip", ip) + .build(); + + // Add logs ... + logger.debug("Response from remoteip: " + ip); + logger.debug("Response from recaptchaSecret: " + recaptchaSecret); + logger.debug("Response from recaptchaResponse: " + recaptchaResponse); + + String result = StringUtils.EMPTY; + HashMap bodyJson; + try { + final byte[] body = Request + .Post(GOOGLE_RECAPTCHA_VERIFY_URL) + .bodyForm(build) + .execute() + .returnContent() + .asBytes(); + + bodyJson = objectMapper + .readValue(body, HashMap.class); + + logger.debug("Response from recaptcha after parse: " + bodyJson); + + final Boolean success = (Boolean) bodyJson.get("success"); + if (!success) { + final List errorCodes = (List) bodyJson + .get("error-codes"); + result = RecaptchaUtil.RECAPTCHA_ERROR_CODE.get(errorCodes.get(0)); + } + } catch (IOException e) { + logger.error(e.getMessage(), e); + result = e.getMessage(); + } + + logger.debug("Captcha Result:" + result); + return result; + + } + + public void setRecaptchaSecret(String recaptchaSecret) { + this.recaptchaSecret = recaptchaSecret; + } +} + +class RecaptchaUtil { + + static final Map + RECAPTCHA_ERROR_CODE = new HashMap<>(); + + static { + RECAPTCHA_ERROR_CODE.put("missing-input-secret", + "The secret parameter is missing"); + RECAPTCHA_ERROR_CODE.put("invalid-input-secret", + "The secret parameter is invalid or malformed"); + RECAPTCHA_ERROR_CODE.put("missing-input-response", + "The response parameter is missing"); + RECAPTCHA_ERROR_CODE.put("invalid-input-response", + "The response parameter is invalid or malformed"); + RECAPTCHA_ERROR_CODE.put("bad-request", + "The request is invalid or malformed"); + } +} \ No newline at end of file diff --git a/wise-webapp/src/main/java/com/wisemapping/validator/Messages.java b/wise-webapp/src/main/java/com/wisemapping/validator/Messages.java index da2a8c9d..f498bb1f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/validator/Messages.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/Messages.java @@ -26,6 +26,5 @@ public interface Messages { String MAP_TITLE_ALREADY_EXISTS = "MAP_TITLE_ALREADY_EXISTS"; String LABEL_TITLE_ALREADY_EXISTS = "LABEL_TITLE_ALREADY_EXISTS"; String PASSWORD_MISSMATCH = "PASSWORD_MISSMATCH"; - String CAPTCHA_ERROR = "CAPTCHA_ERROR"; String CAPTCHA_LOADING_ERROR = "CAPTCHA_LOADING_ERROR"; } diff --git a/wise-webapp/src/main/java/com/wisemapping/validator/UserValidator.java b/wise-webapp/src/main/java/com/wisemapping/validator/UserValidator.java index 6914b83f..10fd1144 100644 --- a/wise-webapp/src/main/java/com/wisemapping/validator/UserValidator.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/UserValidator.java @@ -18,10 +18,10 @@ package com.wisemapping.validator; +import com.wisemapping.service.RecaptchaService; import com.wisemapping.service.UserService; import com.wisemapping.view.UserBean; import com.wisemapping.model.Constants; -import net.tanesha.recaptcha.ReCaptcha; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.springframework.validation.Errors; @@ -32,7 +32,7 @@ public class UserValidator implements Validator { private UserService userService; - private ReCaptcha captchaService; + private RecaptchaService captchaService; public boolean supports(final Class clazz) { @@ -92,11 +92,11 @@ public class UserValidator this.userService = userService; } - public void setCaptchaService(@NotNull final ReCaptcha captchaService) { + public void setCaptchaService(@NotNull final RecaptchaService captchaService) { this.captchaService = captchaService; } - public ReCaptcha getCaptchaService() { + public RecaptchaService getCaptchaService() { return captchaService; } } \ No newline at end of file diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java index 91903854..9b676164 100644 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java +++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java @@ -1,36 +1,35 @@ /* -* Copyright [2015] [wisemapping] -* -* Licensed under WiseMapping Public License, Version 1.0 (the "License"). -* It is basically the Apache License, Version 2.0 (the "License") plus the -* "powered by wisemapping" text requirement on every single page; -* you may not use this file except in compliance with the License. -* You may obtain a copy of the license at -* -* http://www.wisemapping.org/license -* -* 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. -*/ + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * 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 com.wisemapping.webmvc; -import com.wisemapping.model.AuthenticationType; -import com.wisemapping.service.InvalidAuthSchemaException; -import com.wisemapping.validator.Messages; import com.wisemapping.exceptions.WiseMappingException; +import com.wisemapping.model.AuthenticationType; import com.wisemapping.model.User; import com.wisemapping.security.Utils; +import com.wisemapping.service.InvalidAuthSchemaException; import com.wisemapping.service.InvalidUserEmailException; +import com.wisemapping.service.RecaptchaService; import com.wisemapping.service.UserService; +import com.wisemapping.validator.Messages; import com.wisemapping.validator.UserValidator; import com.wisemapping.view.UserBean; -import net.tanesha.recaptcha.ReCaptcha; -import net.tanesha.recaptcha.ReCaptchaResponse; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -55,11 +54,13 @@ public class UsersController { private UserService userService; @Autowired - private ReCaptcha captchaService; + private RecaptchaService captchaService; - @Value("${google.recaptcha.enabled}") + @Value("${google.recaptcha2.enabled}") private boolean captchaEnabled; + @Value("${google.recaptcha2.siteKey}") + private String recaptchaSiteKey; @RequestMapping(value = "user/resetPassword", method = RequestMethod.GET) public ModelAndView showResetPasswordPage() { @@ -74,10 +75,7 @@ public class UsersController { userService.resetPassword(email); result = new ModelAndView("forgotPasswordSuccess"); - } catch (InvalidUserEmailException e) { - result = new ModelAndView("forgotPasswordError"); - } - catch (InvalidAuthSchemaException e) { + } catch (InvalidUserEmailException | InvalidAuthSchemaException e) { result = new ModelAndView("forgotPasswordError"); } return result; @@ -89,10 +87,8 @@ public class UsersController { // If captcha is enabled, generate it ... final Properties prop = new Properties(); prop.put("theme", "white"); - - final String captchaHtml = captchaService.createRecaptchaHtml(null, prop); - request.setAttribute("captchaHtml", captchaHtml); - request.setAttribute("captchaEnabled", true); + request.setAttribute("recaptchaSiteKey", recaptchaSiteKey); + request.setAttribute("recaptchaEnabled", true); } return new ModelAndView("userRegistration", "user", new UserBean()); } @@ -115,7 +111,7 @@ public class UsersController { boolean confirmRegistrationByEmail = false; user.setAuthenticationType(AuthenticationType.DATABASE); - userService.createUser(user, confirmRegistrationByEmail,true); + userService.createUser(user, confirmRegistrationByEmail, true); // Forward to the success view ... result = new ModelAndView("userRegistrationSuccess"); @@ -130,7 +126,7 @@ public class UsersController { return "accountSettings"; } - private BindingResult validateRegistrationForm(@NotNull UserBean userBean, @NotNull HttpServletRequest request, @NotNull BindingResult bindingResult) { + private void validateRegistrationForm(@NotNull UserBean userBean, @NotNull HttpServletRequest request, @NotNull BindingResult bindingResult) { final UserValidator userValidator = new UserValidator(); userValidator.setUserService(userService); userValidator.setCaptchaService(captchaService); @@ -138,21 +134,18 @@ public class UsersController { // If captcha is enabled, generate it ... if (captchaEnabled) { - final String challenge = request.getParameter("recaptcha_challenge_field"); - final String uresponse = request.getParameter("recaptcha_response_field"); + final String gReponse = request.getParameter("g-recaptcha-response"); - if (challenge != null && uresponse != null) { + if (gReponse != null) { final String remoteAddr = request.getRemoteAddr(); - final ReCaptchaResponse reCaptchaResponse = captchaService.checkAnswer(remoteAddr, challenge, uresponse); - - if (!reCaptchaResponse.isValid()) { - bindingResult.rejectValue("captcha", Messages.CAPTCHA_ERROR); + final String reCaptchaResponse = captchaService.verifyRecaptcha(remoteAddr, gReponse); + if (!reCaptchaResponse.isEmpty()) { + bindingResult.rejectValue("captcha", reCaptchaResponse); } } else { bindingResult.rejectValue("captcha", Messages.CAPTCHA_LOADING_ERROR); } } - return bindingResult; } } diff --git a/wise-webapp/src/main/resources/messages_ca.properties b/wise-webapp/src/main/resources/messages_ca.properties index 9b499c7e..04fbce13 100644 --- a/wise-webapp/src/main/resources/messages_ca.properties +++ b/wise-webapp/src/main/resources/messages_ca.properties @@ -52,7 +52,6 @@ PASSWORD_MISSMATCH=La contrasenya no concorda WISEMAPPING_ACCOUNT_MESSAGE=Si us plau verifiqui la informació i llegeixi les condicions del servei. REGISTRATION_CLICK_ADVICE= Seleccionant "Registre" està acceptant les condicions del servei. REGISTRATION_TITLE_MSG=Completi el següent formulari per a convertir-se en memore de la comunitat WiseMapping.
El registre és
de franc i només és un moment. -CAPTCHA_ERROR=Entri els caràcters com a la imatge superior. CREATOR=Creador CREATION_TIME=Data de creació EDITORS=Editors diff --git a/wise-webapp/src/main/resources/messages_de.properties b/wise-webapp/src/main/resources/messages_de.properties index a59d134a..62207eef 100644 --- a/wise-webapp/src/main/resources/messages_de.properties +++ b/wise-webapp/src/main/resources/messages_de.properties @@ -64,7 +64,6 @@ CHANGE_PASSWORD_SUCCESS=Ihr Passwort wurde erfolgreich geändert WISEMAPPING_ACCOUNT_MESSAGE=Bitte überprüfen Sie die eingegebenen WiseMapping Benutzerkonto Informationen und Geschäftsbedingungen REGISTRATION_CLICK_ADVICE= Mit der Registrierung erklären Sie ihr Einverständnis mit den Geschäftsbedingungen und Datenschutzregeln von WiseMapping. REGISTRATION_TITLE_MSG=Bitte fülle die Felder aus, um ein Mitglied der WiseMapping Gemeinschaft zu werden. Die Registrierung is kostenlos und in wenigen Augenblicken erledigt. -CAPTCHA_ERROR=Bitte geben Sie die Buchstaben wie auf dem Bild dargestellt ein. CREATOR=Urheber CREATION_TIME=Erstellungs Datum EDITORS=Verfasser diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index 3722a39c..afa07fc6 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -66,7 +66,6 @@ CHANGE_PASSWORD_SUCCESS=Your password has been changed successfully. WISEMAPPING_ACCOUNT_MESSAGE=Please check the WiseMapping Account information you've entered above, and review the Terms of Service REGISTRATION_CLICK_ADVICE= By clicking on 'Register' below you are agreeing to the Terms of Service above and the Privacy Policy. REGISTRATION_TITLE_MSG=Please, fill the fields and become a member of WiseMapping community. Registration is Free and takes just a moment. -CAPTCHA_ERROR=Enter the letters as they are shown in the image above. CREATOR=Creator CREATION_TIME=Creation Time EDITORS=Editors diff --git a/wise-webapp/src/main/resources/messages_es.properties b/wise-webapp/src/main/resources/messages_es.properties index ac2848e3..79b86c7f 100644 --- a/wise-webapp/src/main/resources/messages_es.properties +++ b/wise-webapp/src/main/resources/messages_es.properties @@ -52,7 +52,6 @@ PASSWORD_MISSMATCH=La contraseña no concuerda WISEMAPPING_ACCOUNT_MESSAGE=Por favor, verifique la información que ha ingresado y lea las condiciones del servicio. REGISTRATION_CLICK_ADVICE= Seleccionando 'Registración' esta aceptando las condiciones de uso de arriba y la politica de privacidad. REGISTRATION_TITLE_MSG=Complete el siguiente formulario para convertirse en un miembro de la comunidad de WiseMapping.
La registración es Gratis y sólo toma un momento. -CAPTCHA_ERROR=Ingrese los caracteres tal como son mostrados en la imagen arriba. CREATOR=Creador CREATION_TIME=Fecha de creación EDITORS=Editores diff --git a/wise-webapp/src/main/resources/messages_fr.properties b/wise-webapp/src/main/resources/messages_fr.properties index cab4963e..8f93bed4 100644 --- a/wise-webapp/src/main/resources/messages_fr.properties +++ b/wise-webapp/src/main/resources/messages_fr.properties @@ -69,7 +69,6 @@ CHANGE_PASSWORD_SUCCESS=Votre mot de passe a été changé avec succès. WISEMAPPING_ACCOUNT_MESSAGE=Merci de vérifier l'information de Compte WiseMapping que vous avez saisie, et de relire les conditions de service REGISTRATION_CLICK_ADVICE=En cliquant "M'enregistrer" ci-dessous, vous acceptez les conditions de service ci-dessus ainsi que les règles de confidentialité. REGISTRATION_TITLE_MSG=Devenez membre de la communauté WiseMapping en remplissant les champs ci-dessous. L'inscription est gratuite et ne prend qu'un instant. -CAPTCHA_ERROR=Saisissez les caractères affichés dans l'image ci-dessus. CREATOR=Créateur CREATION_TIME=Heure de création EDITORS=Editeurs diff --git a/wise-webapp/src/main/resources/messages_it.properties b/wise-webapp/src/main/resources/messages_it.properties index 44868599..3e33deea 100644 --- a/wise-webapp/src/main/resources/messages_it.properties +++ b/wise-webapp/src/main/resources/messages_it.properties @@ -64,7 +64,6 @@ CHANGE_PASSWORD_SUCCESS=La password è stata cambiata correttamente WISEMAPPING_ACCOUNT_MESSAGE=Prego, controllare le informazioni del tuo account WiseMapping appena inserite, e prendi note dei Termini di Servizio REGISTRATION_CLICK_ADVICE= Cliccando su 'Registra' di seguito, si accettano i Termini di Servizio riportati e le Privacy Policy di cui sopra. REGISTRATION_TITLE_MSG=Prego, compilare tutti i campi per diventare membri della Community WiseMapping. La registrazione è Free richiede pochi istanti. -CAPTCHA_ERROR=Inserire le lettere così come appaiono sull'immagine riportata qui sopra. CREATOR=Creatore CREATION_TIME=Orario di creazione EDITORS=Editori diff --git a/wise-webapp/src/main/resources/messages_pt_BR.properties b/wise-webapp/src/main/resources/messages_pt_BR.properties index b4d3b90d..7a3ad9a4 100644 --- a/wise-webapp/src/main/resources/messages_pt_BR.properties +++ b/wise-webapp/src/main/resources/messages_pt_BR.properties @@ -62,7 +62,6 @@ CHANGE_PASSWORD_SUCCESS=Sua senha foi alterada com sucesso. WISEMAPPING_ACCOUNT_MESSAGE=Confira a informação da conta WiseMapping que você inseriu acima e reveja os Termos de Serviço. REGISTRATION_CLICK_ADVICE= Clicando em Registrar abaixo você está concordando com os Termos de Seviço acima e a Política de Privacidade. REGISTRATION_TITLE_MSG=Preencha os campos e toene-se membro da comunidade WiseMapping. O Registro é Gratuito e leva só alguns instantes. -CAPTCHA_ERROR=Digite as letras como são exibidas na imagem acima. CREATOR=Criador CREATION_TIME=Tempo de Criação EDITORS=Editores diff --git a/wise-webapp/src/main/resources/messages_zh_CN.properties b/wise-webapp/src/main/resources/messages_zh_CN.properties index 688c392f..a02f6115 100644 --- a/wise-webapp/src/main/resources/messages_zh_CN.properties +++ b/wise-webapp/src/main/resources/messages_zh_CN.properties @@ -63,7 +63,6 @@ CHANGE_PASSWORD_SUCCESS=密码修改成功! WISEMAPPING_ACCOUNT_MESSAGE=请检查已输入的账户信息,并查阅服务条款 REGISTRATION_CLICK_ADVICE= 点击下面的“注册”,表示你同意上面提到的服务条款和隐私政策。 REGISTRATION_TITLE_MSG=请填写表单,你将成为WiseMapping社区的一员。注册 免费 快速。 -CAPTCHA_ERROR=输入你在上面的图像中看到的字符。 CREATOR=创建者 CREATION_TIME=创建时间 EDITORS=编辑者 diff --git a/wise-webapp/src/main/resources/messages_zh_TW.properties b/wise-webapp/src/main/resources/messages_zh_TW.properties index 7b4441aa..04e80663 100644 --- a/wise-webapp/src/main/resources/messages_zh_TW.properties +++ b/wise-webapp/src/main/resources/messages_zh_TW.properties @@ -64,7 +64,6 @@ CHANGE_PASSWORD_SUCCESS=密碼修改成功! WISEMAPPING_ACCOUNT_MESSAGE=請檢查已輸入的帳戶資訊,並查閱服務條款 REGISTRATION_CLICK_ADVICE= 點擊下麵的“註冊”,表示你同意上面提到的服務條款和隱私政策。 REGISTRATION_TITLE_MSG=請填寫表單,你將成為WiseMapping社區的一員。註冊 免費 快速。 -CAPTCHA_ERROR=輸入你在上面的圖像中看到的字元。 CREATOR=創建者 CREATION_TIME=創建時間 EDITORS=編輯者 diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index 54300703..162dbaa3 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -75,12 +75,12 @@ mail.errorReporterEmail= ################################################################################## # Enable captcha confirmation -google.recaptcha.enabled = true +google.recaptcha2.enabled = true # ReCaptcha is the default captcha. Public and private keys are required. # More Info: http://www.google.com/recaptcha . -google.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK -google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr +google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI +google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe ################################################################################## # Site configuration diff --git a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties index e44a9c52..f1555fcd 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties @@ -1,9 +1,10 @@ -log4j.rootLogger=DEBUG, stdout, R -log4j.logger.com.wisemapping=DEBUG,stdout,R -log4j.logger.org.springframework=DEBUG,stdout,R -log4j.logger.org.codehaus.jackson=DEBUG,stdout,R -log4j.logger.org.hibernate=DEBUG,stdout,R -log4j.logger.org.hibernate.engine.StatefulPersistenceContext=DEBUG,stdout,R +log4j.rootLogger=WARN, stdout, R +log4j.logger.com.wisemapping=WARN,stdout,R +log4j.logger.org.springframework=WARN,stdout,R +log4j.logger.org.codehaus.jackson=WARN,stdout,R +log4j.logger.org.hibernate=WARN,stdout,R +log4j.logger.org.hibernate.engine.StatefulPersistenceContext=ERROR,stdout,R + #log4j.logger.org.hibernate.SQL=WARN,stdout,R diff --git a/wise-webapp/src/main/webapp/WEB-INF/heroku.properties b/wise-webapp/src/main/webapp/WEB-INF/heroku.properties deleted file mode 100644 index 67176a87..00000000 --- a/wise-webapp/src/main/webapp/WEB-INF/heroku.properties +++ /dev/null @@ -1,62 +0,0 @@ -################################################################################## -# Database Configuration -################################################################################## - -# MySQL 5.X configuration properties -database.url=${DATABASE_URL} -database.driver=${DATABASE_DRIVER} -database.hibernate.dialect=${DATABASE_HIBERNATE_DIALECT} -database.username=${DATABASE_USERNAME} -database.password=${DATABASE_PASSWORD} - -#------------------------ -# Sendgrid Configuration -#------------------------ -mail.smtp.port=587 -mail.smtp.host=smtp.sendgrid.net -mail.username=${SENDGRID_USERNAME} -mail.password=${SENDGRID_PASSWORD} -mail.smtp.auth=true -mail.smtp.starttls.enable=true -mail.smtp.quitwait=false - -# Required: "from" email account that will appear in the emails sent from the sender. -mail.serverSendEmail=daemon@wisemapping.herokuapp.com - -# Optional: Support account that the users could use to contact you. This address will appear in emails and in some places in the site. -mail.supportEmail=support@wisemapping.com - -# Optional: Unexpected errors will be reported to this address. -mail.errorReporterEmail=bug-report@wisemapping.com - -################################################################################## -# Users Registration Configuration -################################################################################## - -# Enable/Disable user registration confirmation by e-mail. If it's enabled, mail must be configured. -registration.email.enabled = false - -# Enable captcha confirmation -google.recaptcha.enabled = true - -# ReCaptcha is the default captcha. Public and private keys are required. -# More Info: http://www.google.com/recaptcha . -google.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK -google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr - -################################################################################## -# Site configuration -################################################################################## - -# Site administration user. This user will have special permissions for operations such as removing users, set password -# etc. -admin.user = admin@wisemapping.org - -# Site URL. This url will be used during sharing emails and public views. -site.baseurl = http://http://wisemapping.herokuapp.com:8080 - -################################################################################## -# Google Analytics Settings -################################################################################## -google.analytics.enabled=false -google.analytics.account=UA-XXXX \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-db.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-db.xml index 7319eca1..2879b871 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-db.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-db.xml @@ -6,7 +6,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security-3.1.xsd"> + http://www.springframework.org/schema/security/spring-security-3.2.xsd"> diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-ldap.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-ldap.xml index 0307c5e7..1fa17edd 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-ldap.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security-ldap.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security-3.1.xsd"> + http://www.springframework.org/schema/security/spring-security-3.2.xsd"> diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index a821492d..105e772e 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -6,7 +6,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security-3.1.xsd"> + http://www.springframework.org/schema/security/spring-security-3.2.xsd"> diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml index 923939a0..09a59707 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml @@ -43,6 +43,10 @@ + + + + diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index 2585c731..99a22d92 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -86,12 +86,6 @@ class="org.springframework.web.servlet.i18n.SessionLocaleResolver"> - - - - - - diff --git a/wise-webapp/src/main/webapp/jsp/template.jsp b/wise-webapp/src/main/webapp/jsp/template.jsp index 3a80c34d..652218a1 100644 --- a/wise-webapp/src/main/webapp/jsp/template.jsp +++ b/wise-webapp/src/main/webapp/jsp/template.jsp @@ -24,7 +24,6 @@ - <spring:message code="SITE.TITLE"/>- <c:choose> @@ -44,6 +43,8 @@ <script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.min.js"></script> <script src="js/less.js" type="text/javascript"></script> + <script src='https://www.google.com/recaptcha/api.js'></script> + </head> <body> diff --git a/wise-webapp/src/main/webapp/jsp/userRegistration.jsp b/wise-webapp/src/main/webapp/jsp/userRegistration.jsp index 8bb4fb6c..e0014b04 100644 --- a/wise-webapp/src/main/webapp/jsp/userRegistration.jsp +++ b/wise-webapp/src/main/webapp/jsp/userRegistration.jsp @@ -47,11 +47,9 @@ </div> <div class="form-group"> <div class="col-md-10 col-md-offset-2"> - <c:if test="${requestScope.captchaEnabled}"> - ${requestScope.captchaHtml} - <p> - <form:errors path="captcha" cssClass="errorMsg"/> - </p> + <c:if test="${requestScope.recaptchaEnabled}"> + <div class="g-recaptcha" data-sitekey="${requestScope.recaptchaSiteKey}"></div> + <p>${requestScope.captcha}</p> </c:if> </div> </div> diff --git a/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg b/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg index e74e5a98..13df10ec 100644 --- a/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg +++ b/wise-webapp/src/test/resources/data/svg/bug-nbsp.svg @@ -1,4 +1,4 @@ -<svg xmlns="http://www.w3.org/2000/svg" focusable="true" id="workspace" preserveAspectRatio="none" width="1366" height="768" +<svg focusable="true" id="workspace" preserveAspectRatio="none" width="1366" height="768" viewBox="-1155.6372189600004 -720.729471672 2410.0770093120004 1355.0066933760004"> <path style="fill:none " stroke-width="1px" stroke="#495879" stroke-opacity="1" fill="#495879" fill-opacity="1" visibility="visible" d="M-158,567 C-168,567 -178,689 -188,689"></path> diff --git a/wise-webapp/src/test/resources/data/svg/bug1.svg b/wise-webapp/src/test/resources/data/svg/bug1.svg index 8c3f48ff..70a750aa 100644 --- a/wise-webapp/src/test/resources/data/svg/bug1.svg +++ b/wise-webapp/src/test/resources/data/svg/bug1.svg @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns="http://www.w3.org/2000/svg" focusable="true" id="workspace" preserveAspectRatio="none" width="1024" height="768" +<svg focusable="true" id="workspace" preserveAspectRatio="none" width="1024" height="768" viewBox="-427.77 -328.5450000000001 903.1680000000001 677.3760000000001"> <path style="fill:none " stroke-width="1px" stroke="#495879" stroke-opacity="1" fill="#495879" fill-opacity="1" d="M-384,78 C-393,78 -404,92 -413,92" visibility="visible"></path>