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

Fcrepo-2954 - Add headers #44

Merged
merged 1 commit into from
Nov 30, 2018
Merged

Conversation

bbpennel
Copy link
Contributor

JIRA Ticket: https://jira.duraspace.org/browse/FCREPO-2954

What does this Pull Request do?

Adds methods for adding arbitrary headers.

What's new?

Adds .addHeader and .addLinkHeader to all terminal request builders.

How should this be tested?

mvn clean install

Additional Notes:

I left out .addHeader(Header) on the assumption we didn't want to expose the underlying dependency on HttpClient. I also didn't add a setHeader method, since it seemed a little odd for a builder, but I'm not opposed to including one.

Interested parties

@awoods

Copy link

@awoods awoods left a comment

Choose a reason for hiding this comment

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

I wonder if we are introducing unnecessary code with several of the addLinkHeader methods. Unless you have specific needs in mind, I would be inclined to only keep the addHeader methods.

}

@Override
protected DeleteBuilder addLinkHeader(final FcrepoLink linkHeader) {
Copy link

Choose a reason for hiding this comment

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

Link on Delete? I am not sure the use case exists.

}

@Override
protected MoveBuilder addLinkHeader(final FcrepoLink linkHeader) {
Copy link

Choose a reason for hiding this comment

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

Link on Move? I am not sure the use case exists.

@bbpennel bbpennel force-pushed the fcrepo-2954-headers branch 2 times, most recently from caa044a to a3ef4cb Compare November 29, 2018 22:27
@bbpennel
Copy link
Contributor Author

@awoods I have removed the addLinkHeader method for Copy, Delete and Move. Also, I noticed a lot of method visibility issues (lots of things set to protected that shouldn't have been), so I have addressed those.

…s (not needed for HistoricMementoBuilder since it falls back to PostBuilder). Fix visibility of methods in builders.
@bbpennel bbpennel force-pushed the fcrepo-2954-headers branch from a3ef4cb to 95ab0e0 Compare November 29, 2018 22:28
@awoods awoods merged commit cf55db1 into fcrepo-exts:master Nov 30, 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