diff --git a/Compiling-and-running.md b/Compiling-and-running.md deleted file mode 100644 index 53d0ab77..00000000 --- a/Compiling-and-running.md +++ /dev/null @@ -1,36 +0,0 @@ -# Compiling and Running - -## 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 - -Enjoy :) \ No newline at end of file diff --git a/Home.textile b/Home.textile deleted file mode 100644 index 416bff08..00000000 --- a/Home.textile +++ /dev/null @@ -1,20 +0,0 @@ -h1. What is WiseMapping Open Source? - -WiseMapping is a free web based mindmapping application. 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. - - -h1. Why Open Source ? - -In the last years, we have received hundred of mails from different persons asking for: -Integrating wisemapping.com with their sites -Deploying a private instance of wisemapping.com -Participating in the development of the site -All this make us wonder "Why if we share our product to all this people and invite them to participate with us in this journey ?" . - -h1. Who are we ? - -We’re a couple of friends working on an idea: “Create the best on-line collaborative mind mapping tool ever created”. This has been our idea since the first day we started. - -h1. [[Documentation]] - -h1. [[Compiling and Running]] diff --git a/README.md b/README.md index 9cef7e88..60901fad 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -## Project Information +# 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 -# Compiling and Running +## Compiling and Running -## Prerequisites +### 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 +### Compiling WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules: @@ -27,7 +27,7 @@ The full compilation of the project can be performed executing within /wise-webapp/target/wisemapping*.war will be generated. -## Testing +### 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` @@ -37,12 +37,34 @@ This will start the application on the URL: [http://localhost:8080/wise-webapp/] User: test@wisemapping.org Password: test -## Authors +## Running the JS only version - * Pablo Luna - * Paulo Veiga +Start by creating the .zip file: -Past Collaborators: Ignacio Manzano, Nicolas Damonte +`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/ + +## Members + +### Founders + + * Pablo Luna + * Paulo Veiga + +### Individual Controbutors + + * Ezequiel Bergamaschi + * Claudio Barril + +### Past Individual Contributors + + * Ignacio Manzano + * Nicolas Damonte ## License diff --git a/config/database/hsql/apopulate-schemas.sql b/config/database/hsql/apopulate-schemas.sql new file mode 100644 index 00000000..0d4e071f --- /dev/null +++ b/config/database/hsql/apopulate-schemas.sql @@ -0,0 +1,47 @@ +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURDATE()); +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()); +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'); + +INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id) + VALUES (1, 'Welcome Test', x'504B0304140008080800ED036F4400000000000000000000000007000000636F6E74656E74AD57DD8EDA3814BEEF53B8E9452F360CF985B0C0542C43D5B960355259ED45558D9CC464AC3176E43843A76FB3CFD0479817DB1393F0938442871A09417EFC7DE7F83BDFB1472B9C228E57646CE4194E88819E88CCA8E06343619E08E3FA0D82315222A5118A08571233B827737854916F6A6C4CC54A20F822FC3B96E88381683C366C032D05579FD53383A987C377448FE17068A030990A26E4D8786761F8042586C6A191E07A828C26FCFE81B0D4E8EEDDDED048454695E668F76DB3E3590612322630A35591BA93F02489714C321413B478F9012F8AAC24D760E7E95163E7F856485C638B5E8E506EE90796EF0FF6E8B78410611E11B61F446B20CEC0373B03671B885D053249244920AF7F0B854BFAAE5D83D43372A1C8F5E8ED97E9CD6431F932CB9440107BCEB17E15BDFDFAF57AD4D50F1D32E96A2A27E8B90EE4D9B68366A22B7E33CE70048018DDE184729CA17F49B8E1DB3F9EED963818E58F289720B207A5D23FBBDDF57A7D9508913072158915E03EA7855A6533A9E785625B108AB78DC4AD2299E74CD194410C903CCA8416CEC71C244F1A1A28865E0AA72D843AA46739ED2AD5422A17D5AD6769B9B4601459EA9E8B61BB4D0195C194287E0D65180A160FA9C28C46E70259A6BD13AA53E12C687A90B20D5EEF006F4157241BF6862D419DB97810A5BB53A157817F14720592BBA14B220B7408377BC0854E24891406ED6CF804AD2B794C9DA78B36303BBD5E3317B7600155CA3DB74D225B935842D5DCAF41F32713D2BC50E7D3B18343423B11C434A22F3F38FA27C33C0667606841228663B121E938C76BB4E17F5B83C4716C2FFB47FDEF01CBF8FE913C87027E9C4C66C7F582C26306FB65A2B9F57EC93F8A80773E38174F4411702725775D00BA15473386A6B9CC84D4C6A8DF7A85203BAE0FCE18047B296F53D8B653D2A24B8249CEB248D2904A704B09FF62A84009660DABF24D556BE2FD56B102D3BED9290CA06E7C7792141DBF303E281D89D28252E5EB05A74DDAD0270245C6C5513374EAE6F24BECFA60CBBD165F29D96134559275E744E13FDA697ECEC38AEA718ACD767E614EA16DB7F8D1FCE5BF0C7DB8429FA0BA5104DEFA882847EF2711B4C8C22569614B227B8FB00419E0CD82FBD6C15EE764B9DBAE670E5A32063283DC285A76969F94CF5E2DC35E295C2EEBB5DC703CDF357B7EB391DDF22750309AAC68228A3D00CC8A4321714961F07A61384ECF6CDB17CD562109410584A3BF9848AA9D9D750112D4C7BEFDEC149887B08218A91CCD715AEDC2ECF3D47E8E6BF703B36F37EB529BB6D87AF65CE459D9C65EE5D6F120F4EDE0E76EBDD218A765EFF44DC7A91BB577814FDF88901134D595024BBAE73AE99E416A77BCD0AF3DDBF4FBFB7AD2FB94DF475DF39D4A52D02DFBCD858C21D98765AECDE202C61329710607B95D43D4A4EF00B3101CBEB425BA3DD821BA4D418390F5CE43081656D6E0F48F56CBE11F49182E00B2079AA24C468BE2DE6DB97781639EDA5D30101C22C8429F13009CF0182216EBEAD89A819454796589D946F0A32E9C84AFDFFC0F504B070890C15C185C040000100F0000504B01021400140008080800ED036F4490C15C185C040000100F0000070000000000000000000000000000000000636F6E74656E74504B0506000000000100010035000000910400000000', '', 0, now(), now(), 1, NULL, 1); +INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (1, 0, '{zoom:0.8}'); +INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (1, 1, 1, 1, 0); + +INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (2, 1, '{zoom:0.8}'); +INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (2, 2, 2, 1, 1); + +INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (1, 'test label', 1, NULL, '#ff0000', 'glyphicon glyphicon-tag'); +INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (1,1); + +INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id) + VALUES (2, 'Welcome Admin', x'504B0304140008080800ED036F4400000000000000000000000007000000636F6E74656E74AD57DD8EDA3814BEEF53B8E9452F360CF985B0C0542C43D5B960355259ED45558D9CC464AC3176E43843A76FB3CFD0479817DB1393F0938442871A09417EFC7DE7F83BDFB1472B9C228E57646CE4194E88819E88CCA8E06343619E08E3FA0D82315222A5118A08571233B827737854916F6A6C4CC54A20F822FC3B96E88381683C366C032D05579FD53383A987C377448FE17068A030990A26E4D8786761F8042586C6A191E07A828C26FCFE81B0D4E8EEDDDED048454695E668F76DB3E3590612322630A35591BA93F02489714C321413B478F9012F8AAC24D760E7E95163E7F856485C638B5E8E506EE90796EF0FF6E8B78410611E11B61F446B20CEC0373B03671B885D053249244920AF7F0B854BFAAE5D83D43372A1C8F5E8ED97E9CD6431F932CB9440107BCEB17E15BDFDFAF57AD4D50F1D32E96A2A27E8B90EE4D9B68366A22B7E33CE70048018DDE184729CA17F49B8E1DB3F9EED963818E58F289720B207A5D23FBBDDF57A7D9508913072158915E03EA7855A6533A9E785625B108AB78DC4AD2299E74CD194410C903CCA8416CEC71C244F1A1A28865E0AA72D843AA46739ED2AD5422A17D5AD6769B9B4601459EA9E8B61BB4D0195C194287E0D65180A160FA9C28C46E70259A6BD13AA53E12C687A90B20D5EEF006F4157241BF6862D419DB97810A5BB53A157817F14720592BBA14B220B7408377BC0854E24891406ED6CF804AD2B794C9DA78B36303BBD5E3317B7600155CA3DB74D225B935842D5DCAF41F32713D2BC50E7D3B18343423B11C434A22F3F38FA27C33C0667606841228663B121E938C76BB4E17F5B83C4716C2FFB47FDEF01CBF8FE913C87027E9C4C66C7F582C26306FB65A2B9F57EC93F8A80773E38174F4411702725775D00BA15473386A6B9CC84D4C6A8DF7A85203BAE0FCE18047B296F53D8B653D2A24B8249CEB248D2904A704B09FF62A84009660DABF24D556BE2FD56B102D3BED9290CA06E7C7792141DBF303E281D89D28252E5EB05A74DDAD0270245C6C5513374EAE6F24BECFA60CBBD165F29D96134559275E744E13FDA697ECEC38AEA718ACD767E614EA16DB7F8D1FCE5BF0C7DB8429FA0BA5104DEFA882847EF2711B4C8C22569614B227B8FB00419E0CD82FBD6C15EE764B9DBAE670E5A32063283DC285A76969F94CF5E2DC35E295C2EEBB5DC703CDF357B7EB391DDF22750309AAC68228A3D00CC8A4321714961F07A61384ECF6CDB17CD562109410584A3BF9848AA9D9D750112D4C7BEFDEC149887B08218A91CCD715AEDC2ECF3D47E8E6BF703B36F37EB529BB6D87AF65CE459D9C65EE5D6F120F4EDE0E76EBDD218A765EFF44DC7A91BB577814FDF88901134D595024BBAE73AE99E416A77BCD0AF3DDBF4FBFB7AD2FB94DF475DF39D4A52D02DFBCD858C21D98765AECDE202C61329710607B95D43D4A4EF00B3101CBEB425BA3DD821BA4D418390F5CE43081656D6E0F48F56CBE11F49182E00B2079AA24C468BE2DE6DB97781639EDA5D30101C22C8429F13009CF0182216EBEAD89A819454796589D946F0A32E9C84AFDFFC0F504B070890C15C185C040000100F0000504B01021400140008080800ED036F4490C15C185C040000100F0000070000000000000000000000000000000000636F6E74656E74504B0506000000000100010035000000910400000000', 'This is a short description', 0, now(), now(), 2, NULL, 2); +INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (3, 1, '{zoom:0.8}'); +INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (3, 2, 3, 2, 0); + +INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (2, 'admin label', 2, NULL, '#0000ff', 'glyphicon glyphicon-star'); +INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (2,2); +INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (3, 'mindmap shared', 2, NULL, '#00ff00', 'glyphicon glyphicon-share'); +INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (3,1); + +COMMIT; +SHUTDOWN; \ No newline at end of file diff --git a/config/database/hsql/atest-data.sql b/config/database/hsql/atest-data.sql deleted file mode 100644 index 746ec7ae..00000000 --- a/config/database/hsql/atest-data.sql +++ /dev/null @@ -1,11 +0,0 @@ -INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURDATE()); -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()); -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; -SHUTDOWN; \ No newline at end of file diff --git a/config/database/hsql/create-schemas.sql b/config/database/hsql/create-schemas.sql index 69bf4c0e..30a919bb 100644 --- a/config/database/hsql/create-schemas.sql +++ b/config/database/hsql/create-schemas.sql @@ -1,11 +1,11 @@ CREATE TABLE COLLABORATOR ( id INTEGER NOT NULL IDENTITY, email VARCHAR(255) NOT NULL, - creation_date DATE); + creation_date DATE +); CREATE TABLE USER ( - id INTEGER NOT NULL IDENTITY, - colaborator_id INTEGER NOT NULL, + colaborator_id INTEGER NOT NULL IDENTITY, authentication_type CHAR(1) NOT NULL, authenticator_uri VARCHAR(255) NULL, firstname VARCHAR(255) NOT NULL, @@ -32,22 +32,41 @@ CREATE TABLE MINDMAP ( --FOREIGN KEY(creator_id) REFERENCES USER(colaborator_id) ); -CREATE TABLE MINDMAP_HISTORY -(id INTEGER NOT NULL IDENTITY, +CREATE TABLE LABEL ( + id INTEGER NOT NULL PRIMARY KEY IDENTITY, + title VARCHAR(30), + creator_id INTEGER NOT NULL, + parent_label_id INTEGER, + color VARCHAR(7) NOT NULL, + iconName VARCHAR(50) NOT NULL + --FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id) +); + +CREATE TABLE R_LABEL_MINDMAP ( + mindmap_id INTEGER NOT NULL, + label_id INTEGER NOT NULL, + PRIMARY KEY (mindmap_id, label_id), + FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id), + FOREIGN KEY (label_id) REFERENCES LABEL (id) ON DELETE CASCADE ON UPDATE NO ACTION +); + +CREATE TABLE MINDMAP_HISTORY ( + id INTEGER NOT NULL IDENTITY, xml LONGVARBINARY NOT NULL, mindmap_id INTEGER NOT NULL, creation_date DATETIME, editor_id INTEGER NOT NULL, - FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id)); + FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id) +); -CREATE TABLE COLLABORATION_PROPERTIES -(id INTEGER NOT NULL IDENTITY, +CREATE TABLE COLLABORATION_PROPERTIES ( + id INTEGER NOT NULL IDENTITY, starred BOOLEAN NOT NULL, mindmap_properties VARCHAR(512) ); -CREATE TABLE COLLABORATION -(id INTEGER NOT NULL IDENTITY, +CREATE TABLE COLLABORATION ( + id INTEGER NOT NULL IDENTITY, colaborator_id INTEGER NOT NULL, properties_id INTEGER NOT NULL, mindmap_id INTEGER NOT NULL, @@ -58,8 +77,8 @@ CREATE TABLE COLLABORATION ); -CREATE TABLE TAG -(id INTEGER NOT NULL IDENTITY, +CREATE TABLE TAG ( + id INTEGER NOT NULL IDENTITY, name VARCHAR(255) NOT NULL, user_id INTEGER NOT NULL, --FOREIGN KEY(user_id) REFERENCES USER(colaborator_id) @@ -68,7 +87,10 @@ CREATE TABLE TAG CREATE TABLE ACCESS_AUDITORY ( id INTEGER NOT NULL IDENTITY, user_id INTEGER NOT NULL, - login_date DATE + login_date DATE, + FOREIGN KEY (user_id) REFERENCES USER (colaborator_id) + ON DELETE CASCADE + ON UPDATE NO ACTION ); COMMIT; diff --git a/config/database/hsql/drop-schemas.sql b/config/database/hsql/drop-schemas.sql index cf40ac87..701bb2c8 100644 --- a/config/database/hsql/drop-schemas.sql +++ b/config/database/hsql/drop-schemas.sql @@ -1,9 +1,11 @@ -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 R_LABEL_MINDMAP; +DROP TABLE IF EXISTS LABEL; +DROP TABLE IF EXISTS MINDMAP; +DROP TABLE IF EXISTS USER; +DROP TABLE IF EXISTS COLLABORATOR; COMMIT; diff --git a/config/database/mysql/apopulate-schemas.sql b/config/database/mysql/apopulate-schemas.sql new file mode 100644 index 00000000..8db7865a --- /dev/null +++ b/config/database/mysql/apopulate-schemas.sql @@ -0,0 +1,50 @@ +# +# Command: mysql -u root -p < apopulate_schemas.sql +# + +INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURRENT_DATE()); +INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) + 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) + 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'); + +INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id) + VALUES (1, 'Welcome Test', 0x504B0304140008080800ED036F4400000000000000000000000007000000636F6E74656E74AD57DD8EDA3814BEEF53B8E9452F360CF985B0C0542C43D5B960355259ED45558D9CC464AC3176E43843A76FB3CFD0479817DB1393F0938442871A09417EFC7DE7F83BDFB1472B9C228E57646CE4194E88819E88CCA8E06343619E08E3FA0D82315222A5118A08571233B827737854916F6A6C4CC54A20F822FC3B96E88381683C366C032D05579FD53383A987C377448FE17068A030990A26E4D8786761F8042586C6A191E07A828C26FCFE81B0D4E8EEDDDED048454695E668F76DB3E3590612322630A35591BA93F02489714C321413B478F9012F8AAC24D760E7E95163E7F856485C638B5E8E506EE90796EF0FF6E8B78410611E11B61F446B20CEC0373B03671B885D053249244920AF7F0B854BFAAE5D83D43372A1C8F5E8ED97E9CD6431F932CB9440107BCEB17E15BDFDFAF57AD4D50F1D32E96A2A27E8B90EE4D9B68366A22B7E33CE70048018DDE184729CA17F49B8E1DB3F9EED963818E58F289720B207A5D23FBBDDF57A7D9508913072158915E03EA7855A6533A9E785625B108AB78DC4AD2299E74CD194410C903CCA8416CEC71C244F1A1A28865E0AA72D843AA46739ED2AD5422A17D5AD6769B9B4601459EA9E8B61BB4D0195C194287E0D65180A160FA9C28C46E70259A6BD13AA53E12C687A90B20D5EEF006F4157241BF6862D419DB97810A5BB53A157817F14720592BBA14B220B7408377BC0854E24891406ED6CF804AD2B794C9DA78B36303BBD5E3317B7600155CA3DB74D225B935842D5DCAF41F32713D2BC50E7D3B18343423B11C434A22F3F38FA27C33C0667606841228663B121E938C76BB4E17F5B83C4716C2FFB47FDEF01CBF8FE913C87027E9C4C66C7F582C26306FB65A2B9F57EC93F8A80773E38174F4411702725775D00BA15473386A6B9CC84D4C6A8DF7A85203BAE0FCE18047B296F53D8B653D2A24B8249CEB248D2904A704B09FF62A84009660DABF24D556BE2FD56B102D3BED9290CA06E7C7792141DBF303E281D89D28252E5EB05A74DDAD0270245C6C5513374EAE6F24BECFA60CBBD165F29D96134559275E744E13FDA697ECEC38AEA718ACD767E614EA16DB7F8D1FCE5BF0C7DB8429FA0BA5104DEFA882847EF2711B4C8C22569614B227B8FB00419E0CD82FBD6C15EE764B9DBAE670E5A32063283DC285A76969F94CF5E2DC35E295C2EEBB5DC703CDF357B7EB391DDF22750309AAC68228A3D00CC8A4321714961F07A61384ECF6CDB17CD562109410584A3BF9848AA9D9D750112D4C7BEFDEC149887B08218A91CCD715AEDC2ECF3D47E8E6BF703B36F37EB529BB6D87AF65CE459D9C65EE5D6F120F4EDE0E76EBDD218A765EFF44DC7A91BB577814FDF88901134D595024BBAE73AE99E416A77BCD0AF3DDBF4FBFB7AD2FB94DF475DF39D4A52D02DFBCD858C21D98765AECDE202C61329710607B95D43D4A4EF00B3101CBEB425BA3DD821BA4D418390F5CE43081656D6E0F48F56CBE11F49182E00B2079AA24C468BE2DE6DB97781639EDA5D30101C22C8429F13009CF0182216EBEAD89A819454796589D946F0A32E9C84AFDFFC0F504B070890C15C185C040000100F0000504B01021400140008080800ED036F4490C15C185C040000100F0000070000000000000000000000000000000000636F6E74656E74504B0506000000000100010035000000910400000000, '', 0, now(), now(), 1, NULL, 1); +INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (1, 0, '{zoom:0.8}'); +INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (1, 1, 1, 1, 0); + +INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (2, 1, '{zoom:0.8}'); +INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (2, 2, 2, 1, 1); + +INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (1, 'test label', 1, NULL, '#ff0000', 'glyphicon glyphicon-tag'); +INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (1,1); + +INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id) + VALUES (2, 'Welcome Admin', 0x504B0304140008080800ED036F4400000000000000000000000007000000636F6E74656E74AD57DD8EDA3814BEEF53B8E9452F360CF985B0C0542C43D5B960355259ED45558D9CC464AC3176E43843A76FB3CFD0479817DB1393F0938442871A09417EFC7DE7F83BDFB1472B9C228E57646CE4194E88819E88CCA8E06343619E08E3FA0D82315222A5118A08571233B827737854916F6A6C4CC54A20F822FC3B96E88381683C366C032D05579FD53383A987C377448FE17068A030990A26E4D8786761F8042586C6A191E07A828C26FCFE81B0D4E8EEDDDED048454695E668F76DB3E3590612322630A35591BA93F02489714C321413B478F9012F8AAC24D760E7E95163E7F856485C638B5E8E506EE90796EF0FF6E8B78410611E11B61F446B20CEC0373B03671B885D053249244920AF7F0B854BFAAE5D83D43372A1C8F5E8ED97E9CD6431F932CB9440107BCEB17E15BDFDFAF57AD4D50F1D32E96A2A27E8B90EE4D9B68366A22B7E33CE70048018DDE184729CA17F49B8E1DB3F9EED963818E58F289720B207A5D23FBBDDF57A7D9508913072158915E03EA7855A6533A9E785625B108AB78DC4AD2299E74CD194410C903CCA8416CEC71C244F1A1A28865E0AA72D843AA46739ED2AD5422A17D5AD6769B9B4601459EA9E8B61BB4D0195C194287E0D65180A160FA9C28C46E70259A6BD13AA53E12C687A90B20D5EEF006F4157241BF6862D419DB97810A5BB53A157817F14720592BBA14B220B7408377BC0854E24891406ED6CF804AD2B794C9DA78B36303BBD5E3317B7600155CA3DB74D225B935842D5DCAF41F32713D2BC50E7D3B18343423B11C434A22F3F38FA27C33C0667606841228663B121E938C76BB4E17F5B83C4716C2FFB47FDEF01CBF8FE913C87027E9C4C66C7F582C26306FB65A2B9F57EC93F8A80773E38174F4411702725775D00BA15473386A6B9CC84D4C6A8DF7A85203BAE0FCE18047B296F53D8B653D2A24B8249CEB248D2904A704B09FF62A84009660DABF24D556BE2FD56B102D3BED9290CA06E7C7792141DBF303E281D89D28252E5EB05A74DDAD0270245C6C5513374EAE6F24BECFA60CBBD165F29D96134559275E744E13FDA697ECEC38AEA718ACD767E614EA16DB7F8D1FCE5BF0C7DB8429FA0BA5104DEFA882847EF2711B4C8C22569614B227B8FB00419E0CD82FBD6C15EE764B9DBAE670E5A32063283DC285A76969F94CF5E2DC35E295C2EEBB5DC703CDF357B7EB391DDF22750309AAC68228A3D00CC8A4321714961F07A61384ECF6CDB17CD562109410584A3BF9848AA9D9D750112D4C7BEFDEC149887B08218A91CCD715AEDC2ECF3D47E8E6BF703B36F37EB529BB6D87AF65CE459D9C65EE5D6F120F4EDE0E76EBDD218A765EFF44DC7A91BB577814FDF88901134D595024BBAE73AE99E416A77BCD0AF3DDBF4FBFB7AD2FB94DF475DF39D4A52D02DFBCD858C21D98765AECDE202C61329710607B95D43D4A4EF00B3101CBEB425BA3DD821BA4D418390F5CE43081656D6E0F48F56CBE11F49182E00B2079AA24C468BE2DE6DB97781639EDA5D30101C22C8429F13009CF0182216EBEAD89A819454796589D946F0A32E9C84AFDFFC0F504B070890C15C185C040000100F0000504B01021400140008080800ED036F4490C15C185C040000100F0000070000000000000000000000000000000000636F6E74656E74504B0506000000000100010035000000910400000000, 'This is a short description', 0, now(), now(), 2, NULL, 2); +INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (3, 1, '{zoom:0.8}'); +INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (3, 2, 3, 2, 0); + +INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (2, 'admin label', 2, NULL, '#0000ff', 'glyphicon glyphicon-star'); +INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (2,2); +INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (3, 'mindmap shared', 2, NULL, '#00ff00', 'glyphicon glyphicon-share'); +INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (3,1); + +COMMIT; diff --git a/config/database/mysql/create-database.sql b/config/database/mysql/create-database.sql index 32203224..6d2cd226 100644 --- a/config/database/mysql/create-database.sql +++ b/config/database/mysql/create-database.sql @@ -1,6 +1,10 @@ -CREATE DATABASE wisemapping +# +# Command: mysql -u root -p < create_database.sql +# +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 diff --git a/config/database/mysql/create-schemas.sql b/config/database/mysql/create-schemas.sql index 97e62c74..eba00226 100644 --- a/config/database/mysql/create-schemas.sql +++ b/config/database/mysql/create-schemas.sql @@ -1,3 +1,9 @@ +# +# Command: mysql -u root -p < create_schemas.sql +# + +USE wisemapping; + CREATE TABLE COLLABORATOR ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, email VARCHAR(255) @@ -7,8 +13,7 @@ CREATE TABLE COLLABORATOR ( CHARACTER SET utf8; CREATE TABLE USER ( - id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, - colaborator_id INTEGER NOT NULL, + colaborator_id INTEGER NOT NULL PRIMARY KEY, authentication_type CHAR(1) CHARACTER SET utf8 NOT NULL, authenticator_uri VARCHAR(255) @@ -46,6 +51,31 @@ CREATE TABLE MINDMAP ( ) CHARACTER SET utf8; +CREATE TABLE LABEL ( + id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, + title VARCHAR(30) + CHARACTER SET utf8 NOT NULL, + creator_id INTEGER NOT NULL, + parent_label_id INTEGER, + color VARCHAR(7) NOT NULL, + iconName VARCHAR(50) NOT NULL, + FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id), + FOREIGN KEY (parent_label_id) REFERENCES LABEL (id) + ON DELETE CASCADE + ON UPDATE NO ACTION +) + CHARACTER SET utf8; + +CREATE TABLE R_LABEL_MINDMAP ( + mindmap_id INTEGER NOT NULL, + label_id INTEGER NOT NULL, + PRIMARY KEY (mindmap_id, label_id), + FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id), + FOREIGN KEY (label_id) REFERENCES LABEL (id) + ON DELETE CASCADE + ON UPDATE NO ACTION +) + CHARACTER SET utf8; CREATE TABLE MINDMAP_HISTORY (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, @@ -97,7 +127,10 @@ CREATE TABLE TAG ( CREATE TABLE ACCESS_AUDITORY ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, login_date DATE, - user_id INTEGER NOT NULL + user_id INTEGER NOT NULL, + FOREIGN KEY (user_id) REFERENCES USER (colaborator_id) + ON DELETE CASCADE + ON UPDATE NO ACTION ) CHARACTER SET utf8; diff --git a/config/database/mysql/drop-schemas.sql b/config/database/mysql/drop-schemas.sql index a6bfa760..40880f18 100644 --- a/config/database/mysql/drop-schemas.sql +++ b/config/database/mysql/drop-schemas.sql @@ -1,9 +1,11 @@ -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 LABEL; +DROP TABLE IF EXISTS MINDMAP; +DROP TABLE IF EXISTS R_LABEL_MINDMAP +DROP TABLE IF EXISTS USER; +DROP TABLE IF EXISTS COLLABORATOR; COMMIT; \ No newline at end of file diff --git a/config/database/mysql/test-data.sql b/config/database/mysql/test-data.sql deleted file mode 100644 index 6301d7af..00000000 --- a/config/database/mysql/test-data.sql +++ /dev/null @@ -1,10 +0,0 @@ -INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURRENT_DATE()); -INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) - 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); - - -COMMIT; diff --git a/config/database/mysql/v3.1-to-v3.3.sql b/config/database/mysql/v3.1-to-v3.3.sql new file mode 100644 index 00000000..6d16873e --- /dev/null +++ b/config/database/mysql/v3.1-to-v3.3.sql @@ -0,0 +1,34 @@ +ALTER TABLE `USER` DROP COLUMN `id`; + +ALTER TABLE `ACCESS_AUDITORY` + ADD CONSTRAINT + FOREIGN KEY (user_id) REFERENCES USER (colaborator_id) + ON DELETE CASCADE + ON UPDATE NO ACTION; + +CREATE TABLE LABEL ( + id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, + title VARCHAR(30) + CHARACTER SET utf8 NOT NULL, + creator_id INTEGER NOT NULL, + parent_label_id INTEGER, + color VARCHAR(7) NOT NULL, + FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id), + FOREIGN KEY (parent_label_id) REFERENCES LABEL (id) + ON DELETE CASCADE + ON UPDATE NO ACTION +) + CHARACTER SET utf8; + +CREATE TABLE R_LABEL_MINDMAP ( + mindmap_id INTEGER NOT NULL, + label_id INTEGER NOT NULL, + PRIMARY KEY (mindmap_id, label_id), + FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id), + FOREIGN KEY (label_id) REFERENCES LABEL (id) + ON DELETE CASCADE + ON UPDATE NO ACTION +) + CHARACTER SET utf8; + + diff --git a/config/database/postgres/create-schemas.sql b/config/database/postgres/create-schemas.sql index 723cc2dd..acc839bd 100644 --- a/config/database/postgres/create-schemas.sql +++ b/config/database/postgres/create-schemas.sql @@ -5,10 +5,9 @@ CREATE TABLE COLLABORATOR ( ); CREATE TABLE "user" ( - id SERIAL NOT NULL PRIMARY KEY, authentication_type TEXT NOT NULL, authenticator_uri VARCHAR(255), - colaborator_id INTEGER NOT NULL, + colaborator_id INTEGER NOT NULL PRIMARY KEY, firstname VARCHAR(255) NOT NULL, lastname VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, @@ -19,6 +18,22 @@ CREATE TABLE "user" ( FOREIGN KEY (colaborator_id) REFERENCES COLLABORATOR (id) ON DELETE CASCADE ON UPDATE NO ACTION ); +CREATE TABLE LABEL ( + id INTEGER NOT NULL PRIMARY KEY, + title VARCHAR(255), + creator_id INTEGER NOT NULL, + parent_label_id INTEGER, + color VARCHAR(7) NOT NULL + --FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id) +); + +CREATE TABLE R_LABEL_MINDMAP ( + mindmap_id INTEGER NOT NULL, + label_id INTEGER NOT NULL, + PRIMARY KEY (mindmap_id, label_id), + FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id), + FOREIGN KEY (label_id) REFERENCES LABEL (id) ON DELETE CASCADE ON UPDATE NO ACTION +); CREATE TABLE MINDMAP ( id SERIAL NOT NULL PRIMARY KEY, @@ -73,7 +88,8 @@ CREATE TABLE TAG ( CREATE TABLE ACCESS_AUDITORY ( id SERIAL NOT NULL PRIMARY KEY, login_date DATE, - user_id INTEGER NOT NULL + user_id INTEGER NOT NULL, + FOREIGN KEY (user_id) REFERENCES "user" (colaborator_id) ON DELETE CASCADE ON UPDATE NO ACTION ); diff --git a/config/database/postgres/drop-schemas.sql b/config/database/postgres/drop-schemas.sql index ea2ddf18..0db61fdf 100644 --- a/config/database/postgres/drop-schemas.sql +++ b/config/database/postgres/drop-schemas.sql @@ -3,6 +3,8 @@ DROP TABLE ACCESS_AUDITORY; DROP TABLE COLLABORATION; DROP TABLE COLLABORATION_PROPERTIES; DROP TABLE MINDMAP_HISTORY; +DROP TABLE R_LABEL_MINDMAP; +DROP TABLE LABEL; DROP TABLE MINDMAP; DROP TABLE "user"; DROP TABLE COLLABORATOR; 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 - 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/java.iml b/java.iml deleted file mode 100644 index 8015fa76..00000000 --- a/java.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/license.txt b/license.txt index 3f5065af..fa41cbdd 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,4 @@ - Copyright [2012] [wisemapping] + Copyright [2014] [wisemapping] Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the diff --git a/pom.xml b/pom.xml index e5cdbc9f..bce1d823 100644 --- a/pom.xml +++ b/pom.xml @@ -5,6 +5,7 @@ 3.1-SNAPSHOT + ${project.basedir}/wise-webapps 4.0.0 @@ -101,12 +102,11 @@ org.apache.maven.plugins - true maven-compiler-plugin 3.1 - 1.6 - 1.6 + 1.7 + 1.7 UTF-8 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/setup.sh b/setup.sh new file mode 100644 index 00000000..fbd65887 --- /dev/null +++ b/setup.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +export MAVEN_OPTS="-XX:MaxPermSize=128M" diff --git a/web2d/src/main/javascript/peer/svg/TextPeer.js b/web2d/src/main/javascript/peer/svg/TextPeer.js index 538a5bd5..62b1197b 100644 --- a/web2d/src/main/javascript/peer/svg/TextPeer.js +++ b/web2d/src/main/javascript/peer/svg/TextPeer.js @@ -169,7 +169,6 @@ web2d.peer.svg.TextPeer = new Class({ computedWidth = 10; } - console.log("Final result:"+computedWidth); var width = parseInt(computedWidth); width = width + this._font.getWidthMargin(); diff --git a/wise-editor/doc/Integration.md b/wise-editor/doc/Integration.md new file mode 100644 index 00000000..dcca093b --- /dev/null +++ b/wise-editor/doc/Integration.md @@ -0,0 +1,71 @@ +JS Editor Integration +--------------------- + +## 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); + } }); \ No newline at end of file diff --git a/wise-editor/pom.xml b/wise-editor/pom.xml index a7972f77..6c8b8935 100644 --- a/wise-editor/pom.xml +++ b/wise-editor/pom.xml @@ -27,62 +27,5 @@ - - - - org.mortbay.jetty - maven-jetty-plugin - 6.1.26 - - - - 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 - - - - - - - - diff --git a/wise-editor/src/main/webapp/css/editor.less b/wise-editor/src/main/webapp/css/editor.less index 4572652f..817b4415 100644 --- a/wise-editor/src/main/webapp/css/editor.less +++ b/wise-editor/src/main/webapp/css/editor.less @@ -1,5 +1,5 @@ @import "compatibility.less"; -@import "css/libraries/moodialog/css/MooDialog.css"; +@import "libraries/moodialog/css/MooDialog.css"; /********************************************************************************/ /* Header & Toolbar Styles */ /********************************************************************************/ 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..d0f7513a 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -119,16 +119,6 @@ ${org.springframework.version} compile - - javax.xml.bind - jaxb-api - 2.0 - - - javax.xml.bind - jsr173_api - 1.0 - org.apache.xmlgraphics fop @@ -188,12 +178,6 @@ ${org.springframework.version} runtime - - javax.transaction - jta - 1.0.1B - runtime - org.springframework spring-jdbc @@ -236,21 +220,15 @@ 1.7 - javax.servlet - servlet-api - 2.4 + javax + javaee-api + 6.0 provided - - javax.servlet - jstl - 1.2 - javax.mail mail 1.4 - compile mysql @@ -288,7 +266,6 @@ jackson-core-asl 1.9.4 - org.codehaus.jackson jackson-mapper-asl @@ -319,55 +296,156 @@ jsoup 1.7.1 + + com.mangofactory + swagger-springmvc + 0.6.6 + + + com.wordnik + swagger-annotations_2.9.1 + 1.2.0 + + + + + coverage + + + + org.jacoco + jacoco-maven-plugin + 0.6.4.201312101107 + + + + pre-unit-test + + prepare-agent + + + + + post-unit-test + test + + report + + + + + + + + + hsqldb + + true + + + + + 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/apopulate-schemas.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/apopulate-schemas.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 @@ -448,16 +526,30 @@ - org.apache.maven.plugins maven-surefire-plugin - org.mortbay.jetty + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.0 + + /wisemapping + ${project.build.directory}/wisemapping.war + war + true + + ${project.build.directory} + + + + + + org.eclipse.jetty jetty-maven-plugin - 8.1.14.v20131031 + 9.1.1.v20140108 foo 9999 @@ -467,20 +559,11 @@ ${project.basedir}/webdefault.xml - - org.mortbay.util.FileResource.checkAliases - false - - - org.mortbay.util.FileResource.checkAliases - false - database.base.url ${project.build.directory} - @@ -503,7 +586,6 @@ - org.apache.maven.plugins maven-dependency-plugin @@ -516,9 +598,9 @@ - org.mortbay.jetty + org.eclipse.jetty jetty-runner - 7.4.5.v20110725 + 9.1.3.v20140225 jetty-runner.jar diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/LabelManager.java b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManager.java new file mode 100644 index 00000000..7d0363dc --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManager.java @@ -0,0 +1,26 @@ +package com.wisemapping.dao; + +import com.wisemapping.model.Label; +import com.wisemapping.model.User; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface LabelManager { + + void addLabel(@NotNull final Label label); + + void saveLabel(@NotNull final Label label); + + @NotNull + List