Skip to content

Commit

Permalink
Merge branch 'master' into neo4j-3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jri committed Feb 25, 2017
2 parents b13d010 + a9b4547 commit 3717278
Show file tree
Hide file tree
Showing 159 changed files with 3,594 additions and 2,507 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
@@ -1,7 +1,7 @@
DeepaMehta is a platform for collaboration and knowledge management.
<http://www.deepamehta.de/>

Copyright 2000-2016 Jörg Richter et al.
Copyright 2000-2017 Jörg Richter et al.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Expand Down
113 changes: 82 additions & 31 deletions README.md
Expand Up @@ -20,6 +20,9 @@ Live demo:
Download:
<http://download.deepamehta.de/>

Hosted service:
<https://my.deepamehta.de/>

Mailing lists:
<http://lists.deepamehta.de/>

Expand Down Expand Up @@ -52,34 +55,36 @@ To install and use DeepaMehta follow 5 mandatory steps:

* **Java 1.6** (or newer).

If you don't know weather Java is already installed on your computer or what Java is at all go to
<http://www.java.com>.
To find out whether Java is already installed on your computer go to a terminal window and type `java -version`.
For more information about Java go to <http://www.java.com>.

Note: you do *not* need a Java plugin for your browser. DeepaMehta uses Java only at its backend.

* A **webbrowser**.

DeepaMehta works fine at least with Firefox, Google Chrome, or Safari 5 (or newer).
Doesn't work with IE8. Possibly works with IE9 or IE10 (not tested).


2. Download DeepaMehta
----------------------
2. Download
-----------

<http://download.deepamehta.de/deepamehta-4.8.1.zip> (7.2 MB)
<http://download.deepamehta.de/deepamehta-4.8.5.zip> (7.2 MB)


3. Install DeepaMehta
---------------------
3. Install
----------

Unzip the downloaded file. A folder `deepamehta-4.8.1` is created.
Unzip the downloaded file. A folder `deepamehta-4.8.5` is created.
You can move that folder to any place you want.

Update note: if you want update an existing DeepaMehta installation continue with "Updating DeepaMehta" now (see below).


4. Start DeepaMehta
-------------------
4. Start
--------

Open the `deepamehta-4.8.1` folder and use the respective starter script for your platform:
Open the `deepamehta-4.8.5` folder and use the respective starter script for your platform:

deepamehta-linux.sh # choose "Run in terminal"
deepamehta-macosx.command # double-click it
Expand All @@ -94,8 +99,8 @@ To open the DeepaMehta browser window manually:
Login with `admin` and empty password. Now you're ready to create content.


5. Stop DeepaMehta
------------------
5. Stop
-------

Go to the terminal window that opened while startup and press:

Expand All @@ -110,36 +115,38 @@ You can now close the terminal window.
Auxiliary tasks follow:


Updating DeepaMehta
-------------------
Updating
--------

You can update from DeepaMehta 4.1 or newer to 4.8.1 while keeping your existing DeepaMehta content:
You can update from DeepaMehta 4.1 or newer to 4.8.5 while keeping your existing DeepaMehta content:

1. Install DeepaMehta 4.8.1 (see steps 2. and 3. above).
2. Stop your previous DeepaMehta installation if running. (Also stop DeepaMehta 4.8.1 if already started.)
3. Copy the `deepamehta-db` folder from your previous DeepaMehta installation into the `deepamehta-4.8.1` folder.
1. Install DeepaMehta 4.8.5 (see steps 2. and 3. above).
2. Stop your previous DeepaMehta installation if running. (Also stop DeepaMehta 4.8.5 if already started.)
3. Copy the `deepamehta-db` folder from your previous DeepaMehta installation into the `deepamehta-4.8.5` folder.
(Replace as necessary.)
4. Proceed with "Start DeepaMehta" (see step 4. above).
4. Proceed with "Start" (see step 4. above).

IMPORTANT: generally you're not required to install all intermediate versions. However there are certain versions that are mandatory to be installed. These versions comprise:

DeepaMehta 4.5
DeepaMehta 4.7
So, to update e.g. from DeepaMehta 4.3 to 4.8.1 you must install and run these versions consecutively: 4.5, 4.7, 4.8.1.

So, to update e.g. from DeepaMehta 4.3 to 4.8.5 you must install and run these versions consecutively: 4.5, 4.7, 4.8.5.

Updating from DeepaMehta 2 or 3 to DeepaMehta 4 is not supported. Even updating from 4.0.x is not supported.
The first updatable DeepaMehta version is 4.1.


