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

Islandora connector houdini #49

Merged
merged 6 commits into from
Jun 5, 2018

Conversation

dannylamb
Copy link
Contributor

@dannylamb dannylamb commented Mar 20, 2018

GitHub Issue: Islandora/documentation#766

What does this Pull Request do?

Provides a camel listener to send images to Houdini and place the results back in Drupal.

What's new?

  • A new OSGi bundle for the listener
  • Updated POJOs for parsing AS2 events

How should this be tested?

Testing instructions to come.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora-CLAW/committers

})

// Make a HEAD request for the Node
.removeHeaders("*", "Authorization")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this assume the node is publicly available, is there a JWT on the event we could reuse?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah totally. That's what this code is doing. The second (and any subsequent) parameter(s) to removeHeaders() are patterns that identify headers to keep. We're maintaining the Authorization header all the way down, which is populated here: https://github.com/Islandora-CLAW/islandora/blob/6e4815ef8743889b4bbd9d9870d2c60f21fe5fc3/src/EventGenerator/EmitEvent.php#L143

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coooool, I did not know that.

}

private void regexSearchAndSetProperty(String regex, String[] links, String propertyName, Exchange exchange) {
Pattern pattern = Pattern.compile(regex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing as how you have 3 of these patterns that you use for each request. It might be better to compile them as class variables once and just use them in here.

@dannylamb
Copy link
Contributor Author

This is now wrapped up in Islandora/documentation#86

@codecov
Copy link

codecov bot commented May 10, 2018

Codecov Report

Merging #49 into master will increase coverage by 2.16%.
The diff coverage is 81.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #49      +/-   ##
============================================
+ Coverage     77.31%   79.47%   +2.16%     
- Complexity       16       56      +40     
============================================
  Files             4       11       +7     
  Lines           119      229     +110     
  Branches          1        1              
============================================
+ Hits             92      182      +90     
- Misses           26       46      +20     
  Partials          1        1
Impacted Files Coverage Δ Complexity Δ
...ora/alpaca/connector/houdini/HoudiniConnector.java 100% <100%> (ø) 3 <3> (?)
...slandora/alpaca/indexing/fcrepo/FcrepoIndexer.java 88.23% <100%> (+1.87%) 4 <0> (ø) ⬇️
.../connector/houdini/event/AS2AttachmentContent.java 100% <100%> (ø) 11 <11> (?)
...dora/alpaca/connector/houdini/event/AS2Object.java 50% <50%> (ø) 3 <3> (?)
...landora/alpaca/connector/houdini/event/AS2Url.java 68.75% <68.75%> (ø) 6 <6> (?)
...ndora/alpaca/connector/houdini/event/AS2Actor.java 70% <70%> (ø) 4 <4> (?)
...ndora/alpaca/connector/houdini/event/AS2Event.java 73.68% <73.68%> (ø) 8 <8> (?)
.../alpaca/connector/houdini/event/AS2Attachment.java 80% <80%> (ø) 5 <5> (?)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 743b395...0af8e9d. Read the comment docs.

@whikloj whikloj merged commit 9973d89 into Islandora:master Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants