Merge branch 'develop'

This commit is contained in:
Paulo Gustavo Veiga 2022-04-11 14:43:52 -03:00
commit 7d5c5dff74
45 changed files with 123 additions and 273 deletions

View File

@ -10,7 +10,7 @@ ARG WEBAPP_TARGET_DIR="/usr/local/tomcat/webapps/ROOT"
ARG DB_BASE_DIR="/var/lib/wisemapping"
# Default ENV configurations ...
ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80"
ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80 -Dfile.encoding=UTF-8"
ENV database.base.url=${DB_BASE_DIR}
# Copy wisemapping distribution ...

View File

@ -4,7 +4,7 @@
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<properties>
<com.wisemapping.version>5.0.10</com.wisemapping.version>
<com.wisemapping.version>5.0.11</com.wisemapping.version>
<superpom.dir>${project.basedir}/wise-webapps</superpom.dir>
</properties>
@ -16,7 +16,7 @@
<groupId>org.wisemapping</groupId>
<artifactId>wisemapping</artifactId>
<name>WiseMapping Project</name>
<version>5.0.10</version>
<version>5.0.11</version>
<packaging>pom</packaging>
<licenses>

View File

@ -12,7 +12,7 @@
<groupId>org.wisemapping</groupId>
<artifactId>wisemapping</artifactId>
<relativePath>../pom.xml</relativePath>
<version>5.0.10</version>
<version>5.0.11</version>
</parent>
<build>
@ -29,11 +29,11 @@
<mkdir dir="target/wisemapping-mindplot"/>
<exec executable="npm" dir="target" failonerror="true">
<arg value="pack"/>
<arg value="@wisemapping/mindplot@5.0.10"/>
<arg value="@wisemapping/mindplot@5.0.12"/>
</exec>
<exec executable="tar" dir="target" failonerror="true">
<arg value="-xvzf"/>
<arg value="wisemapping-mindplot-5.0.10.tgz"/>
<arg value="wisemapping-mindplot-5.0.12.tgz"/>
<arg value="-C"/>
<arg value="wisemapping-mindplot"/>
</exec>
@ -42,11 +42,11 @@
<mkdir dir="target/wisemapping-webapp"/>
<exec executable="npm" dir="target" failonerror="true">
<arg value="pack"/>
<arg value="@wisemapping/webapp@5.0.11"/>
<arg value="@wisemapping/webapp@5.0.12"/>
</exec>
<exec executable="tar" dir="target" failonerror="true">
<arg value="-xvzf"/>
<arg value="wisemapping-webapp-5.0.11.tgz"/>
<arg value="wisemapping-webapp-5.0.12.tgz"/>
<arg value="-C"/>
<arg value="wisemapping-webapp"/>
</exec>

View File

@ -9,12 +9,12 @@
<groupId>org.wisemapping</groupId>
<artifactId>wisemapping</artifactId>
<relativePath>../pom.xml</relativePath>
<version>5.0.10</version>
<version>5.0.11</version>
</parent>
<properties>
<org.springframework.version>5.3.14</org.springframework.version>
<org.springframework.addons>5.3.5.RELEASE</org.springframework.addons>
<org.springframework.version>5.3.18</org.springframework.version>
<org.springframework.addons>5.6.2</org.springframework.addons>
<hibernate.version>5.6.5.Final</hibernate.version>
<hibernate-validator.version>6.0.21.Final</hibernate-validator.version>
<spring-security-taglibs.version>5.6.1</spring-security-taglibs.version>
@ -189,9 +189,9 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
@ -244,6 +244,7 @@
<version>2.13.1</version>
</dependency>
<dependency>
<!-- This is required in case of Tomcat, do not remove -->
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
@ -270,12 +271,6 @@
<artifactId>fluent-hc</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
@ -401,23 +396,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>native2ascii</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<includes>
<include>messages*.properties</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>

View File