Install DeepaMehta plugins
--------------------------
Install plugins
---------------

You can extend DeepaMehta's functionality by installing plugins.
See the list of available plugins:
<https://www.deepamehta.de/content/download>


Reset the DeepaMehta database
-----------------------------
Reset the database
------------------

Sometimes you might want to restart DeepaMehta with a fresh database:

Expand All @@ -150,17 +157,17 @@ Sometimes you might want to restart DeepaMehta with a fresh database:
Caution: you will loose all your DeepaMehta content.


Uninstall DeepaMehta
--------------------
Uninstall
---------

1. Stop DeepaMehta.
2. Delete the entire `deepamehta-4.8.1` folder.
2. Delete the entire `deepamehta-4.8.5` folder.

This removes DeepaMehta completely from your computer, including all your DeepaMehta content.


Build DeepaMehta from Source
----------------------------
Build from Source
-----------------

<https://trac.deepamehta.de/wiki/BuildFromSource>

Expand All @@ -171,6 +178,50 @@ Build DeepaMehta from Source
Version History
---------------

**4.8.5** -- Jan 4, 2017

* Improvements:
* Core type instances are searchable by-text
* Changes:
* The "Retype Topic" feature is removed
* Explicit "Create Icon" command
* Bug fix:
* Icon topics work for access controlled file repos
* For more changes and details see the release notes:
<https://trac.deepamehta.de/wiki/ReleaseNotes>

**4.8.4** -- Nov 14, 2016

* Improvements:
* Non-shared type extensions
* Deleting workspaces
* Association Duplicate Check
* WebSockets server is configurable
* Bug fix:
* Webclient starts if stale cookies are present
* For more changes and details see the release notes:
<https://trac.deepamehta.de/wiki/ReleaseNotes>

**4.8.3** -- Aug 30, 2016

* Improvement:
* More robust topicmap rendering.
* Plugin development framework:
* Suppress geocoding per code block.
* Bug fixes:
* Facets API.
* For more changes and details see the release notes:
<https://trac.deepamehta.de/wiki/ReleaseNotes>

**4.8.2** -- Jun 30, 2016

* New feature:
* Download files from remote file repository.
* Improvement:
* When starting the Webclient the last used topicmap is selected automatically.
* For more changes and details see the release notes:
<https://trac.deepamehta.de/wiki/ReleaseNotes>

**4.8.1** -- Jun 21, 2016

* Improvements:
Expand Down Expand Up @@ -638,4 +689,4 @@ Version history of **DeepaMehta 1** and **DeepaMehta 2**:

------------
Jörg Richter
Jun 21, 2016
Jan 4, 2017
17 changes: 6 additions & 11 deletions modules/dm4-accesscontrol/pom.xml
Expand Up @@ -7,31 +7,26 @@
<name>DeepaMehta 4 Access Control</name>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-accesscontrol</artifactId>
<version>4.8.2-SNAPSHOT</version>
<version>4.8.6-SNAPSHOT</version>
<packaging>bundle</packaging>

<parent>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-module</artifactId>
<version>4.8.2-SNAPSHOT</version>
<relativePath>../dm4-module/pom.xml</relativePath>
<artifactId>deepamehta-plugin</artifactId>
<version>4.8.6-SNAPSHOT</version>
<relativePath>../dm4-plugin/pom.xml</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-core</artifactId>
<version>4.8.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-workspaces</artifactId>
<version>4.8.2-SNAPSHOT</version>
<version>4.8.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-files</artifactId>
<version>4.8.2-SNAPSHOT</version>
<version>4.8.6-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
Expand Up @@ -42,14 +42,15 @@
import de.deepamehta.core.service.event.PostUpdateTopicListener;
import de.deepamehta.core.service.event.PreCreateTopicListener;
import de.deepamehta.core.service.event.PreUpdateTopicListener;
import de.deepamehta.core.service.event.ResourceRequestFilterListener;
import de.deepamehta.core.service.event.ServiceRequestFilterListener;
import de.deepamehta.core.service.event.StaticResourceFilterListener;
import de.deepamehta.core.util.JavaUtils;

// ### TODO: hide Jersey internals. Move to JAX-RS 2.0.
import com.sun.jersey.spi.container.ContainerRequest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import javax.ws.rs.GET;
Expand Down Expand Up @@ -87,7 +88,7 @@ public class AccessControlPlugin extends PluginActivator implements AccessContro
PostUpdateTopicListener,
PostUpdateAssociationListener,
ServiceRequestFilterListener,
ResourceRequestFilterListener,
StaticResourceFilterListener,
CheckDiskQuotaListener {

// ------------------------------------------------------------------------------------------------------- Constants
Expand Down Expand Up @@ -315,10 +316,11 @@ public void setWorkspaceOwner(Topic workspace, String username) {
@Override
public void createMembership(@PathParam("username") String username, @PathParam("workspace_id") long workspaceId) {
try {
dm4.createAssociation(mf.newAssociationModel(MEMBERSHIP_TYPE,
Association assoc = dm4.createAssociation(mf.newAssociationModel(MEMBERSHIP_TYPE,
mf.newTopicRoleModel(getUsernameTopicOrThrow(username).getId(), "dm4.core.default"),
mf.newTopicRoleModel(workspaceId, "dm4.core.default")
));
assignMembership(assoc);
} catch (Exception e) {
throw new RuntimeException("Creating membership for user \"" + username + "\" and workspace " +
workspaceId + " failed", e);
Expand Down Expand Up @@ -520,9 +522,9 @@ public void postCreateAssociation(Association assoc) {
// ---

@Override
public void preUpdateTopic(Topic topic, TopicModel newModel) {
public void preUpdateTopic(Topic topic, TopicModel updateModel) {
if (topic.getTypeUri().equals("dm4.accesscontrol.username")) {
SimpleValue newUsername = newModel.getSimpleValue();
SimpleValue newUsername = updateModel.getSimpleValue();
String oldUsername = topic.getSimpleValue().toString();
if (newUsername != null && !newUsername.toString().equals(oldUsername)) {
throw new RuntimeException("A Username can't be changed (tried \"" + oldUsername + "\" -> \"" +
Expand All @@ -532,20 +534,14 @@ public void preUpdateTopic(Topic topic, TopicModel newModel) {
}

@Override
public void postUpdateTopic(Topic topic, TopicModel newModel, TopicModel oldModel) {
public void postUpdateTopic(Topic topic, TopicModel updateModel, TopicModel oldTopic) {
setModifier(topic);
}

@Override
public void postUpdateAssociation(Association assoc, AssociationModel newModel, AssociationModel oldModel) {
if (isMembership(assoc.getModel())) {
if (isMembership(oldModel)) {
// ### TODO?
} else {
wsService.assignToWorkspace(assoc, assoc.getTopicByType("dm4.workspaces.workspace").getId());
}
} else if (isMembership(oldModel)) {
// ### TODO?
public void postUpdateAssociation(Association assoc, AssociationModel updateModel, AssociationModel oldAssoc) {
if (isMembership(assoc.getModel()) && !isMembership(oldAssoc)) {
assignMembership(assoc);
}
//
setModifier(assoc);
Expand All @@ -560,7 +556,7 @@ public void serviceRequestFilter(ContainerRequest containerRequest) {
}

@Override
public void resourceRequestFilter(HttpServletRequest servletRequest) {
public void staticResourceFilter(HttpServletRequest servletRequest, HttpServletResponse servletResponse) {
// Note: for the resource filter no HttpServletRequest is injected
requestFilter(servletRequest);
}
Expand Down Expand Up @@ -602,6 +598,10 @@ private boolean isMembership(AssociationModel assoc) {
return assoc.getTypeUri().equals(MEMBERSHIP_TYPE);
}

private void assignMembership(Association assoc) {
wsService.assignToWorkspace(assoc, assoc.getTopicByType("dm4.workspaces.workspace").getId());
}

private void assignSearchTopic(Topic searchTopic) {
try {
Topic workspace;
Expand Down
15 changes: 5 additions & 10 deletions modules/dm4-box-renderer-dom/pom.xml
Expand Up @@ -7,26 +7,21 @@
<name>DeepaMehta 4 Box Renderer (DOM)</name>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-box-renderer-dom</artifactId>
<version>4.8.2-SNAPSHOT</version>
<version>4.8.6-SNAPSHOT</version>
<packaging>bundle</packaging>

<parent>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-module</artifactId>
<version>4.8.2-SNAPSHOT</version>
<relativePath>../dm4-module/pom.xml</relativePath>
<artifactId>deepamehta-plugin</artifactId>
<version>4.8.6-SNAPSHOT</version>
<relativePath>../dm4-plugin/pom.xml</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-core</artifactId>
<version>4.8.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-topicmaps</artifactId>
<version>4.8.2-SNAPSHOT</version>
<version>4.8.6-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit 3717278

Please sign in to comment.