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

Draft: AssociateItem Backend #382

Draft
wants to merge 7 commits into
base: dspace-cris-2023_02_x
Choose a base branch
from

Conversation

floriangantner
Copy link

@floriangantner floriangantner commented Sep 1, 2023

References

Description

  • see issue . when all issues are created and draft status has ended
  • new Feature of associate item

Instructions for Reviewers

  • deploy default configuration and check the configured associateitem-service.xml
  • the configation is similar to the edititem modes. Additional properties can be defined which are essential for the associateitem actions: discovery, metadatafield, itemSourcetype, itemTypeTarget, disableAuthSource and the optional parameter conditionSource and conditionTarget
  <bean class="org.dspace.content.edit.AssociateItemMode">
      <property name="name" value="PROJECTPUBLICATION" />
      <property name="security">
          <value type="org.dspace.content.security.CrisSecurity">
              CUSTOM
          </value>
      </property>
      <property name="items">
          <list>
              <value>crispj.investigator</value>
          </list>
      </property>
      <!-- discovery index configuration that is shown on the associate-item-page -->
      <property name="discovery" value="researchoutputs" />
      <!-- metadatafield where the metadata is being created . It must be authority controlled -->
      <property name="metadatafield" value="dc.relation.project" />
      <!-- additional check for entity types. discovery indexes might display multiple types and the authority might only support one type -->
      <property name="itemTypeSource" value="Publication" />
      <property name="itemTypeTarget" value="Project" />
      <!-- disable the authorization at the item where the metadata is being created. -->
      <property name="disableAuthSource" value="true" />
      <!-- additional conditions can be specified which must be fulfilled on the source and/or target item, when some associateitem request is made -->
      <!--
      <property name="conditionSource" value-ref="" />
      <property name="conditionTarget" value-ref="" />
      -->
  </bean>

List of changes in this PR:

  • AssociateItemMode
    • in adoption to EditItemMode Implementation
  • AssociateItem Rest Endpoint and Services
  • example configuration provided:
  • tbd: Tests will be provided

Include guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • 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 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.
  • 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.

Service and rest repository for associateitem mode. mainly copied from edit-item mode
Service for associateitem to create metadata-based connection between items with additional skipable auth and condition check
Rest Controller for associateitem with simple authenticated patch and delete operations to create/delete associations between items
@floriangantner floriangantner changed the base branch from dspace-cris-7 to main-cris February 20, 2024 15:06
[maven-release-plugin] copy for tag dspace-cris-2023.02.02
@floriangantner floriangantner changed the base branch from main-cris to dspace-cris-2023_02_x April 9, 2024 09:58
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.

Associate some project to some publication
1 participant