From 4d3d8daa370e35e08208fc3294cee56fee4787d3 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Tue, 7 Jan 2014 16:56:56 -0300 Subject: [PATCH 01/62] fix wrong version of jetty-maven-plugin --- wise-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 5809f05d..3e479cd0 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -457,7 +457,7 @@ org.mortbay.jetty jetty-maven-plugin - 8.1.4.v20131031 + 8.1.14.v20131031 foo 9999 From 55ab430cfeafd05c42665ab8a0062261fd7231c3 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 8 Jan 2014 23:12:53 +0000 Subject: [PATCH 02/62] Fix compile documentation ... --- Compiling-and-running.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Compiling-and-running.md b/Compiling-and-running.md index 74a25a5c..b27f3ad7 100644 --- a/Compiling-and-running.md +++ b/Compiling-and-running.md @@ -4,12 +4,12 @@ The following products must be installed: - * Java Development Kit 6 or higher (http://java.sun.com/javase/downloads/index.jsp) + * Java Development Kit 7 or higher (http://www.oracle.com/technetwork/java/javase/downloads/index.html) * Maven 3.x or higher (http://maven.apache.org/) ## Compiling -WiseMapping uses Maven as packaging and project management. The project is composed of 4 maven sub-modules: +WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules: * core-js: Utilities JavaScript libraries * web2d: JavaScript 2D VML/SVG abstraction library used by the mind map editor @@ -17,7 +17,7 @@ WiseMapping uses Maven as packaging and project management. The project is compo * wise-editor: Mindmap Editor standalone distribution * wise-webapp: J2EE web application -Full compilation of the project can be done executing within : +The full compilation of the project can be performed executing within : `mvn package` @@ -26,9 +26,11 @@ Once this command is execute, the file /wise-webapp/target/wisemapp ## Testing The previously generated war can be deployed locally executing within the directory /wise-webapp the following command: -`mvn jetty:run-war` +`cd wise-webapp;mvn jetty:run-war` This will start the application on the URL: http://localhost:8080/wise-webapp/. Additionally, a file based database is automatically populated with a test user. User: test@wisemapping.org -Password: test \ No newline at end of file +Password: test + +Enjoy :) \ No newline at end of file From f8b25f949a2ca13356104748e912f8cebf59c660 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 8 Jan 2014 23:16:06 +0000 Subject: [PATCH 03/62] Compiling-and-running.md edited online with Bitbucket --- Compiling-and-running.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Compiling-and-running.md b/Compiling-and-running.md index b27f3ad7..53d0ab77 100644 --- a/Compiling-and-running.md +++ b/Compiling-and-running.md @@ -4,16 +4,16 @@ The following products must be installed: - * Java Development Kit 7 or higher (http://www.oracle.com/technetwork/java/javase/downloads/index.html) - * Maven 3.x or higher (http://maven.apache.org/) + * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) + * Maven 3.x or higher ([http://maven.apache.org/]) ## Compiling WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules: - * core-js: Utilities JavaScript libraries - * web2d: JavaScript 2D VML/SVG abstraction library used by the mind map editor - * mindplot: JavaScript mind map designer core + * core-js: Utilities JavaScript classes + * web2d: JavaScript 2D SVG abstraction library used by the mind map editor + * mindplot: JavaScript mindmap designer core * wise-editor: Mindmap Editor standalone distribution * wise-webapp: J2EE web application @@ -28,7 +28,7 @@ The previously generated war can be deployed locally executing within the direct `cd wise-webapp;mvn jetty:run-war` -This will start the application on the URL: http://localhost:8080/wise-webapp/. Additionally, a file based database is automatically populated with a test user. +This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user. User: test@wisemapping.org Password: test From 175b2f8921d4aa81dd43106b9ecfaf83666dc6b3 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 8 Jan 2014 23:18:24 +0000 Subject: [PATCH 04/62] Home.textile edited online with Bitbucket --- Home.textile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Home.textile b/Home.textile index f0bc4983..416bff08 100644 --- a/Home.textile +++ b/Home.textile @@ -18,5 +18,3 @@ We’re a couple of friends working on an idea: “Create the best on-line colla h1. [[Documentation]] h1. [[Compiling and Running]] - -h1. [[FAQ]] From fc6b573f8688a9aa5ef235412cba54774aa8e166 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 8 Jan 2014 23:21:30 +0000 Subject: [PATCH 05/62] README.md edited online with Bitbucket --- README.md | 106 ------------------------------------------------------ 1 file changed, 106 deletions(-) diff --git a/README.md b/README.md index 9e09b530..8ba8f48b 100644 --- a/README.md +++ b/README.md @@ -5,112 +5,6 @@ The goal of this project is to provide a high quality product that can be deployed by educational and academic institutions, private and public companies and anyone who needs to have a mindmapping application. WiseMapping is based on the same code source supporting WiseMapping.com. More info: www.wisemapping.org -## Compiling and Running - -### Prerequisites - -The following products must be installed: - -* Java Development Kit 7 or higher (http://java.sun.com/javase/downloads/index.jsp) -* Maven 2.2.1 or higher (http://maven.apache.org/) - -### Compiling - -WiseMapping uses Maven as packaging and project management. The project is composed of 4 maven sub-modules: - -* core-js: Utilities JavaScript libraries -* web2d: JavaScript 2D SVG abstraction library used by the mind map editor -* mindplot: JavaScript mind map designer core -* wise-webapp: J2EE web application - -Full compilation of the project can be done executing within : - -`mvn clean install` - -Once this command is execute, the file /wise-webapp/target/wisemapping.war will be generated. - -### Testing - -The previously generated war can be deployed locally executing within the directory /wise-webapp the following command: - -`mvn jetty:run` - -This will start the application on the URL: http://localhost:8080. Additionally, a file based database is automatically populated with a test user. - -User: test@wisemapping.org -Pass: test - - -## Running the JS only version - -Start by creating the .zip file: - -`mvn assembly:assembly -Dmaven.test.skip=true` - -To test the javascript frontend you then do: - - ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start' - -Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/ - -### Attaching drag and drop events. - -1) Support for dragging TextNodes: - -The following code is an example of how to add attach to the div dragImageNode the support for node dragging. - - $("dragTextNode").addEvent('mousedown', function(event) { - event.preventDefault(); - - // Create a image node ... - var mindmap = designer.getMindmap(); - var node = mindmap.createNode(); - node.setText("Node Text !!!!"); - node.setMetadata("{'media':'test'}"); - node.setShapeType(mindplot.model.TopicShape.RECTANGLE); - - // Add link ... - var link = node.createFeature(mindplot.TopicFeature.Link.id, {url:"http://www.wisemapping.com"}); - node.addFeature(link); - - // Add Note ... - var note = node.createFeature(mindplot.TopicFeature.Note.id, {text:"This is a note"}); - node.addFeature(note); - - designer.addDraggedNode(event, node); - }); - -In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need. - -2) Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode. - - $("dragImageNode").addEvent('mousedown', function(event) { - event.preventDefault(); - - // Create a image node ... - var mindmap = designer.getMindmap(); - var node = mindmap.createNode(); - node.setImageSize(80, 43); - node.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}"); - node.setImageUrl("images/logo-small.png"); - node.setShapeType(mindplot.model.TopicShape.IMAGE); - - designer.addDraggedNode(event, node); - }); - -The node.setShapeType(mindplot.model.TopicShape.IMAGE) defines a image node. This makes mandatory the set of setImageUrl and setImageSize properties in the node. - -3) An event registration mechanism for Image nodes edit events: The next snipped show how to register a custom edition handler. - - designer.addEvent("editnode", function(event) { - var node = event.model; - - alert("Node Id:" + node.getId()); - alert("Node Metadata:" + node.getMetadata()); - alert("Is Read Only:" + event.readOnly); - } }); - - ## Author From c87424ae809faa38d5bc169cd7c7f7cabb6de432 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 8 Jan 2014 23:28:21 +0000 Subject: [PATCH 06/62] Add compilation details temporally. --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8ba8f48b..1c1da813 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,52 @@ The goal of this project is to provide a high quality product that can be deployed by educational and academic institutions, private and public companies and anyone who needs to have a mindmapping application. WiseMapping is based on the same code source supporting WiseMapping.com. More info: www.wisemapping.org +# Compiling and Running -## Author +## Prerequisites + +The following products must be installed: + + * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) + * Maven 3.x or higher ([http://maven.apache.org/]) + +## Compiling + +WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules: + + * core-js: Utilities JavaScript classes + * web2d: JavaScript 2D SVG abstraction library used by the mind map editor + * mindplot: JavaScript mindmap designer core + * wise-editor: Mindmap Editor standalone distribution + * wise-webapp: J2EE web application + +The full compilation of the project can be performed executing within : + +`mvn package` + +Once this command is execute, the file /wise-webapp/target/wisemapping*.war will be generated. + +## Testing +The previously generated war can be deployed locally executing within the directory /wise-webapp the following command: + +`cd wise-webapp;mvn jetty:run-war` + +This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user. + +User: test@wisemapping.org +Password: test + +## Authors * Pablo Luna * Paulo Veiga +## Past Collaborators + + * Ignacio Manzano + * Nicolas Damonte + ## License The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”); -You may obtain a copy of the License at: http://www.wisemapping.org/license +You may obtain a copy of the License at: [https://wisemapping.atlassian.net/wiki/pages/viewpage.action?pageId=524357] From 5e4c1e4357c617b69666043c74257d2c17dee633 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 8 Jan 2014 23:33:00 +0000 Subject: [PATCH 07/62] Add compile information --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1c1da813..9cef7e88 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ -# WiseMapping Open Source -# Web Based Mindmapping Tool - ## Project Information The goal of this project is to provide a high quality product that can be deployed by educational and academic institutions, private and public companies and anyone who needs to have a mindmapping application. WiseMapping is based on the same code source supporting WiseMapping.com. More info: www.wisemapping.org @@ -45,12 +42,9 @@ Password: test * Pablo Luna * Paulo Veiga -## Past Collaborators - - * Ignacio Manzano - * Nicolas Damonte +Past Collaborators: Ignacio Manzano, Nicolas Damonte ## License The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”); -You may obtain a copy of the License at: [https://wisemapping.atlassian.net/wiki/pages/viewpage.action?pageId=524357] +You may obtain a copy of the License at: [https://wisemapping.atlassian.net/wiki/display/WS/License] From 94ac039390472c1ca57c5f0846b63aff0e98b215 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 9 Jan 2014 22:38:59 -0300 Subject: [PATCH 09/62] Bug WISE-16 fixed. Backed completed. --- .../wisemapping/rest/AccountController.java | 23 ++++++++++++++++++- .../com/wisemapping/rest/AdminController.java | 9 +++++++- .../wisemapping/service/UserServiceImpl.java | 13 ++++++++--- .../src/main/webapp/jsp/accountSettings.jsp | 23 +++++++++++++++++++ 4 files changed, 63 insertions(+), 5 deletions(-) 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 8a5bd969..6084fafb 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java @@ -18,7 +18,9 @@ package com.wisemapping.rest; +import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.mail.NotificationService; +import com.wisemapping.model.Collaboration; import com.wisemapping.model.Mindmap; import com.wisemapping.model.User; import com.wisemapping.rest.model.RestLogItem; @@ -31,9 +33,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; import javax.servlet.http.HttpServletRequest; +import java.util.List; @Controller public class AccountController extends BaseController { @@ -100,6 +106,21 @@ public class AccountController extends BaseController { userService.updateUser(user); } + @RequestMapping(method = RequestMethod.DELETE, value = "account", consumes = {"text/plain"}) + @ResponseStatus(value = HttpStatus.NO_CONTENT) + public void deleleteUser() throws WiseMappingException + + { + final User user = Utils.getUser(true); + final List collaborations = mindmapService.findCollaborations(user); + for (Collaboration collaboration : collaborations) { + final Mindmap mindmap = collaboration.getMindMap(); + mindmapService.removeMindmap(mindmap,user); + } + userService.deleteUser(user); + } + + @RequestMapping(method = RequestMethod.POST, value = "logger/editor", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void logError(@RequestBody RestLogItem item, @NotNull HttpServletRequest request) { 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 8cbdd537..c6688255 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -117,11 +117,18 @@ public class AdminController extends BaseController { @RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}", consumes = {"text/plain"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void getUserByEmail(@PathVariable long id) throws WiseMappingException { + public void deleteUserByEmail(@PathVariable long id) throws WiseMappingException { final User user = userService.getUserBy(id); if (user == null) { throw new IllegalArgumentException("User '" + id + "' could not be found"); } + + final List collaborations = mindmapService.findCollaborations(user); + for (Collaboration collaboration : collaborations) { + final Mindmap mindmap = collaboration.getMindMap(); + mindmapService.removeMindmap(mindmap,user); + } + userService.deleteUser(user); } 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 2842f6f8..6364d3a7 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java @@ -21,7 +21,11 @@ package com.wisemapping.service; import com.wisemapping.dao.UserManager; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.mail.NotificationService; -import com.wisemapping.model.*; +import com.wisemapping.model.AccessAuditory; +import com.wisemapping.model.AuthenticationType; +import com.wisemapping.model.Collaborator; +import com.wisemapping.model.Mindmap; +import com.wisemapping.model.User; import org.apache.velocity.app.VelocityEngine; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -29,8 +33,11 @@ import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.ui.velocity.VelocityEngineUtils; -import java.io.IOException; -import java.util.*; +import java.util.Calendar; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.UUID; public class UserServiceImpl implements UserService { diff --git a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp index 5c1bf789..268caa07 100755 --- a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp +++ b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp @@ -88,6 +88,18 @@ +
+
+
+
+
+ + + "/> +
+
+
@@ -95,6 +107,7 @@ $('#changePasswordMsg').hide(); $('#changeInfoMsg').hide(); $('#languageMsg').hide(); + $('#deleteAccountMsg').hide(); function postChange(url, postBody, msgContainerId, successMsg) { // Change success message ... @@ -144,4 +157,14 @@ postChange("c/restful/account/locale", locale, 'languageMsg', ""); event.preventDefault(); }); + + $('#deleteAccountForm').submit(function (event) { + + var locale = $('#deleteAccountForm option:selected').val(); + + postChange("c/restful/account/locale", locale, 'languageMsg', ""); + event.preventDefault(); + }); + + From 9a77ff3bb86ff55ac603a02399d7435fe821dae9 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 9 Jan 2014 22:38:59 -0300 Subject: [PATCH 10/62] Bug WISE-16 fixed. Backed completed. --- .../wisemapping/rest/AccountController.java | 23 ++++++++++++++++++- .../com/wisemapping/rest/AdminController.java | 9 +++++++- .../wisemapping/service/UserServiceImpl.java | 13 ++++++++--- .../src/main/webapp/jsp/accountSettings.jsp | 23 +++++++++++++++++++ 4 files changed, 63 insertions(+), 5 deletions(-) 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 8a5bd969..6084fafb 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java @@ -18,7 +18,9 @@ package com.wisemapping.rest; +import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.mail.NotificationService; +import com.wisemapping.model.Collaboration; import com.wisemapping.model.Mindmap; import com.wisemapping.model.User; import com.wisemapping.rest.model.RestLogItem; @@ -31,9 +33,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; import javax.servlet.http.HttpServletRequest; +import java.util.List; @Controller public class AccountController extends BaseController { @@ -100,6 +106,21 @@ public class AccountController extends BaseController { userService.updateUser(user); } + @RequestMapping(method = RequestMethod.DELETE, value = "account", consumes = {"text/plain"}) + @ResponseStatus(value = HttpStatus.NO_CONTENT) + public void deleleteUser() throws WiseMappingException + + { + final User user = Utils.getUser(true); + final List collaborations = mindmapService.findCollaborations(user); + for (Collaboration collaboration : collaborations) { + final Mindmap mindmap = collaboration.getMindMap(); + mindmapService.removeMindmap(mindmap,user); + } + userService.deleteUser(user); + } + + @RequestMapping(method = RequestMethod.POST, value = "logger/editor", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void logError(@RequestBody RestLogItem item, @NotNull HttpServletRequest request) { 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 8cbdd537..c6688255 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -117,11 +117,18 @@ public class AdminController extends BaseController { @RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}", consumes = {"text/plain"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void getUserByEmail(@PathVariable long id) throws WiseMappingException { + public void deleteUserByEmail(@PathVariable long id) throws WiseMappingException { final User user = userService.getUserBy(id); if (user == null) { throw new IllegalArgumentException("User '" + id + "' could not be found"); } + + final List collaborations = mindmapService.findCollaborations(user); + for (Collaboration collaboration : collaborations) { + final Mindmap mindmap = collaboration.getMindMap(); + mindmapService.removeMindmap(mindmap,user); + } + userService.deleteUser(user); } 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 2842f6f8..6364d3a7 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java @@ -21,7 +21,11 @@ package com.wisemapping.service; import com.wisemapping.dao.UserManager; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.mail.NotificationService; -import com.wisemapping.model.*; +import com.wisemapping.model.AccessAuditory; +import com.wisemapping.model.AuthenticationType; +import com.wisemapping.model.Collaborator; +import com.wisemapping.model.Mindmap; +import com.wisemapping.model.User; import org.apache.velocity.app.VelocityEngine; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -29,8 +33,11 @@ import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.ui.velocity.VelocityEngineUtils; -import java.io.IOException; -import java.util.*; +import java.util.Calendar; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.UUID; public class UserServiceImpl implements UserService { diff --git a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp index 5c1bf789..268caa07 100755 --- a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp +++ b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp @@ -88,6 +88,18 @@ +
+
+
+
+
+ + + "/> +
+
+
@@ -95,6 +107,7 @@ $('#changePasswordMsg').hide(); $('#changeInfoMsg').hide(); $('#languageMsg').hide(); + $('#deleteAccountMsg').hide(); function postChange(url, postBody, msgContainerId, successMsg) { // Change success message ... @@ -144,4 +157,14 @@ postChange("c/restful/account/locale", locale, 'languageMsg', ""); event.preventDefault(); }); + + $('#deleteAccountForm').submit(function (event) { + + var locale = $('#deleteAccountForm option:selected').val(); + + postChange("c/restful/account/locale", locale, 'languageMsg', ""); + event.preventDefault(); + }); + + From a2db34ae6166fa19fc4869bc0abd26e2576736be Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 10 Jan 2014 00:21:21 -0300 Subject: [PATCH 11/62] Revert "Bug WISE-16 fixed. Backed completed." This reverts commit 9a77ff3bb86ff55ac603a02399d7435fe821dae9. --- .../wisemapping/rest/AccountController.java | 23 +------------------ .../com/wisemapping/rest/AdminController.java | 9 +------- .../wisemapping/service/UserServiceImpl.java | 13 +++-------- .../src/main/webapp/jsp/accountSettings.jsp | 23 ------------------- 4 files changed, 5 insertions(+), 63 deletions(-) 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 6084fafb..8a5bd969 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java @@ -18,9 +18,7 @@ package com.wisemapping.rest; -import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.mail.NotificationService; -import com.wisemapping.model.Collaboration; import com.wisemapping.model.Mindmap; import com.wisemapping.model.User; import com.wisemapping.rest.model.RestLogItem; @@ -33,13 +31,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; -import java.util.List; @Controller public class AccountController extends BaseController { @@ -106,21 +100,6 @@ public class AccountController extends BaseController { userService.updateUser(user); } - @RequestMapping(method = RequestMethod.DELETE, value = "account", consumes = {"text/plain"}) - @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void deleleteUser() throws WiseMappingException - - { - final User user = Utils.getUser(true); - final List collaborations = mindmapService.findCollaborations(user); - for (Collaboration collaboration : collaborations) { - final Mindmap mindmap = collaboration.getMindMap(); - mindmapService.removeMindmap(mindmap,user); - } - userService.deleteUser(user); - } - - @RequestMapping(method = RequestMethod.POST, value = "logger/editor", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void logError(@RequestBody RestLogItem item, @NotNull HttpServletRequest request) { 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 c6688255..8cbdd537 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -117,18 +117,11 @@ public class AdminController extends BaseController { @RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}", consumes = {"text/plain"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void deleteUserByEmail(@PathVariable long id) throws WiseMappingException { + public void getUserByEmail(@PathVariable long id) throws WiseMappingException { final User user = userService.getUserBy(id); if (user == null) { throw new IllegalArgumentException("User '" + id + "' could not be found"); } - - final List collaborations = mindmapService.findCollaborations(user); - for (Collaboration collaboration : collaborations) { - final Mindmap mindmap = collaboration.getMindMap(); - mindmapService.removeMindmap(mindmap,user); - } - userService.deleteUser(user); } 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 6364d3a7..2842f6f8 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/UserServiceImpl.java @@ -21,11 +21,7 @@ package com.wisemapping.service; import com.wisemapping.dao.UserManager; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.mail.NotificationService; -import com.wisemapping.model.AccessAuditory; -import com.wisemapping.model.AuthenticationType; -import com.wisemapping.model.Collaborator; -import com.wisemapping.model.Mindmap; -import com.wisemapping.model.User; +import com.wisemapping.model.*; import org.apache.velocity.app.VelocityEngine; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -33,11 +29,8 @@ import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.ui.velocity.VelocityEngineUtils; -import java.util.Calendar; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.util.UUID; +import java.io.IOException; +import java.util.*; public class UserServiceImpl implements UserService { diff --git a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp index 268caa07..5c1bf789 100755 --- a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp +++ b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp @@ -88,18 +88,6 @@ -
-
-
-
-
- - - "/> -
-
-
@@ -107,7 +95,6 @@ $('#changePasswordMsg').hide(); $('#changeInfoMsg').hide(); $('#languageMsg').hide(); - $('#deleteAccountMsg').hide(); function postChange(url, postBody, msgContainerId, successMsg) { // Change success message ... @@ -157,14 +144,4 @@ postChange("c/restful/account/locale", locale, 'languageMsg', ""); event.preventDefault(); }); - - $('#deleteAccountForm').submit(function (event) { - - var locale = $('#deleteAccountForm option:selected').val(); - - postChange("c/restful/account/locale", locale, 'languageMsg', ""); - event.preventDefault(); - }); - - From 80dfab3ef44d86a8d26b41919c63869868be62dd Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 12 Jan 2014 02:17:42 -0300 Subject: [PATCH 12/62] Bug WISE-22 fixed. Resolve resize node issue. --- web2d/src/main/javascript/peer/svg/TextPeer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web2d/src/main/javascript/peer/svg/TextPeer.js b/web2d/src/main/javascript/peer/svg/TextPeer.js index 24fb8ba9..538a5bd5 100644 --- a/web2d/src/main/javascript/peer/svg/TextPeer.js +++ b/web2d/src/main/javascript/peer/svg/TextPeer.js @@ -156,16 +156,20 @@ web2d.peer.svg.TextPeer = new Class({ var computedWidth; // Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround try { + computedWidth = this._native.getBBox().width; // Chrome bug is producing this error, oly during page loading. Remove the hack if it works. The issue seems to be - // caused when the element is hidden. + // caused when the element is hidden. I don't know why, but it works ... if(computedWidth==0){ - computedWidth = getBoundingClientRect().width - 35; + var bbox = this._native.getBBox(); + computedWidth = bbox.width; } } catch(e) { computedWidth = 10; + } + console.log("Final result:"+computedWidth); var width = parseInt(computedWidth); width = width + this._font.getWidthMargin(); From 63c063933d2b4edde6eedf2ee92fff8110dc61f2 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 12 Jan 2014 02:17:42 -0300 Subject: [PATCH 13/62] Q! Bug WISE-22 fixed. Resolve resize node issue. --- distribution/package-src.sh | 32 ------------------- .../src/main/javascript/peer/svg/TextPeer.js | 8 +++-- 2 files changed, 6 insertions(+), 34 deletions(-) delete mode 100755 distribution/package-src.sh diff --git a/distribution/package-src.sh b/distribution/package-src.sh deleted file mode 100755 index 505a4bb4..00000000 --- a/distribution/package-src.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -set -e -set -u - -WISE_VERSION=$1 -TMP_DIR=/tmp/wise-src/wisemapping-src -TAR_FILE_NAME=wisemapping-${WISE_VERSION}-src.tar.gz -OUTPUT_DIR=`pwd`"/target" -OUTPUT_FILE=${OUTPUT_DIR}/${TAR_FILE_NAME} - - -# Clean all. -cd .. -rm -rf ${TMP_DIR}/../ -mvn clean - -# Prepare copy -mkdir -p ${TMP_DIR} -rsync -aCv --exclude ".git" --exclude "wisemapping.i*" --exclude "**/*/Brix*" --exclude "**/brix" --exclude "*/*.iml" --exclude "*/wisemapping.log*" --exclude "**/.DS_Store" --exclude "*.textile" --exclude "**/.gitignore" --exclude "installer" --exclude "*/target" . ${TMP_DIR} - -# Zip file -[ ! -e ${OUTPUT_DIR} ] && mkdir ${OUTPUT_DIR} -rm -f ${OUTPUT_FILE} - -cd ${TMP_DIR}/.. -tar -cvzf ${OUTPUT_FILE} . - -echo -echo "#################################################################" -echo "Zip file generated on:"${OUTPUT_FILE} -echo "#################################################################" diff --git a/web2d/src/main/javascript/peer/svg/TextPeer.js b/web2d/src/main/javascript/peer/svg/TextPeer.js index 24fb8ba9..538a5bd5 100644 --- a/web2d/src/main/javascript/peer/svg/TextPeer.js +++ b/web2d/src/main/javascript/peer/svg/TextPeer.js @@ -156,16 +156,20 @@ web2d.peer.svg.TextPeer = new Class({ var computedWidth; // Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround try { + computedWidth = this._native.getBBox().width; // Chrome bug is producing this error, oly during page loading. Remove the hack if it works. The issue seems to be - // caused when the element is hidden. + // caused when the element is hidden. I don't know why, but it works ... if(computedWidth==0){ - computedWidth = getBoundingClientRect().width - 35; + var bbox = this._native.getBBox(); + computedWidth = bbox.width; } } catch(e) { computedWidth = 10; + } + console.log("Final result:"+computedWidth); var width = parseInt(computedWidth); width = width + this._font.getWidthMargin(); From a50a96492f57288eb06e25c871267caeb541c8a8 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sun, 12 Jan 2014 05:54:43 +0000 Subject: [PATCH 14/62] Fix jetty download. --- distribution/package-bin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/package-bin.sh b/distribution/package-bin.sh index b1dd9321..97f4e87a 100755 --- a/distribution/package-bin.sh +++ b/distribution/package-bin.sh @@ -8,7 +8,7 @@ BASE_DIR=`pwd` TARGET_DIR=$BASE_DIR/target JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping -JETTY_VERSION=8.1.8.v20121106 +JETTY_VERSION=8.1.14.v20131031 JETTY_DIST_DIR=jetty-distribution-${JETTY_VERSION} JETTY_ZIP=${JETTY_DIST_DIR}.zip From 22c102917e29abd3e1380ad0de6bf09913c8a30f Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 12 Jan 2014 22:53:42 -0300 Subject: [PATCH 15/62] Fix failing uning tests ... --- config/database/hsql/atest-data.sql | 6 +++--- .../java/com/wisemapping/rest/AdminController.java | 2 +- .../com/wisemapping/test/rest/RestAdminITCase.java | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/database/hsql/atest-data.sql b/config/database/hsql/atest-data.sql index e3eeefbf..746ec7ae 100644 --- a/config/database/hsql/atest-data.sql +++ b/config/database/hsql/atest-data.sql @@ -2,9 +2,9 @@ INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURDATE(), 1,'D'); -INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURDATE(),authentication_type); -INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,"D") - VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1); +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURDATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1,'D'); COMMIT; 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 8cbdd537..f9e3a696 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -115,7 +115,7 @@ public class AdminController extends BaseController { userService.changePassword(user); } - @RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}", consumes = {"text/plain"}) + @RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}") @ResponseStatus(value = HttpStatus.NO_CONTENT) public void getUserByEmail(@PathVariable long id) throws WiseMappingException { final User user = userService.getUserBy(id); 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 12f4a1e7..9e30855c 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 @@ -107,11 +107,11 @@ public class RestAdminITCase { // Check that the user has been created ... ResponseEntity result = findUser(requestHeaders, templateRest, location); - assertEquals(result.getBody(), restUser, "Returned object object seems not be the same."); + assertEquals(result.getBody().getEmail(), restUser.getEmail(), "Returned object object seems not be the same."); // Find by email and check ... result = findUserByEmail(requestHeaders, templateRest, restUser.getEmail()); - assertEquals(result.getBody(), restUser, "Returned object object seems not be the same."); + assertEquals(result.getBody().getEmail(), restUser.getEmail(), "Returned object object seems not be the same."); return restUser.getEmail(); } @@ -144,10 +144,10 @@ public class RestAdminITCase { List acceptableMediaTypes = new ArrayList(); acceptableMediaTypes.add(mediaType); - final HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.setAccept(acceptableMediaTypes); - requestHeaders.setContentType(mediaType); - return requestHeaders; + final HttpHeaders result = new HttpHeaders(); + result.setAccept(acceptableMediaTypes); + result.setContentType(mediaType); + return result; } private RestTemplate createTemplate() { From abede3c0104c7b5e496faa0dd9fc216052922990 Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 19 Jan 2014 12:32:02 -0300 Subject: [PATCH 16/62] add if exists to hsql statements --- config/database/hsql/drop-schemas.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/database/hsql/drop-schemas.sql b/config/database/hsql/drop-schemas.sql index cf40ac87..a0de242f 100644 --- a/config/database/hsql/drop-schemas.sql +++ b/config/database/hsql/drop-schemas.sql @@ -1,9 +1,9 @@ -DROP TABLE ACCESS_AUDITORY; -DROP TABLE TAG; -DROP TABLE COLLABORATION; -DROP TABLE COLLABORATION_PROPERTIES; -DROP TABLE MINDMAP_HISTORY; -DROP TABLE MINDMAP; -DROP TABLE USER; -DROP TABLE COLLABORATOR; +DROP TABLE IF EXISTS ACCESS_AUDITORY; +DROP TABLE IF EXISTS TAG; +DROP TABLE IF EXISTS COLLABORATION; +DROP TABLE IF EXISTS COLLABORATION_PROPERTIES; +DROP TABLE IF EXISTS MINDMAP_HISTORY; +DROP TABLE IF EXISTS MINDMAP; +DROP TABLE IF EXISTS USER; +DROP TABLE IF EXISTS COLLABORATOR; COMMIT; From f20b3a7a4644ccb972f8e30625110677e21cd114 Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 19 Jan 2014 12:32:23 -0300 Subject: [PATCH 17/62] add if not exists to mysql database creation --- config/database/mysql/create-database.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database/mysql/create-database.sql b/config/database/mysql/create-database.sql index 32203224..a31b97ca 100644 --- a/config/database/mysql/create-database.sql +++ b/config/database/mysql/create-database.sql @@ -1,4 +1,4 @@ -CREATE DATABASE wisemapping +CREATE DATABASE IF NOT EXISTS wisemapping CHARACTER SET = 'utf8' COLLATE = 'utf8_unicode_ci'; CREATE USER 'wisemapping'@'localhost' From 7eda354f8f57ca8c2de44664c17453e4680b75fb Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 19 Jan 2014 12:32:50 -0300 Subject: [PATCH 18/62] select database wisemapping in mysql tables creation --- config/database/mysql/create-schemas.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/database/mysql/create-schemas.sql b/config/database/mysql/create-schemas.sql index 97e62c74..4e26a3fc 100644 --- a/config/database/mysql/create-schemas.sql +++ b/config/database/mysql/create-schemas.sql @@ -1,3 +1,5 @@ +USE wisemapping; + CREATE TABLE COLLABORATOR ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, email VARCHAR(255) From c6aed4bf6e8c0f8917be05e1915477af7d10e024 Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 19 Jan 2014 12:33:08 -0300 Subject: [PATCH 19/62] add if exists to mysql statements --- config/database/mysql/drop-schemas.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/database/mysql/drop-schemas.sql b/config/database/mysql/drop-schemas.sql index a6bfa760..6a5af0e5 100644 --- a/config/database/mysql/drop-schemas.sql +++ b/config/database/mysql/drop-schemas.sql @@ -1,9 +1,9 @@ -DROP TABLE TAG; -DROP TABLE ACCESS_AUDITORY; -DROP TABLE COLLABORATION; -DROP TABLE COLLABORATION_PROPERTIES; -DROP TABLE MINDMAP_HISTORY; -DROP TABLE MINDMAP; -DROP TABLE USER; -DROP TABLE COLLABORATOR; +DROP TABLE IF EXISTS TAG; +DROP TABLE IF EXISTS ACCESS_AUDITORY; +DROP TABLE IF EXISTS COLLABORATION; +DROP TABLE IF EXISTS COLLABORATION_PROPERTIES; +DROP TABLE IF EXISTS MINDMAP_HISTORY; +DROP TABLE IF EXISTS MINDMAP; +DROP TABLE IF EXISTS USER; +DROP TABLE IF EXISTS COLLABORATOR; COMMIT; \ No newline at end of file From 3828a1afdb9f5abc556202f02159f0415116f3a4 Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 19 Jan 2014 12:33:39 -0300 Subject: [PATCH 20/62] fix mysql test-data statements --- config/database/mysql/test-data.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/database/mysql/test-data.sql b/config/database/mysql/test-data.sql index 6301d7af..960fe536 100644 --- a/config/database/mysql/test-data.sql +++ b/config/database/mysql/test-data.sql @@ -3,8 +3,8 @@ INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D'); INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURRENT_DATE()); -INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type,'D') - VALUES (2, 'Admin', 'User', 'admin', 1237, CURRENT_DATE(), 1); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (2, 'Admin', 'User', 'admin', 1237, CURRENT_DATE(), 1, 'D'); COMMIT; From 541d07c46cacea0a41999e610119ad093dcdbbe6 Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 19 Jan 2014 12:33:56 -0300 Subject: [PATCH 21/62] creating mysql and hsql maven profiles --- wise-webapp/pom.xml | 143 ++++++++++++++++++++++++++++++-------------- 1 file changed, 97 insertions(+), 46 deletions(-) diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 3e479cd0..44322a5b 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -320,54 +320,105 @@ 1.7.1 + + + hsqldb + + true + + + + + org.codehaus.mojo + sql-maven-plugin + 1.5 + + + org.hsqldb.jdbc.JDBCDriver + jdbc:hsqldb:file:${project.build.directory}/db/wisemapping + sa + + + + + org.hsqldb + hsqldb + 2.2.8 + + + + + + + drop-schemas + prepare-package + + execute + + + continue + descending + + ${project.basedir} + + config/database/hsql/drop-schemas.sql + config/database/hsql/create-schemas.sql + config/database/hsql/atest-data.sql + + + + + + + + + + + mysqldb + + false + + + + + org.codehaus.mojo + sql-maven-plugin + 1.5 + + + mysql + mysql-connector-java + 5.1.5 + + + + + init-schema + + execute + + prepare-package + + + + com.mysql.jdbc.Driver + root + + jdbc:mysql://127.0.0.1:3306/?useUnicode=true&characterEncoding=UTF-8 + false + + config/database/mysql/create-database.sql + config/database/mysql/create-schemas.sql + config/database/mysql/test-data.sql + + + + + + + - - org.codehaus.mojo - sql-maven-plugin - 1.5 - - - org.hsqldb.jdbc.JDBCDriver - jdbc:hsqldb:file:${project.build.directory}/db/wisemapping - sa - - - - - mysql - mysql-connector-java - 5.1.5 - - - org.hsqldb - hsqldb - 2.2.8 - - - - - - drop-schemas - prepare-package - - execute - - - continue - descending - - ${project.basedir} - - config/database/hsql/drop-schemas.sql - config/database/hsql/create-schemas.sql - config/database/hsql/atest-data.sql - - - - - - org.codehaus.mojo native2ascii-maven-plugin From 2e24032d1c10238e4986727c4c7372c531554c8b Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 19 Jan 2014 12:39:42 -0300 Subject: [PATCH 22/62] fix mysql database and user creation --- config/database/mysql/create-database.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/database/mysql/create-database.sql b/config/database/mysql/create-database.sql index a31b97ca..52a7cd2f 100644 --- a/config/database/mysql/create-database.sql +++ b/config/database/mysql/create-database.sql @@ -1,6 +1,7 @@ +DROP DATABASE IF EXISTS wisemapping; + CREATE DATABASE IF NOT EXISTS wisemapping CHARACTER SET = 'utf8' COLLATE = 'utf8_unicode_ci'; -CREATE USER 'wisemapping'@'localhost' - IDENTIFIED BY 'password'; GRANT ALL ON wisemapping.* TO 'wisemapping'@'localhost'; +SET PASSWORD FOR 'wisemapping'@'localhost' = PASSWORD('password'); \ No newline at end of file From 9639b9e113fae05257a54531c6e6fa604b9e6662 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sun, 19 Jan 2014 18:21:18 -0300 Subject: [PATCH 23/62] adding missing info to README.md --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/README.md b/README.md index 9cef7e88..2638a159 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,76 @@ This will start the application on the URL: [http://localhost:8080/wise-webapp/] User: test@wisemapping.org Password: test +## Running the JS only version + +Start by creating the .zip file: + +`mvn assembly:assembly -Dmaven.test.skip=true` + +To test the javascript frontend you then do: + + ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start' + +Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/ + +### Attaching drag and drop events. + +1) Support for dragging TextNodes: + +The following code is an example of how to add attach to the div dragImageNode the support for node dragging. + + $("dragTextNode").addEvent('mousedown', function(event) { + event.preventDefault(); + + // Create a image node ... + var mindmap = designer.getMindmap(); + var node = mindmap.createNode(); + node.setText("Node Text !!!!"); + node.setMetadata("{'media':'test'}"); + node.setShapeType(mindplot.model.TopicShape.RECTANGLE); + + // Add link ... + var link = node.createFeature(mindplot.TopicFeature.Link.id, {url:"http://www.wisemapping.com"}); + node.addFeature(link); + + // Add Note ... + var note = node.createFeature(mindplot.TopicFeature.Note.id, {text:"This is a note"}); + node.addFeature(note); + + designer.addDraggedNode(event, node); + }); + +In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need. + +2) Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode. + + $("dragImageNode").addEvent('mousedown', function(event) { + event.preventDefault(); + + // Create a image node ... + var mindmap = designer.getMindmap(); + var node = mindmap.createNode(); + node.setImageSize(80, 43); + node.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}"); + node.setImageUrl("images/logo-small.png"); + node.setShapeType(mindplot.model.TopicShape.IMAGE); + + designer.addDraggedNode(event, node); + }); + +The node.setShapeType(mindplot.model.TopicShape.IMAGE) defines a image node. This makes mandatory the set of setImageUrl and setImageSize properties in the node. + +3) An event registration mechanism for Image nodes edit events: The next snipped show how to register a custom edition handler. + + designer.addEvent("editnode", function(event) { + var node = event.model; + + alert("Node Id:" + node.getId()); + alert("Node Metadata:" + node.getMetadata()); + alert("Is Read Only:" + event.readOnly); + } }); + + ## Authors * Pablo Luna From 242827f7e6ba507709b0e4900dfd075a228c5cec Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sun, 19 Jan 2014 18:21:38 -0300 Subject: [PATCH 24/62] updating jetty plugin on pom --- wise-editor/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wise-editor/pom.xml b/wise-editor/pom.xml index a7972f77..9f6efa4f 100644 --- a/wise-editor/pom.xml +++ b/wise-editor/pom.xml @@ -31,8 +31,8 @@ org.mortbay.jetty - maven-jetty-plugin - 6.1.26 + jetty-maven-plugin + 8.1.14.v20131031 From 9d2cf7e1ffcbadc212adde508a34a5f816d3ea16 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sun, 19 Jan 2014 18:22:13 -0300 Subject: [PATCH 25/62] remove wrong js file on standalone-editor.xml --- distribution/assembly/standalone-editor.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/distribution/assembly/standalone-editor.xml b/distribution/assembly/standalone-editor.xml index 53ee6976..39f278c9 100644 --- a/distribution/assembly/standalone-editor.xml +++ b/distribution/assembly/standalone-editor.xml @@ -6,7 +6,7 @@ zip - + core-js/target/classes/core.js /js @@ -14,10 +14,6 @@ mindplot/target/classes/mindplot-min.js /js - - mindplot/target/classes/mindplot.js - /js - From 52cac830ae8b97dd1487be294b1d8f3eeee3f331 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sun, 19 Jan 2014 18:22:47 -0300 Subject: [PATCH 26/62] removing unnecesary build --- wise-editor/pom.xml | 57 --------------------------------------------- 1 file changed, 57 deletions(-) diff --git a/wise-editor/pom.xml b/wise-editor/pom.xml index 9f6efa4f..6c8b8935 100644 --- a/wise-editor/pom.xml +++ b/wise-editor/pom.xml @@ -27,62 +27,5 @@ - - - - org.mortbay.jetty - jetty-maven-plugin - 8.1.14.v20131031 - - - - 8080 - 60000 - - - ${project.build.directory}/wise-editor-${com.wisemapping.version}.war - - - - - maven-war-plugin - 2.1.1 - - js/mindplot-min.js - - - org.wisemapping - core-js - jar - js - - *.js - - - - org.wisemapping - mindplot - jar - css - - **/*.css - **/*.html - - - - org.wisemapping - mindplot - jar - js - - *.js - - - - - - - - From 0c103fc3a229327cfec7dfcf8dbd903632a16b76 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sun, 29 Dec 2013 16:41:10 -0300 Subject: [PATCH 27/62] addding tomcat plugin --- wise-webapp/pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 44322a5b..c6b2f10c 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -555,6 +555,20 @@ + + org.apache.tomcat.maven + tomcat7-maven-plugin + + /wisemapping + ${project.build.directory}/wisemapping.war + war + true + + ${project.build.directory} + + + + org.apache.maven.plugins maven-dependency-plugin From 8a684519f0ea019fa7b39b7778f350a006d736f3 Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Mon, 20 Jan 2014 23:10:15 -0300 Subject: [PATCH 28/62] DELETE__ACCOUNT message property (en and es languages) --- wise-webapp/src/main/resources/messages_en.properties | 1 + wise-webapp/src/main/resources/messages_es.properties | 1 + 2 files changed, 2 insertions(+) diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index ea58bc52..034851d6 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -15,6 +15,7 @@ LOGOUT=Logout PASSWORD=Password NEW_PASSWORD=New password CONFIRM_NEW_PASSWORD=Confirm new password +DELETE__ACCOUNT=Delete account MY_WISEMAPS=My Wisemaps RETYPE_PASSWORD=Retype Password REGISTER=Register diff --git a/wise-webapp/src/main/resources/messages_es.properties b/wise-webapp/src/main/resources/messages_es.properties index 8a1f5c49..e054ac57 100644 --- a/wise-webapp/src/main/resources/messages_es.properties +++ b/wise-webapp/src/main/resources/messages_es.properties @@ -120,6 +120,7 @@ SAVING=Grabando ... PUBLIC_MAPS=Mapas Publicos MY_MAPS=Mis Mapas NEW_PASSWORD=Nueva Contraseña +DELETE__ACCOUNT=Eliminar cuenta LANGUAGE=Idioma SHARED_WITH_ME=Compartidos ACCEPT=Aceptar From da2594292b914179233036da0f18b5074742e81a Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Mon, 20 Jan 2014 23:10:57 -0300 Subject: [PATCH 29/62] delete account lash in account settings --- wise-webapp/src/main/webapp/jsp/accountSettings.jsp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp index 268caa07..86083608 100755 --- a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp +++ b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp @@ -8,6 +8,7 @@
  • +
  • @@ -93,8 +94,7 @@
    - - + "/>
    @@ -162,7 +162,7 @@ var locale = $('#deleteAccountForm option:selected').val(); - postChange("c/restful/account/locale", locale, 'languageMsg', ""); + postChange("c/restful/account/locale", locale, 'deleteAccountMsg', ""); event.preventDefault(); }); From 7151aa4e2c10e4ecf5bc835c4a8d563f1cf8f687 Mon Sep 17 00:00:00 2001 From: ezequiel Date: Fri, 24 Jan 2014 00:20:13 -0300 Subject: [PATCH 30/62] more users.. --- config/database/hsql/atest-data.sql | 16 ++++++++++++++++ config/database/mysql/test-data.sql | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/config/database/hsql/atest-data.sql b/config/database/hsql/atest-data.sql index 746ec7ae..d9982c8b 100644 --- a/config/database/hsql/atest-data.sql +++ b/config/database/hsql/atest-data.sql @@ -6,6 +6,22 @@ INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemappin INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1,'D'); +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (3, 'homer@wisemapping.org', CURDATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (3, 'Homer', 'Simpson', 'homer', 1237, CURDATE(), 1, 'D'); + +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (4, 'marge@wisemapping.org', CURDATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (4, 'Marge', 'Bouvier', 'marge', 1237, CURDATE(), 1, 'D'); + +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (5, 'bart@wisemapping.org', CURDATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (5, 'Bart', 'Simpson', 'bart', 1237, CURDATE(), 1, 'D'); + +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (6, 'lisa@wisemapping.org', CURDATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (6, 'Lisa', 'Simpson', 'lisa', 1237, CURDATE(), 1, 'D'); + COMMIT; SHUTDOWN; \ No newline at end of file diff --git a/config/database/mysql/test-data.sql b/config/database/mysql/test-data.sql index 960fe536..b92d2554 100644 --- a/config/database/mysql/test-data.sql +++ b/config/database/mysql/test-data.sql @@ -6,5 +6,20 @@ INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemappin INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) VALUES (2, 'Admin', 'User', 'admin', 1237, CURRENT_DATE(), 1, 'D'); +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (3, 'homer@wisemapping.org', CURRENT_DATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (3, 'Homer', 'Simpson', 'homer', 1237, CURRENT_DATE(), 1, 'D'); + +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (4, 'marge@wisemapping.org', CURRENT_DATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (4, 'Marge', 'Bouvier', 'marge', 1237, CURRENT_DATE(), 1, 'D'); + +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (5, 'bart@wisemapping.org', CURRENT_DATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (5, 'Bart', 'Simpson', 'bart', 1237, CURRENT_DATE(), 1, 'D'); + +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (6, 'lisa@wisemapping.org', CURRENT_DATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (6, 'Lisa', 'Simpson', 'lisa', 1237, CURRENT_DATE(), 1, 'D'); COMMIT; From 4f40431d5564a6dd9fa7417783480e561477e63a Mon Sep 17 00:00:00 2001 From: ezequiel Date: Fri, 24 Jan 2014 00:21:27 -0300 Subject: [PATCH 31/62] adding warning msg on delete user popup --- wise-webapp/src/main/resources/messages_en.properties | 1 + wise-webapp/src/main/webapp/jsp/accountSettings.jsp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index 034851d6..3f5935f0 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -32,6 +32,7 @@ YOUR_ROLE=Your Role FORGOT_PASSWORD=Forgot Password ? CHANGE_PASSWORD=Change Password CHANGE_LANGUAGE=Change Language +WARNING_DELETE_USER=Warning! This action cannot be undone. FAQ=Frequent Asked Questions SHORT_FAQ=FAQ LOGIN=Login diff --git a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp index 86083608..7e08e920 100755 --- a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp +++ b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp @@ -90,8 +90,7 @@
    -
    -
    +
    @@ -107,7 +106,6 @@ $('#changePasswordMsg').hide(); $('#changeInfoMsg').hide(); $('#languageMsg').hide(); - $('#deleteAccountMsg').hide(); function postChange(url, postBody, msgContainerId, successMsg) { // Change success message ... From 88fed0af0a11c6c7b333a4ee0a4f0183198ea861 Mon Sep 17 00:00:00 2001 From: ezequiel Date: Fri, 24 Jan 2014 00:21:43 -0300 Subject: [PATCH 32/62] api rest call --- .../com/wisemapping/dao/UserManagerImpl.java | 4 +--- .../src/main/webapp/jsp/accountSettings.jsp | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) 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 e43ff3ed..5bac8dc3 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java @@ -110,9 +110,7 @@ public class UserManagerImpl } @Override - public void deleteUser(@NotNull User user) { - final Collaborator collaborator = this.getCollaboratorBy(user.getEmail()); - getHibernateTemplate().delete(collaborator); + public void deleteUser(@NotNull final User user) { getHibernateTemplate().delete(user); getHibernateTemplate().flush(); } diff --git a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp index 7e08e920..7d826b0a 100755 --- a/wise-webapp/src/main/webapp/jsp/accountSettings.jsp +++ b/wise-webapp/src/main/webapp/jsp/accountSettings.jsp @@ -159,8 +159,21 @@ $('#deleteAccountForm').submit(function (event) { var locale = $('#deleteAccountForm option:selected').val(); - - postChange("c/restful/account/locale", locale, 'deleteAccountMsg', ""); +//FIXME: este metodo hay que unificarlo con postChange, con callbacks o eventos para los success and error y pasandole el type + jQuery.ajax("c/restful/account", { + async: false, + dataType: 'json', + data: locale, + type: 'DELETE', + contentType: "text/plain; charset=utf-8", + success: function (data, textStatus, jqXHR) { + window.location.href = "/c/logout" + }, + error: function (jqXHR, textStatus, errorThrown) { + $('#' + 'deleteAccountMsg').removeClass('alert-info').addClass('alert-error').show(); + $('#' + 'deleteAccountMsg').text(textStatus); + } + }); event.preventDefault(); }); From ae604b1c70bbd235634ffe017e2bc17e4f611918 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 16 Jan 2014 20:09:22 -0300 Subject: [PATCH 33/62] Bug WISE-190 fixed. Implement REST Console support. --- README.md | 2 + .../{atest-data.sql => apopulate-schemas.sql} | 0 .../{test-data.sql => apopulate-schemas.sql} | 4 +- distribution/copy-dist.sh | 21 - .../wise-editor/wise-editor.iml | 51 - .../wise-webapp/wise-webapp.iml | 1444 --------- wise-webapp/doc/REST Services.md | 20 +- wise-webapp/pom.xml | 16 +- .../wisemapping/rest/AccountController.java | 9 +- .../com/wisemapping/rest/AdminController.java | 50 +- .../wisemapping/rest/MindmapController.java | 94 +- .../com/wisemapping/rest/model/RestUser.java | 2 + .../src/main/webapp/WEB-INF/app.properties | 7 + .../main/webapp/WEB-INF/jsp-rest/mapView.jsp | 48 - .../main/webapp/WEB-INF/jsp-rest/mapsView.jsp | 51 - .../webapp/WEB-INF/jsp-rest/responseView.jsp | 11 - .../main/webapp/WEB-INF/jsp-rest/userView.jsp | 35 - .../main/webapp/WEB-INF/wisemapping-rest.xml | 11 +- .../webapp/doc/rest/css/highlight.default.css | 135 + .../src/main/webapp/doc/rest/css/screen.css | 1070 +++++++ .../main/webapp/doc/rest/images/throbber.gif | Bin 0 -> 9257 bytes .../src/main/webapp/doc/rest/index.html | 78 + .../main/webapp/doc/rest/lib/backbone-min.js | 38 + .../webapp/doc/rest/lib/handlebars-1.0.0.js | 2278 ++++++++++++++ .../webapp/doc/rest/lib/highlight.7.3.pack.js | 1 + .../webapp/doc/rest/lib/jquery-1.8.0.min.js | 2 + .../webapp/doc/rest/lib/jquery.ba-bbq.min.js | 18 + .../webapp/doc/rest/lib/jquery.slideto.min.js | 1 + .../webapp/doc/rest/lib/jquery.wiggle.min.js | 8 + .../main/webapp/doc/rest/lib/shred.bundle.js | 2765 +++++++++++++++++ .../main/webapp/doc/rest/lib/shred/content.js | 193 ++ .../src/main/webapp/doc/rest/lib/swagger.js | 1244 ++++++++ .../webapp/doc/rest/lib/underscore-min.js | 32 + .../src/main/webapp/doc/rest/swagger-ui.js | 2117 +++++++++++++ .../main/webapp/doc/rest/swagger-ui.min.js | 1 + 35 files changed, 10127 insertions(+), 1730 deletions(-) rename config/database/hsql/{atest-data.sql => apopulate-schemas.sql} (100%) rename config/database/mysql/{test-data.sql => apopulate-schemas.sql} (88%) delete mode 100755 distribution/copy-dist.sh delete mode 100644 projectFilesBackup/wise-editor/wise-editor.iml delete mode 100644 projectFilesBackup/wise-webapp/wise-webapp.iml delete mode 100644 wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapView.jsp delete mode 100644 wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapsView.jsp delete mode 100644 wise-webapp/src/main/webapp/WEB-INF/jsp-rest/responseView.jsp delete mode 100644 wise-webapp/src/main/webapp/WEB-INF/jsp-rest/userView.jsp create mode 100755 wise-webapp/src/main/webapp/doc/rest/css/highlight.default.css create mode 100755 wise-webapp/src/main/webapp/doc/rest/css/screen.css create mode 100755 wise-webapp/src/main/webapp/doc/rest/images/throbber.gif create mode 100755 wise-webapp/src/main/webapp/doc/rest/index.html create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/backbone-min.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/handlebars-1.0.0.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/highlight.7.3.pack.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/jquery-1.8.0.min.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/jquery.ba-bbq.min.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/jquery.slideto.min.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/jquery.wiggle.min.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/shred.bundle.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/shred/content.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/swagger.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/lib/underscore-min.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/swagger-ui.js create mode 100755 wise-webapp/src/main/webapp/doc/rest/swagger-ui.min.js diff --git a/README.md b/README.md index 9cef7e88..a1b51c4a 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ This will start the application on the URL: [http://localhost:8080/wise-webapp/] User: test@wisemapping.org Password: test + + ## Authors * Pablo Luna diff --git a/config/database/hsql/atest-data.sql b/config/database/hsql/apopulate-schemas.sql similarity index 100% rename from config/database/hsql/atest-data.sql rename to config/database/hsql/apopulate-schemas.sql diff --git a/config/database/mysql/test-data.sql b/config/database/mysql/apopulate-schemas.sql similarity index 88% rename from config/database/mysql/test-data.sql rename to config/database/mysql/apopulate-schemas.sql index 6301d7af..cd449f1a 100644 --- a/config/database/mysql/test-data.sql +++ b/config/database/mysql/apopulate-schemas.sql @@ -3,8 +3,8 @@ INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D'); INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURRENT_DATE()); -INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type,'D') - VALUES (2, 'Admin', 'User', 'admin', 1237, CURRENT_DATE(), 1); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + VALUES (2, 'Admin', 'User', 'admin', 1237, CURRENT_DATE(), 1,'D'); COMMIT; diff --git a/distribution/copy-dist.sh b/distribution/copy-dist.sh deleted file mode 100755 index 6500a9f8..00000000 --- a/distribution/copy-dist.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -e -set -u - -WISE_VERSION=$1 -SERVER_DOWNLOAD_DIR=/var/www/wisemapping.org/stable - -WISE_BIN_FILE_NAME=wisemapping-${WISE_VERSION}.zip -WISE_BIN_FILE_PATH=./target/${WISE_BIN_FILE_NAME} - -#WISE_SRC_FILE_NAME=wisemapping-${WISE_VERSION}-src.tar.gz -#WISE_SRC_FILE_PATH=./target/${WISE_SRC_FILE_NAME} - -#scp ${WISE_SRC_FILE_PATH} thecrow@wisemapping.com:${SERVER_DOWNLOAD_DIR}/ -scp ${WISE_BIN_FILE_PATH} thecrow@wisemapping.com:${SERVER_DOWNLOAD_DIR} - -# It's there ? -cd target -wget -S http://downloads.wisemapping.org/stable/${WISE_BIN_FILE_NAME} -#wget -S http://downloads.wisemapping.org/stable/${WISE_SRC_FILE_NAME} diff --git a/projectFilesBackup/wise-editor/wise-editor.iml b/projectFilesBackup/wise-editor/wise-editor.iml deleted file mode 100644 index ab0f2e90..00000000 --- a/projectFilesBackup/wise-editor/wise-editor.iml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projectFilesBackup/wise-webapp/wise-webapp.iml b/projectFilesBackup/wise-webapp/wise-webapp.iml deleted file mode 100644 index 48639056..00000000 --- a/projectFilesBackup/wise-webapp/wise-webapp.iml +++ /dev/null @@ -1,1444 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/security/spring-security-core/3.1.0.RELEASE/spring-security-core-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-expression/3.0.6.RELEASE/spring-expression-3.0.6.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/3.0.6.RELEASE/spring-core-3.0.6.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-aop/3.1.0.RELEASE/spring-aop-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/3.1.0.RELEASE/spring-beans-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/3.1.0.RELEASE/spring-context-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/security/spring-security-crypto/3.1.0.RELEASE/spring-security-crypto-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-jdbc/3.1.0.RELEASE/spring-jdbc-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-tx/3.1.0.RELEASE/spring-tx-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/codehaus/jackson/jackson-core-asl/1.9.4/jackson-core-asl-1.9.4.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/antlr/antlr/2.7.6/antlr-2.7.6.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/javax/mail/mail/1.4/mail-1.4.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-oxm/3.1.0.RELEASE/spring-oxm-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.5/commons-lang-2.5.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-orm/3.1.0.RELEASE/spring-orm-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/security/spring-security-web/3.1.0.RELEASE/spring-security-web-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-web/3.1.0.RELEASE/spring-web-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/hibernate/hibernate-core/3.6.0.Final/hibernate-core-3.6.0.Final.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.1/commons-collections-3.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/hibernate/hibernate-commons-annotations/3.2.0.Final/hibernate-commons-annotations-3.2.0.Final.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/testng/testng/5.8/testng-5.8-jdk15.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/junit/junit/3.8.1/junit-3.8.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/javax/xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-struts/3.1.0.RELEASE/spring-struts-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/struts/struts/1.2.9/struts-1.2.9.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-digester/commons-digester/1.6/commons-digester-1.6.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-validator/commons-validator/1.1.4/commons-validator-1.1.4.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/oro/oro/2.0.8/oro-2.0.8.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/xalan/xalan/2.5.1/xalan-2.5.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-webmvc/3.1.0.RELEASE/spring-webmvc-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/spring-context-support/3.1.0.RELEASE/spring-context-support-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/struts/struts-tiles/1.3.8/struts-tiles-1.3.8.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/struts/struts-core/1.3.8/struts-core-1.3.8.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-chain/commons-chain/1.1/commons-chain-1.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-pool/commons-pool/1.3/commons-pool-1.3.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/fop/0.94/fop-0.94.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/xmlgraphics-commons/1.2/xmlgraphics-commons-1.2.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/commons-io/commons-io/1.1/commons-io-1.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-svg-dom/1.6-1/batik-svg-dom-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-dom/1.6-1/batik-dom-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-css/1.6-1/batik-css-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-util/1.6-1/batik-util-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-gui-util/1.6-1/batik-gui-util-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-ext/1.6-1/batik-ext-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/xml-apis/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-xml/1.6-1/batik-xml-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/xerces/xercesImpl/2.10.0/xercesImpl-2.10.0.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-parser/1.6-1/batik-parser-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-awt-util/1.6-1/batik-awt-util-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-bridge/1.6-1/batik-bridge-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-gvt/1.6-1/batik-gvt-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-script/1.6-1/batik-script-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-transcoder/1.6-1/batik-transcoder-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/batik/batik-extension/1.6-1/batik-extension-1.6-1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/avalon/framework/avalon-framework-api/4.3.1/avalon-framework-api-4.3.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/avalon/framework/avalon-framework-impl/4.3.1/avalon-framework-impl-4.3.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/hsqldb/hsqldb/2.2.8/hsqldb-2.2.8.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-transcoder/1.7/batik-transcoder-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-awt-util/1.7/batik-awt-util-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-util/1.7/batik-util-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-bridge/1.7/batik-bridge-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-anim/1.7/batik-anim-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-dom/1.7/batik-dom-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-css/1.7/batik-css-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-ext/1.7/batik-ext-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-xml/1.7/batik-xml-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-parser/1.7/batik-parser-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-svg-dom/1.7/batik-svg-dom-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-gvt/1.7/batik-gvt-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-script/1.7/batik-script-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/xmlgraphics/batik-svggen/1.7/batik-svggen-1.7.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/apache/velocity/velocity/1.5/velocity-1.5.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/net/tanesha/recaptcha4j/recaptcha4j/0.0.7/recaptcha4j-0.0.7.jar!/ - - - - - - - - - - - - - jar://$MAVEN_REPOSITORY$/javax/servlet/jstl/1.2/jstl-1.2.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/codehaus/jackson/jackson-mapper-asl/1.9.4/jackson-mapper-asl-1.9.4.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.5/mysql-connector-java-5.1.5.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/springframework/security/spring-security-config/3.1.0.RELEASE/spring-security-config-3.1.0.RELEASE.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/com/intellij/annotations/7.0.3/annotations-7.0.3.jar!/ - - - - - - - - - jar://$MAVEN_REPOSITORY$/log4j/log4j/1.2.9/log4j-1.2.9.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/org/hibernate/hibernate-entitymanager/3.6.0.Final/hibernate-entitymanager-3.6.0.Final.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/cglib/cglib/2.2/cglib-2.2.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/asm/asm/3.1/asm-3.1.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/javassist/javassist/3.12.0.GA/javassist-3.12.0.GA.jar!/ - - - - - jar://$MAVEN_REPOSITORY$/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar!/ - - - - - - - - diff --git a/wise-webapp/doc/REST Services.md b/wise-webapp/doc/REST Services.md index 6831ba74..81ce44e1 100644 --- a/wise-webapp/doc/REST Services.md +++ b/wise-webapp/doc/REST Services.md @@ -5,14 +5,22 @@ Introduction ------------- All WiseMapping services are exposed as REST services. Those services are the same used by the WiseMapping when you are using it. -In the following section, all supported services are listed. The following variables should be replaced: +In the following section, all supported services are listed. + +REST Console +------------- + +You can learn how what are WiseMapping REST API's from using our interactive console. You can access it from here: http://localhost:8080/doc/rest/index.html. +Important: Don't forget to configure your server host url in /WEB-INF/app.properties. By default it's configure to http://localhost:8080/wisemapping/

    + +CURL Usage Examples +------------- + +The following variables should be replaced: - host.name: Host name where WiseMapping is deployed. Default Value: localhost - host.post: Post number where WiseMapping is deployed. Default Value: 8080 -- context.path: Context Path name where the application is deployed. Default Value: wisemapping - -Supported Operations ----------------------- +- context.path: Context Path name where the application is deployed. Default Value: wisemapping Obtaining user information by email: * Template Path: /service/admin/users/email/{user.email}.json @@ -30,3 +38,5 @@ Creating a new user: * Template Path: /service/admin/users/ * Method: Post * curl "http://{host.name}:{host.port}/{context.path}/service/admin/users" --request post --basic -u "admin@wisemapping.org:admin" -H "Content-Type:application/json" --data '{"email": "te2@mydomain.de", "lastname": "lastname", "firstname":"myfirstname","password":"password"}' + + diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 3e479cd0..04bdd97c 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -284,15 +284,19 @@ runtime - org.codehaus.jackson - jackson-core-asl - 1.9.4 + com.mangofactory + swagger-springmvc + 0.6.6 + + + org.projectlombok + lombok + 1.12.4 - org.codehaus.jackson jackson-mapper-asl - 1.9.4 + 1.9.13 compile @@ -361,7 +365,7 @@ config/database/hsql/drop-schemas.sql config/database/hsql/create-schemas.sql - config/database/hsql/atest-data.sql + config/database/hsql/apopulate-schemas.sql 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 8a5bd969..79f56613 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AccountController.java @@ -18,6 +18,7 @@ package com.wisemapping.rest; +import com.mangofactory.swagger.annotations.ApiIgnore; import com.wisemapping.mail.NotificationService; import com.wisemapping.model.Mindmap; import com.wisemapping.model.User; @@ -25,16 +26,21 @@ import com.wisemapping.rest.model.RestLogItem; import com.wisemapping.security.Utils; import com.wisemapping.service.MindmapService; import com.wisemapping.service.UserService; +import com.wordnik.swagger.annotations.Api; import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; import javax.servlet.http.HttpServletRequest; +@Api(value="UserApi",description = "Account Account Related Objects.") @Controller public class AccountController extends BaseController { @Qualifier("userService") @@ -100,6 +106,7 @@ public class AccountController extends BaseController { userService.updateUser(user); } + @ApiIgnore @RequestMapping(method = RequestMethod.POST, value = "logger/editor", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void logError(@RequestBody RestLogItem item, @NotNull HttpServletRequest request) { 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 f9e3a696..25451064 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -18,18 +18,30 @@ package com.wisemapping.rest; +import com.mangofactory.swagger.annotations.ApiModel; import com.wisemapping.exceptions.WiseMappingException; -import com.wisemapping.model.*; +import com.wisemapping.model.AuthenticationType; +import com.wisemapping.model.Collaboration; +import com.wisemapping.model.Mindmap; +import com.wisemapping.model.User; import com.wisemapping.rest.model.RestUser; import com.wisemapping.service.MindmapService; import com.wisemapping.service.UserService; +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiOperation; +import com.wordnik.swagger.annotations.ApiParam; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -38,40 +50,42 @@ import java.util.Calendar; import java.util.List; import java.util.regex.Pattern; +@Api(value = "AdminApi", description = "Administrative Related Objects.") @Controller public class AdminController extends BaseController { @Qualifier("userService") @Autowired private UserService userService; - @Qualifier("mindmapService") @Autowired private MindmapService mindmapService; - - @RequestMapping(method = RequestMethod.GET, value = "admin/users/{id}", produces = {"application/json", "text/html", "application/xml"}) + @ApiOperation("Note: Administration permissions required.") + @RequestMapping(method = RequestMethod.GET, value = "admin/users/{id}", produces = {"application/json", "application/xml"}) @ResponseBody - public ModelAndView getUserById(@PathVariable long id) throws IOException { + public RestUser getUserById(@PathVariable @ApiParam(required = true, value = "User Id", allowableValues = "range[1," + Long.MAX_VALUE + "]") long id) throws IOException { final User userBy = userService.getUserBy(id); if (userBy == null) { throw new IllegalArgumentException("User could not be found"); } - return new ModelAndView("userView", "user", new RestUser(userBy)); + return new RestUser(userBy); } - @RequestMapping(method = RequestMethod.GET, value = "admin/users/email/{email}", produces = {"application/json", "text/html", "application/xml"}) + @ApiOperation("Note: Administration permissions required.") + @RequestMapping(method = RequestMethod.GET, value = "admin/users/email/{email}", produces = {"application/json", "application/xml"}) @ResponseBody - public ModelAndView getUserByEmail(@PathVariable String email) throws IOException { + public RestUser getUserByEmail(@PathVariable String email) throws IOException { final User user = userService.getUserBy(email); if (user == null) { throw new IllegalArgumentException("User '" + email + "' could not be found"); } - return new ModelAndView("userView", "user", new RestUser(user)); + return new RestUser(user); } - @RequestMapping(method = RequestMethod.POST, value = "admin/users", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) + @ApiOperation("Note: Administration permissions required.") + @RequestMapping(method = RequestMethod.POST, value = "admin/users", consumes = {"application/xml", "application/json"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.CREATED) - public void createUser(@RequestBody RestUser user, HttpServletResponse response) throws WiseMappingException { + public void createUser(@RequestBody @ApiParam(required = true) RestUser user, HttpServletResponse response) throws WiseMappingException { if (user == null) { throw new IllegalArgumentException("User could not be found"); } @@ -100,9 +114,10 @@ public class AdminController extends BaseController { response.setHeader("Location", "/service/admin/users/" + user.getId()); } + @ApiOperation("Note: Administration permissions required.") @RequestMapping(method = RequestMethod.PUT, value = "admin/users/{id}/password", consumes = {"text/plain"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void changePassword(@RequestBody String password, @PathVariable long id) throws WiseMappingException { + public void changePassword(@RequestBody @ApiParam(required = true) String password, @PathVariable @ApiParam(required = true, value = "User Id", allowableValues = "range[1," + Long.MAX_VALUE + "]") long id) throws WiseMappingException { if (password == null) { throw new IllegalArgumentException("Password can not be null"); } @@ -115,9 +130,10 @@ public class AdminController extends BaseController { userService.changePassword(user); } + @ApiOperation("Note: Administration permissions required.") @RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}") @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void getUserByEmail(@PathVariable long id) throws WiseMappingException { + public void getUserByEmail(@PathVariable @ApiParam(required = true, allowableValues = "range[1," + Long.MAX_VALUE + "]") long id) throws WiseMappingException { final User user = userService.getUserBy(id); if (user == null) { throw new IllegalArgumentException("User '" + id + "' could not be found"); @@ -125,6 +141,7 @@ public class AdminController extends BaseController { userService.deleteUser(user); } + @ApiOperation("Note: Administration permissions required.") @ResponseStatus(value = HttpStatus.NO_CONTENT) @RequestMapping(method = RequestMethod.GET, value = "admin/database/purge") public void purgeDB(@RequestParam(required = true) Integer minUid, @RequestParam(required = true) Integer maxUid, @RequestParam(required = true) Boolean apply) throws WiseMappingException, UnsupportedEncodingException { @@ -132,7 +149,6 @@ public class AdminController extends BaseController { for (int i = minUid; i < maxUid; i++) { try { - System.out.println("Looking for user:" + i); final User user = userService.getUserBy(i); if (user != null) { @@ -179,6 +195,7 @@ public class AdminController extends BaseController { } } + @ApiOperation("Note: Administration permissions required.") @ResponseStatus(value = HttpStatus.NO_CONTENT) @RequestMapping(method = RequestMethod.GET, value = "admin/database/purge/history") public void purgeHistory(@RequestParam(required = true) Integer mapId) throws WiseMappingException, IOException { @@ -186,7 +203,6 @@ public class AdminController extends BaseController { mindmapService.purgeHistory(mapId); } - private boolean isWelcomeMap(@NotNull Mindmap mindmap) throws UnsupportedEncodingException { // Is welcome map ? final String xmlStr = mindmap.getXmlStr(); 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 009a732e..8dabef62 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -18,20 +18,37 @@ package com.wisemapping.rest; - -import com.wisemapping.exceptions.*; +import com.mangofactory.swagger.annotations.ApiIgnore; +import com.wisemapping.exceptions.ImportUnexpectedException; +import com.wisemapping.exceptions.MapCouldNotFoundException; +import com.wisemapping.exceptions.MultipleSessionsOpenException; +import com.wisemapping.exceptions.SessionExpiredException; +import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.importer.ImportFormat; import com.wisemapping.importer.Importer; import com.wisemapping.importer.ImporterException; import com.wisemapping.importer.ImporterFactory; -import com.wisemapping.model.*; -import com.wisemapping.rest.model.*; +import com.wisemapping.model.Collaboration; +import com.wisemapping.model.CollaborationProperties; +import com.wisemapping.model.CollaborationRole; +import com.wisemapping.model.MindMapHistory; +import com.wisemapping.model.Mindmap; +import com.wisemapping.model.User; +import com.wisemapping.rest.model.RestCollaboration; +import com.wisemapping.rest.model.RestCollaborationList; +import com.wisemapping.rest.model.RestMindmap; +import com.wisemapping.rest.model.RestMindmapHistory; +import com.wisemapping.rest.model.RestMindmapHistoryList; +import com.wisemapping.rest.model.RestMindmapInfo; +import com.wisemapping.rest.model.RestMindmapList; 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 com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiParam; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -39,15 +56,28 @@ import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayInputStream; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +@Api(value="mindmap",description = "User Mindmap Objects.") @Controller public class MindmapController extends BaseController { @@ -58,12 +88,10 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/json", "application/xml", "text/html"}) @ResponseBody - public ModelAndView retrieve(@PathVariable int id) throws WiseMappingException { + public RestMindmap retrieve(@PathVariable int id) throws WiseMappingException { final User user = Utils.getUser(); final Mindmap mindMap = findMindmapById(id); - final RestMindmap map = new RestMindmap(mindMap, user); - - return new ModelAndView("mapView", "map", map); + return new RestMindmap(mindMap, user); } @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/wisemapping+xml"}, params = {"download=wxml"}) @@ -131,8 +159,8 @@ public class MindmapController extends BaseController { } - @RequestMapping(method = RequestMethod.GET, value = "/maps/", produces = {"application/json", "text/html", "application/xml"}) - public ModelAndView retrieveList(@RequestParam(required = false) String q) throws IOException { + @RequestMapping(method = RequestMethod.GET, value = "/maps/", produces = {"application/json", "application/xml"}) + public RestMindmapList retrieveList(@RequestParam(required = false) String q) throws IOException { final User user = Utils.getUser(); final MindmapFilter filter = MindmapFilter.parse(q); @@ -145,19 +173,18 @@ public class MindmapController extends BaseController { mindmaps.add(mindmap); } } - final RestMindmapList restMindmapList = new RestMindmapList(mindmaps, user); - return new ModelAndView("mapsView", "list", restMindmapList); + return new RestMindmapList(mindmaps, user); } - @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/history", produces = {"application/json", "text/html", "application/xml"}) - public ModelAndView retrieveHistory(@PathVariable int id) throws IOException { + @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/history", produces = {"application/json", "application/xml"}) + public RestMindmapHistoryList retrieveHistory(@PathVariable int id) throws IOException { final List histories = mindmapService.findMindmapHistory(id); final RestMindmapHistoryList result = new RestMindmapHistoryList(); for (MindMapHistory history : histories) { result.addHistory(new RestMindmapHistory(history)); } - return new ModelAndView("historyView", "list", result); + return result; } @@ -180,7 +207,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"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/document", consumes = {"application/xml", "application/json"}, produces = {"application/json", "application/xml"}) @ResponseBody 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 { @@ -216,6 +243,7 @@ public class MindmapController extends BaseController { return lockInfo.getTimestamp(); } + @ApiIgnore @RequestMapping(method = RequestMethod.GET, value = {"/maps/{id}/document/xml", "/maps/{id}/document/xml-pub"}, consumes = {"text/plain"}, produces = {"application/xml"}) @ResponseBody public byte[] retrieveDocument(@PathVariable int id, @NotNull HttpServletResponse response) throws WiseMappingException, IOException { @@ -267,9 +295,9 @@ public class MindmapController extends BaseController { /** * The intention of this method is the update of several properties at once ... */ - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void update(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException { + public void updateProperties(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException { final Mindmap mindmap = findMindmapById(id); final User user = Utils.getUser(); @@ -320,7 +348,7 @@ public class MindmapController extends BaseController { } - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/title", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/title", consumes = {"text/plain"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateTitle(@RequestBody String title, @PathVariable int id) throws WiseMappingException { @@ -339,7 +367,7 @@ public class MindmapController extends BaseController { mindmapService.updateMindmap(mindMap, !true); } - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs", consumes = {"application/json", "application/xml"}, produces = {"application/json", "text/html", "application/xml"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs", consumes = {"application/json", "application/xml"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateCollabs(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException { final Mindmap mindMap = findMindmapById(id); @@ -380,8 +408,8 @@ public class MindmapController extends BaseController { } - @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/collabs", produces = {"application/json", "text/html", "application/xml"}) - public ModelAndView retrieveList(@PathVariable int id) throws MapCouldNotFoundException { + @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/collabs", produces = {"application/json", "application/xml"}) + public RestCollaborationList retrieveList(@PathVariable int id) throws MapCouldNotFoundException { final Mindmap mindMap = findMindmapById(id); final Set collaborations = mindMap.getCollaborations(); @@ -390,14 +418,14 @@ public class MindmapController extends BaseController { collabs.add(new RestCollaboration(collaboration)); } - final RestCollaborationList restCollaborationList = new RestCollaborationList(); - restCollaborationList.setCollaborations(collabs); + final RestCollaborationList result = new RestCollaborationList(); + result.setCollaborations(collabs); - return new ModelAndView("collabsView", "list", restCollaborationList); + return result; } - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/description", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/description", consumes = {"text/plain"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateDescription(@RequestBody String description, @PathVariable int id) throws WiseMappingException { @@ -410,7 +438,7 @@ public class MindmapController extends BaseController { mindmapService.updateMindmap(mindMap, !true); } - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/publish", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/publish", consumes = {"text/plain"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updatePublishState(@RequestBody String value, @PathVariable int id) throws WiseMappingException { @@ -435,9 +463,9 @@ public class MindmapController extends BaseController { mindmapService.removeMindmap(mindmap, user); } - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/starred", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/starred", consumes = {"text/plain"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void updateStarredState(@RequestBody String value, @PathVariable int id) throws WiseMappingException { + public void updateStarredState(@RequestBody @ApiParam(defaultValue = "false",allowableValues = "true,false") String value, @PathVariable int id) throws WiseMappingException { final Mindmap mindmap = findMindmapById(id); final User user = Utils.getUser(); @@ -452,7 +480,8 @@ public class MindmapController extends BaseController { mindmapService.updateCollaboration(user, collaboration); } - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/lock", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) + @ApiIgnore + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/lock", consumes = {"text/plain"}, produces = {"application/json", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateMapLock(@RequestBody String value, @PathVariable int id) throws IOException, WiseMappingException { final User user = Utils.getUser(); @@ -467,6 +496,7 @@ public class MindmapController extends BaseController { } } + @ApiIgnore @RequestMapping(method = RequestMethod.DELETE, value = "/maps/batch") @ResponseStatus(value = HttpStatus.NO_CONTENT) public void batchDelete(@RequestParam(required = true) String ids) throws IOException, WiseMappingException { 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 310fecf0..a74f8972 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 @@ -31,6 +31,8 @@ import javax.xml.bind.annotation.XmlRootElement; import java.util.Calendar; import java.util.Set; + + @XmlRootElement(name = "user") @XmlAccessorType(XmlAccessType.PROPERTY) @JsonAutoDetect( diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index aea43dc6..45912ceb 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -142,6 +142,13 @@ security.ldap.firstName.attribute=givenName # Enable OpenId Authentication. security.openid.enabled=false +# REST Documentation +# +# This properties are used for REST API Documentation( http://localhost:8080/doc/rest/index.html) +# Change the URL for proper documentation console setup. +documentation.services.basePath=http://localhost:8080/wisemapping/service +documentation.services.version=3.0.1 + diff --git a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapView.jsp b/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapView.jsp deleted file mode 100644 index 95e23838..00000000 --- a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapView.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - - - - Mindmap Detail - - -

    Details for map with id '${map.id}'

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Id:${map.id}
    Title:${map.title}
    Description:${map.description}
    Owner:${map.owner}
    Xml:
    Last Modified:${map.lastModifierUser}
    Creator:${map.creator}
    Public:${map.public}
    - - \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapsView.jsp b/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapsView.jsp deleted file mode 100644 index 2a40ceb2..00000000 --- a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/mapsView.jsp +++ /dev/null @@ -1,51 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - - - - Mindmaps List - - -

    Mindmaps List

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Id:${map.id}
    Title:${map.title}
    Description:${map.description}
    Owner:${map.owner}
    Xml:
    Last Modified:${map.lastModifierUser}
    Creator:${map.creator}
    Public:${map.public}
    -
    -
    - - \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/responseView.jsp b/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/responseView.jsp deleted file mode 100644 index 46c69913..00000000 --- a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/responseView.jsp +++ /dev/null @@ -1,11 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - - - - - -

    Message: ${message}

    -
    - - \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/userView.jsp b/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/userView.jsp deleted file mode 100644 index 7c568172..00000000 --- a/wise-webapp/src/main/webapp/WEB-INF/jsp-rest/userView.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - - - - Mindmap Detail - - -

    Details for User with id '${user.id}'

    - - - - - - - - - - - - - - - - - - - - - - - -
    Email:${user.email}
    Fist Name:${user.firstname}
    Last Name:${user.lastname}
    Username:${user.username}
    Active:${user.active}
    - - \ No newline at end of file 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 a83725f1..53384828 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml @@ -52,7 +52,6 @@ - @@ -70,11 +69,6 @@ - - - - - @@ -149,4 +143,9 @@ + + + + + \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/doc/rest/css/highlight.default.css b/wise-webapp/src/main/webapp/doc/rest/css/highlight.default.css new file mode 100755 index 00000000..e417fc17 --- /dev/null +++ b/wise-webapp/src/main/webapp/doc/rest/css/highlight.default.css @@ -0,0 +1,135 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #F0F0F0; +} + +pre code, +pre .subst, +pre .tag .title, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title { + color: black; +} + +pre .string, +pre .title, +pre .constant, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .flow, +pre .stream, +pre .bash .variable, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .tex .special, +pre .erlang_repl .function_or_atom, +pre .markdown .header { + color: #800; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk, +pre .markdown .blockquote { + color: #888; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .go .constant, +pre .change, +pre .markdown .bullet, +pre .markdown .link_url { + color: #080; +} + +pre .label, +pre .javadoc, +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .important, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula, +pre .erlang_repl .reserved, +pre .prompt, +pre .markdown .link_label, +pre .vhdl .attribute, +pre .clojure .attribute, +pre .coffeescript .property { + color: #88F +} + +pre .keyword, +pre .id, +pre .phpdoc, +pre .title, +pre .built_in, +pre .aggregate, +pre .css .tag, +pre .javadoctag, +pre .phpdoc, +pre .yardoctag, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .go .typename, +pre .tex .command, +pre .markdown .strong, +pre .request, +pre .status { + font-weight: bold; +} + +pre .markdown .emphasis { + font-style: italic; +} + +pre .nginx .built_in { + font-weight: normal; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/wise-webapp/src/main/webapp/doc/rest/css/screen.css b/wise-webapp/src/main/webapp/doc/rest/css/screen.css new file mode 100755 index 00000000..1627ecd0 --- /dev/null +++ b/wise-webapp/src/main/webapp/doc/rest/css/screen.css @@ -0,0 +1,1070 @@ +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-ui-wrap { + line-height: 1; + font-family: "Droid Sans", sans-serif; + max-width: 960px; + margin-left: auto; + margin-right: auto; +} +.swagger-ui-wrap b, +.swagger-ui-wrap strong { + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-ui-wrap q, +.swagger-ui-wrap blockquote { + quotes: none; +} +.swagger-ui-wrap p { + line-height: 1.4em; + padding: 0 0 10px; + color: #333333; +} +.swagger-ui-wrap q:before, +.swagger-ui-wrap q:after, +.swagger-ui-wrap blockquote:before, +.swagger-ui-wrap blockquote:after { + content: none; +} +.swagger-ui-wrap .heading_with_menu h1, +.swagger-ui-wrap .heading_with_menu h2, +.swagger-ui-wrap .heading_with_menu h3, +.swagger-ui-wrap .heading_with_menu h4, +.swagger-ui-wrap .heading_with_menu h5, +.swagger-ui-wrap .heading_with_menu h6 { + display: block; + clear: none; + float: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 60%; +} +.swagger-ui-wrap table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-ui-wrap table thead tr th { + padding: 5px; + font-size: 0.9em; + color: #666666; + border-bottom: 1px solid #999999; +} +.swagger-ui-wrap table tbody tr:last-child td { + border-bottom: none; +} +.swagger-ui-wrap table tbody tr.offset { + background-color: #f0f0f0; +} +.swagger-ui-wrap table tbody tr td { + padding: 6px; + font-size: 0.9em; + border-bottom: 1px solid #cccccc; + vertical-align: top; + line-height: 1.3em; +} +.swagger-ui-wrap ol { + margin: 0px 0 10px; + padding: 0 0 0 18px; + list-style-type: decimal; +} +.swagger-ui-wrap ol li { + padding: 5px 0px; + font-size: 0.9em; + color: #333333; +} +.swagger-ui-wrap ol, +.swagger-ui-wrap ul { + list-style: none; +} +.swagger-ui-wrap h1 a, +.swagger-ui-wrap h2 a, +.swagger-ui-wrap h3 a, +.swagger-ui-wrap h4 a, +.swagger-ui-wrap h5 a, +.swagger-ui-wrap h6 a { + text-decoration: none; +} +.swagger-ui-wrap h1 a:hover, +.swagger-ui-wrap h2 a:hover, +.swagger-ui-wrap h3 a:hover, +.swagger-ui-wrap h4 a:hover, +.swagger-ui-wrap h5 a:hover, +.swagger-ui-wrap h6 a:hover { + text-decoration: underline; +} +.swagger-ui-wrap h1 span.divider, +.swagger-ui-wrap h2 span.divider, +.swagger-ui-wrap h3 span.divider, +.swagger-ui-wrap h4 span.divider, +.swagger-ui-wrap h5 span.divider, +.swagger-ui-wrap h6 span.divider { + color: #aaaaaa; +} +.swagger-ui-wrap a { + color: #547f00; +} +.swagger-ui-wrap a img { + border: none; +} +.swagger-ui-wrap article, +.swagger-ui-wrap aside, +.swagger-ui-wrap details, +.swagger-ui-wrap figcaption, +.swagger-ui-wrap figure, +.swagger-ui-wrap footer, +.swagger-ui-wrap header, +.swagger-ui-wrap hgroup, +.swagger-ui-wrap menu, +.swagger-ui-wrap nav, +.swagger-ui-wrap section, +.swagger-ui-wrap summary { + display: block; +} +.swagger-ui-wrap pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; +} +.swagger-ui-wrap pre code { + line-height: 1.6em; + background: none; +} +.swagger-ui-wrap .content > .content-type > div > label { + clear: both; + display: block; + color: #0F6AB4; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-ui-wrap .content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} +.swagger-ui-wrap .icon-btn { + cursor: pointer; +} +.swagger-ui-wrap .info_title { + padding-bottom: 10px; + font-weight: bold; + font-size: 25px; +} +.swagger-ui-wrap p.big, +.swagger-ui-wrap div.big p { + font-size: 1em; + margin-bottom: 10px; +} +.swagger-ui-wrap form.fullwidth ol li.string input, +.swagger-ui-wrap form.fullwidth ol li.url input, +.swagger-ui-wrap form.fullwidth ol li.text textarea, +.swagger-ui-wrap form.fullwidth ol li.numeric input { + width: 500px !important; +} +.swagger-ui-wrap .info_license { + padding-bottom: 5px; +} +.swagger-ui-wrap .info_tos { + padding-bottom: 5px; +} +.swagger-ui-wrap .message-fail { + color: #cc0000; +} +.swagger-ui-wrap .info_contact { + padding-bottom: 5px; +} +.swagger-ui-wrap .info_description { + padding-bottom: 10px; + font-size: 15px; +} +.swagger-ui-wrap .markdown ol li, +.swagger-ui-wrap .markdown ul li { + padding: 3px 0px; + line-height: 1.4em; + color: #333333; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { + display: block; + padding: 4px; + width: auto; + clear: both; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { + font-size: 1.3em; +} +.swagger-ui-wrap table.fullwidth { + width: 100%; +} +.swagger-ui-wrap .model-signature { + font-family: "Droid Sans", sans-serif; + font-size: 1em; + line-height: 1.5em; +} +.swagger-ui-wrap .model-signature .signature-nav a { + text-decoration: none; + color: #AAA; +} +.swagger-ui-wrap .model-signature .signature-nav a:hover { + text-decoration: underline; + color: black; +} +.swagger-ui-wrap .model-signature .signature-nav .selected { + color: black; + text-decoration: none; +} +.swagger-ui-wrap .model-signature .propType { + color: #5555aa; +} +.swagger-ui-wrap .model-signature pre:hover { + background-color: #ffffdd; +} +.swagger-ui-wrap .model-signature pre { + font-size: .85em; + line-height: 1.2em; + overflow: auto; + max-height: 200px; + cursor: pointer; +} +.swagger-ui-wrap .model-signature ul.signature-nav { + display: block; + margin: 0; + padding: 0; +} +.swagger-ui-wrap .model-signature ul.signature-nav li:last-child { + padding-right: 0; + border-right: none; +} +.swagger-ui-wrap .model-signature ul.signature-nav li { + float: left; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; +} +.swagger-ui-wrap .model-signature .propOpt { + color: #555; +} +.swagger-ui-wrap .model-signature .snippet small { + font-size: 0.75em; +} +.swagger-ui-wrap .model-signature .propOptKey { + font-style: italic; +} +.swagger-ui-wrap .model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} +.swagger-ui-wrap .model-signature .description div { + font-size: 0.9em; + line-height: 1.5em; + margin-left: 1em; +} +.swagger-ui-wrap .model-signature .description .stronger { + font-weight: bold; + color: #000; +} +.swagger-ui-wrap .model-signature .propName { + font-weight: bold; +} +.swagger-ui-wrap .model-signature .signature-container { + clear: both; +} +.swagger-ui-wrap .body-textarea { + width: 300px; + height: 100px; + border: 1px solid #aaa; +} +.swagger-ui-wrap .markdown p code, +.swagger-ui-wrap .markdown li code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #f0f0f0; + color: black; + padding: 1px 3px; +} +.swagger-ui-wrap .required { + font-weight: bold; +} +.swagger-ui-wrap input.parameter { + width: 300px; + border: 1px solid #aaa; +} +.swagger-ui-wrap h1 { + color: black; + font-size: 1.5em; + line-height: 1.3em; + padding: 10px 0 10px 0; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-ui-wrap .heading_with_menu { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap .heading_with_menu ul { + display: block; + clear: none; + float: right; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + margin-top: 10px; +} +.swagger-ui-wrap h2 { + color: black; + font-size: 1.3em; + padding: 10px 0 10px 0; +} +.swagger-ui-wrap h2 a { + color: black; +} +.swagger-ui-wrap h2 span.sub { + font-size: 0.7em; + color: #999999; + font-style: italic; +} +.swagger-ui-wrap h2 span.sub a { + color: #777777; +} +.swagger-ui-wrap span.weak { + color: #666666; +} +.swagger-ui-wrap .message-success { + color: #89BF04; +} +.swagger-ui-wrap caption, +.swagger-ui-wrap th, +.swagger-ui-wrap td { + text-align: left; + font-weight: normal; + vertical-align: middle; +} +.swagger-ui-wrap .code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { + font-family: "Droid Sans", sans-serif; + height: 250px; + padding: 4px; + display: block; + clear: both; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { + display: block; + clear: both; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { + display: block; + float: left; + clear: none; + margin: 0; + padding: 0; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { + display: block; + float: left; + clear: none; + margin: 0 5px 0 0; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { + color: black; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li label { + display: block; + clear: both; + width: auto; + padding: 0 0 3px; + color: #666666; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { + padding-left: 3px; + color: #888888; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { + margin-left: 0; + font-style: italic; + font-size: 0.9em; + margin: 0; +} +.swagger-ui-wrap form.formtastic fieldset.buttons { + margin: 0; + padding: 0; +} +.swagger-ui-wrap span.blank, +.swagger-ui-wrap span.empty { + color: #888888; + font-style: italic; +} +.swagger-ui-wrap .markdown h3 { + color: #547f00; +} +.swagger-ui-wrap .markdown h4 { + color: #666666; +} +.swagger-ui-wrap .markdown pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; + margin: 0 0 10px 0; +} +.swagger-ui-wrap .markdown pre code { + line-height: 1.6em; +} +.swagger-ui-wrap div.gist { + margin: 20px 0 25px 0 !important; +} +.swagger-ui-wrap ul#resources { + font-family: "Droid Sans", sans-serif; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource { + border-bottom: 1px solid #dddddd; +} +.swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, +.swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { + color: black; +} +.swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, +.swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { + color: #555555; +} +.swagger-ui-wrap ul#resources li.resource:last-child { + border-bottom: none; +} +.swagger-ui-wrap ul#resources li.resource div.heading { + border: 1px solid transparent; + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 14px 10px 0 0; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; + color: #666666; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { + color: #aaaaaa; + text-decoration: none; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { + text-decoration: underline; + color: black; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { + text-decoration: underline; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { + padding-left: 0; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { + padding-left: 0; +} +.swagger-ui-wrap ul#resources li.resource div.heading h2 { + color: #999999; + padding-left: 0; + display: block; + clear: none; + float: left; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-ui-wrap ul#resources li.resource div.heading h2 a { + color: #999999; +} +.swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { + color: black; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { + padding-left: 10px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { + color: black; + text-decoration: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { + text-decoration: underline; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { + text-transform: uppercase; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { + margin: 0; + padding: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { + text-decoration: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { + padding: 4px 0 0 10px; + display: inline-block; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { + outline: 2px solid black; + outline-color: #cc0000; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { + background-color: #f9f2e9; + border: 1px solid #f0e0ca; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { + background-color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0e0ca; + color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { + color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { + background-color: #faf5ee; + border: 1px solid #f0e0ca; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { + color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #ffd20f; + color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { + color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { + color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { + background-color: #f5e8e8; + border: 1px solid #e8c6c7; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #e8c6c7; + color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { + color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + background-color: #f7eded; + border: 1px solid #e8c6c7; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { + color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { + color: #c8787a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { + background-color: #e7f6ec; + border: 1px solid #c3e8d1; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { + background-color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3e8d1; + color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { + color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { + background-color: #ebf7f0; + border: 1px solid #c3e8d1; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { + color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { + background-color: #FCE9E3; + border: 1px solid #F5D5C3; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { + background-color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0cecb; + color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { + color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { + background-color: #faf0ef; + border: 1px solid #f0cecb; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { + color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + border-top: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { + text-decoration: underline; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { + padding-left: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { + padding-left: 0; +} +.swagger-ui-wrap p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: "Droid Sans", sans-serif; + color: #999999; + font-style: italic; +} +.swagger-ui-wrap p#colophon a { + text-decoration: none; + color: #547f00; +} +.swagger-ui-wrap h3 { + color: black; + font-size: 1.1em; + padding: 10px 0 10px 0; +} +.swagger-ui-wrap .markdown ol, +.swagger-ui-wrap .markdown ul { + font-family: "Droid Sans", sans-serif; + margin: 5px 0 10px; + padding: 0 0 0 18px; + list-style-type: disc; +} +.swagger-ui-wrap form.form_box { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; + padding: 10px; +} +.swagger-ui-wrap form.form_box label { + color: #0f6ab4 !important; +} +.swagger-ui-wrap form.form_box input[type=submit] { + display: block; + padding: 10px; +} +.swagger-ui-wrap form.form_box p.weak { + font-size: 0.8em; +} +.swagger-ui-wrap form.form_box p { + font-size: 0.9em; + padding: 0 0 15px; + color: #7e7b6d; +} +.swagger-ui-wrap form.form_box p a { + color: #646257; +} +.swagger-ui-wrap form.form_box p strong { + color: black; +} +#header { + background-color: #89bf04; + padding: 14px; +} +#header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(../images/logo_small.png) no-repeat left center; + padding: 20px 0 20px 40px; + color: white; +} +#header form#api_selector { + display: block; + clear: none; + float: right; +} +#header form#api_selector .input { + display: block; + clear: none; + float: left; + margin: 0 10px 0 0; +} +#header form#api_selector .input input#input_apiKey { + width: 200px; +} +#header form#api_selector .input input#input_baseUrl { + width: 400px; +} +#header form#api_selector .input a#explore { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #547f00; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; +} +#header form#api_selector .input a#explore:hover { + background-color: #547f00; +} +#header form#api_selector .input input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +#content_message { + margin: 10px 15px; + font-style: italic; + color: #999999; +} +#message-bar { + min-height: 30px; + text-align: center; + padding-top: 10px; +} diff --git a/wise-webapp/src/main/webapp/doc/rest/images/throbber.gif b/wise-webapp/src/main/webapp/doc/rest/images/throbber.gif new file mode 100755 index 0000000000000000000000000000000000000000..06393889242fb3ea9e0205fa84369ec7bb66d15a GIT binary patch literal 9257 zcmd^^X;@R|x`tQg5wbE8AV3mAn1TjmQ&en2CK8~ENEH<+P_)pZ24y2E+7O0>K^a6u zQ3;5MiU^7p6*M3qDk!2=YEcHMQ>nzEYP;R`e2C@r+U+?#XaC*&gKPcB#k$`o&;7mu zYNhYYXe|Uo84#4ZIko#rcU5K8*yFL{qT47O&^5fZH$ zVZ@%(l~vVHjnm;H@KL8@r%yUHoo;rbHI_4lIH(_nsTT>S2`DFOD~uCb9_dF4`#QgI zy7ldMcLs+A_s%|e1pRPrbX-tpeNP!9(IpMFTce`t_5U%lP99z%&i6`1d~ zWeM!Rxc50<+d$e^9LT`?B+aMK~apR zHm?q;p<7{wN2g|I^aGlSws;VP84j(z%aQwvAWv83Z$}p(% zZ^?2;gxg(ey_`V5J7{;!o;o;KslW@z5EP~JGs|U)J7dF&(ff#A=6vU?cGQ$-4+;Jf z-ggJEa!yStn`_EWvl)#yhm6XVs}UUbsi;+agri;mCfjH^Uy;lH+Zw^h)4N?oZgZz4 zJk(fTZ|Bi^;+s_M=~+d#vyoxEPzTlOS=mX@sbl*uRj>=MaMr}cFIY8i?UM61>86uB zV$DlOUCiUJwbzJMP@D$urzK|lL2-PC!p1l47V-ZG<5Ev0Z5h~Kx?`KOp7gkAjV93A z-Gc7MrlxTf?wF;CbNc@tCHJH{TB3c;#{SVu%97}tyAM2n&|9W_?qv}$*Jt*%7Yxb# zV0;d;7|lDEltJYS+U)#aiJO};?_Jyy_4%syQ(uy?-J-Yx-9O5nKRk@@XSS~X<(2u~ zV-LamWm~!iqtH9wkpf8mAXZhOD&L#aA_%)4h2M;1M5jt zIR>Us+%W-GXa_f^opKg=DSrAs)AXeRa;Hp0aC1OgbxQ%Qr_QvTleM1jkR!2mkcX$3 ztsR8~G9iqh(-FJ@F_rQBIYDXV_6s7G9SxaVF^laZqcx$!D97m|7t16j6@Jt6UdDRy49Qyvs|c>RuA|@b%}`*wU}2^7q;&Vtc6@lb zcXl)T!6nYDzmMJ~%n$KNXyNlCG)GkJ4!82;v6@d3>s5r~E+3!O?049JDr14Y^PeMI02R`0lJ^=oJ zYd|*u9|SU(j7hY?+<=(?fP*mtV*zFhOrz6%{VA?ozdm&(Jf^V zMfPZ?>l`mS3{Uq8IM;e!+1YjJy2!mzK$O|wPeU{*QSbs9m+@`f5KxO3PBnQ=%RsZg%go*fJ`*w9TL{-WgZVIA$!YV}3BRcfeXaR$x#b zW)Tpd#8E4)^MyYdkH;4_;ChJuw%n+Be7Ko4;w-nHvyo$d_0e-YiF78Df&)_)(}fcr_r0mPH(4RRYWIu+d@t0&Ss@O^s! zOKyX&13)%N@83r^;QsgN{rl(!0|RF1FA)b1{CRXAy&1ySz@>olPiR4r$aMdq&_=nK zq|cFs8phWJ1@%dZ-gXd{zDbTILD>)qEvH-NU*Rf1b2J1Ri79`rBFl@ z8E^0I)OqEi{pH(a24b9YPG;Kz@t-qZW;3Mpe`MRlmYx{7bH-XZ&`RQ7Rb^%}gc&X| zd}Q-FZf|RWxHU?PR!(C?80zu(^l>*h{#ulSiid(O!J(8P-41bNM3tnX@U6NS5yo0? zdcF)~xFE&+&|gZ$23dV5t~?$$&ymZ;F8j7GGMncGSsDo%>J`26=&l=X#rSKv_64;0 zr;k6no@=gV`P)K!=kaHl>q?!`X>(A;84tg^Md<`zA%qbRLby1Z=fn*ZRdNqs%Tq|3 zOt}lZu0q9oKJhgz&+^7PCt$=UFW=R*w?a1)ePoL*`R$Gxj?TU@12tTHsT$giHQU+sqf;fS0FpT!< z z#UR4L_rT;lfRLVo8|3$7cmuxwjY5rmYs&kR6z_LRhf9-=4QalKQYEWw^4-EBI3j$& zA>$Im_{ZA>0`)E_&m%x6a)BThkx=e|aMkOrK9zb1YzqpQ&WZ^$)2T>CwTCuYRn5y) z3fVXg-@R5&Bf4?WUTyD|hBDe2>xEh|o-y}o5Se~+Ob!5xN>CaAN!<4)F zwNh!Y7B?@AigokFYNJL`0Vz&-ekrY95-n3M<%GR<;SzXRmO7(zd+gf|$Thb%;pby2 zyd{5TJ?|JYUgpSlJ0=LB@k6#d&opuPGq^qJAIumfhigC2qAX0OEnYnT@O;bA?X1O5 zpLe9|%_H+Yki!Rv$7Kvjv8r7Z?$<>G)g*%D*V#s&kz>Z3V1 z3!ZKh9H8Nl9IdhEW_rY#oYdDCLTe+nQ{(d2pBX8%CmxL+1`|b#Vb!?IY!kT7$PDWAP9$FY=e9KSK{DEH|408! zl-$lv)U8$EB{~es&j>rYg%{{JRvIl8@NK}L=xDAEVv(o#W@3LUDc*m?yKSPR0O|nY zAh;*QuBdpja8HzP8Uw`ce-r*LrUA47ZvZ)ff3k4^>;dFcof}9eXeeM<0OVj&CKDVK zpUKKIF%hSmry!pwK68UX>zOF@dv}B4Gg)^2GQmN7@A?zG!xO6dT*Cq0+r{eY6}AfU zf`|~y!?^R*nB0!iTcg|CgM}ou^H*s~5)%h;Xh;PYOM!|Yhfk$w;@`1Dx1y!EZrM&^zMat!^Wz# z=Z{;Pa0w21oA1X3*9=`*c7o3ePa^k%Vzu>2C_7DaZJ8FW5GJv|t>`Ym;_S>7g_3XI zdRb!Ppd`ErK`pUDHRsJd9@)bu>}s1)nKsyAR7h21<1u{DX1gd_Vf;^zdUpFPeSHHR z7AMgw^{FlFlK91CGMafKt`$FLhq#^=->@Uok7pqW6&#Zs4*E(i5-jog43A*qC@!(8 z8&F}pofRcMVmcJd=f;fvlfAR!ZqeaTE?#TQ^jQM0ioaJf8m^!Kdv^`f5kEsD0=gX#4={QE1$3A4K~V$ITKEd){XVLx?i6K*D>JF6E=i znqF^X#&UX}rfB|#A9%y|sR5i6B5gyk>8@Q+xHg|^5iz7C2}YkGF)nuP4LX#k2tRBP z=!VnWnXea(K#Wvg2&0f{!mXuuWaPpsoZ)3TSaEp;i|_)CvP=4wjI; zH%7tcLM8dQXsHW*#|}%TG9yiGpyjBltpcpXkpl8zg~x zD{QG)2Z8x$vfjgDc(J6i|OHoLX&!<+m^<$S3DtA8Mf!{ z7;g1}0uqJ0Mxuy%=#BFX5;Xh9JkrA$d}neS9T;$F$kXn}ss zF{Jn}9EDk=>h)sMy$YXfhKIDxr7U@3xl+uI|N5y!>?{aVn703L1Qgb$ql%JT^lsGD%)~)(H?Spj$zNt)h)Raob z@KyVB@&ngE0rtMW4!UTqGX>{&KHJAWqb)oYq9O)e)nmN0jVa;LNbKXx04a+8&O;q) zHBzGejrqt7Dk$Z2VR%%K#`!((pXE*MR{jGtv|q$p5#v9N0f^6B9IB!Q6(y$TmHRLM zsYXm2jn3f{9T)KVVzotDx=Ng8q0Z*VDZOkd5C!p0PRoFt>NyVEc9*%YR&2>Nq~$AI zXOQfjJ&wpGMe~I8y=cC(QR4=W2GWccFK(3`d&gN+)qWtW-`*}mZI%KDRl4@rUv1%d zxFO82lhW$xQyYxJg8tOZyXm1As%kEFNn)eW{R61M>af@wr(YW{R@+eL2 zx?SovK+867$F%T;Dfeajw|kiQ81GcOnS$Y4+hp8g_w1P8_~79d9p$*M1_Ei81$H$Ti6oi?ZW)&tmsJa7RV1LKddm7R*qL54L7j zvCr1Mrb;l!=m^TbJun-C_6$7w81E1eAQC^6s4>rZ4&I5+yyu$kha%Z&d+|S7Ki#{2 zy}%Giz|eR|G?ychX%%=eL`W(aLarb(L4jd>J+wlX;xMV9H8J!l&i?~Mw7)jlIuLD% zyq+AK92j#kC`ycv$SJ|E7!FBParx#v<3_rZ-DLQ@>`#sdl5}immok8&`{YgF|+< z`tB>e%6G{=B4?V-be>`&*}0d*f?$yBX@w+rJht@O+=^zttqB2p=IiA17#YD$4-fih z@$gJ95mGmFhN!d;3Ag4#>3o`>%L{G=9<}qOJ$wDN)%)MN6bVsAPG4oKB3+8r6!Qf9 z3m8?jIpWcEJbt6|f?Y4nMXK(--YZ|GA2_aRS!do%J9S7?Q&4FYL@sPilq}e4tlYa& z?f+we^=FH^Z9|dnXZghblW!IYGIAT{``58&7vZBybh+GuIPP{h*J?&vf7i8rv6qgx zab9~l+K`tvC7pWtlS!5lt(n#Yl}PAR(v01oXjc0F?T0w>+*p#PtE?Tf_hMrEaZ!^V zbv_>=4xibc0TUxg^I>TS?HR4fdiWl`@6{7|WU9G68l7tOz2p>oIe~NNr!>Q&PHm`4 z98R?g(IT*nl#{_|*WO_h0X78;WwMp?A^Zi)W@BX5q==TdOl?~J6HK(0b(xD6?m3e3 z#+zMaSJb(W$h5+d+6vujSjyi_R80c9>7h;0YlUFDvN`iNGu&5HQ5^e>6x?&JSc4V$6_I1jJ4vnCVbkU`Gz=Uy#~OI( zlL-$UAE$pVCsD_rICM#Q!ltzcqDphp5L|ZrqUm>=H%x!RjMrF#*?BN2shvUg=H;)& zy~_xWl*k$~9Hl6PIq({dELPE-r4*YNs7?5{>dlC`EcK~lPKB_8V)G@H)UZFF8$tXT z@^raW#Hq4OJGFL2Aye|HU&_NL%dYans6?ltqEBz`Q|m=@Zh4=-p2r;}q(Nbsk$fUI zP|(Ns2>MDvZi1H7<55frlQn#%?`WY3g`+fRuC#UJx%#d!zxEu3=}zF514S=6f@?~$ zeuSB=6E7r3ya|; z@K7M3VBrls6c{M*M_{AB_fVjgQ|F(FuK(@=1eWeVMSpLglllqV6Rg-L_46;?^IskS z)x6|SR1^gGl6amWjkb1dX}^8DumNXNmhsfxKA#;bBBIZE@0gma5yQY(FX>|N~Y^mgq`xc zdxOf6r{9u#_e0gV3(fdBTdV2Sc4SN5ZmP?cB4?KR + + + WiseMapping REST API + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +

    Welcome REST API Console

    +

    Use this console to learn how to use WiseMapping REST APIs.

    +

    Important: Don't forget to configure your server host url in /WEB-INF/app.properties. By default it's configure to http://localhost:8080/wisemapping/

    +

    +
    + +
    +
    + + + + diff --git a/wise-webapp/src/main/webapp/doc/rest/lib/backbone-min.js b/wise-webapp/src/main/webapp/doc/rest/lib/backbone-min.js new file mode 100755 index 00000000..c1c0d4ff --- /dev/null +++ b/wise-webapp/src/main/webapp/doc/rest/lib/backbone-min.js @@ -0,0 +1,38 @@ +// Backbone.js 0.9.2 + +// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. +// Backbone may be freely distributed under the MIT license. +// For all details and documentation: +// http://backbonejs.org +(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks= +{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g= +z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= +{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== +b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent: +b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; +a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error, +h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t(); +return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= +{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| +!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); +this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i('