Skip to content

Commit

Permalink
Issue 640 (#67)
Browse files Browse the repository at this point in the history
* Adding UUID and URLs to events

* Removing attachment from AS2 event since it may be out of date by the time the message is processed.

* Adding names to URLs

* Changing name from jsonld to metadata

* Adding JSON url.  Updating URN namespaces for UUIDs

* After extensive testing for 640

* Removing hook_install and configuring REST in claw_vagrant

* Adding in reaction rule to remove media from triplestore on delete

* Updates from install testing

* Changes from install testing

* Re-exporting view

* Adding basic auth as dependency for Travis

* Coding standards

* Adding basic_auth to test gear

* Setting filehash view permission to authenticated users

* Removing extra newline

* Update rules.reaction.broadcast_content_create_event.yml

* Update rules.reaction.broadcast_content_update_event.yml

* Update rules.reaction.broadcast_media_create_event.yml

* Update rules.reaction.broadcast_media_update_event.yml

* Update rules.reaction.broadcast_content_delete_event.yml

* Adding install notes about REST configuration

* Update rdf.mapping.media.tn.yml

Getting rid of iana:describes in metadata mapping
  • Loading branch information
dannylamb authored and whikloj committed Nov 22, 2017
1 parent 615b62b commit d357de4
Show file tree
Hide file tree
Showing 21 changed files with 572 additions and 144 deletions.
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -5,7 +5,13 @@

## Introduction

Islandora modules for Drupal 8.2.x
CLAW's core Islandora module for Drupal 8.x

## Installation

For a fully automated install, see [claw-playbook](https://github.com/Islandora-Devops/claw-playbook). If you're installing
manually, the REST configuration for both Nodes and Media need to be enabled. `jwt_auth` and `jsonld` formats needs to be set
for both, with Media additionally needing the `json` format.

## Maintainers

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -21,7 +21,8 @@
"islandora/jsonld": "dev-8.x-1.x",
"stomp-php/stomp-php": "4.*",
"drupal/jwt": "1.0.0-alpha6",
"drupal/media_entity_image": "^1.2"
"drupal/media_entity_image": "^1.2",
"drupal/filehash": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
Expand Down
7 changes: 3 additions & 4 deletions config/install/rdf.mapping.media.tn.yml
Expand Up @@ -21,10 +21,6 @@ fieldMappings:
properties:
- 'dc:title'
- 'rdf:label'
field_image:
properties:
- 'iana:describes'
mapping_type: rel
created:
properties:
- 'schema:dateCreated'
Expand All @@ -39,3 +35,6 @@ fieldMappings:
properties:
- 'schema:author'
mapping_type: rel
field_mimetype:
properties:
- 'ebucore:hasMimeType'
27 changes: 0 additions & 27 deletions config/install/rest.resource.entity.media.yml

This file was deleted.

Expand Up @@ -40,8 +40,8 @@ expression:
uuid: 0e953790-c751-4de8-99b3-c729ba1e09e3
context_values:
recipients:
- "activemq:queue:islandora-indexing-fcrepo-create\r"
- 'activemq:queue:islandora-indexing-triplestore'
- "activemq:queue:islandora-indexing-fcrepo-content\r"
- 'activemq:queue:islandora-indexing-triplestore-index'
context_mapping:
message: event_message
context_processors:
Expand Down
Expand Up @@ -41,7 +41,7 @@ expression:
context_values:
recipients:
- "activemq:queue:islandora-indexing-fcrepo-delete\r"
- 'activemq:queue:islandora-indexing-triplestore'
- 'activemq:queue:islandora-indexing-triplestore-delete'
context_mapping:
message: event_message
context_processors:
Expand Down
Expand Up @@ -40,8 +40,8 @@ expression:
uuid: 7b9cf7be-40e4-4490-ae6f-07a84eb112c4
context_values:
recipients:
- "activemq:queue:islandora-indexing-fcrepo-update\r"
- 'activemq:queue:islandora-indexing-triplestore'
- "activemq:queue:islandora-indexing-fcrepo-content\r"
- 'activemq:queue:islandora-indexing-triplestore-index'
context_mapping:
message: event_message
context_processors:
Expand Down
50 changes: 50 additions & 0 deletions config/install/rules.reaction.broadcast_file_create_event.yml
@@ -0,0 +1,50 @@
uuid: 5a444d61-ac7f-4cde-a8b7-2693bd825753
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
id: broadcast_file_create_event
label: 'Broadcast File Create Event'
events:
-
event_name: 'rules_entity_insert:file'
description: 'Broadcasts an AS2 event to a message broker when a File is created.'
tags:
- ''
config_version: '3'
expression:
id: rules_rule
uuid: 54c6585d-453d-4143-8e54-760019f251d5
conditions:
id: rules_and
uuid: d82f7041-6522-4127-9676-d5534f7c1684
conditions: { }
actions:
id: rules_action_set
uuid: 0dc80d3b-2a60-4a47-afd6-4026d0fdffe6
actions:
-
id: rules_action
uuid: 0e42b62d-39ca-4f51-baa5-fdd1b37605fe
context_values: { }
context_mapping:
entity: file
user: '@user.current_user_context:current_user'
context_processors: { }
provides_mapping: { }
action_id: islandora_create_event_generator
-
id: rules_action
uuid: bcbbe914-54a9-4ff2-9d4b-98945682e087
context_values:
recipients:
- 'activemq:queue:islandora-indexing-fcrepo-file'
context_mapping:
message: event_message
context_processors:
recipients:
rules_tokens: { }
provides_mapping: { }
action_id: islandora_broadcast
50 changes: 50 additions & 0 deletions config/install/rules.reaction.broadcast_file_delete_event.yml
@@ -0,0 +1,50 @@
uuid: d35441d4-62d6-4e0d-bf6f-23ff32eab457
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
id: broadcast_file_delete_event
label: 'Broadcast File Delete Event'
events:
-
event_name: 'rules_entity_delete:file'
description: 'Broadcasts an AS2 event to a message broker when a File is deleted.'
tags:
- ''
config_version: '3'
expression:
id: rules_rule
uuid: 69e8870c-9d20-4cc3-9a17-de940d4c9932
conditions:
id: rules_and
uuid: f465ad23-88a2-4026-a7ca-dbfc2d3aa031
conditions: { }
actions:
id: rules_action_set
uuid: 65ce1b3b-7986-4cf2-ab03-b950212f505e
actions:
-
id: rules_action
uuid: 2d6b2435-e986-4e53-8831-e4328aa63af3
context_values: { }
context_mapping:
entity: file
user: '@user.current_user_context:current_user'
context_processors: { }
provides_mapping: { }
action_id: islandora_delete_event_generator
-
id: rules_action
uuid: f1a6a455-5486-4a4a-a3c9-4e9b3867cf64
context_values:
recipients:
- 'activemq:queue:islandora-indexing-fcrepo-delete'
context_mapping:
message: event_message
context_processors:
recipients:
rules_tokens: { }
provides_mapping: { }
action_id: islandora_broadcast
50 changes: 50 additions & 0 deletions config/install/rules.reaction.broadcast_file_update_event.yml
@@ -0,0 +1,50 @@
d: 129d52bf-c67f-41fc-81fc-83f126f59a66
langcode: en
status: true
dependencies:
enforced:
module:
- islandora
id: broadcast_file_update_event
label: 'Broadcast File Update Event'
events:
-
event_name: 'rules_entity_update:file'
description: 'Broadcasts an AS2 event to a message broker when a File is updated.'
tags:
- ''
config_version: '3'
expression:
id: rules_rule
uuid: 5355a324-0af0-48bb-8168-e2810a9ee0a2
conditions:
id: rules_and
uuid: 0b266024-65ea-4e91-b0e6-ae88b8bfd5ed
conditions: { }
actions:
id: rules_action_set
uuid: 85a784ad-7f03-4ba9-8c01-f87f33f15d5e
actions:
-
id: rules_action
uuid: a7dcf8e2-7e2d-4c9b-b658-e4f3f28898a1
context_values: { }
context_mapping:
entity: file
user: '@user.current_user_context:current_user'
context_processors: { }
provides_mapping: { }
action_id: islandora_update_event_generator
-
id: rules_action
uuid: 60aa1b60-9ea4-40d1-bfbf-d036a617179a
context_values:
recipients:
- 'activemq:queue:islandora-indexing-fcrepo-file'
context_mapping:
message: event_message
context_processors:
recipients:
rules_tokens: { }
provides_mapping: { }
action_id: islandora_broadcast
Expand Up @@ -40,8 +40,8 @@ expression:
uuid: 6b0d07b3-048e-43ac-8a9f-2c5203f8080e
context_values:
recipients:
- "activemq:queue:islandora-indexing-triplestore\r"
- 'activemq:queue:islandora-indexing-fcrepo-binary-create'
- "activemq:queue:islandora-indexing-fcrepo-media\r"
- "activemq:queue:islandora-indexing-triplestore-index"
context_mapping:
message: event_message
context_processors:
Expand Down
15 changes: 7 additions & 8 deletions config/install/rules.reaction.broadcast_media_delete_event.yml
@@ -1,4 +1,4 @@
uuid: 71df1b5d-2f04-42fa-a660-5375de9c6c51
uuid: af85f943-2cc0-455c-97b0-4035d15f55ec
langcode: en
status: true
dependencies:
Expand All @@ -16,18 +16,18 @@ tags:
config_version: '3'
expression:
id: rules_rule
uuid: c12184e7-8230-4bc7-b625-2a26b4a5a913
uuid: abb78ad6-5f27-43e7-890c-c2a12e76ce51
conditions:
id: rules_and
uuid: 5147d740-4e32-4935-8c30-f893e7c3f86f
uuid: 8c386012-6796-4138-b4e7-d438916c713f
conditions: { }
actions:
id: rules_action_set
uuid: 4a023b99-1cf8-410a-a082-b0c0369a807d
uuid: 6599d3f0-dcd7-482c-bcb4-fa76b012da6a
actions:
-
id: rules_action
uuid: 1fdc07dc-72ba-4666-abb8-8d79f29b67ff
uuid: 7003fe72-49f7-4a3a-b95b-781ef1c61615
context_values: { }
context_mapping:
entity: media
Expand All @@ -37,11 +37,10 @@ expression:
action_id: islandora_delete_event_generator
-
id: rules_action
uuid: 75d0cf84-715b-4167-8ec2-92047a0bec56
uuid: 8a5dc149-9629-4e94-a8d5-3ff6069d6af6
context_values:
recipients:
- "activemq:queue:islandora-indexing-triplestore\r"
- 'activemq:queue:islandora-indexing-fcrepo-binary-delete'
- 'activemq:queue:islandora-indexing-triplestore-delete'
context_mapping:
message: event_message
context_processors:
Expand Down
Expand Up @@ -40,8 +40,8 @@ expression:
uuid: ee50c8ae-a9cd-479a-aa86-3567629a01b8
context_values:
recipients:
- "activemq:queue:islandora-indexing-triplestore\r"
- 'activemq:queue:islandora-indexing-fcrepo-binary-update'
- "activemq:queue:islandora-indexing-fcrepo-media\r"
- "activemq:queue:islandora-indexing-triplestore-index"
context_mapping:
message: event_message
context_processors:
Expand Down

0 comments on commit d357de4

Please sign in to comment.