@ -48,7 +48,7 @@ public class RequestPropertiesInterceptor implements HandlerInterceptor {
@Value("${site.homepage}")
private String siteHomepage;
@Value("${site.baseurl:http://localhost:8080}")
@Value("${site.baseurl}")
private String siteUrl;
@Value("${security.type}")

View File

@ -26,7 +26,7 @@ import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.mail.javamail.MimeMessagePreparator;
import javax.mail.internet.MimeMessage;
import java.nio.charset.StandardCharsets;
import java.util.Map;
public final class Mailer {
@ -54,17 +54,14 @@ public final class Mailer {
public void sendEmail(final String from, final String to, final String subject, final Map<String, Object> model,
@NotNull final String templateMail) {
final MimeMessagePreparator preparator =
new MimeMessagePreparator() {
public void prepare(MimeMessage mimeMessage)
throws Exception {
final MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
mimeMessage -> {
final MimeMessageHelper message = new MimeMessageHelper(mimeMessage, StandardCharsets.UTF_8.name());
message.setTo(to);
message.setFrom(from);
message.setSubject(subject);
final String messageBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngineWrapper.getVelocityEngine(), "/mail/" + templateMail, model);
message.setText(messageBody, true);
}
};
this.mailSender.send(preparator);

View File

@ -71,7 +71,7 @@ final public class NotificationService {
model.put("baseUrl", getBaseUrl());
model.put("senderMail", user.getEmail());
model.put("message", message);
model.put("supportEmail", mailer.getSupportEmail());
model.put("doNotReplay", messageSource.getMessage("EMAIL.DO_NOT_REPLAY", new Object[]{mailer.getSupportEmail()}, locale));
mailer.sendEmail(formMail, collabEmail, subject, model, "newCollaboration.vm");
} catch (Exception e) {
@ -111,6 +111,7 @@ final public class NotificationService {
}
private void sendTemplateMail(@NotNull User user, @NotNull String mailSubject, @NotNull String messageTitle, @NotNull String messageBody) {
final Locale locale = LocaleContextHolder.getLocale();
try {
final Map<String, Object> model = new HashMap<>();
@ -119,6 +120,7 @@ final public class NotificationService {
model.put("messageBody", messageBody);
model.put("baseUrl", getBaseUrl());
model.put("supportEmail", mailer.getSupportEmail());
model.put("doNotReplay", messageSource.getMessage("EMAIL.DO_NOT_REPLAY", new Object[]{mailer.getSupportEmail()}, locale));
logger.debug("Email properties->" + model);
mailer.sendEmail(mailer.getServerSenderEmail(), user.getEmail(), mailSubject, model, "baseLayout.vm");

View File

@ -19,9 +19,6 @@
package com.wisemapping.model;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@ -33,7 +30,6 @@ public class Collaboration implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
;
@Column(name = "role_id", unique = true)
private CollaborationRole role;

View File

@ -32,8 +32,8 @@ import java.util.Set;
@Entity
@Table(name = "COLLABORATOR")
@Inheritance(strategy = InheritanceType.JOINED)
@Cacheable
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
//@Cacheable
//@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Collaborator implements Serializable {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)

View File

@ -18,6 +18,7 @@
package com.wisemapping.model;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ -30,6 +31,8 @@ import java.util.Set;
@Entity
@Table(name = "USER")
@PrimaryKeyJoinColumn(name = "colaborator_id")
//@Cacheable
//@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class User
extends Collaborator
implements Serializable {

View File

@ -21,11 +21,13 @@ package com.wisemapping.rest;
import com.wisemapping.exceptions.WiseMappingException;
import com.wisemapping.mail.NotificationService;
import com.wisemapping.model.Collaboration;
import com.wisemapping.model.Label;
import com.wisemapping.model.Mindmap;
import com.wisemapping.model.User;
import com.wisemapping.rest.model.RestLogItem;
import com.wisemapping.rest.model.RestUser;
import com.wisemapping.security.Utils;
import com.wisemapping.service.LabelService;
import com.wisemapping.service.MindmapService;
import com.wisemapping.service.UserService;
import org.apache.log4j.Logger;
@ -52,6 +54,10 @@ public class AccountController extends BaseController {
@Autowired
private MindmapService mindmapService;
@Qualifier("labelService")
@Autowired
private LabelService labelService;
@Autowired
private NotificationService notificationService;
@ -68,7 +74,7 @@ public class AccountController extends BaseController {
userService.changePassword(user);
}
@RequestMapping(method = RequestMethod.GET, value = "/account", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.GET, value = "/account", produces = {"application/json"})
public RestUser fetchAccount() {
final User user = Utils.getUser(true);
return new RestUser(user);
@ -113,15 +119,26 @@ public class AccountController extends BaseController {
@RequestMapping(method = RequestMethod.DELETE, value = "account")
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void deleteUser() throws WiseMappingException
{
public void deleteUser() throws WiseMappingException {
// Delete collaborations ...
final User user = Utils.getUser(true);
final List<Collaboration> collaborations = mindmapService.findCollaborations(user);
for (Collaboration collaboration : collaborations) {
final Mindmap mindmap = collaboration.getMindMap();
mindmapService.removeMindmap(mindmap, user);
}
// Delete labels ....
List<Label> labels = labelService.getAll(user);
labels.forEach(l -> {
try {
labelService.removeLabel(l, user);
} catch (WiseMappingException e) {
throw new IllegalStateException(e);
}
});
// Finally, delete user ...
userService.removeUser(user);
}
}

View File

@ -50,7 +50,7 @@ public class AdminController extends BaseController {
@Autowired
private MindmapService mindmapService;
@RequestMapping(method = RequestMethod.GET, value = "admin/users/{id}", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.GET, value = "admin/users/{id}", produces = {"application/json"})
@ResponseBody
public RestUser getUserById(@PathVariable int id) throws IOException {
final User userBy = userService.getUserBy(id);
@ -60,7 +60,7 @@ public class AdminController extends BaseController {
return new RestUser(userBy);
}
@RequestMapping(method = RequestMethod.GET, value = "admin/users/email/{email:.+}", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.GET, value = "admin/users/email/{email:.+}", produces = {"application/json"})
@ResponseBody
public RestUser getUserByEmail(@PathVariable String email) throws IOException {
final User user = userService.getUserBy(email);
@ -70,7 +70,7 @@ public class AdminController extends BaseController {
return new RestUser(user);
}
@RequestMapping(method = RequestMethod.POST, value = "admin/users", consumes = {"application/xml", "application/json"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.POST, value = "admin/users", consumes = { "application/json"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.CREATED)
public void createUser(@RequestBody RestUser user, HttpServletResponse response) throws WiseMappingException {
if (user == null) {

View File

@ -46,7 +46,7 @@ public class LabelController extends BaseController {
private LabelService labelService;
@RequestMapping(method = RequestMethod.POST, value = "/labels", consumes = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.POST, value = "/labels", consumes = {"application/json"})
@ResponseStatus(value = HttpStatus.CREATED)
public void createLabel(@RequestBody RestLabel restLabel, @NotNull HttpServletResponse response, @RequestParam(required = false) String title) throws WiseMappingException {
// Overwrite title if it was specified by parameter.
@ -64,7 +64,7 @@ public class LabelController extends BaseController {
response.setHeader("ResourceId", Long.toString(label.getId()));
}
@RequestMapping(method = RequestMethod.GET, value = "/labels", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.GET, value = "/labels", produces = {"application/json"})
public RestLabelList retrieveList() {
final User user = Utils.getUser();
assert user != null;

View File

@ -58,7 +58,7 @@ public class MindmapController extends BaseController {
@Autowired
private LabelService labelService;
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/json", "application/xml", "text/html"})
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/json"})
@ResponseBody
public RestMindmap retrieve(@PathVariable int id) throws WiseMappingException {
final User user = Utils.getUser();
@ -66,7 +66,7 @@ public class MindmapController extends BaseController {
return new RestMindmap(mindMap, user);
}
@RequestMapping(method = RequestMethod.GET, value = "/maps/", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.GET, value = "/maps/", produces = {"application/json"})
public RestMindmapList retrieveList(@RequestParam(required = false) String q) throws IOException {
final User user = Utils.getUser();
@ -80,7 +80,7 @@ public class MindmapController extends BaseController {
return new RestMindmapList(mindmaps, user);
}
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/history/", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/history/", produces = {"application/json"})
public RestMindmapHistoryList fetchHistory(@PathVariable int id) {
final List<MindMapHistory> histories = mindmapService.findMindmapHistory(id);
final RestMindmapHistoryList result = new RestMindmapHistoryList();
@ -109,7 +109,7 @@ public class MindmapController extends BaseController {
}
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/document", consumes = {"application/xml", "application/json"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/document", consumes = {"application/json"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updateDocument(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws WiseMappingException, IOException {
@ -169,7 +169,7 @@ public class MindmapController extends BaseController {
/**
* The intention of this method is the update of several properties at once ...
*/
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = { "application/json"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updateProperties(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException {
@ -223,7 +223,7 @@ public class MindmapController extends BaseController {
return result;
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/title", consumes = {"text/plain"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/title", consumes = {"text/plain"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updateTitle(@RequestBody String title, @PathVariable int id) throws WiseMappingException {
@ -241,7 +241,7 @@ public class MindmapController extends BaseController {
mindmapService.updateMindmap(mindMap, false);
}
@RequestMapping(method = RequestMethod.POST, value = "/maps/{id}/collabs/", consumes = {"application/json", "application/xml"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.POST, value = "/maps/{id}/collabs/", consumes = {"application/json"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updateCollabs(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException {
final Mindmap mindMap = findMindmapById(id);
@ -288,7 +288,7 @@ public class MindmapController extends BaseController {
}
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs/", consumes = {"application/json", "application/xml"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs/", consumes = {"application/json"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException {
final Mindmap mindMap = findMindmapById(id);
@ -351,7 +351,7 @@ public class MindmapController extends BaseController {
}
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/collabs", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/collabs", produces = {"application/json"})
public RestCollaborationList retrieveList(@PathVariable int id) throws MapCouldNotFoundException, AccessDeniedSecurityException {
final Mindmap mindMap = findMindmapById(id);
@ -367,7 +367,7 @@ public class MindmapController extends BaseController {
return result;
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/description", consumes = {"text/plain"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/description", consumes = {"text/plain"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updateDescription(@RequestBody String description, @PathVariable int id) throws WiseMappingException {
final Mindmap mindmap = findMindmapById(id);
@ -375,7 +375,7 @@ public class MindmapController extends BaseController {
mindmapService.updateMindmap(mindmap, false);
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/publish", consumes = {"text/plain"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/publish", consumes = {"text/plain"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updatePublishState(@RequestBody String value, @PathVariable int id) throws WiseMappingException {
@ -431,7 +431,7 @@ public class MindmapController extends BaseController {
}
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/starred", consumes = {"text/plain"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/starred", consumes = {"text/plain"}, produces = {"application/json"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updateStarredState(@RequestBody String value, @PathVariable int id) throws WiseMappingException {
@ -454,10 +454,16 @@ public class MindmapController extends BaseController {
public void batchDelete(@RequestParam() String ids) throws IOException, WiseMappingException {
final User user = Utils.getUser();
final String[] mapsIds = ids.split(",");
try {
for (final String mapId : mapsIds) {
final Mindmap mindmap = findMindmapById(Integer.parseInt(mapId));
mindmapService.removeMindmap(mindmap, user);
}
} catch (Exception e) {
final AccessDeniedSecurityException accessDenied = new AccessDeniedSecurityException("Map could not be deleted. Maps to be deleted:" + ids);
accessDenied.initCause(e);
throw accessDenied;
}
}
@RequestMapping(method = RequestMethod.POST, value = "/maps", consumes = {"application/xml", "application/json"})
@ -497,7 +503,7 @@ public class MindmapController extends BaseController {
response.setHeader("ResourceId", Integer.toString(mindmap.getId()));
}
@RequestMapping(method = RequestMethod.POST, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/xml", "application/json", "text/plain"})
@RequestMapping(method = RequestMethod.POST, value = "/maps/{id}", consumes = {"application/json"}, produces = { "application/json", "text/plain"})
@ResponseStatus(value = HttpStatus.CREATED)
public void createDuplicate(@RequestBody RestMindmapInfo restMindmap, @PathVariable int id, @NotNull HttpServletResponse response) throws IOException, WiseMappingException {
// Validate ...
@ -552,7 +558,7 @@ public class MindmapController extends BaseController {
mindmapService.updateMindmap(mindmap, false);
}
@RequestMapping(method = RequestMethod.POST, value = "/maps/{id}/labels", consumes = {"application/xml", "application/json"})
@RequestMapping(method = RequestMethod.POST, value = "/maps/{id}/labels", consumes = {"application/json"})
@ResponseStatus(value = HttpStatus.OK)
public void updateLabel(@PathVariable int id, @RequestBody int lid) throws WiseMappingException {
final User user = Utils.getUser();
@ -566,7 +572,7 @@ public class MindmapController extends BaseController {
mindmapService.updateMindmap(mindmap, false);
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/lock", consumes = {"text/plain"}, produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/lock", consumes = {"text/plain"}, produces = {"application/json"})
public ResponseEntity<RestLockInfo> lockMindmap(@RequestBody String value, @PathVariable int id) throws WiseMappingException {
final User user = Utils.getUser();
final LockManager lockManager = mindmapService.getLockManager();

View File

@ -1,46 +0,0 @@
/*
* Copyright [2022] [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.rest;
import org.jetbrains.annotations.Nullable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@Controller
public class TransformerController extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"application/freemind"}, consumes = {"application/xml"})
@ResponseBody
public ModelAndView transformFreemind(@RequestBody @Nullable final String content) throws IOException {
final Map<String, Object> values = new HashMap<String, Object>();
if (content == null || content.length() == 0) {
throw new IllegalArgumentException("Body can not be null.");
}
values.put("content", content);
return new ModelAndView("transformViewFreemind", values);
}
}

View File

@ -55,7 +55,7 @@ public class UserController extends BaseController {
private static final Logger logger = Logger.getLogger(UserController.class);
private static final String REAL_IP_ADDRESS_HEADER = "X-Real-IP";
@RequestMapping(method = RequestMethod.POST, value = "/users", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.POST, value = "/users", produces = {"application/json"})
@ResponseStatus(value = HttpStatus.CREATED)
public void registerUser(@RequestBody RestUserRegistration registration, @NotNull HttpServletRequest request, @NotNull HttpServletResponse response) throws WiseMappingException, BindException {
logger.debug("Register new user:" + registration.getEmail());
@ -80,7 +80,7 @@ public class UserController extends BaseController {
response.setHeader("Location", "/service/users/" + user.getId());
}
@RequestMapping(method = RequestMethod.PUT, value = "/users/resetPassword", produces = {"application/json", "application/xml"})
@RequestMapping(method = RequestMethod.PUT, value = "/users/resetPassword", produces = {"application/json"})
@ResponseStatus(value = HttpStatus.OK)
public void resetPassword(@RequestParam String email) throws InvalidAuthSchemaException, EmailNotExistsException {
try {

View File

@ -24,12 +24,6 @@ import com.wisemapping.model.Collaboration;
import com.wisemapping.model.CollaborationRole;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "collaboration")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -22,15 +22,9 @@ package com.wisemapping.rest.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;
@XmlRootElement(name = "collaborations")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,
@ -52,7 +46,6 @@ public class RestCollaborationList {
}
@XmlElement(name = "collaborations")
public List<RestCollaboration> getCollaborations() {
return collaborations;
}

View File

@ -29,8 +29,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Calendar;
@XmlRootElement(name = "collaborator")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -35,8 +35,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.*;
@XmlRootElement(name = "errors")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
setterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -7,15 +7,9 @@ import com.wisemapping.model.Label;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
@XmlRootElement(name = "label")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = NONE,
setterVisibility = PUBLIC_ONLY,

View File

@ -4,15 +4,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.wisemapping.model.Label;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;
@XmlRootElement(name = "labels")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -21,18 +21,11 @@ package com.wisemapping.rest.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.wisemapping.model.Collaborator;
import com.wisemapping.model.User;
import com.wisemapping.service.LockInfo;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "lock")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -22,12 +22,6 @@ package com.wisemapping.rest.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "logitem")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -35,8 +35,6 @@ import javax.xml.bind.annotation.XmlRootElement;
import java.io.IOException;
import java.util.Calendar;
@XmlRootElement(name = "map")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
setterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -25,16 +25,11 @@ import com.wisemapping.model.MindMapHistory;
import com.wisemapping.model.User;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
@XmlRootElement(name = "history")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
setterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -22,15 +22,9 @@ package com.wisemapping.rest.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;
@XmlRootElement(name = "history")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,
@ -51,7 +45,6 @@ public class RestMindmapHistoryList {
}
@XmlElement(name = "changes")
public List<RestMindmapHistory> getChanges() {
return changes;
}

View File

@ -28,17 +28,11 @@ import com.wisemapping.util.TimeUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Calendar;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
@XmlRootElement(name = "mapinfo")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
setterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -33,8 +33,6 @@ import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@XmlRootElement(name = "maps")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -26,14 +26,9 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.wisemapping.model.User;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Calendar;
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -24,13 +24,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.wisemapping.model.User;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.PROPERTY)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY,

View File

@ -33,9 +33,6 @@
</div>
</div>
<p style="font-size: 13px;font-family: Arial, sans-serif">Important: Do not reply this email. If
you need further help or believe you have received this email in error, contact us to <a
href="mailto:${supportEmail}">here</a>.
</p>
<p style="font-size: 13px;font-family: Arial, sans-serif">${doNotReplay}</p>
</body>
</html>

View File

@ -33,8 +33,6 @@
</div>
</div>
<p style="font-size: 13px;font-family: Arial, sans-serif">Important: Do not reply this email. If
you need further help or have any concerns regarding your account, contact us to <a href="mailto:${supportEmail}">here</a>.
</p>
<p style="font-size: 13px;font-family: Arial, sans-serif">${doNotReplay}</p>
</body>
</html>

View File

@ -1,4 +1,4 @@
# Default English Support.
# Default German Support.
DESCRIPTION=Beschreibung
SITE.TITLE=WiseMapping
FIELD_REQUIRED=Ein benötigtes Feld kann icht leer gelassen werden
@ -41,7 +41,7 @@ CAPTCHA_LOADING_ERROR=ReCaptcha konnte nicht geladen werden. Sie müssen den Zug
ACCESS_HAS_BEEN_REVOKED=Ihre Zugriffsrechte auf diese map sind zurückgesetzt worden. Kontaktieren Sie den Besitzer dieser map.
MAP_CAN_NOT_BE_FOUND=Die Karte kann nicht gefunden werden. Es muss gelöscht worden sein.
LABEL_CAN_NOT_BE_FOUND=Das Etikett kann nicht gefunden werden. Es muss gelöscht worden sein.
MINDMAP_TIMESTAMP_OUTDATED=Es ist nicht möglich, Ihre Änderungen zu speichern, da Ihre Mindmap von {0} geändert wurde. Aktualisieren Sie die Seite und versuchen Sie es erneut.
MINDMAP_TIMESTAMP_OUTDATED=Es ist nicht möglich, Ihre Änderungen zu speichern, da Ihre Mindmap von {0} geändert wurde. Aktualisieren Sie die Seite und versuchen Sie es erneut.
MINDMAP_OUTDATED_BY_YOU=Ihre Änderungen können nicht gespeichert werden, da die Karte veraltet ist. Haben Sie mehrere Tabs geöffnet? Aktualisieren Sie die Seite und versuchen Sie es erneut.
MINDMAP_LOCKED=Karte wird bearbeitet von {0} <{1}>. Die Karte wird im schreibgeschützten Modus geöffnet.
MINDMAP_IS_LOCKED=Mindmap ist für die Bearbeitung gesperrt.
@ -56,7 +56,7 @@ REGISTRATION.EMAIL_TITLE=Ihr Konto wurde erfolgreich erstellt
REGISTRATION.EMAIL_BODY=<p> Vielen Dank für Ihr Interesse an WiseMapping. Klicken Sie <a href='https://app.wisemapping.com/c/login'>hier</a>, um mit dem Erstellen und Teilen neuer Mindmaps zu beginnen. Wenn Sie Feedback oder Ideen haben, senden Sie uns eine E-Mail an <a href=\"mailto:feedback@wisemapping.com\">feedback@wisemapping.com</a>. Wir würden uns freuen, von Ihnen zu hören.</p >
CHANGE_PASSWORD.EMAIL_SUBJECT=Dein Passwort wurde zurück gesetzt
CHANGE_PASSWORD.EMAIL_TITLE=Ein temporäres Passwort wurde generiert
CHANGE_PASSWORD.EMAIL_BODY=<p>Jemand, höchstwahrscheinlich Sie selbst, hat ein neues Passwort für Ihr WiseMapping-Konto angefordert. </p><p><strong>Hier ist Ihr neues Passwort: {0} </strong></p><p>Sie können sich anmelden, indem Sie <a href='${1}/c/login'>hier klicken </a>. Wir empfehlen Ihnen dringend, das Passwort so schnell wie möglich zu ändern.</p>
CHANGE_PASSWORD.EMAIL_BODY=<p>Jemand, höchstwahrscheinlich Sie selbst, hat ein neues Passwort für Ihr WiseMapping-Konto angefordert. </p><p><strong>Hier ist Ihr neues Passwort: {0} </strong></p><p>Sie können sich anmelden, indem Sie <a href="{1}/c/login">hier klicken </a>. Wir empfehlen Ihnen dringend, das Passwort so schnell wie möglich zu ändern.</p>
PASSWORD_CHANGED.EMAIL_SUBJECT=Ihr Passwort wurde geändert
PASSWORD_CHANGED.EMAIL_TITLE=Ihr Passwort wurde erfolgreich geändert
PASSWORD_CHANGED.EMAIL_BODY=<p>Dies ist nur eine Benachrichtigung, dass Ihr Passwort geändert wurde. Es sind keine weiteren Maßnahmen erforderlich.</p>
@ -66,3 +66,4 @@ MINDMAP_EMPTY_ERROR=Mindmap darf nicht leer sein.
INVALID_MINDMAP_FORMAT=Ungültiges Mindmap-Format.
TOO_BIG_MINDMAP=Sie haben das Limit von 5000 Themen in einer Mindmap erreicht.
SHARE_MAP.EMAIL_SUBJECT={0} hat eine Mindmap mit Ihnen geteilt
EMAIL.DO_NOT_REPLAY=Wichtig: Antworten Sie nicht auf diese E-Mail. Wenn Sie weitere Hilfe benötigen oder Bedenken bezüglich Ihres Kontos haben, kontaktieren Sie uns <a href="mailto:{0}">hier</a>.

View File

@ -62,8 +62,9 @@ REGISTRATION.EMAIL_TITLE=Your account has been created successfully
REGISTRATION.EMAIL_BODY=<p> Thank you for your interest in WiseMapping. Click <a href='https://app.wisemapping.com/c/login'>here</a> to start creating and sharing new mind maps. If have any feedback or idea, send us an email to <a href=\"mailto:feedback@wisemapping.com\">feedback@wisemapping.com</a> .We'd love to hear from you.</p>
CHANGE_PASSWORD.EMAIL_SUBJECT=Your password has been reset
CHANGE_PASSWORD.EMAIL_TITLE=A temporal password has been generated
CHANGE_PASSWORD.EMAIL_BODY=<p>Someone, most likely you, requested a new password for your WiseMapping account. </p><p><strong>Here is your new password: {0} </strong></p><p>You can login clicking <a href='${1}/c/login'>here</a>. We strongly encourage you to change the password as soon as possible.</p>
CHANGE_PASSWORD.EMAIL_BODY=<p>Someone, most likely you, requested a new password for your WiseMapping account. </p><p><strong>Here is your new password: {0} </strong></p><p>You can login clicking <a href="{1}/c/login">here</a>. We strongly encourage you to change the password as soon as possible.</p>
PASSWORD_CHANGED.EMAIL_SUBJECT=Your password has been changed
PASSWORD_CHANGED.EMAIL_TITLE=Your password has been changed successfully
PASSWORD_CHANGED.EMAIL_BODY=<p>This is only an notification that your password has been changed. No further action is required.</p>
SHARE_MAP.EMAIL_SUBJECT={0} has shared a mind map with you
EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to <a href="mailto:{0}">here</a>.

View File

@ -55,14 +55,15 @@ CAPTCHA_TIMEOUT_OUT_DUPLICATE=Por favor, actualice la página y vuelva a intenta
CAPTCHA_INVALID_INPUT_RESPONSE=Respuesta ingresada no es válida, actualice la página y vuelva a intentarlo.
MINDMAP_EMPTY_ERROR=El mapa mental no puede estar vacío.
INVALID_MINDMAP_FORMAT=Formato de mapa mental no válido.
TOO_BIG_MINDMAP=Ha alcanzado el límite de 5000 temas en un mapa mental.
TOO_BIG_MINDMAP=Ha alcanzado el límite de 5000 nodos en un mapa mental.
REGISTRATION.EMAIL_SUBJECT=Bienvenido/a a WiseMapping !
REGISTRATION.EMAIL_TITLE=Tu cuenta ha sido creada exitosamente
REGISTRATION.EMAIL_BODY=<p> Gracias por tu interest en WiseMapping. Hace click <a href='https://app.wisemapping.com/c/login'>aqui</a> para empezar a crear y compatir tus mapas mentales. Ideas y sugerencias, no dudes en contactarnos a <a href=\"mailto:feedback@wisemapping.com\">feedback@wisemapping.com</a>.</p>
CHANGE_PASSWORD.EMAIL_SUBJECT=Su contraseña ha sido restablecida
CHANGE_PASSWORD.EMAIL_TITLE=Se ha generado una contraseña temporal
CHANGE_PASSWORD.EMAIL_BODY=<p>Alguien, muy probablemente usted, solicitó una nueva contraseña para su cuenta de WiseMapping. </p><p><strong>Esta es su nueva contraseña: {0} </strong></p><p>Puede iniciar sesión haciendo clic <a href='${1}/c/login'>aquí </a>. Te recomendamos que cambie la contraseña lo antes posible.</p>
CHANGE_PASSWORD.EMAIL_BODY=<p>Alguien, muy probablemente usted, solicitó una nueva contraseña para su cuenta de WiseMapping. </p><p><strong>Esta es su nueva contraseña: {0} </strong></p><p>Puede iniciar sesión haciendo clic <a href='{1}/c/login'>aquí </a>. Te recomendamos que cambie la contraseña lo antes posible.</p>
PASSWORD_CHANGED.EMAIL_SUBJECT=Su contraseña ha sido cambiada
PASSWORD_CHANGED.EMAIL_TITLE=Su contraseña ha sido cambiada con éxito
PASSWORD_CHANGED.EMAIL_BODY=<p>Esto es solo una notificación de que su contraseña ha sido cambiada. No se requiere ninguna otra acción.</p>
SHARE_MAP.EMAIL_SUBJECT={0} te ha compartido un mapa mental
EMAIL.DO_NOT_REPLAY=Importante: No responda este correo electrónico. Si necesita más ayuda o tiene alguna inquietud con respecto a su cuenta, comuníquese con nosotros a <a href="mailto:{0}">aquí</a>.

View File

@ -56,7 +56,7 @@ REGISTRATION.EMAIL_TITLE=Votre compte a été créé avec succès
REGISTRATION.EMAIL_BODY=<p> Merci de l'intérêt que vous portez à WiseMapping. Cliquez <a href='https://app.wisemapping.com/c/login'>ici</a> pour commencer à créer et partager de nouvelles cartes mentales. Si vous avez des commentaires ou des idées, envoyez-nous un e-mail à <a href=\"mailto:feedback@wisemapping.com\">feedback@wisemapping.com</a>. Nous aimerions avoir de vos nouvelles.</p >
CHANGE_PASSWORD.EMAIL_SUBJECT=Votre mot de passe a été réinitialisé
CHANGE_PASSWORD.EMAIL_TITLE=Un mot de passe temporaire a été généré
CHANGE_PASSWORD.EMAIL_BODY=<p>Quelqu'un, probablement vous, a demandé un nouveau mot de passe pour votre compte WiseMapping. </p><p><strong>Voici votre nouveau mot de passe : {0} </strong></p><p>Vous pouvez vous connecter en cliquant sur <a href='${1}/c/login'> ici </a>. Nous vous recommandons de changer votre mot de passe dès que possible.</p>
CHANGE_PASSWORD.EMAIL_BODY=<p>Quelqu''un, probablement vous, a demandé un nouveau mot de passe pour votre compte WiseMapping. </p><p><strong>Voici votre nouveau mot de passe : {0} </strong></p><p>Vous pouvez vous connecter en cliquant sur <a href="{1}/c/login"> ici </a>. Nous vous recommandons de changer votre mot de passe dès que possible.</p>
PASSWORD_CHANGED.EMAIL_SUBJECT=Votre mot de passe a été changé
PASSWORD_CHANGED.EMAIL_TITLE=Votre mot de passe a été changé avec succès
PASSWORD_CHANGED.EMAIL_BODY=<p>Il s'agit simplement d'une notification indiquant que votre mot de passe a été modifié. Aucune autre action n'est requise.</p>
@ -66,3 +66,4 @@ MINDMAP_EMPTY_ERROR=La carte mentale ne peut pas être vide.
INVALID_MINDMAP_FORMAT=Format de carte mentale non valide.
TOO_BIG_MINDMAP=Vous avez atteint la limite de 5000 sujets dans une carte mentale.
SHARE_MAP.EMAIL_SUBJECT={0} a partagé une carte mentale avec vous
EMAIL.DO_NOT_REPLAY=Important : Ne répondez pas à cet e-mail. Si vous avez besoin d'aide supplémentaire ou si vous avez des inquiétudes concernant votre compte, contactez-nous <a href="mailto:{0}">ici</a>.

View File

@ -60,4 +60,4 @@ REGISTRATION.EMAIL_SUBJECT=Добро пожаловать в WiseMapping!
REGISTRATION.EMAIL_TITLE=Ваша учетная запись успешно создана
REGISTRATION.EMAIL_BODY=<p> Благодарим вас за интерес к WiseMapping. Нажмите <a href='https://app.wisemapping.com/c/login'>здесь</a>, чтобы начать создавать и публиковать новые интеллект-карты. Если у вас есть какие-либо отзывы или идеи, отправьте нам электронное письмо по адресу <a href=\"mailto:feedback@wisemapping.com\">feedback@wisemapping.com</a>. Мы будем рады услышать от вас.</p >
SHARE_MAP.EMAIL_SUBJECT={0} has shared a mindmap with you
EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to <a href="mailto:{0}">here</a>.

View File

@ -61,9 +61,9 @@ REGISTRATION.EMAIL_TITLE=您的帐户已成功创建
REGISTRATION.EMAIL_BODY=<p> 感谢您对 WiseMapping 的关注。点击<a href='https://app.wisemapping.com/c/login'>这里</a>开始创建和分享新的思维导图。如果有任何反馈或想法,请给我们发送电子邮件至 <a href=\"mailto:feedback@wisemapping.com\">feedback@wisemapping.com</a>。我们很乐意听取您的意见。</p >
CHANGE_PASSWORD.EMAIL_SUBJECT=您的密码已重置
CHANGE_PASSWORD.EMAIL_TITLE=已生成临时密码
CHANGE_PASSWORD.EMAIL_BODY=<p>有人(很可能是您)为您的 WiseMapping 帐户申请了新密码。 </p><p><strong>这是您的新密码:{0} </strong></p><p>您可以点击<a href='${1}/c/login'>此处登录</a>。我们强烈建议您尽快更改密码</p>
CHANGE_PASSWORD.EMAIL_BODY=<p>有人(很可能是您)为您的 WiseMapping 帐户申请了新密码。 </p><p><strong>这是您的新密码:{0} </strong></p><p>您可以点击<a href="{1}/c/login">此处登录</a>。我们强烈建议您尽快更改密码</p>
PASSWORD_CHANGED.EMAIL_SUBJECT=您的密码已被更改
PASSWORD_CHANGED.EMAIL_TITLE=你已经成功更改密码
PASSWORD_CHANGED.EMAIL_BODY=<p>这只是您的密码已更改的通知。无需进一步操作。</p>
SHARE_MAP.EMAIL_SUBJECT={0} 与您分享了一张思维导图
EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to <a href="mailto:{0}">here</a>.

View File

@ -89,7 +89,7 @@ google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
admin.user = admin@wisemapping.org
# Base URL where WiseMapping is deployed. By default, It will be automatically inferred.
site.baseurl = http://localhost:8080
#site.baseurl = http://localhost:8080
# Site Homepage URL. This will be used as URL for homepage location.
site.homepage = c/login

View File

@ -22,25 +22,6 @@
</mvc:message-converters>
</mvc:annotation-driven>
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>com.wisemapping.rest.model.RestMindmap</value>
<value>com.wisemapping.rest.model.RestMindmapInfo</value>
<value>com.wisemapping.rest.model.RestMindmapList</value>
<value>com.wisemapping.rest.model.RestUser</value>
<value>com.wisemapping.rest.model.RestErrors</value>
<value>com.wisemapping.rest.model.RestCollaboration</value>
<value>com.wisemapping.rest.model.RestCollaborationList</value>
<value>com.wisemapping.rest.model.RestLogItem</value>
<value>com.wisemapping.rest.model.RestLockInfo</value>
<value>com.wisemapping.rest.model.RestLabel</value>
<value>com.wisemapping.rest.model.RestLabelList</value>
<value>com.wisemapping.rest.model.RestUserRegistration</value>
</list>
</property>
</bean>
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="favorParameter" value="true"/>
<property name="parameterName" value="mediaType"/>
@ -66,14 +47,12 @@
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
<property name="extractValueFromSingleKeyModel" value="true"/>
</bean>
<bean class="org.springframework.web.servlet.view.xml.MarshallingView">
<constructor-arg ref="jaxbMarshaller"/>
</bean>
</list>
</property>
</bean>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="defaultEncoding" value="UTF-8"/>
<property name="basenames">
<list>
<value>messages</value>

View File

@ -99,6 +99,7 @@
</bean>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="defaultEncoding" value="UTF-8"/>
<property name="basenames">
<list>
<value>messages</value>

View File

@ -60,6 +60,7 @@
</bean>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="defaultEncoding" value="UTF-8"/>
<property name="basenames">
<list>
<value>messages</value>

View File

@ -46,7 +46,7 @@ public class RestHelper {
@DataProvider(name = "ContentType-Provider-Function")
static Object[][] contentTypes() {
return new Object[][]{{MediaType.APPLICATION_XML}, {MediaType.APPLICATION_JSON}};
return new Object[][]{{MediaType.APPLICATION_JSON}};
}
}

View File

@ -201,10 +201,6 @@ public class RestMindmapITCase {
@Test(dataProviderClass = RestHelper.class, dataProvider = "ContentType-Provider-Function")
public void updateMap(final @NotNull MediaType mediaType) throws IOException, WiseMappingException { // Configure media types ...
if (MediaType.APPLICATION_XML == mediaType) {
throw new SkipException("Some research need to check why it's falling.");
}
final HttpHeaders requestHeaders = createHeaders(mediaType);
final RestTemplate template = createTemplate(userEmail);
@ -223,7 +219,7 @@ public class RestMindmapITCase {
// Update map ...
final String resourceUrl = HOST_PORT + resourceUri.toString() + "/document";
requestHeaders.setContentType(MediaType.APPLICATION_XML);
requestHeaders.setContentType(MediaType.APPLICATION_JSON);
final HttpEntity<RestMindmap> updateEntity = new HttpEntity<>(mapToUpdate, requestHeaders);
template.put(resourceUrl, updateEntity);
@ -396,10 +392,6 @@ public class RestMindmapITCase {
@Test(dataProviderClass = RestHelper.class, dataProvider = "ContentType-Provider-Function")
public void addLabelToMindmap(final @NotNull MediaType mediaType) throws IOException, WiseMappingException { // Configure media types ...
if (MediaType.APPLICATION_XML == mediaType) {
throw new SkipException("Some research need to check why it's falling.");
}
final HttpHeaders requestHeaders = createHeaders(mediaType);
final RestTemplate template = createTemplate(userEmail);