From 3672d2a8e23a4fd0a28f70e5f09b4c50558fff29 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 30 Sep 2012 17:15:01 -0300 Subject: [PATCH 1/6] - Finish exclusive locking support. --- .../main/javascript/LocalStorageManager.js | 20 ++- .../src/main/javascript/PersistenceManager.js | 16 +- .../main/javascript/RestPersistenceManager.js | 36 ++++- mindplot/src/main/javascript/widget/IMenu.js | 16 +- mindplot/src/main/javascript/widget/Menu.js | 26 +-- .../wisemapping/exceptions/LockException.java | 35 ++++ ...ion.java => MindmapOutdatedException.java} | 67 ++++---- .../java/com/wisemapping/model/Mindmap.java | 4 - .../main/java/com/wisemapping/model/User.java | 2 + .../ncontroller/MindmapController.java | 45 ++++-- .../com/wisemapping/rest/BaseController.java | 3 + .../wisemapping/rest/MindmapController.java | 32 +++- .../rest/model/RestMindmapLock.java | 55 +++++++ .../security/AuthenticationProvider.java | 18 +++ .../security/aop/BaseSecurityAdvice.java | 5 +- .../com/wisemapping/service/LockInfo.java | 50 ++++++ .../com/wisemapping/service/LockManager.java | 43 +++++ .../wisemapping/service/LockManagerImpl.java | 153 ++++++++++++++++++ .../wisemapping/service/MindmapService.java | 2 + .../service/MindmapServiceImpl.java | 16 ++ .../src/main/resources/messages_en.properties | 2 +- .../webapp/WEB-INF/classes/log4j.properties | 3 +- .../src/main/webapp/jsp/mindmapEditor.jsp | 2 +- .../resources/data/freemind/node-styles.mmr | 16 +- .../resources/data/freemind/node-styles.wxml | 16 +- .../resources/data/freemind/richtextnode.mmr | 38 ++--- .../resources/data/freemind/richtextnode.wxml | 38 ++--- 27 files changed, 602 insertions(+), 157 deletions(-) create mode 100755 wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java rename wise-webapp/src/main/java/com/wisemapping/exceptions/{UnexpectedArgumentException.java => MindmapOutdatedException.java} (71%) create mode 100644 wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapLock.java create mode 100644 wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java create mode 100644 wise-webapp/src/main/java/com/wisemapping/service/LockManager.java create mode 100644 wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java diff --git a/mindplot/src/main/javascript/LocalStorageManager.js b/mindplot/src/main/javascript/LocalStorageManager.js index 201b6b1c..a8ed69ee 100644 --- a/mindplot/src/main/javascript/LocalStorageManager.js +++ b/mindplot/src/main/javascript/LocalStorageManager.js @@ -18,28 +18,28 @@ mindplot.LocalStorageManager = new Class({ Extends:mindplot.PersistenceManager, - initialize: function() { + initialize:function () { this.parent(); }, - saveMapXml : function(mapId, mapXml, pref, saveHistory, events) { + saveMapXml:function (mapId, mapXml, pref, saveHistory, events) { localStorage.setItem(mapId + "-xml", mapXml); events.onSuccess(); }, - discardChanges : function(mapId) { + discardChanges:function (mapId) { localStorage.removeItem(mapId + "-xml"); }, - loadMapDom : function(mapId) { + loadMapDom:function (mapId) { var xml = localStorage.getItem(mapId + "-xml"); if (xml == null) { // Let's try to open one from the local directory ... var xmlRequest = new Request({ - url: 'samples/' + mapId + '.xml', - method: 'get', - async: false, - onSuccess: function(responseText) { + url:'samples/' + mapId + '.xml', + method:'get', + async:false, + onSuccess:function (responseText) { xml = responseText; } }); @@ -54,6 +54,10 @@ mindplot.LocalStorageManager = new Class({ var parser = new DOMParser(); return parser.parseFromString(xml, "text/xml"); + }, + + unlockMap:function (mindmap) { + // Ignore, no implementation required ... } } ); diff --git a/mindplot/src/main/javascript/PersistenceManager.js b/mindplot/src/main/javascript/PersistenceManager.js index d7d11948..84bc791d 100644 --- a/mindplot/src/main/javascript/PersistenceManager.js +++ b/mindplot/src/main/javascript/PersistenceManager.js @@ -31,7 +31,7 @@ mindplot.PersistenceManager = new Class({ }, - save:function (mindmap, editorProperties, saveHistory, events) { + save:function (mindmap, editorProperties, saveHistory, events, sync) { $assert(mindmap, "mindmap can not be null"); $assert(editorProperties, "editorProperties can not be null"); @@ -44,7 +44,7 @@ mindplot.PersistenceManager = new Class({ var pref = JSON.encode(editorProperties); try { - this.saveMapXml(mapId, mapXml, pref, saveHistory, events); + this.saveMapXml(mapId, mapXml, pref, saveHistory, events,sync); } catch (e) { console.log(e); events.onError(); @@ -58,15 +58,19 @@ mindplot.PersistenceManager = new Class({ }, discardChanges:function (mapId) { - throw "Method must be implemented"; + throw new Error("Method must be implemented"); }, loadMapDom:function (mapId) { - throw "Method must be implemented"; + throw new Error("Method must be implemented"); }, - saveMapXml:function (mapId, mapXml, pref, saveHistory, events) { - throw "Method must be implemented"; + saveMapXml:function (mapId, mapXml, pref, saveHistory, events,sync) { + throw new Error("Method must be implemented"); + }, + + unlockMap:function (mindmap) { + throw new Error("Method must be implemented"); } }); diff --git a/mindplot/src/main/javascript/RestPersistenceManager.js b/mindplot/src/main/javascript/RestPersistenceManager.js index 7335503a..b7d5b2aa 100644 --- a/mindplot/src/main/javascript/RestPersistenceManager.js +++ b/mindplot/src/main/javascript/RestPersistenceManager.js @@ -18,15 +18,17 @@ mindplot.RESTPersistenceManager = new Class({ Extends:mindplot.PersistenceManager, - initialize:function (saveUrl, revertUrl) { + initialize:function (saveUrl, revertUrl, lockUrl) { this.parent(); $assert(saveUrl, "saveUrl can not be null"); $assert(revertUrl, "revertUrl can not be null"); this.saveUrl = saveUrl; this.revertUrl = revertUrl; + this.lockUrl = lockUrl; + this.timestamp = null; }, - saveMapXml:function (mapId, mapXml, pref, saveHistory, events) { + saveMapXml:function (mapId, mapXml, pref, saveHistory, events, sync) { var data = { id:mapId, @@ -34,12 +36,17 @@ mindplot.RESTPersistenceManager = new Class({ properties:pref }; + var persistence = this; + var query = "minor=" + !saveHistory; + query = query + (this.timestamp ? "×tamp=" + this.timestamp : ""); + var request = new Request({ - url:this.saveUrl.replace("{id}", mapId) + "?minor=" + !saveHistory, + url:this.saveUrl.replace("{id}", mapId) + "?" + query, method:'put', + async:!sync, onSuccess:function (responseText, responseXML) { events.onSuccess(); - + persistence.timestamp = responseText; }, onException:function (headerName, value) { events.onError(); @@ -81,8 +88,27 @@ mindplot.RESTPersistenceManager = new Class({ urlEncoded:false }); request.post(); - } + }, + unlockMap:function (mindmap) { + var mapId = mindmap.getId(); + var request = new Request({ + url:this.lockUrl.replace("{id}", mapId), + async:false, + method:'put', + onSuccess:function () { + + }, + onException:function () { + }, + onFailure:function () { + }, + headers:{"Content-Type":"text/plain"}, + emulation:false, + urlEncoded:false + }); + request.put("false"); + } } ); diff --git a/mindplot/src/main/javascript/widget/IMenu.js b/mindplot/src/main/javascript/widget/IMenu.js index 487092d8..0bc89a90 100644 --- a/mindplot/src/main/javascript/widget/IMenu.js +++ b/mindplot/src/main/javascript/widget/IMenu.js @@ -40,7 +40,7 @@ mindplot.widget.IMenu = new Class({ }); }, - discardChanges:function () { + discardChanges:function (designer) { // Avoid autosave before leaving the page .... this.setRequireChange(false); @@ -49,12 +49,21 @@ mindplot.widget.IMenu = new Class({ var mindmap = designer.getMindmap(); persistenceManager.discardChanges(mindmap.getId()); + // Unlock map ... + this.unlockMap(designer); + // Reload the page ... window.location.reload(); }, - save:function (saveElem, designer, saveHistory) { + unlockMap:function (designer) { + var mindmap = designer.getMindmap(); + var persistenceManager = mindplot.PersistenceManager.getInstance(); + persistenceManager.unlockMap(mindmap); + }, + + save:function (saveElem, designer, saveHistory, sync) { // Load map content ... var mindmap = designer.getMindmap(); var mindmapProp = designer.getMindmapProperties(); @@ -88,7 +97,8 @@ mindplot.widget.IMenu = new Class({ $notify(msg); } } - }); + }, sync); + }, isSaveRequired:function () { diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index 9a87a477..0432d1de 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -325,10 +325,12 @@ mindplot.widget.Menu = new Class({ if (!readOnly) { // To prevent the user from leaving the page with changes ... - $(window).addEvent('beforeunload', function () { + Element.NativeEvents.unload = 2; + $(window).addEvent('unload', function () { if (this.isSaveRequired()) { - this.save(saveElem, designer, false); + this.save(saveElem, designer, false, true); } + this.unlockMap(designer); }.bind(this)); // Autosave on a fixed period of time ... @@ -343,29 +345,11 @@ mindplot.widget.Menu = new Class({ var discardElem = $('discard'); if (discardElem) { this._addButton('discard', false, false, function () { - this.discardChanges(); + this.discardChanges(designer); }.bind(this)); this._registerTooltip('discard', $msg('DISCARD_CHANGES')); } - var tagElem = $('tagIt'); - if (tagElem) { - this._addButton('tagIt', false, false, function () { - var reqDialog = new MooDialog.Request('c/tags?mapId=' + mapId, null, - {'class':'modalDialog tagItModalDialog', - closeButton:true, - destroyOnClose:true, - title:'Tags' - }); - reqDialog.setRequestOptions({ - onRequest:function () { - reqDialog.setContent($msg('LOADING')); - } - }); - }); - this._registerTooltip('tagIt', "Tag"); - } - var shareElem = $('shareIt'); if (shareElem) { this._addButton('shareIt', false, false, function () { diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java new file mode 100755 index 00000000..dff6efe0 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java @@ -0,0 +1,35 @@ +/* +* Copyright [2011] [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.exceptions; + +import org.jetbrains.annotations.NotNull; + +public class LockException + extends ClientException +{ + public LockException(@NotNull String message) { + super(message); + } + + @NotNull + @Override + protected String getMsgBundleKey() { + return null; //To change body of implemented methods use File | Settings | File Templates. + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/UnexpectedArgumentException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/MindmapOutdatedException.java similarity index 71% rename from wise-webapp/src/main/java/com/wisemapping/exceptions/UnexpectedArgumentException.java rename to wise-webapp/src/main/java/com/wisemapping/exceptions/MindmapOutdatedException.java index 3c346dda..87a65e91 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/UnexpectedArgumentException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/MindmapOutdatedException.java @@ -1,29 +1,38 @@ -/* -* Copyright [2011] [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.exceptions; - - -public class UnexpectedArgumentException - extends Exception -{ - public UnexpectedArgumentException(String msg) - { - super(msg); - } -} +/* +* Copyright [2011] [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.exceptions; + +import org.jetbrains.annotations.NotNull; + +public class MindmapOutdatedException + extends ClientException +{ + public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED"; + + public MindmapOutdatedException(@NotNull String msg) + { + super(msg); + } + + @NotNull + @Override + protected String getMsgBundleKey() { + return MSG_KEY; + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java index 2dd41384..98a58e7d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java @@ -138,10 +138,6 @@ public class Mindmap { return lastModificationTime; } - public Date getLastModificationDate() { - return new Date(); - } - public void setLastModificationTime(Calendar lastModificationTime) { this.lastModificationTime = lastModificationTime; } diff --git a/wise-webapp/src/main/java/com/wisemapping/model/User.java b/wise-webapp/src/main/java/com/wisemapping/model/User.java index f448330f..4f350353 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/User.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/User.java @@ -20,6 +20,8 @@ package com.wisemapping.model; import org.jetbrains.annotations.Nullable; +import javax.servlet.http.HttpSessionBindingEvent; +import javax.servlet.http.HttpSessionBindingListener; import java.io.Serializable; import java.util.*; diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java index abbb92bf..b154e0e2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java @@ -19,12 +19,15 @@ package com.wisemapping.ncontroller; +import com.wisemapping.exceptions.AccessDeniedSecurityException; +import com.wisemapping.exceptions.LockException; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.model.CollaborationRole; import com.wisemapping.model.Mindmap; import com.wisemapping.model.MindMapHistory; import com.wisemapping.model.User; import com.wisemapping.security.Utils; +import com.wisemapping.service.LockManager; import com.wisemapping.service.MindmapService; import com.wisemapping.view.MindMapBean; import org.jetbrains.annotations.NotNull; @@ -140,33 +143,47 @@ public class MindmapController { } @RequestMapping(value = "maps/{id}/edit", method = RequestMethod.GET) - public String showMindmapEditorPage(@PathVariable int id, @NotNull Model model) { + public String showMindmapEditorPage(@PathVariable int id, @NotNull Model model) throws WiseMappingException { + return showEditorPage(id, model, true); + } + + private String showEditorPage(int id, @NotNull final Model model, boolean requiresLock) throws AccessDeniedSecurityException, LockException { final MindMapBean mindmapBean = findMindmapBean(id); final Mindmap mindmap = mindmapBean.getDelegated(); + final User collaborator = Utils.getUser(); + final Locale locale = LocaleContextHolder.getLocale(); + // Is the mindmap locked ?. + boolean readOnlyMode = !requiresLock || !mindmap.hasPermissions(collaborator, CollaborationRole.EDITOR); + if (!readOnlyMode) { + final LockManager lockManager = this.mindmapService.getLockManager(); + if (lockManager.isLocked(mindmap) && !lockManager.isLockedBy(mindmap, collaborator)) { + readOnlyMode = true; + model.addAttribute("lockedBy", lockManager.getLockInfo(mindmap)); + } else { + lockManager.lock(mindmap, collaborator); + } + } + + // Set render attributes ... model.addAttribute("mindmap", mindmapBean); // Configure default locale for the editor ... - final Locale locale = LocaleContextHolder.getLocale(); model.addAttribute("locale", locale.toString().toLowerCase()); - final User collaborator = Utils.getUser(); model.addAttribute("principal", collaborator); - model.addAttribute("readOnlyMode", !mindmap.hasPermissions(collaborator, CollaborationRole.EDITOR)); + model.addAttribute("readOnlyMode", readOnlyMode); return "mindmapEditor"; } @RequestMapping(value = "maps/{id}/view", method = RequestMethod.GET) - public String showMindmapViewerPage(@PathVariable int id, @NotNull Model model) { - final String result = showMindmapEditorPage(id, model); - model.addAttribute("readOnlyMode", true); - return result; + public String showMindmapViewerPage(@PathVariable int id, @NotNull Model model) throws LockException, AccessDeniedSecurityException { + return showEditorPage(id, model, false); } @RequestMapping(value = "maps/{id}/try", method = RequestMethod.GET) - public String showMindmapTryPage(@PathVariable int id, @NotNull Model model) { - final String result = showMindmapEditorPage(id, model); + public String showMindmapTryPage(@PathVariable int id, @NotNull Model model) throws LockException, AccessDeniedSecurityException { + final String result = showEditorPage(id, model, false); model.addAttribute("memoryPersistence", true); - model.addAttribute("readOnlyMode", false); return result; } @@ -213,11 +230,7 @@ public class MindmapController { } private Mindmap findMindmap(long mapId) { - final Mindmap mindmap = mindmapService.findMindmapById((int) mapId); - if (mindmap == null) { - throw new IllegalArgumentException("Mindmap could not be found"); - } - return mindmap; + return mindmapService.findMindmapById((int) mapId); } private MindMapBean findMindmapBean(long mapId) { diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java index 232088d6..8b195ca5 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java @@ -24,6 +24,7 @@ import com.wisemapping.mail.NotificationService; import com.wisemapping.model.User; import com.wisemapping.rest.model.RestErrors; import com.wisemapping.security.Utils; +import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -41,6 +42,8 @@ import java.util.Locale; public class BaseController { + final protected static Logger logger = Logger.getLogger("com.wisemapping.rest"); + @Qualifier("messageSource") @Autowired private ResourceBundleMessageSource messageSource; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index ecb4230f..b52a5fec 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -20,6 +20,7 @@ package com.wisemapping.rest; import com.wisemapping.exceptions.ImportUnexpectedException; +import com.wisemapping.exceptions.MindmapOutdatedException; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.importer.ImportFormat; import com.wisemapping.importer.Importer; @@ -29,8 +30,10 @@ import com.wisemapping.model.*; import com.wisemapping.rest.model.*; import com.wisemapping.security.Utils; import com.wisemapping.service.CollaborationException; +import com.wisemapping.service.LockManager; import com.wisemapping.service.MindmapService; import com.wisemapping.validator.MapInfoValidator; +import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -49,6 +52,7 @@ import java.util.*; @Controller public class MindmapController extends BaseController { + public static final String LATEST_HISTORY_REVISION = "latest"; @Qualifier("mindmapService") @Autowired @@ -136,8 +140,8 @@ public class MindmapController extends BaseController { } @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/document", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) - @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void updateDocument(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws WiseMappingException, IOException { + @ResponseBody + public long updateDocument(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor, @RequestParam(required = false) Long timestamp) throws WiseMappingException, IOException { final Mindmap mindmap = mindmapService.findMindmapById(id); final User user = Utils.getUser(); @@ -148,6 +152,11 @@ public class MindmapController extends BaseController { throw new IllegalArgumentException("Map properties can not be null"); } + // Check that there we are not overwriting an already existing map ... + if (timestamp != null && mindmap.getLastModificationTime().getTimeInMillis() > timestamp) { + throw new MindmapOutdatedException("Mindmap timestamp out of sync. Client timestamp: " + timestamp + ", DB Timestamp:" + timestamp); + } + // Update collaboration properties ... final CollaborationProperties collaborationProperties = mindmap.findCollaborationProperties(user); collaborationProperties.setMindmapProperties(properties); @@ -160,7 +169,11 @@ public class MindmapController extends BaseController { mindmap.setXmlStr(xml); // Update map ... + logger.debug("Mindmap save completed:" + restMindmap.getXml()); saveMindmap(minor, mindmap, user); + + // Return last update timestamp ... + return mindmap.getLastModificationTime().getTimeInMillis(); } /** @@ -317,6 +330,14 @@ public class MindmapController extends BaseController { } + @RequestMapping(method = RequestMethod.DELETE, value = "/maps/{id}") + @ResponseStatus(value = HttpStatus.NO_CONTENT) + public void updateMap(@PathVariable int id) throws IOException, WiseMappingException { + final User user = Utils.getUser(); + final Mindmap mindmap = mindmapService.findMindmapById(id); + mindmapService.removeMindmap(mindmap, user); + } + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/starred", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateStarredState(@RequestBody String value, @PathVariable int id) throws WiseMappingException { @@ -334,12 +355,13 @@ public class MindmapController extends BaseController { mindmapService.updateCollaboration(user, collaboration); } - @RequestMapping(method = RequestMethod.DELETE, value = "/maps/{id}") + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/lock", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void updateMap(@PathVariable int id) throws IOException, WiseMappingException { + public void updateMapLock(@RequestBody String value, @PathVariable int id) throws IOException, WiseMappingException { final User user = Utils.getUser(); + final LockManager lockManager = mindmapService.getLockManager(); final Mindmap mindmap = mindmapService.findMindmapById(id); - mindmapService.removeMindmap(mindmap, user); + lockManager.updateLock(Boolean.parseBoolean(value), mindmap, user); } @RequestMapping(method = RequestMethod.DELETE, value = "/maps/batch") diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapLock.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapLock.java new file mode 100644 index 00000000..5377b215 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapLock.java @@ -0,0 +1,55 @@ +package com.wisemapping.rest.model; + + +import com.wisemapping.model.Collaborator; +import com.wisemapping.model.User; +import com.wisemapping.service.LockInfo; +import org.codehaus.jackson.annotate.JsonAutoDetect; +import org.codehaus.jackson.annotate.JsonIgnore; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +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.Date; +import java.util.Set; + +@XmlRootElement(name = "lock") +@XmlAccessorType(XmlAccessType.PROPERTY) +@JsonAutoDetect( + fieldVisibility = JsonAutoDetect.Visibility.NONE, + getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY, + isGetterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY) +@JsonIgnoreProperties(ignoreUnknown = true) +public class RestMindmapLock { + + @NotNull + private Collaborator user; + @Nullable + private LockInfo lockInfo; + + public RestMindmapLock(@Nullable LockInfo lockInfo, @NotNull Collaborator collaborator) { + + this.lockInfo = lockInfo; + this.user = collaborator; + } + + public boolean isLocked() { + return lockInfo != null; + } + + public void setLocked(boolean locked) { + // Ignore ... + } + + public boolean isLockedByMe() { + return isLocked() && lockInfo != null && lockInfo.getCollaborator().equals(user); + } + + public void setLockedByMe(boolean lockedForMe) { + // Ignore ... + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java b/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java index 9d0ce501..04ef95b3 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java @@ -1,3 +1,21 @@ +/* +* Copyright [2011] [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.security; diff --git a/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java b/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java index 4f4bea73..2a6da5a8 100755 --- a/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java @@ -22,7 +22,6 @@ import com.wisemapping.model.Collaborator; import com.wisemapping.model.Mindmap; import com.wisemapping.model.User; import com.wisemapping.exceptions.AccessDeniedSecurityException; -import com.wisemapping.exceptions.UnexpectedArgumentException; import com.wisemapping.security.Utils; import com.wisemapping.service.MindmapService; import org.aopalliance.intercept.MethodInvocation; @@ -31,7 +30,7 @@ import org.jetbrains.annotations.Nullable; public abstract class BaseSecurityAdvice { private MindmapService mindmapService = null; - public void checkRole(MethodInvocation methodInvocation) throws UnexpectedArgumentException, AccessDeniedSecurityException { + public void checkRole(MethodInvocation methodInvocation) throws AccessDeniedSecurityException { final User user = Utils.getUser(); final Object argument = methodInvocation.getArguments()[0]; boolean isAllowed; @@ -44,7 +43,7 @@ public abstract class BaseSecurityAdvice { // Read operation find on the user are allowed ... isAllowed = user.equals(argument); } else { - throw new UnexpectedArgumentException("Argument " + argument); + throw new IllegalArgumentException("Argument " + argument); } if (!isAllowed) { diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java b/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java new file mode 100644 index 00000000..d45be415 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java @@ -0,0 +1,50 @@ +/* +* Copyright [2011] [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.service; + +import com.wisemapping.model.Collaborator; +import org.jetbrains.annotations.NotNull; + +import java.util.Calendar; + +public class LockInfo { + final private Collaborator collaborator; + private Calendar timeout; + private static int EXPIRATION_MIN = 25; + + public LockInfo(@NotNull Collaborator collaborator) { + this.collaborator = collaborator; + this.updateTimeout(); + } + + public Collaborator getCollaborator() { + return collaborator; + } + + public boolean isExpired() { + return timeout.before(Calendar.getInstance()); + } + + public void updateTimeout() { + final Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.MINUTE, EXPIRATION_MIN); + this.timeout = calendar; + + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java b/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java new file mode 100644 index 00000000..9a71facc --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java @@ -0,0 +1,43 @@ +/* +* Copyright [2011] [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.service; + +import com.wisemapping.exceptions.AccessDeniedSecurityException; +import com.wisemapping.exceptions.LockException; +import com.wisemapping.exceptions.WiseMappingException; +import com.wisemapping.model.Collaborator; +import com.wisemapping.model.Mindmap; +import com.wisemapping.model.User; +import org.jetbrains.annotations.NotNull; + +public interface LockManager { + boolean isLocked(@NotNull Mindmap mindmap); + + LockInfo getLockInfo(@NotNull Mindmap mindmap); + + void updateExpirationTimeout(@NotNull Mindmap mindmap, @NotNull Collaborator user); + + void unlock(@NotNull Mindmap mindmap, @NotNull Collaborator user) throws LockException, AccessDeniedSecurityException; + + boolean isLockedBy(@NotNull Mindmap mindmap, @NotNull Collaborator collaborator); + + void lock(@NotNull Mindmap mindmap, @NotNull Collaborator user) throws AccessDeniedSecurityException, LockException; + + void updateLock(boolean value, Mindmap mindmap, User user) throws WiseMappingException; +} diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java new file mode 100644 index 00000000..a886568b --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java @@ -0,0 +1,153 @@ +/* +* Copyright [2011] [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.service; + +import com.wisemapping.exceptions.AccessDeniedSecurityException; +import com.wisemapping.exceptions.LockException; +import com.wisemapping.exceptions.WiseMappingException; +import com.wisemapping.model.CollaborationRole; +import com.wisemapping.model.Collaborator; +import com.wisemapping.model.Mindmap; +import com.wisemapping.model.User; +import org.apache.log4j.Logger; +import org.jetbrains.annotations.NotNull; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +/* +* Refresh page should not lost the lock. +* En caso que no sea posible grabar por que se perdio el lock, usar mensaje de error para explicar el por que... +* Mensaje modal explicando que el mapa esta siendo editado, por eso no es posible edilarlo.... +*/ + +class LockManagerImpl implements LockManager { + public static final int ONE_MINUTE_MILLISECONDS = 1000 * 60; + final Map lockInfoByMapId; + final static Timer expirationTimer = new Timer(); + final private static Logger logger = Logger.getLogger("com.wisemapping.service.LockManager"); + + public LockManagerImpl() { + lockInfoByMapId = new ConcurrentHashMap(); + expirationTimer.schedule(new TimerTask() { + @Override + public void run() { + + logger.debug("Lock expiration scheduler started. Current locks:" + lockInfoByMapId.keySet()); + + final List toRemove = new ArrayList(); + final Set mapIds = lockInfoByMapId.keySet(); + for (Integer mapId : mapIds) { + final LockInfo lockInfo = lockInfoByMapId.get(mapId); + if (lockInfo.isExpired()) { + toRemove.add(mapId); + } + } + + for (Integer mapId : toRemove) { + unlock(mapId); + } + } + }, ONE_MINUTE_MILLISECONDS, ONE_MINUTE_MILLISECONDS); + } + + @Override + public boolean isLocked(@NotNull Mindmap mindmap) { + return this.getLockInfo(mindmap) != null; + } + + @Override + public LockInfo getLockInfo(@NotNull Mindmap mindmap) { + return lockInfoByMapId.get(mindmap.getId()); + } + + @Override + public void updateExpirationTimeout(@NotNull Mindmap mindmap, @NotNull Collaborator user) { + if (this.isLocked(mindmap)) { + final LockInfo lockInfo = this.getLockInfo(mindmap); + if (!lockInfo.getCollaborator().equals(user)) { + throw new IllegalStateException("Could not update map lock timeout if you are not the locking user. User:" + lockInfo.getCollaborator() + ", " + user); + } + lockInfo.updateTimeout(); + logger.debug("Timeout updated for:" + mindmap.getId()); + + }else { + throw new IllegalStateException("Lock lost for map. No update possible."); + } + } + + @Override + public void unlock(@NotNull Mindmap mindmap, @NotNull Collaborator user) throws LockException, AccessDeniedSecurityException { + if (isLocked(mindmap) && !isLockedBy(mindmap, user)) { + throw new LockException("Lock can be only revoked by the locker."); + } + + if (!mindmap.hasPermissions(user, CollaborationRole.EDITOR)) { + throw new AccessDeniedSecurityException("Invalid lock, this should not happen"); + } + + this.unlock(mindmap.getId()); + } + + private void unlock(int mapId) { + logger.debug("Unlock map id:" + mapId); + lockInfoByMapId.remove(mapId); + } + + @Override + public boolean isLockedBy(@NotNull Mindmap mindmap, @NotNull Collaborator collaborator) { + boolean result = false; + final LockInfo lockInfo = this.getLockInfo(mindmap); + if (lockInfo != null && lockInfo.getCollaborator().equals(collaborator)) { + result = true; + } + return result; + } + + @Override + public void lock(@NotNull Mindmap mindmap, @NotNull Collaborator user) throws AccessDeniedSecurityException, LockException { + if (isLocked(mindmap) && !isLockedBy(mindmap, user)) { + throw new LockException("Invalid lock, this should not happen"); + } + + if (!mindmap.hasPermissions(user, CollaborationRole.EDITOR)) { + throw new AccessDeniedSecurityException("Invalid lock, this should not happen"); + } + + final LockInfo lockInfo = lockInfoByMapId.get(mindmap.getId()); + if (lockInfo != null) { + // Update timeout only... + logger.debug("Update timestamp:" + mindmap.getId()); + updateExpirationTimeout(mindmap, user); + } else { + logger.debug("Lock map id:" + mindmap.getId()); + lockInfoByMapId.put(mindmap.getId(), new LockInfo(user)); + } + + } + + @Override + public void updateLock(boolean lock, @NotNull Mindmap mindmap, @NotNull User user) throws WiseMappingException { + if (lock) { + this.lock(mindmap, user); + } else { + this.unlock(mindmap, user); + } + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java index 76c8cbb7..937fd1a3 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java @@ -62,4 +62,6 @@ public interface MindmapService { MindMapHistory findMindmapHistory(int id, int hid) throws WiseMappingException; void updateCollaboration(@NotNull Collaborator collaborator, @NotNull Collaboration collaboration) throws WiseMappingException; + + LockManager getLockManager(); } diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java index 92b754b1..941bff53 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java @@ -45,6 +45,11 @@ public class MindmapServiceImpl private NotificationService notificationService; private String adminUser; + final private LockManager lockManager; + + public MindmapServiceImpl() { + this.lockManager = new LockManagerImpl(); + } @Override public boolean hasPermissions(@Nullable User user, int mapId, @NotNull CollaborationRole grantedRole) { @@ -94,6 +99,11 @@ public class MindmapServiceImpl if (mindMap.getTitle() == null || mindMap.getTitle().length() == 0) { throw new WiseMappingException("The tile can not be empty"); } + + // Update edition timeout ... + final LockManager lockManager = this.getLockManager(); + lockManager.updateExpirationTimeout(mindMap, Utils.getUser()); + mindmapManager.updateMindmap(mindMap, saveHistory); } @@ -264,6 +274,12 @@ public class MindmapServiceImpl mindmapManager.updateCollaboration(collaboration); } + @Override + @NotNull + public LockManager getLockManager() { + return this.lockManager; + } + private Collaboration getCollaborationBy(String email, Set collaborations) { Collaboration collaboration = null; diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index e67d4c18..9097bd5f 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -249,7 +249,7 @@ DIRECT_LINK_EXPLANATION=Copy and paste the link below to share your map with col TEMPORAL_PASSWORD_SENT=Your temporal password has been sent TEMPORAL_PASSWORD_SENT_DETAILS=We've sent you an email that will allow you to reset your password. Please check your email now. TEMPORAL_PASSWORD_SENT_SUPPORT=If you have any problem receiving the email, contact us to support@wisemapping.com - +MINDMAP_TIMESTAMP_OUTDATED=It's not possible to save your changes because your mindmap is out of date. Refresh the page and try again. 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 fc70ce71..5f160b6e 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties @@ -1,8 +1,9 @@ log4j.rootLogger=WARN, stdout, R +log4j.logger.com.wisemapping.service.LockManager=DEBUG,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=DEBUG,stdout,R +log4j.logger.org.hibernate=WARN,stdout,R log4j.logger.org.hibernate.SQL=true diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp index 5c857efa..cf46b517 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp @@ -35,7 +35,7 @@ // Configure designer options ... var options = loadDesignerOptions(); - options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/{id}/document", "service/maps/{id}/history/latest"); + options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/{id}/document", "service/maps/{id}/history/latest","service/maps/{id}/lock"); var userOptions = ${mindmap.properties}; options.zoom = userOptions.zoom; diff --git a/wise-webapp/src/test/resources/data/freemind/node-styles.mmr b/wise-webapp/src/test/resources/data/freemind/node-styles.mmr index 41a1f3ce..cb496bac 100644 --- a/wise-webapp/src/test/resources/data/freemind/node-styles.mmr +++ b/wise-webapp/src/test/resources/data/freemind/node-styles.mmr @@ -15,31 +15,31 @@ - - + + - + - + - - + + - + - + diff --git a/wise-webapp/src/test/resources/data/freemind/node-styles.wxml b/wise-webapp/src/test/resources/data/freemind/node-styles.wxml index aa881c56..9f37ab87 100644 --- a/wise-webapp/src/test/resources/data/freemind/node-styles.wxml +++ b/wise-webapp/src/test/resources/data/freemind/node-styles.wxml @@ -17,10 +17,10 @@ - + + brColor="#808080" bgColor="#0000cc" shape="rectagle"> + bgColor="#00ffff" shape="rectagle"> + brColor="#808080" bgColor="#990099" shape="rectagle"> - + + fontStyle=";;#ffff00;;;" shape="rectagle"> + fontStyle=";;#009999;;;" shape="rectagle"> + fontStyle=";;#009999;;;" shape="rectagle"> diff --git a/wise-webapp/src/test/resources/data/freemind/richtextnode.mmr b/wise-webapp/src/test/resources/data/freemind/richtextnode.mmr index b88c81da..fe5bd72a 100644 --- a/wise-webapp/src/test/resources/data/freemind/richtextnode.mmr +++ b/wise-webapp/src/test/resources/data/freemind/richtextnode.mmr @@ -24,36 +24,36 @@ - - - - - - + + + + + + - + - + - + - + - + - + @@ -61,15 +61,15 @@ - + - + - + @@ -77,21 +77,21 @@ - + - + - + - + diff --git a/wise-webapp/src/test/resources/data/freemind/richtextnode.wxml b/wise-webapp/src/test/resources/data/freemind/richtextnode.wxml index e353d432..39974fe0 100644 --- a/wise-webapp/src/test/resources/data/freemind/richtextnode.wxml +++ b/wise-webapp/src/test/resources/data/freemind/richtextnode.wxml @@ -35,27 +35,27 @@ du plan d'actions]]> notre offre de services selon l'évolution des besoins]]> + bgColor="#99ffff" shape="rectagle"> + bgColor="#0099ff" shape="rectagle"> + bgColor="#ff9999" shape="rectagle"> + bgColor="#ffcc00" shape="rectagle"> + bgColor="#ffff00" shape="rectagle"> + bgColor="#66ff00" shape="rectagle"> @@ -64,7 +64,7 @@ du plan d'actions]]> + fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -72,7 +72,7 @@ du plan d'actions]]> + bgColor="#ffff00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -80,7 +80,7 @@ du plan d'actions]]> + bgColor="#66ff00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -88,7 +88,7 @@ du plan d'actions]]> + bgColor="#ffff00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -96,7 +96,7 @@ du plan d'actions]]> + bgColor="#ffcc00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -104,7 +104,7 @@ du plan d'actions]]> + bgColor="#66ff00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -119,7 +119,7 @@ du plan d'actions]]> + bgColor="#ffff00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -127,7 +127,7 @@ du plan d'actions]]> + bgColor="#ffcc00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -135,7 +135,7 @@ du plan d'actions]]> + bgColor="#66ff00" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -150,7 +150,7 @@ du plan d'actions]]> notre notoriété]]> + fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -159,7 +159,7 @@ du plan d'actions]]> + fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -167,7 +167,7 @@ du plan d'actions]]> + bgColor="#ff6666" fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> @@ -175,7 +175,7 @@ du plan d'actions]]> + fontStyle="Arial;8;#006600;bold;;" shape="rectagle"> From 3fdbcb31d3de260014df384bc5df5c6e606a2644 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 1 Oct 2012 00:57:49 -0300 Subject: [PATCH 2/6] - Change MYSQL blob to mediumblob. --- .../main/java/com/wisemapping/service/LockManagerImpl.java | 1 + wise-webapp/src/test/sql/mysql/create-schemas.sql | 4 ++-- wise-webapp/src/test/sql/mysql/v2.0-to-v3.0.sql | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java index a886568b..79ea189d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java @@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap; * Refresh page should not lost the lock. * En caso que no sea posible grabar por que se perdio el lock, usar mensaje de error para explicar el por que... * Mensaje modal explicando que el mapa esta siendo editado, por eso no es posible edilarlo.... +* Internacionalizacion de los mensaje ... */ class LockManagerImpl implements LockManager { diff --git a/wise-webapp/src/test/sql/mysql/create-schemas.sql b/wise-webapp/src/test/sql/mysql/create-schemas.sql index 187f6219..fe110b06 100644 --- a/wise-webapp/src/test/sql/mysql/create-schemas.sql +++ b/wise-webapp/src/test/sql/mysql/create-schemas.sql @@ -21,7 +21,7 @@ CREATE TABLE MINDMAP ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, title varchar(255) CHARACTER SET utf8 NOT NULL, description varchar(255) CHARACTER SET utf8 NOT NULL, -xml blob NOT NULL, +xml mediumblob NOT NULL, public BOOL not null default 0, creation_date datetime, edition_date datetime, @@ -34,7 +34,7 @@ FOREIGN KEY(creator_id) REFERENCES USER(colaborator_id) ON DELETE CASCADE ON UPD CREATE TABLE MINDMAP_HISTORY (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, -xml blob NOT NULL, +xml mediumblob NOT NULL, mindmap_id INTEGER NOT NULL, creation_date datetime, editor_id INTEGER NOT NULL, diff --git a/wise-webapp/src/test/sql/mysql/v2.0-to-v3.0.sql b/wise-webapp/src/test/sql/mysql/v2.0-to-v3.0.sql index 42d79f29..8bfef8c7 100644 --- a/wise-webapp/src/test/sql/mysql/v2.0-to-v3.0.sql +++ b/wise-webapp/src/test/sql/mysql/v2.0-to-v3.0.sql @@ -45,3 +45,6 @@ INSERT INTO `COLLABORATOR` (`id`, `email`, `creation_date`) VALUES (8081, 'migfa DELETE FROM `USER` where activation_date is null; DROP TABLE FEEDBACK; + +ALTER TABLE `MINDMAP` CHANGE COLUMN `XML` `XML` MEDIUMBLOB NULL DEFAULT NULL; +ALTER TABLE `MINDMAP_HISTORY` CHANGE COLUMN `XML` `XML` MEDIUMBLOB NULL DEFAULT NULL; From 742fa9d03ea048774816bb60383503f5292f43ee Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 3 Oct 2012 00:26:11 -0300 Subject: [PATCH 3/6] - Add Opera 11 support. --- .../main/java/com/wisemapping/filter/SupportedUserAgent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java index 301a3780..e237b032 100644 --- a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java +++ b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java @@ -48,7 +48,7 @@ public class SupportedUserAgent implements Serializable { boolean result = browser == Browser.FIREFOX && majorVersion >= 10; result = result || browser == Browser.IE8 || browser == Browser.IE9; result = result || browser == Browser.IE && majorVersion >= 8; - result = result || browser == Browser.OPERA && majorVersion >= 11; + result = result || browser == Browser.OPERA10 && majorVersion >= 11; result = result || browser == Browser.CHROME && majorVersion >= 18; result = result || browser == Browser.SAFARI5; result = result || browser == Browser.SAFARI && majorVersion >= 5; From d17b8397f7c1caa7490285d72323cf26e8f866be Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 4 Oct 2012 20:28:59 -0300 Subject: [PATCH 4/6] Edition lock is working. Working on user interation. --- .../main/javascript/RestPersistenceManager.js | 20 ++-- .../main/javascript/widget/ErrorNotifier.js | 83 ++++++++++++++ .../EditionSessionExpiredException.java | 38 +++++++ ...ava => MultipleSessionsOpenException.java} | 4 +- .../exceptions/SessionExpiredException.java | 39 +++++++ .../ncontroller/MindmapController.java | 14 ++- .../wisemapping/rest/MindmapController.java | 54 +++++++-- ...RestMindmapLock.java => RestLockInfo.java} | 28 ++++- .../com/wisemapping/service/LockInfo.java | 32 +++++- .../com/wisemapping/service/LockManager.java | 7 +- .../wisemapping/service/LockManagerImpl.java | 104 ++++++++++-------- .../service/MindmapServiceImpl.java | 4 - .../main/webapp/WEB-INF/wisemapping-rest.xml | 1 + .../src/main/webapp/jsp/mindmapEditor.jsp | 12 +- 14 files changed, 350 insertions(+), 90 deletions(-) create mode 100644 mindplot/src/main/javascript/widget/ErrorNotifier.js create mode 100755 wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java rename wise-webapp/src/main/java/com/wisemapping/exceptions/{MindmapOutdatedException.java => MultipleSessionsOpenException.java} (91%) create mode 100755 wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java rename wise-webapp/src/main/java/com/wisemapping/rest/model/{RestMindmapLock.java => RestLockInfo.java} (71%) diff --git a/mindplot/src/main/javascript/RestPersistenceManager.js b/mindplot/src/main/javascript/RestPersistenceManager.js index b7d5b2aa..747815b8 100644 --- a/mindplot/src/main/javascript/RestPersistenceManager.js +++ b/mindplot/src/main/javascript/RestPersistenceManager.js @@ -18,14 +18,19 @@ mindplot.RESTPersistenceManager = new Class({ Extends:mindplot.PersistenceManager, - initialize:function (saveUrl, revertUrl, lockUrl) { + initialize:function (options) { this.parent(); - $assert(saveUrl, "saveUrl can not be null"); - $assert(revertUrl, "revertUrl can not be null"); - this.saveUrl = saveUrl; - this.revertUrl = revertUrl; - this.lockUrl = lockUrl; - this.timestamp = null; + $assert(options.saveUrl, "saveUrl can not be null"); + $assert(options.revertUrl, "revertUrl can not be null"); + $assert(options.lockUrl, "lockUrl can not be null"); + $assert(options.session, "session can not be null"); + $assert(options.timestamp, "timestamp can not be null"); + + this.saveUrl = options.saveUrl; + this.revertUrl = options.revertUrl; + this.lockUrl = options.lockUrl; + this.timestamp = options.timestamp; + this.session = options.session; }, saveMapXml:function (mapId, mapXml, pref, saveHistory, events, sync) { @@ -39,6 +44,7 @@ mindplot.RESTPersistenceManager = new Class({ var persistence = this; var query = "minor=" + !saveHistory; query = query + (this.timestamp ? "×tamp=" + this.timestamp : ""); + query = query + (this.session ? "&session=" + this.session : ""); var request = new Request({ url:this.saveUrl.replace("{id}", mapId) + "?" + query, diff --git a/mindplot/src/main/javascript/widget/ErrorNotifier.js b/mindplot/src/main/javascript/widget/ErrorNotifier.js new file mode 100644 index 00000000..fe0246d7 --- /dev/null +++ b/mindplot/src/main/javascript/widget/ErrorNotifier.js @@ -0,0 +1,83 @@ +/* + * Copyright [2011] [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. + */ + +mindplot.widget.ToolbarNotifier = new Class({ + + initialize:function () { + var container = $('headerNotifier'); + // In case of print,embedded no message is displayed .... + if (container) { + this._effect = new Fx.Elements(container, { + onComplete:function () { + container.setStyle('display', 'none'); + }.bind(this), + link:'cancel', + duration:8000, + transition:Fx.Transitions.Expo.easeInOut + }); + } + }, + + logError:function (userMsg) { + this.logMessage(userMsg, mindplot.widget.ToolbarNotifier.MsgKind.ERROR); + }, + + hide:function () { + + }, + + logMessage:function (msg, fade) { + $assert(msg, 'msg can not be null'); + + var container = $('headerNotifier'); + + // In case of print,embedded no message is displayed .... + if (container) { + container.set('text', msg); + container.setStyle('display', 'block'); + container.position({ + relativeTo:$('header'), + position:'upperCenter', + edge:'centerTop' + }); + + if (!$defined(fade) || fade) { + this._effect.start({ + 0:{ + opacity:[1, 0] + } + }); + + } else { + container.setStyle('opacity', '1'); + this._effect.pause(); + } + } + } + +}); + +mindplot.widget.ToolbarNotifier.MsgKind = { + INFO:1, + WARNING:2, + ERROR:3, + FATAL:4 +}; + +var toolbarNotifier = new mindplot.widget.ToolbarNotifier(); +$notify = toolbarNotifier.logMessage.bind(toolbarNotifier); \ No newline at end of file diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java new file mode 100755 index 00000000..e34c4781 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java @@ -0,0 +1,38 @@ +/* +* Copyright [2011] [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.exceptions; + +import org.jetbrains.annotations.NotNull; + +public class EditionSessionExpiredException + extends ClientException +{ + public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED"; + + public EditionSessionExpiredException(@NotNull String msg) + { + super(msg); + } + + @NotNull + @Override + protected String getMsgBundleKey() { + return MSG_KEY; + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/MindmapOutdatedException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/MultipleSessionsOpenException.java similarity index 91% rename from wise-webapp/src/main/java/com/wisemapping/exceptions/MindmapOutdatedException.java rename to wise-webapp/src/main/java/com/wisemapping/exceptions/MultipleSessionsOpenException.java index 87a65e91..7014001e 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/MindmapOutdatedException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/MultipleSessionsOpenException.java @@ -20,12 +20,12 @@ package com.wisemapping.exceptions; import org.jetbrains.annotations.NotNull; -public class MindmapOutdatedException +public class MultipleSessionsOpenException extends ClientException { public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED"; - public MindmapOutdatedException(@NotNull String msg) + public MultipleSessionsOpenException(@NotNull String msg) { super(msg); } diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java new file mode 100755 index 00000000..392a5b90 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java @@ -0,0 +1,39 @@ +/* +* Copyright [2011] [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.exceptions; + +import com.wisemapping.model.Collaborator; +import org.jetbrains.annotations.NotNull; + +public class SessionExpiredException + extends ClientException +{ + public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED"; + + public SessionExpiredException(@NotNull String msg,@NotNull Collaborator newEditor) + { + super(msg); + } + + @NotNull + @Override + protected String getMsgBundleKey() { + return MSG_KEY; + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java index b154e0e2..dbae734f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java @@ -27,6 +27,7 @@ import com.wisemapping.model.Mindmap; import com.wisemapping.model.MindMapHistory; import com.wisemapping.model.User; import com.wisemapping.security.Utils; +import com.wisemapping.service.LockInfo; import com.wisemapping.service.LockManager; import com.wisemapping.service.MindmapService; import com.wisemapping.view.MindMapBean; @@ -147,7 +148,7 @@ public class MindmapController { return showEditorPage(id, model, true); } - private String showEditorPage(int id, @NotNull final Model model, boolean requiresLock) throws AccessDeniedSecurityException, LockException { + private String showEditorPage(int id, @NotNull final Model model, boolean requiresLock) throws WiseMappingException { final MindMapBean mindmapBean = findMindmapBean(id); final Mindmap mindmap = mindmapBean.getDelegated(); final User collaborator = Utils.getUser(); @@ -159,10 +160,13 @@ public class MindmapController { final LockManager lockManager = this.mindmapService.getLockManager(); if (lockManager.isLocked(mindmap) && !lockManager.isLockedBy(mindmap, collaborator)) { readOnlyMode = true; - model.addAttribute("lockedBy", lockManager.getLockInfo(mindmap)); } else { - lockManager.lock(mindmap, collaborator); + final long session = lockManager.generateSession(); + final LockInfo lock = lockManager.lock(mindmap, collaborator, session); + model.addAttribute("lockTimestamp", lock.getTimestamp()); + model.addAttribute("lockSession", session); } + model.addAttribute("lockInfo", lockManager.getLockInfo(mindmap)); } // Set render attributes ... @@ -176,12 +180,12 @@ public class MindmapController { } @RequestMapping(value = "maps/{id}/view", method = RequestMethod.GET) - public String showMindmapViewerPage(@PathVariable int id, @NotNull Model model) throws LockException, AccessDeniedSecurityException { + public String showMindmapViewerPage(@PathVariable int id, @NotNull Model model) throws WiseMappingException { return showEditorPage(id, model, false); } @RequestMapping(value = "maps/{id}/try", method = RequestMethod.GET) - public String showMindmapTryPage(@PathVariable int id, @NotNull Model model) throws LockException, AccessDeniedSecurityException { + public String showMindmapTryPage(@PathVariable int id, @NotNull Model model) throws WiseMappingException { final String result = showEditorPage(id, model, false); model.addAttribute("memoryPersistence", true); return result; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index b52a5fec..5738aa15 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -19,9 +19,7 @@ package com.wisemapping.rest; -import com.wisemapping.exceptions.ImportUnexpectedException; -import com.wisemapping.exceptions.MindmapOutdatedException; -import com.wisemapping.exceptions.WiseMappingException; +import com.wisemapping.exceptions.*; import com.wisemapping.importer.ImportFormat; import com.wisemapping.importer.Importer; import com.wisemapping.importer.ImporterException; @@ -30,10 +28,10 @@ import com.wisemapping.model.*; import com.wisemapping.rest.model.*; import com.wisemapping.security.Utils; import com.wisemapping.service.CollaborationException; +import com.wisemapping.service.LockInfo; import com.wisemapping.service.LockManager; import com.wisemapping.service.MindmapService; import com.wisemapping.validator.MapInfoValidator; -import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -141,7 +139,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/document", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseBody - public long updateDocument(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor, @RequestParam(required = false) Long timestamp) throws WiseMappingException, IOException { + public long updateDocument(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor, @RequestParam(required = false) Long timestamp, @RequestParam(required = false) Long session) throws WiseMappingException, IOException { final Mindmap mindmap = mindmapService.findMindmapById(id); final User user = Utils.getUser(); @@ -152,10 +150,8 @@ public class MindmapController extends BaseController { throw new IllegalArgumentException("Map properties can not be null"); } - // Check that there we are not overwriting an already existing map ... - if (timestamp != null && mindmap.getLastModificationTime().getTimeInMillis() > timestamp) { - throw new MindmapOutdatedException("Mindmap timestamp out of sync. Client timestamp: " + timestamp + ", DB Timestamp:" + timestamp); - } + // Could the map be updated ? + checkUpdate(mindmap, user, session, timestamp); // Update collaboration properties ... final CollaborationProperties collaborationProperties = mindmap.findCollaborationProperties(user); @@ -172,8 +168,36 @@ public class MindmapController extends BaseController { logger.debug("Mindmap save completed:" + restMindmap.getXml()); saveMindmap(minor, mindmap, user); - // Return last update timestamp ... - return mindmap.getLastModificationTime().getTimeInMillis(); + // Update edition timeout ... + final LockManager lockManager = mindmapService.getLockManager(); + final LockInfo lockInfo = lockManager.updateExpirationTimeout(mindmap, user, session); + return lockInfo.getTimestamp(); + } + + private void checkUpdate(@NotNull Mindmap mindmap, @NotNull User user, long session, long timestamp) throws WiseMappingException { + // The lock was lost, reclaim as the ownership of it. + final LockManager lockManager = mindmapService.getLockManager(); + final boolean lockLost = lockManager.isLocked(mindmap); + if (!lockLost) { + lockManager.lock(mindmap, user, session); + } + + final LockInfo lockInfo = lockManager.getLockInfo(mindmap); + if (lockInfo.getCollaborator().equals(user)) { + final boolean outdated = mindmap.getLastModificationTime().getTimeInMillis() > timestamp; + if (lockInfo.getSession() == session) { + // Timestamp might not be returned to the client. This try to cover this case, ignoring the client timestamp check. + final User lastEditor = mindmap.getLastEditor(); + if (outdated && (lockInfo.getPreviousTimestamp() != timestamp || lastEditor == null || !lastEditor.equals(user))) { + throw new MultipleSessionsOpenException("The map has been updated and not by you. Session lost."); + } + } else if (outdated) { + throw new MultipleSessionsOpenException("The map has been updated and not by you. Session lost."); + } + } else { + throw new SessionExpiredException("You have lost the edition session", lockInfo.getCollaborator()); + + } } /** @@ -361,7 +385,13 @@ public class MindmapController extends BaseController { final User user = Utils.getUser(); final LockManager lockManager = mindmapService.getLockManager(); final Mindmap mindmap = mindmapService.findMindmapById(id); - lockManager.updateLock(Boolean.parseBoolean(value), mindmap, user); + + final boolean lock = Boolean.parseBoolean(value); + if (!lock) { + lockManager.unlock(mindmap, user); + } else { + throw new UnsupportedOperationException("REST lock must be implemented."); + } } @RequestMapping(method = RequestMethod.DELETE, value = "/maps/batch") diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapLock.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLockInfo.java similarity index 71% rename from wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapLock.java rename to wise-webapp/src/main/java/com/wisemapping/rest/model/RestLockInfo.java index 5377b215..0c0f21e4 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapLock.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLockInfo.java @@ -24,14 +24,23 @@ import java.util.Set; getterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY, isGetterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY) @JsonIgnoreProperties(ignoreUnknown = true) -public class RestMindmapLock { +public class RestLockInfo { @NotNull - private Collaborator user; - @Nullable - private LockInfo lockInfo; + final private Collaborator user; - public RestMindmapLock(@Nullable LockInfo lockInfo, @NotNull Collaborator collaborator) { + @Nullable + final private LockInfo lockInfo; + + // This is required only for compliance with the JAXB serializer. + public RestLockInfo(){ + + this.lockInfo = null; + //noinspection ConstantConditions + this.user = null; + } + + public RestLockInfo(@Nullable LockInfo lockInfo, @NotNull Collaborator collaborator) { this.lockInfo = lockInfo; this.user = collaborator; @@ -52,4 +61,13 @@ public class RestMindmapLock { public void setLockedByMe(boolean lockedForMe) { // Ignore ... } + + public long getTimestamp() { + return lockInfo != null ? lockInfo.getTimestamp() : -1; + } + + public void setTimestamp(long value) { + // + } + } diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java b/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java index d45be415..56b0455a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java @@ -19,6 +19,7 @@ package com.wisemapping.service; import com.wisemapping.model.Collaborator; +import com.wisemapping.model.Mindmap; import org.jetbrains.annotations.NotNull; import java.util.Calendar; @@ -26,11 +27,15 @@ import java.util.Calendar; public class LockInfo { final private Collaborator collaborator; private Calendar timeout; - private static int EXPIRATION_MIN = 25; + private long session; + private static int EXPIRATION_MIN = 30; + private long timestamp = -1; + private long previousTimestamp; - public LockInfo(@NotNull Collaborator collaborator) { + public LockInfo(@NotNull Collaborator collaborator, @NotNull Mindmap mindmap, long session) { this.collaborator = collaborator; this.updateTimeout(); + this.updateTimestamp(mindmap); } public Collaborator getCollaborator() { @@ -38,7 +43,7 @@ public class LockInfo { } public boolean isExpired() { - return timeout.before(Calendar.getInstance()); + return timeout.before(Calendar.getInstance()); } public void updateTimeout() { @@ -47,4 +52,25 @@ public class LockInfo { this.timeout = calendar; } + + public long getSession() { + return session; + } + + public void setSession(long session) { + this.session = session; + } + + public long getTimestamp() { + return timestamp; + } + + public long getPreviousTimestamp() { + return previousTimestamp; + } + + public void updateTimestamp(@NotNull Mindmap mindmap) { + this.previousTimestamp = this.timestamp; + this.timestamp = mindmap.getLastModificationTime().getTimeInMillis(); + } } diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java b/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java index 9a71facc..8c8859ad 100644 --- a/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java @@ -19,6 +19,7 @@ package com.wisemapping.service; import com.wisemapping.exceptions.AccessDeniedSecurityException; +import com.wisemapping.exceptions.ClientException; import com.wisemapping.exceptions.LockException; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.model.Collaborator; @@ -31,13 +32,13 @@ public interface LockManager { LockInfo getLockInfo(@NotNull Mindmap mindmap); - void updateExpirationTimeout(@NotNull Mindmap mindmap, @NotNull Collaborator user); + LockInfo updateExpirationTimeout(@NotNull Mindmap mindmap, @NotNull Collaborator user,long session); void unlock(@NotNull Mindmap mindmap, @NotNull Collaborator user) throws LockException, AccessDeniedSecurityException; boolean isLockedBy(@NotNull Mindmap mindmap, @NotNull Collaborator collaborator); - void lock(@NotNull Mindmap mindmap, @NotNull Collaborator user) throws AccessDeniedSecurityException, LockException; + LockInfo lock(@NotNull Mindmap mindmap, @NotNull Collaborator user, long session) throws WiseMappingException; - void updateLock(boolean value, Mindmap mindmap, User user) throws WiseMappingException; + long generateSession(); } diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java index 79ea189d..a9bcf4b5 100644 --- a/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java @@ -24,7 +24,6 @@ import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.model.CollaborationRole; import com.wisemapping.model.Collaborator; import com.wisemapping.model.Mindmap; -import com.wisemapping.model.User; import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; @@ -36,6 +35,15 @@ import java.util.concurrent.ConcurrentHashMap; * En caso que no sea posible grabar por que se perdio el lock, usar mensaje de error para explicar el por que... * Mensaje modal explicando que el mapa esta siendo editado, por eso no es posible edilarlo.... * Internacionalizacion de los mensaje ... +* Logout limpiar las sessiones ... +* +* Casos: +* - Usuario pierde el lock: +* - Y grabo con la misma sessions y el timestap ok. +* - Y grabo con la misma session y el timestap esta mal + * - Y grabo con distinta sessions + * - +* - Usuario pierde el lock, pero intenta grabar camio */ class LockManagerImpl implements LockManager { @@ -44,30 +52,6 @@ class LockManagerImpl implements LockManager { final static Timer expirationTimer = new Timer(); final private static Logger logger = Logger.getLogger("com.wisemapping.service.LockManager"); - public LockManagerImpl() { - lockInfoByMapId = new ConcurrentHashMap(); - expirationTimer.schedule(new TimerTask() { - @Override - public void run() { - - logger.debug("Lock expiration scheduler started. Current locks:" + lockInfoByMapId.keySet()); - - final List toRemove = new ArrayList(); - final Set mapIds = lockInfoByMapId.keySet(); - for (Integer mapId : mapIds) { - final LockInfo lockInfo = lockInfoByMapId.get(mapId); - if (lockInfo.isExpired()) { - toRemove.add(mapId); - } - } - - for (Integer mapId : toRemove) { - unlock(mapId); - } - } - }, ONE_MINUTE_MILLISECONDS, ONE_MINUTE_MILLISECONDS); - } - @Override public boolean isLocked(@NotNull Mindmap mindmap) { return this.getLockInfo(mindmap) != null; @@ -79,18 +63,21 @@ class LockManagerImpl implements LockManager { } @Override - public void updateExpirationTimeout(@NotNull Mindmap mindmap, @NotNull Collaborator user) { - if (this.isLocked(mindmap)) { - final LockInfo lockInfo = this.getLockInfo(mindmap); - if (!lockInfo.getCollaborator().equals(user)) { - throw new IllegalStateException("Could not update map lock timeout if you are not the locking user. User:" + lockInfo.getCollaborator() + ", " + user); - } - lockInfo.updateTimeout(); - logger.debug("Timeout updated for:" + mindmap.getId()); - - }else { + public LockInfo updateExpirationTimeout(@NotNull Mindmap mindmap, @NotNull Collaborator user, long session) { + if (!this.isLocked(mindmap)) { throw new IllegalStateException("Lock lost for map. No update possible."); } + + final LockInfo result = this.getLockInfo(mindmap); + if (!result.getCollaborator().equals(user)) { + throw new IllegalStateException("Could not update map lock timeout if you are not the locking user. User:" + result.getCollaborator() + ", " + user); + } + + result.updateTimeout(); + result.setSession(session); + result.updateTimestamp(mindmap); + logger.debug("Timeout updated for:" + mindmap.getId()); + return result; } @Override @@ -122,7 +109,8 @@ class LockManagerImpl implements LockManager { } @Override - public void lock(@NotNull Mindmap mindmap, @NotNull Collaborator user) throws AccessDeniedSecurityException, LockException { + @NotNull + public LockInfo lock(@NotNull Mindmap mindmap, @NotNull Collaborator user, long session) throws WiseMappingException { if (isLocked(mindmap) && !isLockedBy(mindmap, user)) { throw new LockException("Invalid lock, this should not happen"); } @@ -131,24 +119,46 @@ class LockManagerImpl implements LockManager { throw new AccessDeniedSecurityException("Invalid lock, this should not happen"); } - final LockInfo lockInfo = lockInfoByMapId.get(mindmap.getId()); - if (lockInfo != null) { + LockInfo result = lockInfoByMapId.get(mindmap.getId()); + if (result != null) { // Update timeout only... logger.debug("Update timestamp:" + mindmap.getId()); - updateExpirationTimeout(mindmap, user); + updateExpirationTimeout(mindmap, user, session); } else { logger.debug("Lock map id:" + mindmap.getId()); - lockInfoByMapId.put(mindmap.getId(), new LockInfo(user)); + result = new LockInfo(user, mindmap, session); + lockInfoByMapId.put(mindmap.getId(), result); } - + return result; } @Override - public void updateLock(boolean lock, @NotNull Mindmap mindmap, @NotNull User user) throws WiseMappingException { - if (lock) { - this.lock(mindmap, user); - } else { - this.unlock(mindmap, user); - } + public long generateSession() { + return System.nanoTime(); } + + public LockManagerImpl() { + lockInfoByMapId = new ConcurrentHashMap(); + expirationTimer.schedule(new TimerTask() { + @Override + public void run() { + + logger.debug("Lock expiration scheduler started. Current locks:" + lockInfoByMapId.keySet()); + + final List toRemove = new ArrayList(); + final Set mapIds = lockInfoByMapId.keySet(); + for (Integer mapId : mapIds) { + final LockInfo lockInfo = lockInfoByMapId.get(mapId); + if (lockInfo.isExpired()) { + toRemove.add(mapId); + } + } + + for (Integer mapId : toRemove) { + unlock(mapId); + } + } + }, ONE_MINUTE_MILLISECONDS, ONE_MINUTE_MILLISECONDS); + } + } diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java index 941bff53..9a897712 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java @@ -100,10 +100,6 @@ public class MindmapServiceImpl throw new WiseMappingException("The tile can not be empty"); } - // Update edition timeout ... - final LockManager lockManager = this.getLockManager(); - lockManager.updateExpirationTimeout(mindMap, Utils.getUser()); - mindmapManager.updateMindmap(mindMap, saveHistory); } diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml index f99c09ef..6fe8ad41 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml @@ -32,6 +32,7 @@ com.wisemapping.rest.model.RestCollaboration com.wisemapping.rest.model.RestCollaborationList com.wisemapping.rest.model.RestLogItem + com.wisemapping.rest.model.RestLockInfo diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp index cf46b517..08490c72 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp @@ -34,8 +34,16 @@ // Configure designer options ... var options = loadDesignerOptions(); - - options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/{id}/document", "service/maps/{id}/history/latest","service/maps/{id}/lock"); + + options.persistenceManager = new mindplot.RESTPersistenceManager( + { + saveUrl:"service/maps/{id}/document", + revertUrl:"service/maps/{id}/history/latest", + lockUrl:"service/maps/{id}/lock", + timestamp: ${lockTimestamp}, + session: ${lockSession} + } + ); var userOptions = ${mindmap.properties}; options.zoom = userOptions.zoom; From cc57fae5cf2dac73d22ca31b717aaf5bdaf95cd0 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 4 Oct 2012 20:48:01 -0300 Subject: [PATCH 5/6] Update copyright year. --- core-js/src/main/javascript/Utils.js | 2 +- core-js/src/main/javascript/header.js | 2 +- license.txt | 2 +- .../src/main/javascript/ActionDispatcher.js | 2 +- mindplot/src/main/javascript/ActionIcon.js | 2 +- mindplot/src/main/javascript/CentralTopic.js | 2 +- .../main/javascript/CollabActionDispatcher.js | 2 +- mindplot/src/main/javascript/Command.js | 2 +- .../src/main/javascript/ConnectionLine.js | 2 +- mindplot/src/main/javascript/ControlPoint.js | 2 +- mindplot/src/main/javascript/Designer.js | 2 +- .../main/javascript/DesignerActionRunner.js | 2 +- .../src/main/javascript/DesignerKeyboard.js | 2 +- mindplot/src/main/javascript/DesignerModel.js | 2 +- .../main/javascript/DesignerUndoManager.js | 2 +- mindplot/src/main/javascript/DragConnector.js | 2 +- mindplot/src/main/javascript/DragManager.js | 2 +- mindplot/src/main/javascript/DragPivot.js | 2 +- mindplot/src/main/javascript/DragTopic.js | 2 +- mindplot/src/main/javascript/EditorOptions.js | 18 +++++++ .../src/main/javascript/EditorProperties.js | 2 +- mindplot/src/main/javascript/Icon.js | 2 +- mindplot/src/main/javascript/IconGroup.js | 2 +- mindplot/src/main/javascript/ImageIcon.js | 2 +- mindplot/src/main/javascript/LinkIcon.js | 2 +- .../main/javascript/LocalStorageManager.js | 2 +- mindplot/src/main/javascript/MainTopic.js | 2 +- mindplot/src/main/javascript/Messages.js | 2 +- .../main/javascript/MultilineTextEditor.js | 2 +- mindplot/src/main/javascript/NodeGraph.js | 2 +- mindplot/src/main/javascript/NoteIcon.js | 2 +- .../src/main/javascript/PersistenceManager.js | 2 +- mindplot/src/main/javascript/Relationship.js | 2 +- .../src/main/javascript/RelationshipPivot.js | 2 +- .../main/javascript/RestPersistenceManager.js | 2 +- mindplot/src/main/javascript/ScreenManager.js | 2 +- .../src/main/javascript/ShrinkConnector.js | 2 +- .../javascript/StandaloneActionDispatcher.js | 2 +- mindplot/src/main/javascript/TextEditor.js | 2 +- .../src/main/javascript/TextEditorFactory.js | 2 +- mindplot/src/main/javascript/Topic.js | 2 +- .../main/javascript/TopicEventDispatcher.js | 2 +- mindplot/src/main/javascript/TopicFeature.js | 2 +- mindplot/src/main/javascript/Workspace.js | 2 +- .../collaboration/CollaborationManager.js | 2 +- .../AbstractCollaborativeModelFactory.js | 2 +- .../collab/BrixCollaborativeModelFactory.js | 2 +- .../framework/collab/BrixFramework.js | 2 +- .../framework/collab/model/Mindmap.js | 2 +- .../framework/collab/model/NodeModel.js | 2 +- .../commands/AddFeatureToTopicCommand.js | 2 +- .../commands/AddRelationshipCommand.js | 2 +- .../javascript/commands/AddTopicCommand.js | 2 +- .../commands/ChangeFeatureToTopicCommand.js | 2 +- .../main/javascript/commands/DeleteCommand.js | 2 +- .../javascript/commands/DragTopicCommand.js | 2 +- .../commands/GenericFunctionCommand.js | 2 +- .../commands/MoveControlPointCommand.js | 2 +- .../commands/RemoveFeatureFromTopicCommand.js | 2 +- mindplot/src/main/javascript/header.js | 2 +- .../javascript/layout/AbstractBasicSorter.js | 2 +- .../main/javascript/layout/BalancedSorter.js | 2 +- .../src/main/javascript/layout/ChangeEvent.js | 2 +- .../layout/ChildrenSorterStrategy.js | 2 +- .../src/main/javascript/layout/EventBus.js | 2 +- .../javascript/layout/EventBusDispatcher.js | 2 +- .../src/main/javascript/layout/GridSorter.js | 2 +- .../main/javascript/layout/LayoutManager.js | 2 +- mindplot/src/main/javascript/layout/Node.js | 2 +- .../main/javascript/layout/OriginalLayout.js | 2 +- .../main/javascript/layout/RootedTreeSet.js | 2 +- .../main/javascript/layout/SymmetricSorter.js | 2 +- .../src/main/javascript/model/FeatureModel.js | 2 +- .../src/main/javascript/model/IMindmap.js | 2 +- .../src/main/javascript/model/INodeModel.js | 2 +- .../src/main/javascript/model/IconModel.js | 2 +- .../src/main/javascript/model/LinkModel.js | 2 +- mindplot/src/main/javascript/model/Mindmap.js | 2 +- .../src/main/javascript/model/NodeModel.js | 2 +- .../src/main/javascript/model/NoteModel.js | 2 +- .../javascript/model/RelationshipModel.js | 2 +- .../persistence/Beta2PelaMigrator.js | 2 +- .../javascript/persistence/ModelCodeName.js | 2 +- .../persistence/Pela2TangoMigrator.js | 2 +- .../persistence/XMLSerializerFactory.js | 2 +- .../persistence/XMLSerializer_Beta.js | 2 +- .../persistence/XMLSerializer_Pela.js | 2 +- .../persistence/XMLSerializer_Tango.js | 2 +- .../src/main/javascript/util/FadeEffect.js | 2 +- mindplot/src/main/javascript/util/Shape.js | 2 +- .../javascript/widget/ColorPalettePanel.js | 2 +- .../src/main/javascript/widget/FloatingTip.js | 2 +- .../main/javascript/widget/FontFamilyPanel.js | 2 +- .../main/javascript/widget/FontSizePanel.js | 2 +- mindplot/src/main/javascript/widget/IMenu.js | 2 +- .../src/main/javascript/widget/IconPanel.js | 2 +- .../widget/KeyboardShortcutTooltip.js | 2 +- .../src/main/javascript/widget/LinkEditor.js | 2 +- .../main/javascript/widget/LinkIconTooltip.js | 2 +- .../javascript/widget/ListToolbarPanel.js | 2 +- mindplot/src/main/javascript/widget/Menu.js | 2 +- ...rrorNotifier.js => ModalDialogNotifier.js} | 2 +- .../src/main/javascript/widget/NoteEditor.js | 2 +- .../src/main/javascript/widget/ToolbarItem.js | 2 +- .../main/javascript/widget/ToolbarNotifier.js | 2 +- .../main/javascript/widget/ToolbarPaneItem.js | 2 +- .../main/javascript/widget/TopicShapePanel.js | 2 +- .../static/test/BalancedTestSuite.js | 2 +- .../javascript/static/test/FreeTestSuite.js | 2 +- .../static/test/SymmetricTestSuite.js | 2 +- .../test/javascript/static/test/TestSuite.js | 2 +- web2d/src/main/javascript/Arrow.js | 2 +- web2d/src/main/javascript/CurvedLine.js | 2 +- web2d/src/main/javascript/Element.js | 2 +- web2d/src/main/javascript/Elipse.js | 2 +- web2d/src/main/javascript/Font.js | 2 +- web2d/src/main/javascript/Group.js | 2 +- web2d/src/main/javascript/Image.js | 2 +- web2d/src/main/javascript/Line.js | 2 +- web2d/src/main/javascript/Point.js | 2 +- web2d/src/main/javascript/PolyLine.js | 2 +- web2d/src/main/javascript/Rect.js | 2 +- web2d/src/main/javascript/Text.js | 2 +- web2d/src/main/javascript/Toolkit.js | 2 +- web2d/src/main/javascript/Workspace.js | 2 +- web2d/src/main/javascript/header.js | 2 +- .../src/main/javascript/peer/svg/ArialFont.js | 2 +- .../src/main/javascript/peer/svg/ArrowPeer.js | 2 +- .../javascript/peer/svg/CurvedLinePeer.js | 2 +- .../main/javascript/peer/svg/ElementPeer.js | 2 +- .../main/javascript/peer/svg/ElipsePeer.js | 2 +- web2d/src/main/javascript/peer/svg/Font.js | 2 +- .../src/main/javascript/peer/svg/GroupPeer.js | 2 +- .../src/main/javascript/peer/svg/ImagePeer.js | 2 +- .../src/main/javascript/peer/svg/LinePeer.js | 2 +- .../main/javascript/peer/svg/PolyLinePeer.js | 2 +- .../src/main/javascript/peer/svg/RectPeer.js | 2 +- .../main/javascript/peer/svg/TahomaFont.js | 2 +- .../src/main/javascript/peer/svg/TextPeer.js | 2 +- .../src/main/javascript/peer/svg/TimesFont.js | 2 +- .../main/javascript/peer/svg/VerdanaFont.js | 2 +- .../main/javascript/peer/svg/WorkspacePeer.js | 2 +- .../main/javascript/peer/utils/EventUtils.js | 2 +- .../javascript/peer/utils/TransformUtils.js | 2 +- web2d/src/test/javascript/render/utils.js | 2 +- wise-editor/src/main/webapp/js/editor.js | 2 +- .../com/wisemapping/dao/MindmapManager.java | 2 +- .../wisemapping/dao/MindmapManagerImpl.java | 2 +- .../java/com/wisemapping/dao/UserManager.java | 2 +- .../com/wisemapping/dao/UserManagerImpl.java | 2 +- .../AccessDeniedSecurityException.java | 4 +- .../exceptions/ClientException.java | 9 +++- .../EditionSessionExpiredException.java | 4 +- .../exceptions/EmailNotExistsException.java | 2 +- .../GoogleChromeFrameRequiredException.java | 2 +- .../exceptions/ImportUnexpectedException.java | 2 +- .../wisemapping/exceptions/LockException.java | 4 +- .../MultipleSessionsOpenException.java | 4 +- .../exceptions/SessionExpiredException.java | 14 ++--- .../com/wisemapping/exceptions/Severity.java | 25 +++++++++ .../UnsupportedBrowserException.java | 2 +- .../exceptions/WiseMappingException.java | 2 +- .../wisemapping/exporter/ExportException.java | 2 +- .../wisemapping/exporter/ExportFormat.java | 2 +- .../exporter/ExportProperties.java | 2 +- .../com/wisemapping/exporter/Exporter.java | 2 +- .../wisemapping/exporter/ExporterFactory.java | 2 +- .../exporter/FreemindExporter.java | 2 +- .../filter/BrowserSupportInterceptor.java | 2 +- .../filter/RequestPropertiesInterceptor.java | 2 +- .../filter/SupportedUserAgent.java | 2 +- .../filter/UserLocaleInterceptor.java | 2 +- .../wisemapping/importer/ImportFormat.java | 2 +- .../com/wisemapping/importer/Importer.java | 2 +- .../importer/ImporterException.java | 2 +- .../wisemapping/importer/ImporterFactory.java | 2 +- .../importer/JaxbCDATAMarshaller.java | 18 +++++++ .../wisemapping/importer/VersionNumber.java | 18 +++++++ .../freemind/FreemindIconConverter.java | 2 +- .../importer/freemind/FreemindImporter.java | 2 +- .../java/com/wisemapping/mail/Mailer.java | 2 +- .../wisemapping/mail/NotificationService.java | 2 +- .../com/wisemapping/model/AccessAuditory.java | 2 +- .../com/wisemapping/model/Collaboration.java | 2 +- .../wisemapping/model/CollaborationEmail.java | 2 +- .../model/CollaborationProperties.java | 2 +- .../wisemapping/model/CollaborationRole.java | 2 +- .../com/wisemapping/model/Collaborator.java | 2 +- .../java/com/wisemapping/model/Constants.java | 2 +- .../main/java/com/wisemapping/model/Font.java | 2 +- .../com/wisemapping/model/IconFamily.java | 2 +- .../wisemapping/model/MindMapCriteria.java | 2 +- .../com/wisemapping/model/MindMapHistory.java | 2 +- .../java/com/wisemapping/model/Mindmap.java | 2 +- .../com/wisemapping/model/MindmapIcon.java | 2 +- .../com/wisemapping/model/MindmapIcons.java | 2 +- .../com/wisemapping/model/ShapeStyle.java | 2 +- .../main/java/com/wisemapping/model/User.java | 2 +- .../ncontroller/ExtensionsController.java | 2 +- .../ncontroller/LoginController.java | 2 +- .../ncontroller/MindmapController.java | 2 +- .../ncontroller/PublicPagesController.java | 2 +- .../ncontroller/UsersController.java | 2 +- .../wisemapping/rest/AccountController.java | 2 +- .../com/wisemapping/rest/AdminController.java | 2 +- .../com/wisemapping/rest/BaseController.java | 9 ++-- ...bugMappingJacksonHttpMessageConverter.java | 18 +++++++ .../JsonHttpMessageNotReadableException.java | 18 +++++++ .../wisemapping/rest/MindmapController.java | 52 ++++++++++--------- .../com/wisemapping/rest/MindmapFilter.java | 2 +- .../rest/TransformerController.java | 2 +- .../wisemapping/rest/ValidationException.java | 2 +- .../rest/model/RestCollaboration.java | 18 +++++++ .../rest/model/RestCollaborationList.java | 18 +++++++ .../rest/model/RestCollaborator.java | 18 +++++++ .../wisemapping/rest/model/RestErrors.java | 31 ++++++++++- .../wisemapping/rest/model/RestLockInfo.java | 18 +++++++ .../wisemapping/rest/model/RestLogItem.java | 18 +++++++ .../wisemapping/rest/model/RestMindmap.java | 18 +++++++ .../rest/model/RestMindmapHistory.java | 18 +++++++ .../rest/model/RestMindmapHistoryList.java | 18 +++++++ .../rest/model/RestMindmapInfo.java | 18 +++++++ .../rest/model/RestMindmapList.java | 18 +++++++ .../com/wisemapping/rest/model/RestUser.java | 18 +++++++ .../rest/view/ImportTransformationView.java | 2 +- .../wisemapping/rest/view/TransformView.java | 2 +- .../security/AuthenticationProvider.java | 2 +- .../security/CustomPasswordEncoder.java | 2 +- .../com/wisemapping/security/UserDetails.java | 2 +- .../security/UserDetailsService.java | 2 +- .../java/com/wisemapping/security/Utils.java | 2 +- .../security/aop/BaseSecurityAdvice.java | 2 +- .../security/aop/UpdateSecurityAdvise.java | 2 +- .../security/aop/ViewBaseSecurityAdvise.java | 2 +- .../service/CollaborationException.java | 2 +- .../service/HibernateAppListener.java | 2 +- .../wisemapping/service/HibernateUtil.java | 2 +- .../InvalidActivationCodeException.java | 2 +- .../service/InvalidUserEmailException.java | 2 +- .../com/wisemapping/service/LockInfo.java | 2 +- .../com/wisemapping/service/LockManager.java | 2 +- .../wisemapping/service/LockManagerImpl.java | 2 +- .../wisemapping/service/MindmapService.java | 2 +- .../service/MindmapServiceImpl.java | 2 +- .../com/wisemapping/service/UserService.java | 2 +- .../wisemapping/service/UserServiceImpl.java | 2 +- .../java/com/wisemapping/util/JAXBUtils.java | 2 +- .../java/com/wisemapping/util/ZipUtils.java | 2 +- .../validator/MapInfoValidator.java | 2 +- .../com/wisemapping/validator/Messages.java | 2 +- .../wisemapping/validator/UserValidator.java | 2 +- .../java/com/wisemapping/validator/Utils.java | 2 +- .../wisemapping/validator/ValidatorUtils.java | 2 +- .../wisemapping/view/ChangePasswordBean.java | 2 +- .../wisemapping/view/CollaboratorBean.java | 2 +- .../com/wisemapping/view/MindMapBean.java | 2 +- .../com/wisemapping/view/MindMapInfoBean.java | 2 +- .../java/com/wisemapping/view/UserBean.java | 2 +- .../src/main/resources/messages_en.properties | 2 +- .../test/rest/RestAdminITCase.java | 18 +++++++ 260 files changed, 650 insertions(+), 278 deletions(-) rename mindplot/src/main/javascript/widget/{ErrorNotifier.js => ModalDialogNotifier.js} (96%) create mode 100644 wise-webapp/src/main/java/com/wisemapping/exceptions/Severity.java diff --git a/core-js/src/main/javascript/Utils.js b/core-js/src/main/javascript/Utils.js index 9db008e4..97e43e75 100644 --- a/core-js/src/main/javascript/Utils.js +++ b/core-js/src/main/javascript/Utils.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/core-js/src/main/javascript/header.js b/core-js/src/main/javascript/header.js index 359eb697..fdc85e2f 100644 --- a/core-js/src/main/javascript/header.js +++ b/core-js/src/main/javascript/header.js @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/license.txt b/license.txt index 7d244672..3f5065af 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,4 @@ - Copyright [2011] [wisemapping] + Copyright [2012] [wisemapping] Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/ActionDispatcher.js b/mindplot/src/main/javascript/ActionDispatcher.js index 74aeb29c..beb9c8ec 100644 --- a/mindplot/src/main/javascript/ActionDispatcher.js +++ b/mindplot/src/main/javascript/ActionDispatcher.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/ActionIcon.js b/mindplot/src/main/javascript/ActionIcon.js index 4e08f7bb..a6abfe1a 100644 --- a/mindplot/src/main/javascript/ActionIcon.js +++ b/mindplot/src/main/javascript/ActionIcon.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/CentralTopic.js b/mindplot/src/main/javascript/CentralTopic.js index 4ac5040d..93fa74d0 100644 --- a/mindplot/src/main/javascript/CentralTopic.js +++ b/mindplot/src/main/javascript/CentralTopic.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/CollabActionDispatcher.js b/mindplot/src/main/javascript/CollabActionDispatcher.js index e68e5cc9..e194e0d1 100644 --- a/mindplot/src/main/javascript/CollabActionDispatcher.js +++ b/mindplot/src/main/javascript/CollabActionDispatcher.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/Command.js b/mindplot/src/main/javascript/Command.js index 21bcc4ae..3b776947 100644 --- a/mindplot/src/main/javascript/Command.js +++ b/mindplot/src/main/javascript/Command.js @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/ConnectionLine.js b/mindplot/src/main/javascript/ConnectionLine.js index 79041834..80d6c2a2 100644 --- a/mindplot/src/main/javascript/ConnectionLine.js +++ b/mindplot/src/main/javascript/ConnectionLine.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/ControlPoint.js b/mindplot/src/main/javascript/ControlPoint.js index d19293da..47e50869 100644 --- a/mindplot/src/main/javascript/ControlPoint.js +++ b/mindplot/src/main/javascript/ControlPoint.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index f2be351f..1d0f79e4 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DesignerActionRunner.js b/mindplot/src/main/javascript/DesignerActionRunner.js index 5e96e9b1..c372dac8 100644 --- a/mindplot/src/main/javascript/DesignerActionRunner.js +++ b/mindplot/src/main/javascript/DesignerActionRunner.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DesignerKeyboard.js b/mindplot/src/main/javascript/DesignerKeyboard.js index f3aebdd5..c6f00fe0 100644 --- a/mindplot/src/main/javascript/DesignerKeyboard.js +++ b/mindplot/src/main/javascript/DesignerKeyboard.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DesignerModel.js b/mindplot/src/main/javascript/DesignerModel.js index e42b47ea..66d0bad9 100644 --- a/mindplot/src/main/javascript/DesignerModel.js +++ b/mindplot/src/main/javascript/DesignerModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DesignerUndoManager.js b/mindplot/src/main/javascript/DesignerUndoManager.js index 30d4f10e..e6612a00 100644 --- a/mindplot/src/main/javascript/DesignerUndoManager.js +++ b/mindplot/src/main/javascript/DesignerUndoManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DragConnector.js b/mindplot/src/main/javascript/DragConnector.js index 150043f0..11893e1d 100644 --- a/mindplot/src/main/javascript/DragConnector.js +++ b/mindplot/src/main/javascript/DragConnector.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DragManager.js b/mindplot/src/main/javascript/DragManager.js index 1af1dd53..4a9648e6 100644 --- a/mindplot/src/main/javascript/DragManager.js +++ b/mindplot/src/main/javascript/DragManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DragPivot.js b/mindplot/src/main/javascript/DragPivot.js index c1cfce04..9758cfc4 100644 --- a/mindplot/src/main/javascript/DragPivot.js +++ b/mindplot/src/main/javascript/DragPivot.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/DragTopic.js b/mindplot/src/main/javascript/DragTopic.js index e7415630..a1750c64 100644 --- a/mindplot/src/main/javascript/DragTopic.js +++ b/mindplot/src/main/javascript/DragTopic.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/EditorOptions.js b/mindplot/src/main/javascript/EditorOptions.js index ccc533c5..e9bd1d3e 100644 --- a/mindplot/src/main/javascript/EditorOptions.js +++ b/mindplot/src/main/javascript/EditorOptions.js @@ -1,3 +1,21 @@ +/* + * Copyright [2012] [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. + */ + mindplot.EditorOptions = { LayoutManager:"OriginalLayout", diff --git a/mindplot/src/main/javascript/EditorProperties.js b/mindplot/src/main/javascript/EditorProperties.js index 0a650195..1fa148d7 100644 --- a/mindplot/src/main/javascript/EditorProperties.js +++ b/mindplot/src/main/javascript/EditorProperties.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/Icon.js b/mindplot/src/main/javascript/Icon.js index 2bd23e83..5d448e77 100644 --- a/mindplot/src/main/javascript/Icon.js +++ b/mindplot/src/main/javascript/Icon.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/IconGroup.js b/mindplot/src/main/javascript/IconGroup.js index cdc38f22..cfc0fa00 100644 --- a/mindplot/src/main/javascript/IconGroup.js +++ b/mindplot/src/main/javascript/IconGroup.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/ImageIcon.js b/mindplot/src/main/javascript/ImageIcon.js index f1812724..f0339cb9 100644 --- a/mindplot/src/main/javascript/ImageIcon.js +++ b/mindplot/src/main/javascript/ImageIcon.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/LinkIcon.js b/mindplot/src/main/javascript/LinkIcon.js index 839a8cef..6f820744 100644 --- a/mindplot/src/main/javascript/LinkIcon.js +++ b/mindplot/src/main/javascript/LinkIcon.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/LocalStorageManager.js b/mindplot/src/main/javascript/LocalStorageManager.js index a8ed69ee..5156413c 100644 --- a/mindplot/src/main/javascript/LocalStorageManager.js +++ b/mindplot/src/main/javascript/LocalStorageManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/MainTopic.js b/mindplot/src/main/javascript/MainTopic.js index f92920c7..2a94d1e3 100644 --- a/mindplot/src/main/javascript/MainTopic.js +++ b/mindplot/src/main/javascript/MainTopic.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/Messages.js b/mindplot/src/main/javascript/Messages.js index 1304fc34..bfa36cb1 100644 --- a/mindplot/src/main/javascript/Messages.js +++ b/mindplot/src/main/javascript/Messages.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/MultilineTextEditor.js b/mindplot/src/main/javascript/MultilineTextEditor.js index b1b730c9..b7cb9161 100644 --- a/mindplot/src/main/javascript/MultilineTextEditor.js +++ b/mindplot/src/main/javascript/MultilineTextEditor.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/NodeGraph.js b/mindplot/src/main/javascript/NodeGraph.js index daf2997c..f530cb70 100644 --- a/mindplot/src/main/javascript/NodeGraph.js +++ b/mindplot/src/main/javascript/NodeGraph.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/NoteIcon.js b/mindplot/src/main/javascript/NoteIcon.js index b6ae4562..e3b93985 100644 --- a/mindplot/src/main/javascript/NoteIcon.js +++ b/mindplot/src/main/javascript/NoteIcon.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/PersistenceManager.js b/mindplot/src/main/javascript/PersistenceManager.js index 84bc791d..76caaf18 100644 --- a/mindplot/src/main/javascript/PersistenceManager.js +++ b/mindplot/src/main/javascript/PersistenceManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/Relationship.js b/mindplot/src/main/javascript/Relationship.js index 690e7b14..105cd73e 100644 --- a/mindplot/src/main/javascript/Relationship.js +++ b/mindplot/src/main/javascript/Relationship.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/RelationshipPivot.js b/mindplot/src/main/javascript/RelationshipPivot.js index efc63918..3b9e0e66 100644 --- a/mindplot/src/main/javascript/RelationshipPivot.js +++ b/mindplot/src/main/javascript/RelationshipPivot.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/RestPersistenceManager.js b/mindplot/src/main/javascript/RestPersistenceManager.js index 747815b8..79842e32 100644 --- a/mindplot/src/main/javascript/RestPersistenceManager.js +++ b/mindplot/src/main/javascript/RestPersistenceManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/ScreenManager.js b/mindplot/src/main/javascript/ScreenManager.js index 010de117..f633b02f 100644 --- a/mindplot/src/main/javascript/ScreenManager.js +++ b/mindplot/src/main/javascript/ScreenManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/ShrinkConnector.js b/mindplot/src/main/javascript/ShrinkConnector.js index 1f177314..733f0e24 100644 --- a/mindplot/src/main/javascript/ShrinkConnector.js +++ b/mindplot/src/main/javascript/ShrinkConnector.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/StandaloneActionDispatcher.js b/mindplot/src/main/javascript/StandaloneActionDispatcher.js index 4d648740..1b1098ab 100644 --- a/mindplot/src/main/javascript/StandaloneActionDispatcher.js +++ b/mindplot/src/main/javascript/StandaloneActionDispatcher.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/TextEditor.js b/mindplot/src/main/javascript/TextEditor.js index 2b07b420..aabb3507 100644 --- a/mindplot/src/main/javascript/TextEditor.js +++ b/mindplot/src/main/javascript/TextEditor.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/TextEditorFactory.js b/mindplot/src/main/javascript/TextEditorFactory.js index 32ac8fdc..18c66d35 100644 --- a/mindplot/src/main/javascript/TextEditorFactory.js +++ b/mindplot/src/main/javascript/TextEditorFactory.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/Topic.js b/mindplot/src/main/javascript/Topic.js index 41c0c5ce..68f64aa5 100644 --- a/mindplot/src/main/javascript/Topic.js +++ b/mindplot/src/main/javascript/Topic.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/TopicEventDispatcher.js b/mindplot/src/main/javascript/TopicEventDispatcher.js index 90eea789..20476d10 100644 --- a/mindplot/src/main/javascript/TopicEventDispatcher.js +++ b/mindplot/src/main/javascript/TopicEventDispatcher.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/TopicFeature.js b/mindplot/src/main/javascript/TopicFeature.js index d6368d62..ed1130db 100644 --- a/mindplot/src/main/javascript/TopicFeature.js +++ b/mindplot/src/main/javascript/TopicFeature.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/Workspace.js b/mindplot/src/main/javascript/Workspace.js index 5e17d39a..859b41fc 100644 --- a/mindplot/src/main/javascript/Workspace.js +++ b/mindplot/src/main/javascript/Workspace.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/collaboration/CollaborationManager.js b/mindplot/src/main/javascript/collaboration/CollaborationManager.js index ff4a7ffb..80ea67a6 100644 --- a/mindplot/src/main/javascript/collaboration/CollaborationManager.js +++ b/mindplot/src/main/javascript/collaboration/CollaborationManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/collaboration/framework/AbstractCollaborativeModelFactory.js b/mindplot/src/main/javascript/collaboration/framework/AbstractCollaborativeModelFactory.js index d74c6c90..f1447359 100644 --- a/mindplot/src/main/javascript/collaboration/framework/AbstractCollaborativeModelFactory.js +++ b/mindplot/src/main/javascript/collaboration/framework/AbstractCollaborativeModelFactory.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/collaboration/framework/collab/BrixCollaborativeModelFactory.js b/mindplot/src/main/javascript/collaboration/framework/collab/BrixCollaborativeModelFactory.js index fb4d5a4a..cdcab900 100644 --- a/mindplot/src/main/javascript/collaboration/framework/collab/BrixCollaborativeModelFactory.js +++ b/mindplot/src/main/javascript/collaboration/framework/collab/BrixCollaborativeModelFactory.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/collaboration/framework/collab/BrixFramework.js b/mindplot/src/main/javascript/collaboration/framework/collab/BrixFramework.js index de9583e2..06cfecfa 100644 --- a/mindplot/src/main/javascript/collaboration/framework/collab/BrixFramework.js +++ b/mindplot/src/main/javascript/collaboration/framework/collab/BrixFramework.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/collaboration/framework/collab/model/Mindmap.js b/mindplot/src/main/javascript/collaboration/framework/collab/model/Mindmap.js index 19d16fa1..69566a51 100644 --- a/mindplot/src/main/javascript/collaboration/framework/collab/model/Mindmap.js +++ b/mindplot/src/main/javascript/collaboration/framework/collab/model/Mindmap.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/collaboration/framework/collab/model/NodeModel.js b/mindplot/src/main/javascript/collaboration/framework/collab/model/NodeModel.js index 98522c54..e3fe6cc2 100644 --- a/mindplot/src/main/javascript/collaboration/framework/collab/model/NodeModel.js +++ b/mindplot/src/main/javascript/collaboration/framework/collab/model/NodeModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/AddFeatureToTopicCommand.js b/mindplot/src/main/javascript/commands/AddFeatureToTopicCommand.js index f208c791..3852766f 100644 --- a/mindplot/src/main/javascript/commands/AddFeatureToTopicCommand.js +++ b/mindplot/src/main/javascript/commands/AddFeatureToTopicCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/AddRelationshipCommand.js b/mindplot/src/main/javascript/commands/AddRelationshipCommand.js index 3df8172e..ed1e4a5d 100644 --- a/mindplot/src/main/javascript/commands/AddRelationshipCommand.js +++ b/mindplot/src/main/javascript/commands/AddRelationshipCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/AddTopicCommand.js b/mindplot/src/main/javascript/commands/AddTopicCommand.js index be9f8475..c5c3870f 100644 --- a/mindplot/src/main/javascript/commands/AddTopicCommand.js +++ b/mindplot/src/main/javascript/commands/AddTopicCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/ChangeFeatureToTopicCommand.js b/mindplot/src/main/javascript/commands/ChangeFeatureToTopicCommand.js index 694a616d..f0fee9f7 100644 --- a/mindplot/src/main/javascript/commands/ChangeFeatureToTopicCommand.js +++ b/mindplot/src/main/javascript/commands/ChangeFeatureToTopicCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/DeleteCommand.js b/mindplot/src/main/javascript/commands/DeleteCommand.js index 7ed894b1..f160a19a 100644 --- a/mindplot/src/main/javascript/commands/DeleteCommand.js +++ b/mindplot/src/main/javascript/commands/DeleteCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/DragTopicCommand.js b/mindplot/src/main/javascript/commands/DragTopicCommand.js index bbf40119..986221cb 100644 --- a/mindplot/src/main/javascript/commands/DragTopicCommand.js +++ b/mindplot/src/main/javascript/commands/DragTopicCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/GenericFunctionCommand.js b/mindplot/src/main/javascript/commands/GenericFunctionCommand.js index 9488fab0..d52e5103 100644 --- a/mindplot/src/main/javascript/commands/GenericFunctionCommand.js +++ b/mindplot/src/main/javascript/commands/GenericFunctionCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/MoveControlPointCommand.js b/mindplot/src/main/javascript/commands/MoveControlPointCommand.js index 3419fe2b..96564599 100644 --- a/mindplot/src/main/javascript/commands/MoveControlPointCommand.js +++ b/mindplot/src/main/javascript/commands/MoveControlPointCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/commands/RemoveFeatureFromTopicCommand.js b/mindplot/src/main/javascript/commands/RemoveFeatureFromTopicCommand.js index 1536f875..a8043164 100644 --- a/mindplot/src/main/javascript/commands/RemoveFeatureFromTopicCommand.js +++ b/mindplot/src/main/javascript/commands/RemoveFeatureFromTopicCommand.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/header.js b/mindplot/src/main/javascript/header.js index a62941dd..b5c0b76f 100644 --- a/mindplot/src/main/javascript/header.js +++ b/mindplot/src/main/javascript/header.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/AbstractBasicSorter.js b/mindplot/src/main/javascript/layout/AbstractBasicSorter.js index 02a85969..fbfcad6d 100644 --- a/mindplot/src/main/javascript/layout/AbstractBasicSorter.js +++ b/mindplot/src/main/javascript/layout/AbstractBasicSorter.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/BalancedSorter.js b/mindplot/src/main/javascript/layout/BalancedSorter.js index 55b8d02a..1c683616 100644 --- a/mindplot/src/main/javascript/layout/BalancedSorter.js +++ b/mindplot/src/main/javascript/layout/BalancedSorter.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/ChangeEvent.js b/mindplot/src/main/javascript/layout/ChangeEvent.js index 057c1fa1..9e0dce84 100644 --- a/mindplot/src/main/javascript/layout/ChangeEvent.js +++ b/mindplot/src/main/javascript/layout/ChangeEvent.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js b/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js index 26472e2c..e578ba7f 100644 --- a/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js +++ b/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/EventBus.js b/mindplot/src/main/javascript/layout/EventBus.js index a8d93fc9..a7ddd230 100644 --- a/mindplot/src/main/javascript/layout/EventBus.js +++ b/mindplot/src/main/javascript/layout/EventBus.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/EventBusDispatcher.js b/mindplot/src/main/javascript/layout/EventBusDispatcher.js index e5e768f0..0b8f5d50 100644 --- a/mindplot/src/main/javascript/layout/EventBusDispatcher.js +++ b/mindplot/src/main/javascript/layout/EventBusDispatcher.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/GridSorter.js b/mindplot/src/main/javascript/layout/GridSorter.js index 1d434bbc..9122b51c 100644 --- a/mindplot/src/main/javascript/layout/GridSorter.js +++ b/mindplot/src/main/javascript/layout/GridSorter.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/LayoutManager.js b/mindplot/src/main/javascript/layout/LayoutManager.js index a10cc3b5..c7d6c86d 100644 --- a/mindplot/src/main/javascript/layout/LayoutManager.js +++ b/mindplot/src/main/javascript/layout/LayoutManager.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/Node.js b/mindplot/src/main/javascript/layout/Node.js index fe7e379e..972a0a80 100644 --- a/mindplot/src/main/javascript/layout/Node.js +++ b/mindplot/src/main/javascript/layout/Node.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/OriginalLayout.js b/mindplot/src/main/javascript/layout/OriginalLayout.js index 12612a2e..84d4c3f5 100644 --- a/mindplot/src/main/javascript/layout/OriginalLayout.js +++ b/mindplot/src/main/javascript/layout/OriginalLayout.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/RootedTreeSet.js b/mindplot/src/main/javascript/layout/RootedTreeSet.js index e4ae17f5..c51f9e22 100644 --- a/mindplot/src/main/javascript/layout/RootedTreeSet.js +++ b/mindplot/src/main/javascript/layout/RootedTreeSet.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/layout/SymmetricSorter.js b/mindplot/src/main/javascript/layout/SymmetricSorter.js index ea9ed3e3..10604091 100644 --- a/mindplot/src/main/javascript/layout/SymmetricSorter.js +++ b/mindplot/src/main/javascript/layout/SymmetricSorter.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/FeatureModel.js b/mindplot/src/main/javascript/model/FeatureModel.js index a8bccec3..f28c1768 100644 --- a/mindplot/src/main/javascript/model/FeatureModel.js +++ b/mindplot/src/main/javascript/model/FeatureModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/IMindmap.js b/mindplot/src/main/javascript/model/IMindmap.js index 3b3f0855..545a0355 100644 --- a/mindplot/src/main/javascript/model/IMindmap.js +++ b/mindplot/src/main/javascript/model/IMindmap.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/INodeModel.js b/mindplot/src/main/javascript/model/INodeModel.js index 2a8cbcd2..9e4fb96d 100644 --- a/mindplot/src/main/javascript/model/INodeModel.js +++ b/mindplot/src/main/javascript/model/INodeModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/IconModel.js b/mindplot/src/main/javascript/model/IconModel.js index 80124d3a..aa6bca65 100644 --- a/mindplot/src/main/javascript/model/IconModel.js +++ b/mindplot/src/main/javascript/model/IconModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/LinkModel.js b/mindplot/src/main/javascript/model/LinkModel.js index 259adc87..a04ed093 100644 --- a/mindplot/src/main/javascript/model/LinkModel.js +++ b/mindplot/src/main/javascript/model/LinkModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/Mindmap.js b/mindplot/src/main/javascript/model/Mindmap.js index aca43a3d..345568bd 100644 --- a/mindplot/src/main/javascript/model/Mindmap.js +++ b/mindplot/src/main/javascript/model/Mindmap.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/NodeModel.js b/mindplot/src/main/javascript/model/NodeModel.js index e41b3d8f..89365805 100644 --- a/mindplot/src/main/javascript/model/NodeModel.js +++ b/mindplot/src/main/javascript/model/NodeModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/NoteModel.js b/mindplot/src/main/javascript/model/NoteModel.js index 27b320fe..679d08ce 100644 --- a/mindplot/src/main/javascript/model/NoteModel.js +++ b/mindplot/src/main/javascript/model/NoteModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/model/RelationshipModel.js b/mindplot/src/main/javascript/model/RelationshipModel.js index 6f26f1a5..55f909e7 100644 --- a/mindplot/src/main/javascript/model/RelationshipModel.js +++ b/mindplot/src/main/javascript/model/RelationshipModel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/persistence/Beta2PelaMigrator.js b/mindplot/src/main/javascript/persistence/Beta2PelaMigrator.js index cf8aaf8b..8c296bb5 100644 --- a/mindplot/src/main/javascript/persistence/Beta2PelaMigrator.js +++ b/mindplot/src/main/javascript/persistence/Beta2PelaMigrator.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/persistence/ModelCodeName.js b/mindplot/src/main/javascript/persistence/ModelCodeName.js index 28028a32..21b8758f 100644 --- a/mindplot/src/main/javascript/persistence/ModelCodeName.js +++ b/mindplot/src/main/javascript/persistence/ModelCodeName.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/persistence/Pela2TangoMigrator.js b/mindplot/src/main/javascript/persistence/Pela2TangoMigrator.js index c5e129c7..0b65ae32 100644 --- a/mindplot/src/main/javascript/persistence/Pela2TangoMigrator.js +++ b/mindplot/src/main/javascript/persistence/Pela2TangoMigrator.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/persistence/XMLSerializerFactory.js b/mindplot/src/main/javascript/persistence/XMLSerializerFactory.js index dba43285..c1740899 100644 --- a/mindplot/src/main/javascript/persistence/XMLSerializerFactory.js +++ b/mindplot/src/main/javascript/persistence/XMLSerializerFactory.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/persistence/XMLSerializer_Beta.js b/mindplot/src/main/javascript/persistence/XMLSerializer_Beta.js index 9f988b26..0d0e7cc0 100644 --- a/mindplot/src/main/javascript/persistence/XMLSerializer_Beta.js +++ b/mindplot/src/main/javascript/persistence/XMLSerializer_Beta.js @@ -1,4 +1,4 @@ -/* Copyright [2011] [wisemapping] +/* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js b/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js index 3157fef7..95da6d9d 100644 --- a/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js +++ b/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/persistence/XMLSerializer_Tango.js b/mindplot/src/main/javascript/persistence/XMLSerializer_Tango.js index 8db3adff..02e96616 100644 --- a/mindplot/src/main/javascript/persistence/XMLSerializer_Tango.js +++ b/mindplot/src/main/javascript/persistence/XMLSerializer_Tango.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/util/FadeEffect.js b/mindplot/src/main/javascript/util/FadeEffect.js index 7d9c0616..82a7fb0d 100644 --- a/mindplot/src/main/javascript/util/FadeEffect.js +++ b/mindplot/src/main/javascript/util/FadeEffect.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/util/Shape.js b/mindplot/src/main/javascript/util/Shape.js index ddbd9787..7abfabe4 100644 --- a/mindplot/src/main/javascript/util/Shape.js +++ b/mindplot/src/main/javascript/util/Shape.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/ColorPalettePanel.js b/mindplot/src/main/javascript/widget/ColorPalettePanel.js index 3246b0e0..252ecc5d 100644 --- a/mindplot/src/main/javascript/widget/ColorPalettePanel.js +++ b/mindplot/src/main/javascript/widget/ColorPalettePanel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/FloatingTip.js b/mindplot/src/main/javascript/widget/FloatingTip.js index 87d1483b..28aeeb57 100644 --- a/mindplot/src/main/javascript/widget/FloatingTip.js +++ b/mindplot/src/main/javascript/widget/FloatingTip.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/FontFamilyPanel.js b/mindplot/src/main/javascript/widget/FontFamilyPanel.js index fca4baa6..263dfd62 100644 --- a/mindplot/src/main/javascript/widget/FontFamilyPanel.js +++ b/mindplot/src/main/javascript/widget/FontFamilyPanel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/FontSizePanel.js b/mindplot/src/main/javascript/widget/FontSizePanel.js index d375b63c..b46c7acc 100644 --- a/mindplot/src/main/javascript/widget/FontSizePanel.js +++ b/mindplot/src/main/javascript/widget/FontSizePanel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/IMenu.js b/mindplot/src/main/javascript/widget/IMenu.js index 0bc89a90..902a6f5b 100644 --- a/mindplot/src/main/javascript/widget/IMenu.js +++ b/mindplot/src/main/javascript/widget/IMenu.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/IconPanel.js b/mindplot/src/main/javascript/widget/IconPanel.js index 6c9f67c6..f51ac33b 100644 --- a/mindplot/src/main/javascript/widget/IconPanel.js +++ b/mindplot/src/main/javascript/widget/IconPanel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/KeyboardShortcutTooltip.js b/mindplot/src/main/javascript/widget/KeyboardShortcutTooltip.js index 0e1b0054..575adefa 100644 --- a/mindplot/src/main/javascript/widget/KeyboardShortcutTooltip.js +++ b/mindplot/src/main/javascript/widget/KeyboardShortcutTooltip.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/LinkEditor.js b/mindplot/src/main/javascript/widget/LinkEditor.js index ddbd95d8..c320f5fc 100644 --- a/mindplot/src/main/javascript/widget/LinkEditor.js +++ b/mindplot/src/main/javascript/widget/LinkEditor.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/LinkIconTooltip.js b/mindplot/src/main/javascript/widget/LinkIconTooltip.js index 8ca0141a..a5df8ee1 100644 --- a/mindplot/src/main/javascript/widget/LinkIconTooltip.js +++ b/mindplot/src/main/javascript/widget/LinkIconTooltip.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/ListToolbarPanel.js b/mindplot/src/main/javascript/widget/ListToolbarPanel.js index 7d744ff6..583a2afa 100644 --- a/mindplot/src/main/javascript/widget/ListToolbarPanel.js +++ b/mindplot/src/main/javascript/widget/ListToolbarPanel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index 0432d1de..7094b235 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/ErrorNotifier.js b/mindplot/src/main/javascript/widget/ModalDialogNotifier.js similarity index 96% rename from mindplot/src/main/javascript/widget/ErrorNotifier.js rename to mindplot/src/main/javascript/widget/ModalDialogNotifier.js index fe0246d7..703dae98 100644 --- a/mindplot/src/main/javascript/widget/ErrorNotifier.js +++ b/mindplot/src/main/javascript/widget/ModalDialogNotifier.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/NoteEditor.js b/mindplot/src/main/javascript/widget/NoteEditor.js index 8caea4bb..f1906751 100644 --- a/mindplot/src/main/javascript/widget/NoteEditor.js +++ b/mindplot/src/main/javascript/widget/NoteEditor.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/ToolbarItem.js b/mindplot/src/main/javascript/widget/ToolbarItem.js index 5a49afce..edde65c2 100644 --- a/mindplot/src/main/javascript/widget/ToolbarItem.js +++ b/mindplot/src/main/javascript/widget/ToolbarItem.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/ToolbarNotifier.js b/mindplot/src/main/javascript/widget/ToolbarNotifier.js index fe0246d7..703dae98 100644 --- a/mindplot/src/main/javascript/widget/ToolbarNotifier.js +++ b/mindplot/src/main/javascript/widget/ToolbarNotifier.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js index b7a2ed78..287cedfe 100644 --- a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js +++ b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/main/javascript/widget/TopicShapePanel.js b/mindplot/src/main/javascript/widget/TopicShapePanel.js index 70fa5394..b597414f 100644 --- a/mindplot/src/main/javascript/widget/TopicShapePanel.js +++ b/mindplot/src/main/javascript/widget/TopicShapePanel.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/test/javascript/static/test/BalancedTestSuite.js b/mindplot/src/test/javascript/static/test/BalancedTestSuite.js index 7b540855..4e9ceba0 100644 --- a/mindplot/src/test/javascript/static/test/BalancedTestSuite.js +++ b/mindplot/src/test/javascript/static/test/BalancedTestSuite.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/test/javascript/static/test/FreeTestSuite.js b/mindplot/src/test/javascript/static/test/FreeTestSuite.js index a17926f3..40ad2698 100644 --- a/mindplot/src/test/javascript/static/test/FreeTestSuite.js +++ b/mindplot/src/test/javascript/static/test/FreeTestSuite.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/test/javascript/static/test/SymmetricTestSuite.js b/mindplot/src/test/javascript/static/test/SymmetricTestSuite.js index ed650918..e2dd3a65 100644 --- a/mindplot/src/test/javascript/static/test/SymmetricTestSuite.js +++ b/mindplot/src/test/javascript/static/test/SymmetricTestSuite.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/mindplot/src/test/javascript/static/test/TestSuite.js b/mindplot/src/test/javascript/static/test/TestSuite.js index 2a693aa8..b0100019 100644 --- a/mindplot/src/test/javascript/static/test/TestSuite.js +++ b/mindplot/src/test/javascript/static/test/TestSuite.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Arrow.js b/web2d/src/main/javascript/Arrow.js index 8f7912c7..33fabdb5 100644 --- a/web2d/src/main/javascript/Arrow.js +++ b/web2d/src/main/javascript/Arrow.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/CurvedLine.js b/web2d/src/main/javascript/CurvedLine.js index 61f9f0bb..0ddf05ea 100644 --- a/web2d/src/main/javascript/CurvedLine.js +++ b/web2d/src/main/javascript/CurvedLine.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Element.js b/web2d/src/main/javascript/Element.js index 9ab06611..0fa9ca84 100644 --- a/web2d/src/main/javascript/Element.js +++ b/web2d/src/main/javascript/Element.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Elipse.js b/web2d/src/main/javascript/Elipse.js index 93f520db..ba26514f 100644 --- a/web2d/src/main/javascript/Elipse.js +++ b/web2d/src/main/javascript/Elipse.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Font.js b/web2d/src/main/javascript/Font.js index 41f8a12d..1be13fb3 100644 --- a/web2d/src/main/javascript/Font.js +++ b/web2d/src/main/javascript/Font.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Group.js b/web2d/src/main/javascript/Group.js index c2dd64f0..20387b7d 100644 --- a/web2d/src/main/javascript/Group.js +++ b/web2d/src/main/javascript/Group.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Image.js b/web2d/src/main/javascript/Image.js index 74441921..b9af98f5 100644 --- a/web2d/src/main/javascript/Image.js +++ b/web2d/src/main/javascript/Image.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Line.js b/web2d/src/main/javascript/Line.js index b77c35d3..f8251b74 100644 --- a/web2d/src/main/javascript/Line.js +++ b/web2d/src/main/javascript/Line.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Point.js b/web2d/src/main/javascript/Point.js index 0b4dd5e6..ffc1254a 100644 --- a/web2d/src/main/javascript/Point.js +++ b/web2d/src/main/javascript/Point.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/PolyLine.js b/web2d/src/main/javascript/PolyLine.js index 5c44d98a..ec485443 100644 --- a/web2d/src/main/javascript/PolyLine.js +++ b/web2d/src/main/javascript/PolyLine.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Rect.js b/web2d/src/main/javascript/Rect.js index d71e0965..d3b667ec 100644 --- a/web2d/src/main/javascript/Rect.js +++ b/web2d/src/main/javascript/Rect.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Text.js b/web2d/src/main/javascript/Text.js index 300fe4e7..440f45e9 100644 --- a/web2d/src/main/javascript/Text.js +++ b/web2d/src/main/javascript/Text.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Toolkit.js b/web2d/src/main/javascript/Toolkit.js index 7c2e4292..294127d7 100644 --- a/web2d/src/main/javascript/Toolkit.js +++ b/web2d/src/main/javascript/Toolkit.js @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/Workspace.js b/web2d/src/main/javascript/Workspace.js index 158e1f5e..b9f16670 100644 --- a/web2d/src/main/javascript/Workspace.js +++ b/web2d/src/main/javascript/Workspace.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/header.js b/web2d/src/main/javascript/header.js index 89fa6cb1..44c495e6 100644 --- a/web2d/src/main/javascript/header.js +++ b/web2d/src/main/javascript/header.js @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/ArialFont.js b/web2d/src/main/javascript/peer/svg/ArialFont.js index 6488e997..f3ebbf2f 100644 --- a/web2d/src/main/javascript/peer/svg/ArialFont.js +++ b/web2d/src/main/javascript/peer/svg/ArialFont.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/ArrowPeer.js b/web2d/src/main/javascript/peer/svg/ArrowPeer.js index 60994fd8..ba96bd60 100644 --- a/web2d/src/main/javascript/peer/svg/ArrowPeer.js +++ b/web2d/src/main/javascript/peer/svg/ArrowPeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/CurvedLinePeer.js b/web2d/src/main/javascript/peer/svg/CurvedLinePeer.js index 545d4c14..20b6b4af 100644 --- a/web2d/src/main/javascript/peer/svg/CurvedLinePeer.js +++ b/web2d/src/main/javascript/peer/svg/CurvedLinePeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/ElementPeer.js b/web2d/src/main/javascript/peer/svg/ElementPeer.js index 0eca90ee..1966f5b7 100644 --- a/web2d/src/main/javascript/peer/svg/ElementPeer.js +++ b/web2d/src/main/javascript/peer/svg/ElementPeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/ElipsePeer.js b/web2d/src/main/javascript/peer/svg/ElipsePeer.js index 93c69270..84bf52bc 100644 --- a/web2d/src/main/javascript/peer/svg/ElipsePeer.js +++ b/web2d/src/main/javascript/peer/svg/ElipsePeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/Font.js b/web2d/src/main/javascript/peer/svg/Font.js index 5ce7e6bd..014334ea 100644 --- a/web2d/src/main/javascript/peer/svg/Font.js +++ b/web2d/src/main/javascript/peer/svg/Font.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/GroupPeer.js b/web2d/src/main/javascript/peer/svg/GroupPeer.js index 10b7ab69..001a7cd5 100644 --- a/web2d/src/main/javascript/peer/svg/GroupPeer.js +++ b/web2d/src/main/javascript/peer/svg/GroupPeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/ImagePeer.js b/web2d/src/main/javascript/peer/svg/ImagePeer.js index be9eed91..1a8e2582 100644 --- a/web2d/src/main/javascript/peer/svg/ImagePeer.js +++ b/web2d/src/main/javascript/peer/svg/ImagePeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/LinePeer.js b/web2d/src/main/javascript/peer/svg/LinePeer.js index cada8015..eb5c1e74 100644 --- a/web2d/src/main/javascript/peer/svg/LinePeer.js +++ b/web2d/src/main/javascript/peer/svg/LinePeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/PolyLinePeer.js b/web2d/src/main/javascript/peer/svg/PolyLinePeer.js index 69de2656..d67bb92b 100644 --- a/web2d/src/main/javascript/peer/svg/PolyLinePeer.js +++ b/web2d/src/main/javascript/peer/svg/PolyLinePeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/RectPeer.js b/web2d/src/main/javascript/peer/svg/RectPeer.js index 614e3845..226d0387 100644 --- a/web2d/src/main/javascript/peer/svg/RectPeer.js +++ b/web2d/src/main/javascript/peer/svg/RectPeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/TahomaFont.js b/web2d/src/main/javascript/peer/svg/TahomaFont.js index 5a2c7842..aefd38e6 100644 --- a/web2d/src/main/javascript/peer/svg/TahomaFont.js +++ b/web2d/src/main/javascript/peer/svg/TahomaFont.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/TextPeer.js b/web2d/src/main/javascript/peer/svg/TextPeer.js index f62b341c..f7ec4d7c 100644 --- a/web2d/src/main/javascript/peer/svg/TextPeer.js +++ b/web2d/src/main/javascript/peer/svg/TextPeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/TimesFont.js b/web2d/src/main/javascript/peer/svg/TimesFont.js index 0249cc37..b35d5093 100644 --- a/web2d/src/main/javascript/peer/svg/TimesFont.js +++ b/web2d/src/main/javascript/peer/svg/TimesFont.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/VerdanaFont.js b/web2d/src/main/javascript/peer/svg/VerdanaFont.js index 31caa48c..7166d2e3 100644 --- a/web2d/src/main/javascript/peer/svg/VerdanaFont.js +++ b/web2d/src/main/javascript/peer/svg/VerdanaFont.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/svg/WorkspacePeer.js b/web2d/src/main/javascript/peer/svg/WorkspacePeer.js index f91ed959..22ad1bd4 100644 --- a/web2d/src/main/javascript/peer/svg/WorkspacePeer.js +++ b/web2d/src/main/javascript/peer/svg/WorkspacePeer.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/utils/EventUtils.js b/web2d/src/main/javascript/peer/utils/EventUtils.js index 1ef9a12f..2df86fef 100644 --- a/web2d/src/main/javascript/peer/utils/EventUtils.js +++ b/web2d/src/main/javascript/peer/utils/EventUtils.js @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/main/javascript/peer/utils/TransformUtils.js b/web2d/src/main/javascript/peer/utils/TransformUtils.js index 202a78cc..5e0603a4 100644 --- a/web2d/src/main/javascript/peer/utils/TransformUtils.js +++ b/web2d/src/main/javascript/peer/utils/TransformUtils.js @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/web2d/src/test/javascript/render/utils.js b/web2d/src/test/javascript/render/utils.js index 6ab74e05..687a7238 100755 --- a/web2d/src/test/javascript/render/utils.js +++ b/web2d/src/test/javascript/render/utils.js @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-editor/src/main/webapp/js/editor.js b/wise-editor/src/main/webapp/js/editor.js index 0bc95301..f937f0e0 100644 --- a/wise-editor/src/main/webapp/js/editor.js +++ b/wise-editor/src/main/webapp/js/editor.js @@ -1,5 +1,5 @@ /* - * Copyright [2011] [wisemapping] + * Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManager.java b/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManager.java index 9ceeee48..25c4815a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManager.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManager.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java index f23a7038..adb9ba88 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/UserManager.java b/wise-webapp/src/main/java/com/wisemapping/dao/UserManager.java index 772ef1d5..6e169473 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/UserManager.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/UserManager.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java index 415c3554..36f51bfe 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java index b3fbba89..adeddcba 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -27,7 +27,7 @@ public class AccessDeniedSecurityException public AccessDeniedSecurityException(@NotNull String msg) { - super(msg); + super(msg,Severity.FATAL); } @NotNull diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/ClientException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/ClientException.java index 35a8e239..0d60d1f7 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/ClientException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/ClientException.java @@ -6,8 +6,11 @@ import org.springframework.context.MessageSource; import java.util.Locale; abstract public class ClientException extends WiseMappingException { - public ClientException(@NotNull String message) { + private Severity severity; + + public ClientException(@NotNull String message, @NotNull Severity severity) { super(message); + this.severity = severity; } protected abstract @@ -17,4 +20,8 @@ abstract public class ClientException extends WiseMappingException { public String getMessage(@NotNull final MessageSource messageSource, final @NotNull Locale locale) { return messageSource.getMessage(this.getMsgBundleKey(), null, locale); } + + public Severity getSeverity() { + return this.severity; + } } diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java index e34c4781..0f350694 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/EditionSessionExpiredException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -27,7 +27,7 @@ public class EditionSessionExpiredException public EditionSessionExpiredException(@NotNull String msg) { - super(msg); + super(msg,Severity.INFO); } @NotNull diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/EmailNotExistsException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/EmailNotExistsException.java index 2faad932..43c31aa2 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/EmailNotExistsException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/EmailNotExistsException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/GoogleChromeFrameRequiredException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/GoogleChromeFrameRequiredException.java index 88394b29..06b1750e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/GoogleChromeFrameRequiredException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/GoogleChromeFrameRequiredException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/ImportUnexpectedException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/ImportUnexpectedException.java index ce0a67c0..ce2830bb 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/ImportUnexpectedException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/ImportUnexpectedException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java index dff6efe0..d2e2924e 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/LockException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -24,7 +24,7 @@ public class LockException extends ClientException { public LockException(@NotNull String message) { - super(message); + super(message,Severity.INFO); } @NotNull diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/MultipleSessionsOpenException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/MultipleSessionsOpenException.java index 7014001e..ff3a13c7 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/MultipleSessionsOpenException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/MultipleSessionsOpenException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -27,7 +27,7 @@ public class MultipleSessionsOpenException public MultipleSessionsOpenException(@NotNull String msg) { - super(msg); + super(msg,Severity.INFO); } @NotNull diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java index 392a5b90..c33bcd20 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/SessionExpiredException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -20,15 +20,17 @@ package com.wisemapping.exceptions; import com.wisemapping.model.Collaborator; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class SessionExpiredException - extends ClientException -{ + extends ClientException { public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED"; + @Nullable + private Collaborator lastUpdater; - public SessionExpiredException(@NotNull String msg,@NotNull Collaborator newEditor) - { - super(msg); + public SessionExpiredException(@Nullable Collaborator lastUpdater) { + super("Map has been updated by " + (lastUpdater != null ? lastUpdater.getEmail() : ""), Severity.FATAL); + this.lastUpdater = lastUpdater; } @NotNull diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/Severity.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/Severity.java new file mode 100644 index 00000000..1d02774c --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/Severity.java @@ -0,0 +1,25 @@ +/* +* Copyright [2012] [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.exceptions; + +public enum Severity { + INFO, + WARNING, + SEVERE, + FATAL +} diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/UnsupportedBrowserException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/UnsupportedBrowserException.java index 9cbc603e..198e6fbf 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/UnsupportedBrowserException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/UnsupportedBrowserException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/WiseMappingException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/WiseMappingException.java index 1ef3d07b..8bc9581e 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/WiseMappingException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/WiseMappingException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportException.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportException.java index 3bee3a3d..920824a3 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportFormat.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportFormat.java index 6ef65a11..7bc60eca 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportFormat.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportFormat.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java index 0e15c6c5..2026135b 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/Exporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/Exporter.java index 0e8c66ac..f2b86523 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/Exporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/Exporter.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the 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 e5ba98f9..6a473d75 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the 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 79ea6661..5b3da926 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/BrowserSupportInterceptor.java b/wise-webapp/src/main/java/com/wisemapping/filter/BrowserSupportInterceptor.java index ec25e574..eb1fda67 100644 --- a/wise-webapp/src/main/java/com/wisemapping/filter/BrowserSupportInterceptor.java +++ b/wise-webapp/src/main/java/com/wisemapping/filter/BrowserSupportInterceptor.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java b/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java index a187e920..adfe3954 100644 --- a/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java +++ b/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java index e237b032..076a9860 100644 --- a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java +++ b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java b/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java index 74728218..3db64877 100644 --- a/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java +++ b/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/ImportFormat.java b/wise-webapp/src/main/java/com/wisemapping/importer/ImportFormat.java index b9c9e716..24cd182e 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/ImportFormat.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/ImportFormat.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/Importer.java b/wise-webapp/src/main/java/com/wisemapping/importer/Importer.java index 85156237..fbae23e5 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/Importer.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/Importer.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/ImporterException.java b/wise-webapp/src/main/java/com/wisemapping/importer/ImporterException.java index 4b90a41c..6000ea75 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/ImporterException.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/ImporterException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/ImporterFactory.java b/wise-webapp/src/main/java/com/wisemapping/importer/ImporterFactory.java index c4f1a349..7542edf1 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/ImporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/ImporterFactory.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java b/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java index 8482b690..347a0d5d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.importer; import java.io.OutputStream; diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java b/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java index dd623e6d..1023b4bb 100644 --- a/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.importer; import java.util.*; diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindIconConverter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindIconConverter.java index b32c6a1c..1d6ccef0 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindIconConverter.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindIconConverter.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java index ab47ccca..d46b24ae 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the 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 7234fc86..c82ffa81 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/Mailer.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java index da6cb137..0ef7edfb 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/AccessAuditory.java b/wise-webapp/src/main/java/com/wisemapping/model/AccessAuditory.java index 939dc951..f72dd7fc 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/AccessAuditory.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/AccessAuditory.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java b/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java index 2a657e87..e9c5b982 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/CollaborationEmail.java b/wise-webapp/src/main/java/com/wisemapping/model/CollaborationEmail.java index 01afe38c..50b1547d 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/CollaborationEmail.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/CollaborationEmail.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/CollaborationProperties.java b/wise-webapp/src/main/java/com/wisemapping/model/CollaborationProperties.java index 23393c6a..bde2f1b2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/CollaborationProperties.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/CollaborationProperties.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/CollaborationRole.java b/wise-webapp/src/main/java/com/wisemapping/model/CollaborationRole.java index 3cad1fbc..f9c64398 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/CollaborationRole.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/CollaborationRole.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java b/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java index 2006ba40..b7c53d59 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Constants.java b/wise-webapp/src/main/java/com/wisemapping/model/Constants.java index 73492e98..c8d306ce 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/Constants.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Constants.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Font.java b/wise-webapp/src/main/java/com/wisemapping/model/Font.java index 9e14ace8..42ff8adf 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/Font.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Font.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java b/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java index 990dde63..e11abe2b 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindMapCriteria.java b/wise-webapp/src/main/java/com/wisemapping/model/MindMapCriteria.java index fd89a61e..173260c3 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindMapCriteria.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindMapCriteria.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindMapHistory.java b/wise-webapp/src/main/java/com/wisemapping/model/MindMapHistory.java index 4abaa99e..234c66fc 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindMapHistory.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindMapHistory.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java index 98a58e7d..af83c458 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcon.java b/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcon.java index 5fdd6b74..baea7a6e 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcon.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcon.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the 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 209c849e..b02f8fc7 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java b/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java index 3f84dfaf..0681807d 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/model/User.java b/wise-webapp/src/main/java/com/wisemapping/model/User.java index 4f350353..2b433ad7 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/User.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/User.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/ExtensionsController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/ExtensionsController.java index da57582e..81a0f550 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/ExtensionsController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/ExtensionsController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/LoginController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/LoginController.java index c34e7463..bfa4659e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/LoginController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/LoginController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java index dbae734f..4c7d4cca 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/PublicPagesController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/PublicPagesController.java index 4ee9a1d0..d267617f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/PublicPagesController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/PublicPagesController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java index 20f13c38..7ce07633 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java b/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java index 05bb6c82..d25d655a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java index 73bc1a85..d137025c 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java index 8b195ca5..1bf3ea6e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -20,6 +20,7 @@ package com.wisemapping.rest; import com.wisemapping.exceptions.ClientException; import com.wisemapping.exceptions.ImportUnexpectedException; +import com.wisemapping.exceptions.Severity; import com.wisemapping.mail.NotificationService; import com.wisemapping.model.User; import com.wisemapping.rest.model.RestErrors; @@ -59,7 +60,7 @@ public class BaseController { @ResponseBody public RestErrors handleClientErrors(@NotNull IllegalArgumentException ex) { ex.printStackTrace(); - return new RestErrors(ex.getMessage()); + return new RestErrors(ex.getMessage(), Severity.SEVERE); } @ExceptionHandler(Exception.class) @@ -101,7 +102,7 @@ public class BaseController { if (cause instanceof ClientException) { result = handleClientErrors((ClientException) cause); } else { - result = new RestErrors(ex.getMessage()); + result = new RestErrors(ex.getMessage(), Severity.INFO); } return result; } @@ -110,6 +111,6 @@ public class BaseController { @ResponseStatus(HttpStatus.BAD_REQUEST) public RestErrors handleClientErrors(@NotNull ClientException ex) { final Locale locale = LocaleContextHolder.getLocale(); - return new RestErrors(ex.getMessage(messageSource, locale)); + return new RestErrors(ex.getMessage(messageSource, locale),ex.getSeverity()); } } diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java b/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java index d3487ddf..13d90cbf 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.apache.commons.io.IOUtils; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/JsonHttpMessageNotReadableException.java b/wise-webapp/src/main/java/com/wisemapping/rest/JsonHttpMessageNotReadableException.java index db078f3c..c58ba70c 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/JsonHttpMessageNotReadableException.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/JsonHttpMessageNotReadableException.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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; class JsonHttpMessageNotReadableException extends org.springframework.http.converter.HttpMessageNotReadableException { diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index 5738aa15..e1ddb3fc 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -151,7 +151,7 @@ public class MindmapController extends BaseController { } // Could the map be updated ? - checkUpdate(mindmap, user, session, timestamp); + verifyLock(mindmap, user, session, timestamp); // Update collaboration properties ... final CollaborationProperties collaborationProperties = mindmap.findCollaborationProperties(user); @@ -174,30 +174,32 @@ public class MindmapController extends BaseController { return lockInfo.getTimestamp(); } - private void checkUpdate(@NotNull Mindmap mindmap, @NotNull User user, long session, long timestamp) throws WiseMappingException { - // The lock was lost, reclaim as the ownership of it. - final LockManager lockManager = mindmapService.getLockManager(); - final boolean lockLost = lockManager.isLocked(mindmap); - if (!lockLost) { - lockManager.lock(mindmap, user, session); - } + private void verifyLock(@NotNull Mindmap mindmap, @NotNull User user, long session, long timestamp) throws WiseMappingException { + throw new SessionExpiredException(user); - final LockInfo lockInfo = lockManager.getLockInfo(mindmap); - if (lockInfo.getCollaborator().equals(user)) { - final boolean outdated = mindmap.getLastModificationTime().getTimeInMillis() > timestamp; - if (lockInfo.getSession() == session) { - // Timestamp might not be returned to the client. This try to cover this case, ignoring the client timestamp check. - final User lastEditor = mindmap.getLastEditor(); - if (outdated && (lockInfo.getPreviousTimestamp() != timestamp || lastEditor == null || !lastEditor.equals(user))) { - throw new MultipleSessionsOpenException("The map has been updated and not by you. Session lost."); - } - } else if (outdated) { - throw new MultipleSessionsOpenException("The map has been updated and not by you. Session lost."); - } - } else { - throw new SessionExpiredException("You have lost the edition session", lockInfo.getCollaborator()); - - } +// // The lock was lost, reclaim as the ownership of it. +// final LockManager lockManager = mindmapService.getLockManager(); +// final boolean lockLost = lockManager.isLocked(mindmap); +// if (!lockLost) { +// lockManager.lock(mindmap, user, session); +// } +// +// final LockInfo lockInfo = lockManager.getLockInfo(mindmap); +// if (lockInfo.getCollaborator().equals(user)) { +// final boolean outdated = mindmap.getLastModificationTime().getTimeInMillis() > timestamp; +// if (lockInfo.getSession() == session) { +// // Timestamp might not be returned to the client. This try to cover this case, ignoring the client timestamp check. +// final User lastEditor = mindmap.getLastEditor(); +// if (outdated && (lockInfo.getPreviousTimestamp() != timestamp || lastEditor == null || !lastEditor.equals(user))) { +// throw new SessionExpiredException(lastEditor); +// } +// } else if (outdated) { +// throw new MultipleSessionsOpenException("The map has been updated and not by you. Session lost."); +// } +// } else { +// throw new SessionExpiredException(lockInfo.getCollaborator()); +// +// } } /** diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java index c9e4a87e..fb53e456 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/TransformerController.java b/wise-webapp/src/main/java/com/wisemapping/rest/TransformerController.java index 6fdfce86..ec250742 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/TransformerController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/TransformerController.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/ValidationException.java b/wise-webapp/src/main/java/com/wisemapping/rest/ValidationException.java index 4016ccd7..c21a0b3e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/ValidationException.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/ValidationException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaboration.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaboration.java index b9a9eab4..47c4724f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaboration.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaboration.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborationList.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborationList.java index 5c0614eb..8f5f4cab 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborationList.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborationList.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborator.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborator.java index 687e7262..910fc873 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborator.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestCollaborator.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; import com.wisemapping.model.Collaborator; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestErrors.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestErrors.java index c5e4ad96..d94b9e0b 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestErrors.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestErrors.java @@ -1,6 +1,24 @@ +/* +* Copyright [2012] [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.model; +import com.wisemapping.exceptions.Severity; import org.codehaus.jackson.annotate.JsonAutoDetect; import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonIgnoreProperties; @@ -35,6 +53,9 @@ public class RestErrors { @JsonIgnore MessageSource messageSource; + @JsonIgnore + Severity gSeverity; + public RestErrors() { } @@ -44,11 +65,13 @@ public class RestErrors { this.errors = errors; this.messageSource = messageSource; this.gErrors = this.processGlobalErrors(errors, messageSource); + this.gSeverity = Severity.WARNING; } - public RestErrors(@NotNull String errorMsg) { + public RestErrors(@NotNull String errorMsg, @NotNull Severity severity) { gErrors = new ArrayList(); gErrors.add(errorMsg); + this.gSeverity = severity; } private List processGlobalErrors(@NotNull Errors errors, @NotNull MessageSource messageSource) { @@ -84,5 +107,11 @@ public class RestErrors { // Implemented only for XML serialization contract ... } + public void setGlobalSeverity(@NotNull String severity) { + // Implemented only for XML serialization contract ... + } + public String getGlobalSeverity() { + return this.gSeverity.toString(); + } } diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLockInfo.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLockInfo.java index 0c0f21e4..7c635f16 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLockInfo.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLockInfo.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLogItem.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLogItem.java index 0796ba5f..16340061 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLogItem.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestLogItem.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java index 8df2c781..9d8225ea 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistory.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistory.java index f8422b84..64afc8e3 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistory.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistory.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistoryList.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistoryList.java index 465cd4ff..0f8078b4 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistoryList.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapHistoryList.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java index ed5e003c..1b3db88e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java index 4a2001ff..2c86d563 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestUser.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestUser.java index 3a817149..c88402e5 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestUser.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestUser.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.model; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/view/ImportTransformationView.java b/wise-webapp/src/main/java/com/wisemapping/rest/view/ImportTransformationView.java index 8bc58bdd..20dfc4a6 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/view/ImportTransformationView.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/view/ImportTransformationView.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java index bfeeaf49..64f8b5ea 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java b/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java index 04ef95b3..364a789f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/CustomPasswordEncoder.java b/wise-webapp/src/main/java/com/wisemapping/security/CustomPasswordEncoder.java index b10f0219..3e3751ae 100755 --- a/wise-webapp/src/main/java/com/wisemapping/security/CustomPasswordEncoder.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/CustomPasswordEncoder.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/UserDetails.java b/wise-webapp/src/main/java/com/wisemapping/security/UserDetails.java index cb09c68e..30530ad7 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/UserDetails.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/UserDetails.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java b/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java index 92dbf19a..0c1f1ab4 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/Utils.java b/wise-webapp/src/main/java/com/wisemapping/security/Utils.java index 97ae2904..ed826c3a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/Utils.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/Utils.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java b/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java index 2a6da5a8..3e8930fe 100755 --- a/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/aop/UpdateSecurityAdvise.java b/wise-webapp/src/main/java/com/wisemapping/security/aop/UpdateSecurityAdvise.java index 95c0b16a..4e562788 100755 --- a/wise-webapp/src/main/java/com/wisemapping/security/aop/UpdateSecurityAdvise.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/aop/UpdateSecurityAdvise.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java b/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java index 832e3195..7504d812 100755 --- a/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/CollaborationException.java b/wise-webapp/src/main/java/com/wisemapping/service/CollaborationException.java index 8adf3e16..0e459a7d 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/CollaborationException.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/CollaborationException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/HibernateAppListener.java b/wise-webapp/src/main/java/com/wisemapping/service/HibernateAppListener.java index 43604a86..3f25e2cb 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/HibernateAppListener.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/HibernateAppListener.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/HibernateUtil.java b/wise-webapp/src/main/java/com/wisemapping/service/HibernateUtil.java index 526c9f10..c76a5075 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/HibernateUtil.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/HibernateUtil.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/InvalidActivationCodeException.java b/wise-webapp/src/main/java/com/wisemapping/service/InvalidActivationCodeException.java index fca6c96d..9a7f48d9 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/InvalidActivationCodeException.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/InvalidActivationCodeException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/InvalidUserEmailException.java b/wise-webapp/src/main/java/com/wisemapping/service/InvalidUserEmailException.java index f47ad052..013691dd 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/InvalidUserEmailException.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/InvalidUserEmailException.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java b/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java index 56b0455a..e3cb76b8 100644 --- a/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockInfo.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java b/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java index 8c8859ad..78ad7ad6 100644 --- a/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockManager.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java index a9bcf4b5..1e7d7c5a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/LockManagerImpl.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java index 937fd1a3..b012c121 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java index 9a897712..8f8d1791 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/UserService.java b/wise-webapp/src/main/java/com/wisemapping/service/UserService.java index 19cde2e5..52d32752 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/UserService.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/UserService.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java index 7e111e95..26344abd 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java b/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java index 2197a71d..4c3c843a 100755 --- a/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java +++ b/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/util/ZipUtils.java b/wise-webapp/src/main/java/com/wisemapping/util/ZipUtils.java index 6413b02c..ca31852e 100755 --- a/wise-webapp/src/main/java/com/wisemapping/util/ZipUtils.java +++ b/wise-webapp/src/main/java/com/wisemapping/util/ZipUtils.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/validator/MapInfoValidator.java b/wise-webapp/src/main/java/com/wisemapping/validator/MapInfoValidator.java index 06d79430..e571df2e 100755 --- a/wise-webapp/src/main/java/com/wisemapping/validator/MapInfoValidator.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/MapInfoValidator.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the 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 c39f2575..fd1c5dd2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/validator/Messages.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/Messages.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the 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 82e5622b..0e58eff3 100644 --- a/wise-webapp/src/main/java/com/wisemapping/validator/UserValidator.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/UserValidator.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/validator/Utils.java b/wise-webapp/src/main/java/com/wisemapping/validator/Utils.java index 9909f6ec..3c4fbe29 100644 --- a/wise-webapp/src/main/java/com/wisemapping/validator/Utils.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/Utils.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/validator/ValidatorUtils.java b/wise-webapp/src/main/java/com/wisemapping/validator/ValidatorUtils.java index b12f2d96..597c3e70 100755 --- a/wise-webapp/src/main/java/com/wisemapping/validator/ValidatorUtils.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/ValidatorUtils.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/view/ChangePasswordBean.java b/wise-webapp/src/main/java/com/wisemapping/view/ChangePasswordBean.java index 1b666ba0..4a0bdaaa 100644 --- a/wise-webapp/src/main/java/com/wisemapping/view/ChangePasswordBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/ChangePasswordBean.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/view/CollaboratorBean.java b/wise-webapp/src/main/java/com/wisemapping/view/CollaboratorBean.java index 1b1b7648..f667617b 100755 --- a/wise-webapp/src/main/java/com/wisemapping/view/CollaboratorBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/CollaboratorBean.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java b/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java index bf5f0fda..47fb206e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/view/MindMapInfoBean.java b/wise-webapp/src/main/java/com/wisemapping/view/MindMapInfoBean.java index 247415a4..48d6f448 100644 --- a/wise-webapp/src/main/java/com/wisemapping/view/MindMapInfoBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/MindMapInfoBean.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/java/com/wisemapping/view/UserBean.java b/wise-webapp/src/main/java/com/wisemapping/view/UserBean.java index 9b6776cd..10d46cff 100644 --- a/wise-webapp/src/main/java/com/wisemapping/view/UserBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/UserBean.java @@ -1,5 +1,5 @@ /* -* Copyright [2011] [wisemapping] +* Copyright [2012] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index 9097bd5f..e8bf5ea9 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -249,7 +249,7 @@ DIRECT_LINK_EXPLANATION=Copy and paste the link below to share your map with col TEMPORAL_PASSWORD_SENT=Your temporal password has been sent TEMPORAL_PASSWORD_SENT_DETAILS=We've sent you an email that will allow you to reset your password. Please check your email now. TEMPORAL_PASSWORD_SENT_SUPPORT=If you have any problem receiving the email, contact us to support@wisemapping.com -MINDMAP_TIMESTAMP_OUTDATED=It's not possible to save your changes because your mindmap is out of date. Refresh the page and try again. +MINDMAP_TIMESTAMP_OUTDATED=It's not possible to save your changes because your mindmap has been modified by '%s'. Refresh the page and try again. diff --git a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java index 18890c86..12f4a1e7 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java @@ -1,3 +1,21 @@ +/* +* Copyright [2012] [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.test.rest; From 24b4f4b19033fb7ab97643d9fed9e7b774f34998 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 5 Oct 2012 20:05:33 -0300 Subject: [PATCH 6/6] Temporal commit. --- mindplot/pom.xml | 1 + .../main/javascript/LocalStorageManager.js | 3 +- .../src/main/javascript/PersistenceManager.js | 6 +- .../main/javascript/RestPersistenceManager.js | 21 ++- mindplot/src/main/javascript/widget/IMenu.js | 12 +- .../javascript/widget/ModalDialogNotifier.js | 123 ++++++++++-------- 6 files changed, 100 insertions(+), 66 deletions(-) diff --git a/mindplot/pom.xml b/mindplot/pom.xml index 53144cd4..69ffc0d9 100644 --- a/mindplot/pom.xml +++ b/mindplot/pom.xml @@ -195,6 +195,7 @@ collaboration/CollaborationManager.js collaboration/framework/AbstractCollaborativeFramework.js collaboration/framework/AbstractCollaborativeModelFactory.js + widget/ModalDialogNotifier.js widget/ToolbarNotifier.js widget/ToolbarItem.js widget/ToolbarPaneItem.js diff --git a/mindplot/src/main/javascript/LocalStorageManager.js b/mindplot/src/main/javascript/LocalStorageManager.js index 5156413c..1df06dfb 100644 --- a/mindplot/src/main/javascript/LocalStorageManager.js +++ b/mindplot/src/main/javascript/LocalStorageManager.js @@ -24,7 +24,7 @@ mindplot.LocalStorageManager = new Class({ saveMapXml:function (mapId, mapXml, pref, saveHistory, events) { localStorage.setItem(mapId + "-xml", mapXml); - events.onSuccess(); + events.onError({message:"It's not possible to save your changes because your mindmap has been modified by '%s'. Refresh the page and try again.", severity:"FATAL"}); }, discardChanges:function (mapId) { @@ -49,7 +49,6 @@ mindplot.LocalStorageManager = new Class({ if (xml == null) { throw new Error("Map could not be loaded"); } - } var parser = new DOMParser(); diff --git a/mindplot/src/main/javascript/PersistenceManager.js b/mindplot/src/main/javascript/PersistenceManager.js index 76caaf18..387a179d 100644 --- a/mindplot/src/main/javascript/PersistenceManager.js +++ b/mindplot/src/main/javascript/PersistenceManager.js @@ -44,10 +44,10 @@ mindplot.PersistenceManager = new Class({ var pref = JSON.encode(editorProperties); try { - this.saveMapXml(mapId, mapXml, pref, saveHistory, events,sync); + this.saveMapXml(mapId, mapXml, pref, saveHistory, events, sync); } catch (e) { console.log(e); - events.onError(); + events.onError(this._buildError()); } }, @@ -65,7 +65,7 @@ mindplot.PersistenceManager = new Class({ throw new Error("Method must be implemented"); }, - saveMapXml:function (mapId, mapXml, pref, saveHistory, events,sync) { + saveMapXml:function (mapId, mapXml, pref, saveHistory, events, sync) { throw new Error("Method must be implemented"); }, diff --git a/mindplot/src/main/javascript/RestPersistenceManager.js b/mindplot/src/main/javascript/RestPersistenceManager.js index 79842e32..82c0d2cd 100644 --- a/mindplot/src/main/javascript/RestPersistenceManager.js +++ b/mindplot/src/main/javascript/RestPersistenceManager.js @@ -55,7 +55,7 @@ mindplot.RESTPersistenceManager = new Class({ persistence.timestamp = responseText; }, onException:function (headerName, value) { - events.onError(); + events.onError(persistence._buildError()); }, onFailure:function (xhr) { var responseText = xhr.responseText; @@ -65,11 +65,12 @@ mindplot.RESTPersistenceManager = new Class({ if (contentType != null && contentType.indexOf("application/json") != -1) { try { error = JSON.decode(responseText); + events.onError(persistence._buildError(error)); } catch (e) { - throw "Unexpected error saving. Error response is not json object:" + responseText; + events.onError(persistence._buildError()); + throw new Error("Unexpected error saving. Error response is not json object:" + responseText); } } - events.onError(error); }, headers:{"Content-Type":"application/json", "Accept":"application/json"}, emulation:false, @@ -114,6 +115,20 @@ mindplot.RESTPersistenceManager = new Class({ urlEncoded:false }); request.put("false"); + }, + + _buildError:function (jsonSeverResponse) { + var message = jsonSeverResponse ? jsonSeverResponse.globalErrors[0] : null; + var severity = jsonSeverResponse ? jsonSeverResponse.globalSeverity : null; + + if (!message) { + message = $msg('SAVE_COULD_NOT_BE_COMPLETED'); + } + + if (!severity) { + severity = "INFO"; + } + return {severity:severity, message:message}; } } ); diff --git a/mindplot/src/main/javascript/widget/IMenu.js b/mindplot/src/main/javascript/widget/IMenu.js index 902a6f5b..3a79afb9 100644 --- a/mindplot/src/main/javascript/widget/IMenu.js +++ b/mindplot/src/main/javascript/widget/IMenu.js @@ -72,8 +72,6 @@ mindplot.widget.IMenu = new Class({ if (saveHistory) { $notify($msg('SAVING')); saveElem.setStyle('cursor', 'wait'); - } else { - console.log("Saving without history ..."); } // Call persistence manager for saving ... @@ -87,14 +85,16 @@ mindplot.widget.IMenu = new Class({ } menu.setRequireChange(false); }, + onError:function (error) { if (saveHistory) { saveElem.setStyle('cursor', 'pointer'); - var msg = error ? error.globalErrors : null; - if (!msg) { - msg = $msg('SAVE_COULD_NOT_BE_COMPLETED'); + + if (error.severity == "INFO") { + $notify(error.message); + } else { + $notifyModal(error.message); } - $notify(msg); } } }, sync); diff --git a/mindplot/src/main/javascript/widget/ModalDialogNotifier.js b/mindplot/src/main/javascript/widget/ModalDialogNotifier.js index 703dae98..b6fa4d23 100644 --- a/mindplot/src/main/javascript/widget/ModalDialogNotifier.js +++ b/mindplot/src/main/javascript/widget/ModalDialogNotifier.js @@ -16,68 +16,87 @@ * limitations under the License. */ -mindplot.widget.ToolbarNotifier = new Class({ - +mindplot.widget.ModalDialogNotifier = new Class({ + Extends:MooDialog, initialize:function () { - var container = $('headerNotifier'); - // In case of print,embedded no message is displayed .... - if (container) { - this._effect = new Fx.Elements(container, { - onComplete:function () { - container.setStyle('display', 'none'); - }.bind(this), - link:'cancel', - duration:8000, - transition:Fx.Transitions.Expo.easeInOut - }); - } + this.parent({ + closeButton:false, + destroyOnClose:true, + autoOpen:true, + useEscKey:false, + title:"", + onInitialize:function (wrapper) { + wrapper.setStyle('opacity', 0); + this.wrapper.setStyle('display', 'none'); + this.fx = new Fx.Morph(wrapper, { + duration:100, + transition:Fx.Transitions.Bounce.easeOut + }); + }, + + onBeforeOpen:function () { + var panel = this._buildPanel(); + this.setContent(panel); + + this.overlay = new Overlay(this.options.inject, { + duration:this.options.duration + }); + if (this.options.closeOnOverlayClick) + this.overlay.addEvent('click', this.close.bind(this)); + this.overlay.open(); + this.fx.start({ + 'margin-top':[-200, -100], + opacity:[0, 1] + }).chain(function () { + this.fireEvent('show'); + this.wrapper.setStyle('display', 'block'); + }.bind(this)); + }, + + onBeforeClose:function () { + this.fx.start({ + 'margin-top':[-100, 0], + opacity:0, + duration:200 + }).chain(function () { + this.wrapper.setStyle('display', 'none'); + this.fireEvent('hide'); + + }.bind(this)); + }} + ); + this.message = null; }, - logError:function (userMsg) { - this.logMessage(userMsg, mindplot.widget.ToolbarNotifier.MsgKind.ERROR); + show:function (message, title) { + $assert(message, "message can not be null"); + this._messsage = message; + this.options.title.setText($defined(title) ? title : "Outch!!. An unexpected error has occurred"); + this.open(); }, - hide:function () { - + destroy:function () { + this.parent(); + this.overlay.destroy(); }, - logMessage:function (msg, fade) { - $assert(msg, 'msg can not be null'); + _buildPanel:function () { + var result = new Element('div'); + result.setStyles({ + 'text-align':'center', + width:'400px' + }); + var p = new Element('p', {'text':this._messsage}); + p.inject(result); - var container = $('headerNotifier'); + var img = new Element('img', {'src':'images/alert-sign.png'}); + img.inject(result); - // In case of print,embedded no message is displayed .... - if (container) { - container.set('text', msg); - container.setStyle('display', 'block'); - container.position({ - relativeTo:$('header'), - position:'upperCenter', - edge:'centerTop' - }); - - if (!$defined(fade) || fade) { - this._effect.start({ - 0:{ - opacity:[1, 0] - } - }); - - } else { - container.setStyle('opacity', '1'); - this._effect.pause(); - } - } + return result; } - }); -mindplot.widget.ToolbarNotifier.MsgKind = { - INFO:1, - WARNING:2, - ERROR:3, - FATAL:4 -}; -var toolbarNotifier = new mindplot.widget.ToolbarNotifier(); -$notify = toolbarNotifier.logMessage.bind(toolbarNotifier); \ No newline at end of file +var dialogNotifier = new mindplot.widget.ModalDialogNotifier(); +$notifyModal = dialogNotifier.show.bind(dialogNotifier); +