-
Notifications
You must be signed in to change notification settings - Fork 2
UFAL/Added dead and deadSince to handle rest #948
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
UFAL/Added dead and deadSince to handle rest #948
Conversation
WalkthroughThe changes introduce support for tracking the "dead" status and the date since a handle has been dead within the handle management system. This is achieved by adding new Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant HandleRestRepository
participant HandleClarinService
participant Handle
Client->>HandleRestRepository: Request to create external handle (with dead/deadSince)
HandleRestRepository->>HandleClarinService: createExternalHandle(context, handleStr, url, dead, deadSince)
HandleClarinService->>Handle: Create handle object
HandleClarinService->>Handle: Set dead and deadSince properties
HandleClarinService->>Handle: Save handle
HandleClarinService-->>HandleRestRepository: Return handle
HandleRestRepository-->>Client: Return handle REST representation
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
dspace-api/src/main/java/org/dspace/handle/service/HandleClarinService.java
Outdated
Show resolved
Hide resolved
dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/HandleRestRepository.java
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/handle/HandleClarinServiceImpl.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/handle/HandleClarinServiceImpl.java
Outdated
Show resolved
Hide resolved
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.
Pull Request Overview
This PR adds support for the "dead" status and "deadSince" date to handle objects in the REST API. Key changes include updating the REST repository to pass new parameters, adding corresponding fields and accessors in the REST model, and overloading the createExternalHandle method in the service layer to handle the additional parameters.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/HandleRestRepository.java | Updated to invoke the extended createExternalHandle with dead and deadSince parameters. |
| dspace-server-webapp/src/main/java/org/dspace/app/rest/model/HandleRest.java | Added new fields and accessor methods for dead and deadSince. |
| dspace-api/src/main/java/org/dspace/handle/service/HandleClarinService.java | Documented and declared an overloaded createExternalHandle method supporting dead properties. |
| dspace-api/src/main/java/org/dspace/handle/HandleClarinServiceImpl.java | Implemented the overloaded createExternalHandle method setting dead and deadSince properties. |
Comments suppressed due to low confidence (1)
dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/HandleRestRepository.java:168
- The overloaded createExternalHandle method in HandleClarinServiceImpl already calls save, so calling save again in the repository may lead to duplicate persistence operations. Consider removing the redundant save in the repository or adjust the service implementation to align with the expected flow.
handleClarinService.save(context, handle);
* Fixed browse - the results are not lowercase (#954) * S3-CESNET direct downloads (#949) * Return headers for HEAD request - the bitstream download endpoint (#956) * The bitstream name is encoded in the URL. (#958) * SWORDv2 issues: Cannot update bitstream of archived Item. The swordv2 url is not composed correctly. Fixed deleting the workspace item when used org.dspace.sword2.WorkflowManagerDefault (#957) * The file preview process not required username and password in UI (#960) * Added translation of distribution license for collection to Czech (#952) * Added dead and deadSince to handle rest (#948) * Display community and collection handle (#961) * Embargo during submission not recorded in provenance (#950) * Allow to access File Downloader for any authorized user (ufal#1199) * allow.edit.metadata property should also work for submitters that are members of collection SUBMIT subgroup (ufal#1202) * Prevent error 500 for non admin user uploading file to bundle (ufal#1205) * Track downloads as pageviews (ufal#1209) * Loading the bitstreams - performance issue (ufal#1211)
Problem description
The handle attributes dead and deadSince were not imported.
Summary by CodeRabbit