Remove username from the mindmap info.

This commit is contained in:
Paulo Gustavo Veiga
2012-07-15 02:04:53 -03:00
parent 9257638da2
commit 1ac80626b4
7 changed files with 6 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ public class MindmapManagerImpl
final Collaborator collaborator;
final List<Collaborator> collaborators = getHibernateTemplate().find("from com.wisemapping.model.Collaborator collaborator where email=?", email);
if (collaborators != null && !collaborators.isEmpty()) {
assert collaborators.size() == 1 : "More than one user with the same username!";
assert collaborators.size() == 1 : "More than one user with the same email!";
collaborator = collaborators.get(0);
} else {
collaborator = null;

View File

@@ -22,7 +22,6 @@ public class Constants {
public static final int MAX_MAP_NAME_LENGTH = 512;
public static final int MAX_MAP_DESCRIPTION_LENGTH = 512;
public static final int MAX_USER_USERNAME_LENGTH = 255;
public static final int MAX_USER_LASTNAME_LENGTH = 255;
public static final int MAX_USER_FIRSTNAME_LENGTH = 255;
public static final int MAX_USER_PASSWORD_LENGTH = 255;

View File

@@ -404,7 +404,6 @@ public class MindmapController extends BaseController {
}
// Save new map ...
final User user = Utils.getUser();
createMap(new RestMindmap(mindMap, null), response, title, description);
}

View File

@@ -142,7 +142,7 @@ public class UserServiceImpl
return user;
}
private MindMap buildWelcomeMindmap(@NotNull String username) throws WiseMappingException {
private MindMap buildWelcomeMindmap(@NotNull String firstName) throws WiseMappingException {
//To change body of created methods use File | Settings | File Templates.
final Locale locale = LocaleContextHolder.getLocale();
MindMap result = new MindMap();
@@ -155,7 +155,7 @@ public class UserServiceImpl
try {
final byte[] bytes = IOUtils.toByteArray(resourceAsStream);
result.setXml(bytes);
result.setTitle(messageSource.getMessage("WELCOME", null, locale) + " " + username);
result.setTitle(messageSource.getMessage("WELCOME", null, locale) + " " + firstName);
result.setDescription("");
} catch (IOException e) {

View File

@@ -21,7 +21,6 @@ package com.wisemapping.validator;
public interface Messages {
String EMAIL_ALREADY_EXIST = "EMAIL_ALREADY_EXIST";
String NO_VALID_EMAIL_ADDRESS = "NO_VALID_EMAIL_ADDRESS";
String USERNAME_ALREADY_EXIST = "USERNAME_ALREADY_EXIST";
String FIELD_REQUIRED = "FIELD_REQUIRED";
String IMPORT_MAP_ERROR = "IMPORT_MAP_ERROR";
String MAP_TITLE_ALREADY_EXISTS = "MAP_TITLE_ALREADY_EXISTS";