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
Transaction Support #67
Merged
Merged
Changes from 8 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
a9d558a
Add startTransaction for creating transactions
mikejritter e0bf3ce
Add transaction header constants
mikejritter bc9e596
Add method to retrieve transaction uri
mikejritter a3d2c0e
Add method to add Atomic-Id header for transactions
mikejritter fb686ac
Use transaction endpoint constant
mikejritter 6a615d8
Override addTransaction for all builders
mikejritter 7b5d998
Initial TransactionBuilder idea
mikejritter 2ba7721
Checkstyle updates
mikejritter bf4ef02
Create RequestBuilders per transaction endpoint
mikejritter 4ab4583
Move start and TRANSACTION_ENDPOINT to TransactionBuilder
mikejritter 26e68a3
Add uri validation methods
mikejritter e708c1e
Add simple tests for tx uri validation
mikejritter cb41eca
Split start valid into separate tests
mikejritter d5225d0
Use regex from fcrepo for validation help on tx ids
mikejritter 3ab69aa
Create TransactionURI for more strict api definitions
mikejritter d757231
Update ATOMIC_ID constant
mikejritter 798b055
Try to retrieve the Atomic-ID from a response when getting the transa…
mikejritter 4f1c652
Add TransactionalFcrepoClient for automatically adding Atomic-IDs to …
mikejritter d1fe986
Add builder option for a TransactionFcrepoClient
mikejritter 441ef5c
Create a container to test the transactional client
mikejritter bb007a2
Use DateTimeFormatter when checking all Atomic-Expires headers
mikejritter 373e8a7
Add a method for creating transaction clients from a fcrepo client
mikejritter 916e1ff
Extend BodyRequestBuilder to allow for removal of addTransaction
mikejritter 6002a51
Make addTransaction protected to hide it in unused builders
mikejritter 837afe5
Add function to start a tx and create a client
mikejritter 87d40ec
Test for startTransactionalClient
mikejritter 9f49e6e
Drop Optional from getTransactionUri
mikejritter 913a529
Add transaction helpers to client
mikejritter e8daf3f
Move startTransactionClient to FcrepoClient
mikejritter e06e813
Update tests to be only through TransactionalFcrepoClient
mikejritter c68bbd6
Create RequestBuilders for tx endpoints in TransactionalFcrepoClient
mikejritter b97e05d
Update import for TRANSACTION_ENDPOINT
mikejritter 42ad827
Remove unused classes
mikejritter 6e0230b
Shorten transaction methods
mikejritter 44b64b4
Keep functionality for base or transaction endpoints
mikejritter a786b92
Add test creating a client using the full transaction endpoint
mikejritter 975192d
Drop need for TransactionURI
mikejritter 1eb0043
Use Get/Post/etc builders for the transaction api
mikejritter File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
154 changes: 0 additions & 154 deletions
154
src/main/java/org/fcrepo/client/TransactionBuilder.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Reducing the set of operations available is probably a good thing. It may not be an issue, but I am realizing this does remove the ability to set headers. My understanding is that authz doesn't require any extra headers in fedora, so the only other use case that comes to mind is extensions like API-X (which seems to have become less of a thing), where headers might be used by the extensions for triggering behaviors. Anyways, I don't know if we need to expose addHeader/addLinkHeader or not, just was realizing the option was being removed.
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.
I'm trying to remember why I had gone with returning RequestBuilder in the first place - since that originally came from the TransactionBuilder maybe it was something in there. Either way it seems like it we could have these return PostBuilder/GetBuilder/etc which should expose the additional methods.
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.
that's true, although it would expose a lot of other methods too like addTransaction. But maybe its better to be under-perscriptive rather than over.