Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-1019

Update code usages of ConfigurationManager.getProperty to reflect changes in config/modules

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.0
    • Component/s: OAI-PMH
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      4
    • Documentation Status:
      Needed

      Description

      I noticed that rearranging the config files from dspace.cfg to modules/feature.cfg that the Java source code that wanted the configuration property has never been updated to reflect the changes.

      I've noticed one module in particular that has not yet been updated, and is now broken as a result.

      The broken feature would be OAI Harvest for Collections.
      https://github.com/DSpace/DSpace/blob/14f3d7213af360ccd608c951ede5fac560bbc9a0/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/administrative/collection/EditCollectionHarvestingForm.java#L134

      	    String key = "harvester.oai.metadataformats." + metadataFormatValue;
      	    String metadataString = ConfigurationManager.getProperty(key);
      

      The configuration property harvester.oai.metadataformats.* used to exist in dspace.cfg, however, they now reside in modules/oai.cfg. The default ConfigurationManager.getProperty(key) is only searching in dspace.cfg for these config properties. We either need to fix the code of all the affected modules, or update the default behavior of getProperty(key) to also look in modules/*.cfg for the field.
      https://github.com/DSpace/DSpace/blob/14f3d7213af360ccd608c951ede5fac560bbc9a0/dspace/config/modules/oai.cfg#L38

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                robintaylor Robin Taylor
                Reporter:
                peterdietz Peter Dietz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: