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
adding fixity events #765
adding fixity events #765
Conversation
@@ -99,6 +117,13 @@ public RdfStream getDatastreamFixity() { | |||
} | |||
|
|||
LOGGER.info("Get fixity for '{}'", externalPath); | |||
|
|||
final RdfStream rs = ((FedoraBinary)resource()).getFixity(translator()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this doing the fixity check twice? Wouldn't it be better to move the createFixityEvent() call into the kernel anyway, so if there was a non-REST API fixity check (e.g., from a sequencer) it would work too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 @escowles.
...maybe in FedoraBinaryImpl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we ever have any intention of carrying through the API partitioning as designed in the fall, we should place this in such a position that it will be easy to extract into a separate module later, along with FedoraFixity
and associated gear.
This moves the createFixityEvent method into FedoraBinaryImpl, but it's still called from the REST API. I think it's important to move the call into FedoraBinaryImpl so any fixity check will trigger an event, even if it's from a sequencer or other non-REST API source. I tried to do this as a demo, but had to pass the EventBus from the REST API down into FedoraBinaryImpl because injection wasn't working for some reason (you had this issue earlier, so I hope you know how to fix that): |
No I had to pass down the eventBus too. |
@escowles Question, In your branch's fedoraFixity's call to getFixity, you're passing 2 nulls rather than baseURL and agent. Are these getting populated some other place? |
@yulgit1 No, that's a mistake -- those should be references to the baseURL and userAgent that are populated in postConstruct() |
@escowles ok i'll run your changes and fix these and anything else if necessary |
@escowles: I now have a new branch w/ the consolidated changes, should I create a new pull request? |
@yulgit1 sure -- go ahead and close this one and open a new PR |
resolving instead with |
No description provided.