Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature workspace/Draft #1527

Closed
wants to merge 77 commits into from
Closed

Feature workspace/Draft #1527

wants to merge 77 commits into from

Conversation

Delawen
Copy link
Contributor

@Delawen Delawen commented Apr 14, 2016

The idea is simple:

When a published metadata is edited, a new copy is saved on both the database and the index marked with the draft flag. This way a user with enough privileges can view, search and edit published metadata without modifying what the rest of the users see about this metadata. This is specially useful for long editings (that last more than one session) or edits that need some kind of review from several users before getting published.

This draft is blocked while a user is editing it to prevent other concurrent editing with other users. This block is released either when the editor is closed or after a timeout of inactivity. Once the draft copy is published, the original published metadata gets replaced with the draft copy and the draft is removed from the system.

Drafts will be saved on a different table on the database, so we can keep a unique identifier by uuid on the metadata table. The lucene index will be the same, just adding the "draft" flag.

Delawen added 28 commits March 31, 2016 09:05
This means a lot of small changes in several places where metadata is used.
This also means a big change on how GeonetEntity creates xml (asXml).

All the tests pass. Not warranteed that all the functionalities remain stable, because now there are database searches that have to handle two tables at the same time. Lot of room for improvement.
…intain and to *enhance*.

All this utility classes are pluggable by xml bean definition, so if you want to modify how a metadata is stored or extracted, you can.
…ing works. Still pending more tests.

No tests on multinode yet.
…nction to load them from context. MultiNode tested.
Now, when you try to edit a published record, a draft is created and showed instead.
Pending:
 * Redirect to draft when trying to edit published metadata
 * If draft is published, replace metadata
 * If metadata is unpublished... what happens with the draft?
@Delawen Delawen added this to the 3.1.0 milestone Apr 14, 2016
@Delawen
Copy link
Contributor Author

Delawen commented Feb 1, 2017

So, Travis does not agree with me. Also, it fails on places I haven't modified 🤔

Locally, all tests run fine:

[INFO] Reactor Summary:
[INFO]
[INFO] GeoNetwork opensource ............................. SUCCESS [ 0.593 s]
[INFO] common utils ...................................... SUCCESS [ 18.938 s]
[INFO] Caching xslt module ............................... SUCCESS [ 0.077 s]
[INFO] ArcSDE module (dummy-api) ......................... SUCCESS [ 0.058 s]
[INFO] GeoNetwork domain ................................. SUCCESS [ 40.445 s]
[INFO] Oaipmh modules .................................... SUCCESS [ 0.095 s]
[INFO] GeoNetwork Events ................................. SUCCESS [ 0.076 s]
[INFO] GeoNetwork schema plugins ......................... SUCCESS [ 0.003 s]
[INFO] GeoNetwork schema plugins core .................... SUCCESS [ 0.080 s]
[INFO] GeoNetwork schema plugin for ISO19139/119 standards SUCCESS [ 2.628 s]
[INFO] GeoNetwork core ................................... SUCCESS [05:59 min]
[INFO] GeoNetwork schema plugin for Dublin Core records retrieved by CSW SUCCESS [ 0.051 s]
[INFO] GeoNetwork schema plugin for Dublin Core standard . SUCCESS [ 0.053 s]
[INFO] GeoNetwork schema plugin for ISO19110 standard .... SUCCESS [ 0.047 s]
[INFO] GeoNetwork CSW server ............................. SUCCESS [02:01 min]
[INFO] GeoNetwork harvesters ............................. SUCCESS [01:32 min]
[INFO] GeoNetwork health monitor ......................... SUCCESS [ 0.096 s]
[INFO] GeoNetwork services ............................... SUCCESS [08:23 min]
[INFO] Geonetwork Web Resources 4 Java ................... SUCCESS [ 9.932 s]
[INFO] GeoNetwork INSPIRE Atom ........................... SUCCESS [ 2.594 s]
[INFO] Solr module ....................................... SUCCESS [ 0.002 s]
[INFO] Solr core configuration ........................... SUCCESS [ 0.153 s]
[INFO] Solr proxy ........................................ SUCCESS [ 0.233 s]
[INFO] messaging ......................................... SUCCESS [ 0.363 s]
[INFO] workers ........................................... SUCCESS [ 0.003 s]
[INFO] WFS features harvester ............................ SUCCESS [ 0.818 s]
[INFO] Tests for schema plugins .......................... SUCCESS [01:33 min]
[INFO] GeoNetwork user interface module .................. SUCCESS [ 1.425 s]
[INFO] JS API and Service documentation .................. SUCCESS [ 2.775 s]
[INFO] GeoNetwork Web module ............................. SUCCESS [01:08 min]
[INFO] GeoNetwork E2E Javascript Tests ................... SUCCESS [ 0.001 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:02 min
[INFO] Finished at: 2017-02-01T12:05:54+01:00
[INFO] Final Memory: 81M/297M
[INFO] ------------------------------------------------------------------------

@fxprunayre fxprunayre modified the milestones: 3.2.1, 3.4.0 Feb 9, 2017
@Delawen
Copy link
Contributor Author

Delawen commented Aug 24, 2017

Ok this is a nightmare. I'm giving up on this branch.

Starting from scratch. Wait for my smaller but concatenated PR in the following days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants