Skip to content

Fix haveNA to honor additional handle prefixes #11449 - #13065

Open
AzazelSensei wants to merge 1 commit into
DSpace:mainfrom
AzazelSensei:fix-11449-handle-checknameauthority
Open

AzazelSensei wants to merge 1 commit into
DSpace:mainfrom
AzazelSensei:fix-11449-handle-checknameauthority

Conversation

@AzazelSensei

Copy link
Copy Markdown

References

Description

HandlePlugin.haveNA() now treats handle.additional.prefixes as naming authorities, and handle.plugin.checknameauthority is documented in dspace.cfg.

Instructions for Reviewers

List of changes in this PR:

  • haveNA() matches 0.NA/<prefix> against handle.prefix and every handle.additional.prefixes entry when handle.plugin.checknameauthority is true (default).
  • When that property is false, haveNA() still always returns true.
  • Javadoc and the inline comment now describe that behavior instead of saying the method checks storage.
  • Commented default added next to the other Handle settings in dspace.cfg.
  • Unit tests cover the primary prefix, additional prefixes, an unknown prefix, and the disabled check.

I could not run dspace-api tests on this machine (no JDK 21). CI should run HandlePluginTest.

Merged repositories that already list extra prefixes should no longer need handle.plugin.checknameauthority = false.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR follows all coding best practices based on the Code Conventions Guide.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

haveNA() only compared against handle.prefix, so merged
repositories with extra prefixes had to disable the naming
authority check. Also document handle.plugin.checknameauthority
in dspace.cfg.
@lgeggleston lgeggleston added bug identifier: Handles Related to integration with Handle System documentation Ticket describes improvements or additions to documentation labels Sep 10, 2026
@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace 11.0 Release Sep 10, 2026
@lgeggleston

Copy link
Copy Markdown

Hi @AzazelSensei, thanks for the contribution. While I am not familiar with the details yet, one question I had was why this includes updates to the logic for haveNA(), while the issue seems to be requesting updates only to the method comment/documentation?

Since I'm not familiar with this area, @paulo-graca or @mwoodiupui would you have any thoughts on whether this PR addresses the original ticket? Thank you!

@AzazelSensei

Copy link
Copy Markdown
Author

The ticket title is docs-only, but Mark's comment on #11449 asked for haveNA() to test handle.prefix and handle.additional.prefixes so merged repos do not need checknameauthority = false. That is the logic change. The javadoc and the dspace.cfg comment are the documentation part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug documentation Ticket describes improvements or additions to documentation identifier: Handles Related to integration with Handle System

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

Better documentation for handle.plugin.checknameauthority configuration

2 participants