Compare commits

...

1049 Commits

Author SHA1 Message Date
Tim Donohue
61f2695b83 Merge pull request #11396 from TexasDigitalLibrary/port_11329_to_7x
[Port dspace-7_x] Fix Hibernate syntax bugs in the CollectionDAO and BitstreamDAO
2025-10-01 16:44:36 -05:00
Tim Donohue
8643888d68 Merge pull request #11399 from tdonohue/port_11139_to_7x
[Port dspace-7_x] fix(#10721): Sanitize non-characters during OAI indexing
2025-10-01 16:39:31 -05:00
JohnnyMendesC
d8fbe16ede fix(#10721): Sanitize non-characters during OAI indexing (#11139)
* fix(#10721): Sanitize non-characters during OAI indexing

* refactor: Use StringEscapeUtils as suggested in review

* fix: Removed whitespace before the import that was causing error

Maven Unit Test failed due to the whitespace before the import
https://github.com/DSpace/DSpace/actions/runs/16891881837/job/47853392956?pr=11139#step:4:1959

* fix: Removed trailing whitespace that was causing error
2025-10-01 15:28:11 -05:00
nwoodward
29e13b77fc checkstyle fix 2025-10-01 13:46:40 -05:00
nwoodward
fc74a7ffdf fix Hibernate bugs 2025-10-01 13:41:41 -05:00
Tim Donohue
6ac823d29a Merge pull request #11358 from DSpace/backport-11330-to-dspace-7_x
[Port dspace-7_x] Fix (#9694): Change Solr dynamic field *.year to *_year
2025-09-30 17:29:57 -05:00
JohnnyMendesC
0246588ab5 Fix (#9694): Change Solr dynamic field *.year to *_year
(cherry picked from commit 9fc163fbda)
2025-09-30 21:44:34 +00:00
Tim Donohue
190b908a8a Merge pull request #11355 from DSpace/backport-11328-to-dspace-7_x
[Port dspace-7_x] Fix Hibernate syntax bug in the CollectionDAO
2025-09-30 16:38:57 -05:00
nwoodward
f8ac04b591 lint fixes
(cherry picked from commit b8812aad45)
2025-09-30 21:07:21 +00:00
nwoodward
23cd582801 fix hibernate syntax bug
(cherry picked from commit d9cbb96655)
2025-09-30 21:07:21 +00:00
Tim Donohue
c100eb2567 Merge pull request #11344 from tdonohue/port_11341_to_7x
[Port dspace-7_x] [GitHub Actions] Decrease cache size of our Docker images in GitHub Actions
2025-09-23 16:39:24 -05:00
Tim Donohue
de50420624 Change to "mode=min" in order to minimize our cache size for Docker images 2025-09-23 15:54:55 -05:00
Tim Donohue
988a67d8fe Merge pull request #11338 from DSpace/backport-11337-to-dspace-7_x
[Port dspace-7_x] Remove ratingreviewaction in workflow-actions.xml
2025-09-23 15:09:35 -05:00
Sascha Szott
7a95781068 remove ratingreviewaction in test context
(cherry picked from commit ddccb342d6)
2025-09-23 18:47:37 +00:00
Sascha Szott
cad7e9397b remove ratingreviewaction bean in workflow-actions.xml
(cherry picked from commit 770ab0ca79)
2025-09-23 18:47:36 +00:00
Tim Donohue
f84ddb541d Merge pull request #11318 from tdonohue/port_11261_to_7x
[Port dspace-7_x] Fix/11033 solr logging thumbnail download stats
2025-09-12 16:14:56 -05:00
Tim Donohue
45fa8277d8 Merge pull request #11312 from DSpace/backport-10756-to-dspace-7_x
[Port dspace-7_x] The subscription sends an email with `No items` however there are changes in the collection
2025-09-12 15:58:40 -05:00
JohnnyMendesC
d4c826d871 fix(#11033): Prevent logging of ignored bundles in Solr stats 2025-09-12 15:03:15 -05:00
jm
ee5093b6a6 Fixed https://github.com/DSpace/DSpace/issues/10754 by setting the context user to the current subscriber
(cherry picked from commit 6275d3b756)
2025-09-12 19:25:41 +00:00
Tim Donohue
e672be5eaa Merge pull request #11309 from DSpace/backport-10555-to-dspace-7_x
[Port dspace-7_x] Fix sort order in AbstractHibernateDAO findByX
2025-09-12 13:52:27 -05:00
abhinav
fcde7489d3 Added a test case to verify the sort
(cherry picked from commit 989d930417)
2025-09-12 17:30:09 +00:00
abhinav
4402847f38 129616: Added order by
(cherry picked from commit cc6520bfbb)
2025-09-12 17:30:09 +00:00
Tim Donohue
a180a257cd Merge pull request #11305 from DSpace/backport-11253-to-dspace-7_x
[Port dspace-7_x] Add ORCID document type
2025-09-11 13:56:24 -05:00
Pierre Lasou
467e42ca27 Add ORCID document type
Addiing new mappings between ORCID document type and DSpace default type.

(cherry picked from commit e213f5b305)
2025-09-11 15:59:20 +00:00
Tim Donohue
13c6835656 Merge pull request #11302 from DSpace/backport-10929-to-dspace-7_x
[Port dspace-7_x] Fix SAF Import Open connection leak
2025-09-10 15:50:31 -05:00
Tim Donohue
f700c37a73 Merge pull request #11299 from DSpace/backport-11263-to-dspace-7_x
[Port dspace-7_x] Add familyName and givenName when creating profile author and fix EPe…
2025-09-10 15:49:47 -05:00
Nathan Buckingham
0902db21eb 132206: Saf Imports close connections
(cherry picked from commit 35135c80ae)
2025-09-10 19:32:40 +00:00
Jesiel Viana
11ba34b1fd Add familyName and givenName when creating profile author and fix EPerson#getName
(cherry picked from commit df0dd01776)
2025-09-10 19:22:58 +00:00
Tim Donohue
936cb3c101 Merge pull request #11227 from DSpace/dependabot/maven/dspace-7_x/io.grpc-grpc-context-1.75.0
Bump io.grpc:grpc-context from 1.74.0 to 1.75.0
2025-09-10 09:50:25 -05:00
Tim Donohue
7c7bbeadc5 Merge pull request #11235 from DSpace/dependabot/maven/dspace-7_x/org.ehcache-ehcache-3.11.1
Bump org.ehcache:ehcache from 3.10.8 to 3.11.1
2025-09-10 09:48:33 -05:00
Tim Donohue
5e3c57a920 Merge pull request #11276 from DSpace/dependabot/maven/dspace-7_x/com.amazonaws-aws-java-sdk-s3-1.12.791
Bump com.amazonaws:aws-java-sdk-s3 from 1.12.788 to 1.12.791
2025-09-10 09:40:49 -05:00
Tim Donohue
beb5a096ab Merge pull request #11275 from DSpace/dependabot/maven/dspace-7_x/com.github.spotbugs-spotbugs-maven-plugin-4.9.4.2
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.4.0 to 4.9.4.2
2025-09-09 17:10:17 -05:00
Tim Donohue
73a0316f99 Merge pull request #11237 from DSpace/dependabot/maven/dspace-7_x/net.minidev-json-smart-2.6.0
Bump net.minidev:json-smart from 2.5.2 to 2.6.0
2025-09-09 17:06:38 -05:00
Tim Donohue
257dc13d32 Merge pull request #11274 from DSpace/dependabot/maven/dspace-7_x/test-tools-7b258dae6a
Bump the test-tools group with 6 updates
2025-09-09 17:03:06 -05:00
Tim Donohue
dfa38c90df Merge pull request #11295 from DSpace/backport-11170-to-dspace-7_x
[Port dspace-7_x] DS-3796 Fix dates for Not to be processed checker-emailer report
2025-09-09 16:48:05 -05:00
Miika Nurminen
cd62cac431 DS-3796 Fix dates for Not to be processed checker-emailer report
Based on 86de8c74a7 (ResultTypeInDateRange dates have already been fixed in upstream).

(cherry picked from commit fac888793c)
2025-09-09 21:14:21 +00:00
dependabot[bot]
847904cadb Bump com.amazonaws:aws-java-sdk-s3 from 1.12.788 to 1.12.791
Bumps [com.amazonaws:aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.788 to 1.12.791.
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.788...1.12.791)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-version: 1.12.791
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 20:35:21 +00:00
dependabot[bot]
127770219b Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.4.0 to 4.9.4.2
Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.4.0 to 4.9.4.2.
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.9.4.0...spotbugs-maven-plugin-4.9.4.2)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 20:34:23 +00:00
dependabot[bot]
98e89caa35 Bump the test-tools group with 6 updates
Bumps the test-tools group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [io.netty:netty-buffer](https://github.com/netty/netty) | `4.2.4.Final` | `4.2.6.Final` |
| [io.netty:netty-transport](https://github.com/netty/netty) | `4.2.4.Final` | `4.2.6.Final` |
| [io.netty:netty-transport-native-unix-common](https://github.com/netty/netty) | `4.2.4.Final` | `4.2.6.Final` |
| [io.netty:netty-common](https://github.com/netty/netty) | `4.2.4.Final` | `4.2.6.Final` |
| [io.netty:netty-handler](https://github.com/netty/netty) | `4.2.4.Final` | `4.2.6.Final` |
| [io.netty:netty-codec](https://github.com/netty/netty) | `4.2.4.Final` | `4.2.6.Final` |


Updates `io.netty:netty-buffer` from 4.2.4.Final to 4.2.6.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.4.Final...netty-4.2.6.Final)

Updates `io.netty:netty-transport` from 4.2.4.Final to 4.2.6.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.4.Final...netty-4.2.6.Final)

Updates `io.netty:netty-transport-native-unix-common` from 4.2.4.Final to 4.2.6.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.4.Final...netty-4.2.6.Final)

Updates `io.netty:netty-common` from 4.2.4.Final to 4.2.6.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.4.Final...netty-4.2.6.Final)

Updates `io.netty:netty-handler` from 4.2.4.Final to 4.2.6.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.4.Final...netty-4.2.6.Final)

Updates `io.netty:netty-codec` from 4.2.4.Final to 4.2.6.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.4.Final...netty-4.2.6.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-buffer
  dependency-version: 4.2.6.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-version: 4.2.6.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-version: 4.2.6.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-version: 4.2.6.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-version: 4.2.6.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-version: 4.2.6.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 20:33:03 +00:00
Tim Donohue
a063a7a4f6 Merge pull request #11273 from tdonohue/port_11171_to_7x
[Port dspace-7_x] Error in file upload after security fixes
2025-09-08 13:23:38 -05:00
Stefano Maffei
7dd2b5318b [CST-21947] fix security fix 2025-09-08 12:17:59 -05:00
Tim Donohue
29b3ba9c57 Merge pull request #11269 from tdonohue/port_11268_to_7x
[Port dspace-7_x] fix(#11191): Align Content-Disposition with RFC 5987/6266
2025-09-05 17:30:08 -05:00
Tim Donohue
568fdab395 Merge pull request #11264 from DSpace/backport-11245-to-dspace-7_x
[Port dspace-7_x] AIP Packager bitstream URL fix
2025-09-05 16:57:27 -05:00
JohnnyMendesC
fe4077acee fix(#11191): Align Content-Disposition with RFC 5987/6266 2025-09-05 16:55:45 -05:00
Kristof De Langhe
cbecc64a5a 133552: unused import
(cherry picked from commit 93240941d3)
2025-09-05 21:18:54 +00:00
Kristof De Langhe
5ed0b28a36 133552: AIP packager bitstream url fix
(cherry picked from commit 11da562ea4)
2025-09-05 21:18:54 +00:00
Tim Donohue
54a6011e60 Merge pull request #11257 from DSpace/backport-10142-to-dspace-7_x
[Port dspace-7_x] DS-10133: make several usage statistics parameters configurable
2025-09-04 12:03:46 -05:00
nwoodward
be9d2bd2bf make several usage statistics parameters configurable
(cherry picked from commit cd57985934)
2025-09-04 14:31:45 +00:00
Tim Donohue
e4d058f1c9 Merge pull request #11251 from DSpace/backport-11174-to-dspace-7_x
[Port dspace-7_x] Fix #11074 export simple archive format when item has no collection
2025-09-03 15:47:29 -05:00
Tim Donohue
603f638174 Merge pull request #11247 from DSpace/backport-11200-to-dspace-7_x
[Port dspace-7_x] Fix database connection leak on failed login attempts
2025-09-03 14:51:14 -05:00
Martin Walk
66fc49800d Fix #11074 export simple archive format with no collection
(cherry picked from commit d282f92427)
2025-09-03 19:46:19 +00:00
Alexandre Vryghem
376f49e99b 133421: Removed database connection leak on unsuccessful login
(cherry picked from commit 0b0c9fc84c)
2025-09-03 19:09:02 +00:00
Tim Donohue
4dedd1b66f Merge pull request #11242 from DSpace/backport-11195-to-dspace-7_x
[Port dspace-7_x] Implement logging for index out-of-range in MetadataValueRemovePatchOperation
2025-09-02 15:10:25 -05:00
Sascha Szott
8f4a3f963a Implement logging for index out-of-range
Add logging for out-of-range index when removing metadata values.

(cherry picked from commit 7692b02b12)
2025-09-02 19:34:30 +00:00
Tim Donohue
cc35141661 Merge pull request #11226 from DSpace/dependabot/maven/dspace-7_x/build-tools-e11e9b5c2b
Bump the build-tools group with 3 updates
2025-09-02 13:01:34 -05:00
Tim Donohue
fd1aa013a7 Merge pull request #11233 from DSpace/dependabot/maven/dspace-7_x/apache-commons-4538dd79bf
Bump commons-cli:commons-cli from 1.9.0 to 1.10.0 in the apache-commons group
2025-09-02 10:51:10 -05:00
Tim Donohue
3721d231b3 Merge pull request #11234 from DSpace/dependabot/maven/dspace-7_x/jetty.version-9.4.58.v20250814
Bump jetty.version from 9.4.57.v20241219 to 9.4.58.v20250814
2025-09-02 10:48:42 -05:00
Tim Donohue
45b677c20e Merge pull request #11223 from DSpace/dependabot/maven/dspace-7_x/test-tools-2cb88a00ef
Bump the test-tools group with 6 updates
2025-09-02 10:47:02 -05:00
dependabot[bot]
ccf253ddda Bump net.minidev:json-smart from 2.5.2 to 2.6.0
Bumps [net.minidev:json-smart](https://github.com/netplex/json-smart-v2) from 2.5.2 to 2.6.0.
- [Release notes](https://github.com/netplex/json-smart-v2/releases)
- [Commits](https://github.com/netplex/json-smart-v2/compare/2.5.2...v2.6.0)

---
updated-dependencies:
- dependency-name: net.minidev:json-smart
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 06:01:09 +00:00
dependabot[bot]
2c34dde3a8 Bump org.ehcache:ehcache from 3.10.8 to 3.11.1
Bumps [org.ehcache:ehcache](https://github.com/ehcache/ehcache3) from 3.10.8 to 3.11.1.
- [Release notes](https://github.com/ehcache/ehcache3/releases)
- [Commits](https://github.com/ehcache/ehcache3/compare/v3.10.8...v3.11.1)

---
updated-dependencies:
- dependency-name: org.ehcache:ehcache
  dependency-version: 3.11.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 06:00:09 +00:00
dependabot[bot]
13982618df Bump jetty.version from 9.4.57.v20241219 to 9.4.58.v20250814
Bumps `jetty.version` from 9.4.57.v20241219 to 9.4.58.v20250814.

Updates `org.eclipse.jetty:jetty-server` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-alpn-java-server` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-deploy` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-http` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-io` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-servlet` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-servlets` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-util` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-webapp` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty:jetty-xml` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty.http2:http2-common` from 9.4.57.v20241219 to 9.4.58.v20250814

Updates `org.eclipse.jetty.http2:http2-server` from 9.4.57.v20241219 to 9.4.58.v20250814

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-alpn-java-server
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-deploy
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-http
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-io
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-servlets
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-util
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-webapp
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-xml
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty.http2:http2-common
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty.http2:http2-server
  dependency-version: 9.4.58.v20250814
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 05:53:13 +00:00
dependabot[bot]
cf3f8e9bb2 Bump commons-cli:commons-cli in the apache-commons group
Bumps the apache-commons group with 1 update: [commons-cli:commons-cli](https://github.com/apache/commons-cli).


Updates `commons-cli:commons-cli` from 1.9.0 to 1.10.0
- [Changelog](https://github.com/apache/commons-cli/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-cli/compare/rel/commons-cli-1.9.0...rel/commons-cli-1.10.0)

---
updated-dependencies:
- dependency-name: commons-cli:commons-cli
  dependency-version: 1.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 05:51:23 +00:00
dependabot[bot]
9bef7b58d6 Bump io.grpc:grpc-context from 1.74.0 to 1.75.0
Bumps [io.grpc:grpc-context](https://github.com/grpc/grpc-java) from 1.74.0 to 1.75.0.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.74.0...v1.75.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-context
  dependency-version: 1.75.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 05:45:53 +00:00
dependabot[bot]
b78f570dbf Bump the build-tools group with 3 updates
Bumps the build-tools group with 3 updates: [com.github.spotbugs:spotbugs](https://github.com/spotbugs/spotbugs), [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) and [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin).


Updates `com.github.spotbugs:spotbugs` from 4.9.3 to 4.9.4
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.9.3...4.9.4)

Updates `com.github.spotbugs:spotbugs-maven-plugin` from 4.9.3.2 to 4.9.4.0
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.9.3.2...spotbugs-maven-plugin-4.9.4.0)

Updates `org.apache.maven.plugins:maven-javadoc-plugin` from 3.11.2 to 3.11.3
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.2...maven-javadoc-plugin-3.11.3)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs
  dependency-version: 4.9.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.4.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-version: 3.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 05:44:48 +00:00
dependabot[bot]
103d7f754a Bump the test-tools group with 6 updates
Bumps the test-tools group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [io.netty:netty-buffer](https://github.com/netty/netty) | `4.2.3.Final` | `4.2.4.Final` |
| [io.netty:netty-transport](https://github.com/netty/netty) | `4.2.3.Final` | `4.2.4.Final` |
| [io.netty:netty-transport-native-unix-common](https://github.com/netty/netty) | `4.2.3.Final` | `4.2.4.Final` |
| [io.netty:netty-common](https://github.com/netty/netty) | `4.2.3.Final` | `4.2.4.Final` |
| [io.netty:netty-handler](https://github.com/netty/netty) | `4.2.3.Final` | `4.2.4.Final` |
| [io.netty:netty-codec](https://github.com/netty/netty) | `4.2.3.Final` | `4.2.4.Final` |


Updates `io.netty:netty-buffer` from 4.2.3.Final to 4.2.4.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.3.Final...netty-4.2.4.Final)

Updates `io.netty:netty-transport` from 4.2.3.Final to 4.2.4.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.3.Final...netty-4.2.4.Final)

Updates `io.netty:netty-transport-native-unix-common` from 4.2.3.Final to 4.2.4.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.3.Final...netty-4.2.4.Final)

Updates `io.netty:netty-common` from 4.2.3.Final to 4.2.4.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.3.Final...netty-4.2.4.Final)

Updates `io.netty:netty-handler` from 4.2.3.Final to 4.2.4.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.3.Final...netty-4.2.4.Final)

Updates `io.netty:netty-codec` from 4.2.3.Final to 4.2.4.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.3.Final...netty-4.2.4.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-buffer
  dependency-version: 4.2.4.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-version: 4.2.4.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-version: 4.2.4.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-version: 4.2.4.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-version: 4.2.4.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-version: 4.2.4.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 05:44:10 +00:00
Tim Donohue
ff0ebea316 Merge pull request #11188 from DSpace/backport-11160-to-dspace-7_x
[Port dspace-7_x] fix(#8852): Statistics event processor now uses oaiPrefix instead of getHost
2025-08-21 16:56:25 -05:00
JohnnyMendesC
f831acf4d7 fix(#8852): Statistics event processor now uses oaiPrefix instead of getHost
(cherry picked from commit c8fe80c22b)
2025-08-21 21:15:20 +00:00
Tim Donohue
21343d3158 Merge pull request #11184 from DSpace/backport-11161-to-dspace-7_x
[Port dspace-7_x] dspace-api/pom.xml: remove build-helper-maven-plugin
2025-08-21 08:54:54 -05:00
Tim Donohue
abc238cdd0 Merge pull request #11183 from tdonohue/port_11168_to_7x
[Port dspace-7_x] Fix bean initialization with citation-page.enabled_communities
2025-08-21 08:46:31 -05:00
Alan Orth
922109b10a dspace-api/pom.xml: remove build-helper-maven-plugin
Remove the org.codehaus.mojo:build-helper-maven-plugin because the
`maven-version` property has been included by maven itself since
version 3.0.4. This fixes the following warning during build:

    [INFO] --- build-helper:3.6.1:maven-version (default) @ dspace-api ---
    [WARNING]  Goal 'maven-version' is deprecated: Maven since version 3.0.4 has such property build in: MNG-4112 <https://issues.apache.org/jira/browse/MNG-4112>. So goal can be removed.

(cherry picked from commit de3170d4eb)
2025-08-21 13:20:36 +00:00
Tim Donohue
23150bc89a Merge pull request #11180 from tdonohue/port-11166-to-7x
[Port dspace-7_x] .github/workflows/codescan.yml: use codeql-action v3
2025-08-20 17:15:35 -05:00
Miika Nurminen
e51a2537ac Fix bean initialization error on Tomcat startup if citation-page.enabled_communities is set
Arrays.asList produces non-mutable list but with communities, sub-collections are added dynamically on initializaion.
2025-08-20 17:05:46 -05:00
Alan Orth
94a1a0b2e0 .github/workflows/codescan.yml: use codeql-action v3
Version 2 was deprecated in January, 2024 after the release of v3.

See: https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/
2025-08-20 16:30:23 -05:00
Tim Donohue
71af1503ae Merge pull request #11175 from DSpace/backport-11156-to-dspace-7_x
[Port dspace-7_x] Metadata import empty collection column check
2025-08-20 16:28:23 -05:00
Joran De Braekeleer
d063f1ef66 133268: Metadata import empty collection col check
(cherry picked from commit b9513228d7)
2025-08-20 20:50:47 +00:00
kshepherd
be3702f419 Merge pull request #11151 from DSpace/backport-11150-to-dspace-7_x
[Port dspace-7_x] Fix for #9589 Incorrect Export of Search Results with Double Quotation Marks in DSpace 7. Reference PR #10103
2025-08-12 18:10:49 +02:00
im-shubham-vish
aa0fe083a6 Make parse protected to make it override in MetadataExportSearch Add Test for Double Quoted Search CSV Export
(cherry picked from commit 39a45f7f34)
2025-08-12 14:36:37 +00:00
Tim Donohue
38dd432feb Merge pull request #11143 from DSpace/backport-10508-to-dspace-7_x
[Port dspace-7_x] Fix checkpointing for DSpace "checker" command
2025-08-06 16:30:25 -05:00
Tim Donohue
bce865f299 Revert to using java.util.Date instead of Instant to support earlier versions of DSpace. 2025-08-06 15:10:41 -05:00
David P. Steelman
558f0c7bea Fix checkpointing for checksum checking
Fixes the checkpointing for checksum checking by actually committing
the changes to the database.

Replacing "uncacheEntity" with "commit", as testing has shown that this
is necessary to ensure that the checksum status is properly updated in
the most_recent_checksum" table when checksum process is interrupted.

The provided integration test fails if the checksums of bitstreams that
were checked before the interruption are not properly recorded in the
database.

(cherry picked from commit 502b655ef6)
2025-08-06 19:43:04 +00:00
Tim Donohue
eec374a7c5 Merge pull request #11140 from DSpace/backport-11138-to-dspace-7_x
[Port dspace-7_x] FIX uses dc.source for bitstream originalName tag
2025-08-06 14:14:15 -05:00
Tim Donohue
375c0aee1c Merge pull request #11135 from DSpace/backport-11131-to-dspace-7_x
[Port dspace-7_x] Enhance SWORDv1 Integration Tests & fix WRITE Permissions error for submitters
2025-08-06 14:09:11 -05:00
Vincenzo Mecca
56b38bb26d fix: uses dc.source for bitstream originalName tag
Refs: DURACOM-391, #1130
(cherry picked from commit f5c0c17c66)
2025-08-06 18:37:42 +00:00
Tim Donohue
e4f9e90394 Merge pull request #11134 from the-library-code/orcid-identifier-fix-7x_backport
[Port dspace-7_x] ORCID Push: Fix SELF and PART_OF external identifier handling
2025-08-06 13:32:54 -05:00
Tim Donohue
05af860553 getContentAsByteArray() didn't exist in Spring 5. Use readAllBytes() from InputStream instead. 2025-08-06 12:19:14 -05:00
Tim Donohue
ea6e025519 Fix WRITE permissions error when ingesting a new Item. Do not call "updateDSpaceObject" after calling "finishCreateItem" as the latter saves the object and removes submitter privileges from it.
(cherry picked from commit c2d05891ab)
2025-08-06 16:33:00 +00:00
Tim Donohue
b8cbaa053d Add a deposit integration test for SWORDv1 based on the similar SWORDv2 test.
(cherry picked from commit 0589011849)
2025-08-06 16:33:00 +00:00
Kim Shepherd
af654e57f2 [TLC-1097] Additional javadoc for ORCID sync fix 2025-08-06 17:26:12 +02:00
Kim Shepherd
3bca2164be [TLC-1097] ORCID external identifier sync fix
Handle SELF and PART_OF identifiers properly based on
configuration, work type, and identifier type
2025-08-06 17:25:57 +02:00
Tim Donohue
389269e958 Merge pull request #11123 from DSpace/backport-10490-to-dspace-7_x
[Port dspace-7_x] Fix checkpointing for bitstore migration
2025-07-31 16:24:12 -05:00
David P. Steelman
2d353ea995 Fix checkpointing for bitstore migration
Fixes the checkpointing for bitstore migration by actually committing
the changes to the database.

Replacing "dispatchEvents" with "commit" as testing has shown that this
is necessary to ensure that the status of bitstreams is properly
updated when the bitstore migration is interrupted.

The provided integration tests fail if bitstreams successfully migrated
before the interruption are not properly recorded in the database as
being in the destination assetstore.

(cherry picked from commit 3d7c45852d)
2025-07-31 20:52:41 +00:00
Tim Donohue
e0dd7454a4 Merge pull request #11116 from DSpace/dependabot/maven/dspace-7_x/apache-commons-cb46d7dc0f
Bump org.apache.commons:commons-compress from 1.27.1 to 1.28.0 in the apache-commons group
2025-07-31 08:47:43 -05:00
Tim Donohue
7153efe412 Merge pull request #11119 from DSpace/dependabot/maven/dspace-7_x/com.github.spotbugs-spotbugs-maven-plugin-4.9.3.2
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.3.0 to 4.9.3.2
2025-07-30 17:08:55 -05:00
Tim Donohue
0a3733db95 Merge pull request #11121 from DSpace/dependabot/maven/dspace-7_x/io.grpc-grpc-context-1.74.0
Bump io.grpc:grpc-context from 1.73.0 to 1.74.0
2025-07-30 15:42:04 -05:00
Tim Donohue
ee45f736cd Merge pull request #11113 from tdonohue/port_11111_to_7x
[Port dspace-7_x] Ensure DSpace defaults to UTC time zone in all code / tests
2025-07-30 14:13:10 -05:00
dependabot[bot]
808135f688 Bump io.grpc:grpc-context from 1.73.0 to 1.74.0
Bumps [io.grpc:grpc-context](https://github.com/grpc/grpc-java) from 1.73.0 to 1.74.0.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-context
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-30 18:42:52 +00:00
dependabot[bot]
1ecb5660f8 Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.3.0 to 4.9.3.2
Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.3.0 to 4.9.3.2.
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.9.3.0...spotbugs-maven-plugin-4.9.3.2)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-30 18:41:59 +00:00
dependabot[bot]
6282cb9f12 Bump org.apache.commons:commons-compress in the apache-commons group
Bumps the apache-commons group with 1 update: [org.apache.commons:commons-compress](https://github.com/apache/commons-compress).


Updates `org.apache.commons:commons-compress` from 1.27.1 to 1.28.0
- [Changelog](https://github.com/apache/commons-compress/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-compress/compare/rel/commons-compress-1.27.1...rel/commons-compress-1.28.0)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-version: 1.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-30 18:40:38 +00:00
Tim Donohue
2b2d0b19b6 Ensure DSpace defaults to UTC time zone in all code / tests. This is necessary so that Spring / Hibernate don't auto-switch timezones when reading from database. 2025-07-30 12:08:23 -05:00
Tim Donohue
77f07a735b Merge pull request #11105 from tdonohue/port_11077_to_7x
[Port dspace-7_x] Add basic logging tests to our docker deployment script in GitHub actions
2025-07-29 10:14:54 -05:00
Tim Donohue
613ef1dc62 Merge pull request #11067 from kshepherd/log4j_it
Simple Log4j tests with in-memory log appender
2025-07-29 09:14:59 -05:00
Tim Donohue
5e3463bd8b Add tests for backend logging to docker deployment tests 2025-07-29 09:11:36 -05:00
Tim Donohue
e3c64906de Merge pull request #11088 from DSpace/dependabot/maven/dspace-7_x/org.apache.james-apache-mime4j-core-0.8.13
Bump org.apache.james:apache-mime4j-core from 0.8.12 to 0.8.13
2025-07-28 16:33:12 -05:00
Tim Donohue
8c79201da3 Merge pull request #10976 from DSpace/dependabot/maven/dspace-7_x/google-apis-d482fb5384
Bump the google-apis group with 3 updates
2025-07-28 16:30:14 -05:00
Tim Donohue
c22583e892 Merge pull request #11005 from DSpace/dependabot/maven/dspace-7_x/build-tools-4f2f951df2
Bump the build-tools group across 1 directory with 2 updates
2025-07-28 15:52:14 -05:00
dependabot[bot]
af38697ade Bump the build-tools group across 1 directory with 2 updates
Bumps the build-tools group with 2 updates in the / directory: [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) and [org.codehaus.mojo:license-maven-plugin](https://github.com/mojohaus/license-maven-plugin).


Updates `org.apache.maven.plugins:maven-enforcer-plugin` from 3.5.0 to 3.6.0
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.5.0...enforcer-3.6.0)

Updates `org.codehaus.mojo:license-maven-plugin` from 2.5.0 to 2.6.0
- [Release notes](https://github.com/mojohaus/license-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/license-maven-plugin/compare/2.5.0...2.6.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.codehaus.mojo:license-maven-plugin
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 19:43:25 +00:00
Tim Donohue
ccdbc381c5 Merge pull request #11047 from DSpace/dependabot/maven/dspace-7_x/test-tools-68aaeff8ca
Bump the test-tools group across 1 directory with 7 updates
2025-07-28 14:37:51 -05:00
Tim Donohue
584d70db81 Merge pull request #11100 from mwoodiupui/my-11042-7x
Avoid injection vulnerability in controlled vocabulary lookup 7_x
2025-07-28 14:18:43 -05:00
Mark H. Wood
ceab9526c4 Port #11075 to 7_x 2025-07-28 13:42:28 -04:00
Alan Orth
45c37bcf66 Merge pull request #11089 from DSpace/dependabot/maven/dspace-7_x/com.opencsv-opencsv-5.12.0 2025-07-28 09:30:39 -07:00
Tim Donohue
69a83f0bdd Merge pull request #11049 from DSpace/dependabot/maven/dspace-7_x/com.amazonaws-aws-java-sdk-s3-1.12.788
Bump com.amazonaws:aws-java-sdk-s3 from 1.12.785 to 1.12.788
2025-07-28 08:58:22 -05:00
Tim Donohue
18d53743cd Merge pull request #11087 from DSpace/dependabot/maven/dspace-7_x/apache-commons-7e5b090d5c
Bump the apache-commons group across 1 directory with 5 updates
2025-07-28 08:55:42 -05:00
Tim Donohue
f6f2d5e05c Merge pull request #11050 from DSpace/dependabot/maven/dspace-7_x/fasterxml-d1c1cdfb0c
Bump the fasterxml group with 3 updates
2025-07-28 08:50:51 -05:00
dependabot[bot]
dc65c7a304 Bump com.opencsv:opencsv from 5.11.1 to 5.12.0
Bumps com.opencsv:opencsv from 5.11.1 to 5.12.0.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-version: 5.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 03:39:24 +00:00
dependabot[bot]
de220d55ac Bump org.apache.james:apache-mime4j-core from 0.8.12 to 0.8.13
Bumps org.apache.james:apache-mime4j-core from 0.8.12 to 0.8.13.

---
updated-dependencies:
- dependency-name: org.apache.james:apache-mime4j-core
  dependency-version: 0.8.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 03:37:58 +00:00
dependabot[bot]
ac81a3d36f Bump the apache-commons group across 1 directory with 5 updates
Bumps the apache-commons group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [commons-codec:commons-codec](https://github.com/apache/commons-codec) | `1.18.0` | `1.19.0` |
| [commons-io:commons-io](https://github.com/apache/commons-io) | `2.19.0` | `2.20.0` |
| org.apache.commons:commons-lang3 | `3.17.0` | `3.18.0` |
| [org.apache.commons:commons-text](https://github.com/apache/commons-text) | `1.13.1` | `1.14.0` |
| commons-validator:commons-validator | `1.9.0` | `1.10.0` |



Updates `commons-codec:commons-codec` from 1.18.0 to 1.19.0
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.18.0...rel/commons-codec-1.19.0)

Updates `commons-io:commons-io` from 2.19.0 to 2.20.0
- [Changelog](https://github.com/apache/commons-io/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-io/compare/rel/commons-io-2.19.0...rel/commons-io-2.20.0)

Updates `org.apache.commons:commons-lang3` from 3.17.0 to 3.18.0

Updates `org.apache.commons:commons-text` from 1.13.1 to 1.14.0
- [Changelog](https://github.com/apache/commons-text/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-text/compare/rel/commons-text-1.13.1...rel/commons-text-1.14.0)

Updates `commons-validator:commons-validator` from 1.9.0 to 1.10.0

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: commons-io:commons-io
  dependency-version: 2.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-lang3
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-text
  dependency-version: 1.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: commons-validator:commons-validator
  dependency-version: 1.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 03:36:02 +00:00
dependabot[bot]
92120211da Bump the test-tools group across 1 directory with 7 updates
---
updated-dependencies:
- dependency-name: org.xmlunit:xmlunit-core
  dependency-version: 2.10.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-buffer
  dependency-version: 4.2.3.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-version: 4.2.3.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-version: 4.2.3.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-version: 4.2.3.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-version: 4.2.3.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-version: 4.2.3.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 02:55:44 +00:00
dependabot[bot]
609062befb Bump the google-apis group with 3 updates
Bumps the google-apis group with 3 updates: [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client), [com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client) and [com.google.http-client:google-http-client-gson](https://github.com/googleapis/google-http-java-client).


Updates `com.google.http-client:google-http-client` from 1.47.0 to 1.47.1
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.47.0...v1.47.1)

Updates `com.google.http-client:google-http-client-jackson2` from 1.47.0 to 1.47.1
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.47.0...v1.47.1)

Updates `com.google.http-client:google-http-client-gson` from 1.47.0 to 1.47.1
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.47.0...v1.47.1)

---
updated-dependencies:
- dependency-name: com.google.http-client:google-http-client
  dependency-version: 1.47.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-jackson2
  dependency-version: 1.47.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-gson
  dependency-version: 1.47.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: google-apis
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 02:55:24 +00:00
dependabot[bot]
ffd60bf811 Bump the fasterxml group with 3 updates
Bumps the fasterxml group with 3 updates: [com.fasterxml.jackson.core:jackson-annotations](https://github.com/FasterXML/jackson), [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) and [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson).


Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.19.1 to 2.19.2
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.19.1 to 2.19.2
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.19.1...jackson-core-2.19.2)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.19.1 to 2.19.2
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.19.1...jackson-core-2.19.2)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.19.1 to 2.19.2
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-version: 2.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 02:55:08 +00:00
Tim Donohue
695aa673d3 Merge pull request #11071 from tdonohue/port_10356_to_7x
[Port dspace-7_x] Live Import - PubMed - support optional apiKey config
2025-07-23 15:05:28 -05:00
Marie Verdonck
2f66457abe 109807: Live Import - PubMed - support optional apiKey config 2025-07-23 12:41:25 -05:00
Tim Donohue
c061015ecf [maven-release-plugin] prepare for next development iteration 2025-07-22 15:03:08 -05:00
Tim Donohue
6e8b6cc33a [maven-release-plugin] prepare release dspace-7.6.5 2025-07-22 15:03:04 -05:00
Tim Donohue
479cb76885 Minor updates to LICENSES_THIRD_PARTY for 7.6.5 release 2025-07-22 14:42:47 -05:00
Kim Shepherd
588c4ef4d2 Add simple log4j WebappLoggingIT test 2025-07-22 18:12:05 +02:00
Tim Donohue
5f291400b3 Merge pull request #11066 from tdonohue/port_11063_to_7x
[Port dspace-7_x] Fix several unit/integration test failures that only occur on Windows
2025-07-22 09:34:56 -05:00
kshepherd
1bd4da3899 Merge pull request #11028 from DSpace/dependabot/maven/dspace-7_x/log4j.version-2.25.1
Bump log4j.version from 2.25.0 to 2.25.1
2025-07-22 16:23:59 +02:00
Tim Donohue
15b3f314a3 Force UTF-8 encoding in all tests. This fixes several test failures when running tests from Windows commandline because Windows doesn't default to using UTF-8. 2025-07-22 08:59:50 -05:00
Tim Donohue
28686fc48a Improve logging in AbstractLiveImportIntegrationTest (to make tests easier to debug). Replace obscure StringInputStream (from Ant) with IOUtils.toInputStream 2025-07-22 08:59:44 -05:00
Tim Donohue
d2c120bd8b Fix broken tests on Windows by using Paths to split file path instead of regex. Also switch to in-memory s3mock because Windows cannot cleanup created files successfully. 2025-07-22 08:59:39 -05:00
Tim Donohue
39fb2afba1 Update test to no longer assume 127.0.0.1 will always respond with "localhost" as the hostname. On my machine it does not. 2025-07-22 08:59:34 -05:00
dependabot[bot]
5cd3daa379 Bump com.amazonaws:aws-java-sdk-s3 from 1.12.785 to 1.12.788
Bumps [com.amazonaws:aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.785 to 1.12.788.
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.785...1.12.788)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-version: 1.12.788
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 02:49:30 +00:00
Tim Donohue
9424ccf4aa [maven-release-plugin] prepare for next development iteration 2025-07-14 12:03:15 -05:00
Tim Donohue
a5f04f9c77 [maven-release-plugin] prepare release dspace-7.6.4 2025-07-14 12:03:12 -05:00
Tim Donohue
f506d18bb1 Merge pull request #11036 from DSpace/backport-11031-to-dspace-7_x
[Port dspace-7_x] Improve SAF manifest path handling
2025-07-14 10:18:06 -05:00
Kim Shepherd
bc17559162 Fix line length in DSBitstore log
(cherry picked from commit dbf524c112)
2025-07-14 14:36:58 +00:00
Kim Shepherd
907b42c2a9 return existing File constructed and validated for bitstream
(cherry picked from commit 31b1c922b2)
2025-07-14 14:36:58 +00:00
Kim Shepherd
b0a4a3400f Enforce bitstream path to be within (fs) bitstore base on get
(cherry picked from commit 6799660a90)
2025-07-14 14:36:58 +00:00
MMilosz
84e308c8f5 fix: prevent path traversal in SAF import
(cherry picked from commit 596d8666f4)
2025-07-14 14:36:58 +00:00
Tim Donohue
91989e5efb Merge pull request #11032 from kshepherd/saf-xml-fix-2_7.x
Improve SAF Import XML handling (7.x)
2025-07-14 09:22:15 -05:00
Kim Shepherd
e9bc74cf6d Fix missing XMLUtils imports 2025-07-14 13:09:43 +02:00
Kim Shepherd
dda6d9ec9d Remove unused imports 2025-07-14 13:07:45 +02:00
Kim Shepherd
45a9f8b530 Re-add file separator to normalized SAF item path 2025-07-14 12:50:32 +02:00
dependabot[bot]
a381611ebd Bump log4j.version from 2.25.0 to 2.25.1
Bumps `log4j.version` from 2.25.0 to 2.25.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.25.0 to 2.25.1

Updates `org.apache.logging.log4j:log4j-core` from 2.25.0 to 2.25.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.25.0 to 2.25.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-14 03:45:03 +00:00
Kim Shepherd
259c3ddd37 Enforce path traversal check on import subdir (pre-processing) 2025-07-13 10:08:30 +02:00
Tim Donohue
d48e22aff5 Update LICENSES_THIRD_PARTY to prepare for 7.6.4 release. 2025-07-11 14:01:37 -05:00
Tim Donohue
4fd3112ebf Merge pull request #10690 from atmire/w2p-119612_export-item-limit-dspace-7_x
[Port dspace-7_x] support a configurable limit for exporting items as it can take a up a huge amount of resources
2025-07-10 13:25:38 -05:00
Kim Shepherd
99b2a630a7 Allow trusted XML builder to enforce base path for entities 2025-07-10 17:22:58 +02:00
Tim Donohue
8c80b67b04 EPO and PubMed only need to allow for DOCTYPEs. All other XML security changes can be used. 2025-07-03 12:49:11 +02:00
Kim Shepherd
f7dcbf1b44 Safe and consistent XML entity handling in parsers 2025-07-03 12:48:47 +02:00
Tim Donohue
a9546055f4 Merge pull request #10998 from DSpace/backport-10997-to-dspace-7_x
[Port dspace-7_x] Point directly to HTTPS address for ArXiv
2025-07-02 13:21:17 -05:00
Yury Bondarenko
8f9a7f1f92 Point directly to HTTPS address for ArXiv
(cherry picked from commit cf0d6635f2)
2025-07-02 16:22:49 +00:00
Tim Donohue
042bf15237 Merge pull request #10994 from tdonohue/port_10986_to_7x
[Port dspace-7_x] Update POM to use Sonatype's Central Portal for Maven Releases
2025-07-01 14:25:05 -05:00
Tim Donohue
76c50ac43e Update POM to use central-publishing-maven-plugin and Sonatype's Central Portal 2025-07-01 12:22:58 -05:00
Tim Donohue
2b9b14501c Merge pull request #9966 from atmire/accessibility-settings-7_x
[Port dspace-7_x] Accessibility settings metadata field
2025-06-30 13:22:15 -05:00
Alan Orth
96ce51ae09 Merge pull request #10914 from DSpace/dependabot/maven/dspace-7_x/fasterxml-4343a5c2e7 2025-06-30 07:00:24 +03:00
dependabot[bot]
66a75f522f Bump the fasterxml group with 3 updates
Bumps the fasterxml group with 3 updates: [com.fasterxml.jackson.core:jackson-annotations](https://github.com/FasterXML/jackson), [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) and [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson).


Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.19.0...jackson-core-2.19.1)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.19.0...jackson-core-2.19.1)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-version: 2.19.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.19.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-30 02:37:25 +00:00
Tim Donohue
88a1ac08bf Merge pull request #10970 from DSpace/backport-10961-to-dspace-7_x
[Port dspace-7_x] Fix patching metadata on unknown field clears all DSO metadata
2025-06-27 15:03:33 -05:00
Tim Donohue
aac45284d2 Correct metadata value count for dspace-7_x 2025-06-27 14:06:33 -05:00
abhinav
130442746a move the exception to patchUtils
(cherry picked from commit a2dc6fbdf8)
2025-06-27 16:42:45 +00:00
abhinav
934f73f412 Update PatchMetadataIT
(cherry picked from commit 27d59085db)
2025-06-27 16:42:45 +00:00
abhinav
172783691b fix metadata getting cleared on patch request with invalid field
(cherry picked from commit e559af1841)
2025-06-27 16:42:44 +00:00
Tim Donohue
04f443b589 Merge pull request #10896 from mwoodiupui/9733-7
[Port dspace-7_x] filter-media:  make POI record buffer size adjustable.
2025-06-26 16:58:17 -05:00
Tim Donohue
61277b72d9 Merge pull request #10875 from alanorth/malformed-dates-7x
[Port dspace-7_x] dspace-api: improve date parsing for Solr sort indexes
2025-06-26 16:19:22 -05:00
Mark H. Wood
e2e402f0de Merge branch 'dspace-7_x' of github.com:DSpace/DSpace into 9733-7 2025-06-26 13:17:22 -04:00
Mark H. Wood
d0b5911cf6 Make POI record buffer size adjustable. 2025-06-26 13:16:32 -04:00
Alan Orth
27540b93bf Merge pull request #10865 from DSpace/dependabot/maven/dspace-7_x/jersey.version-2.47 2025-06-26 08:38:25 +02:00
Alan Orth
62512bdec8 Merge pull request #10915 from DSpace/dependabot/maven/dspace-7_x/org.postgresql-postgresql-42.7.7 2025-06-26 08:36:07 +02:00
Alan Orth
cd8c277ae5 Merge pull request #10950 from DSpace/dependabot/maven/dspace-7_x/log4j.version-2.25.0 2025-06-26 08:28:03 +02:00
Tim Donohue
9f9d810bea Merge pull request #10952 from max-nuding/backport-10688-to-dspace-7_x
[Port dspace-7_x] Allow collection admins to add new policies for bitstreams
2025-06-25 17:11:11 -05:00
Tim Donohue
57a1de5ecd Update deploy demo.dspace.org branch to 9.x to ensure older branches never trigger a redeploy. 2025-06-25 16:41:48 -05:00
max.nuding
e3b9179482 remove unnecessary code 2025-06-25 10:36:51 +02:00
dependabot[bot]
312416a716 Bump jersey.version from 2.46 to 2.47
Bumps `jersey.version` from 2.46 to 2.47.

Updates `org.glassfish.jersey.core:jersey-client` from 2.46 to 2.47

Updates `org.glassfish.jersey.inject:jersey-hk2` from 2.46 to 2.47

Updates `org.glassfish.jersey.core:jersey-server` from 2.46 to 2.47

Updates `org.glassfish.jersey.containers:jersey-container-servlet` from 2.46 to 2.47

Updates `org.glassfish.jersey.media:jersey-media-json-jackson` from 2.46 to 2.47

Updates `org.glassfish.jersey.media:jersey-media-jaxb` from 2.46 to 2.47

Updates `org.glassfish.jersey.ext:jersey-spring5` from 2.46 to 2.47

---
updated-dependencies:
- dependency-name: org.glassfish.jersey.core:jersey-client
  dependency-version: '2.47'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.inject:jersey-hk2
  dependency-version: '2.47'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.core:jersey-server
  dependency-version: '2.47'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.containers:jersey-container-servlet
  dependency-version: '2.47'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.media:jersey-media-json-jackson
  dependency-version: '2.47'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.media:jersey-media-jaxb
  dependency-version: '2.47'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.ext:jersey-spring5
  dependency-version: '2.47'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-24 20:24:13 +00:00
dependabot[bot]
8839eefbe7 Bump org.postgresql:postgresql from 42.7.6 to 42.7.7
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.6 to 42.7.7.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.6...REL42.7.7)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-version: 42.7.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-24 20:09:59 +00:00
Alan Orth
b594ebbf9e dspace-api: improve date parsing for Solr sort
Re-use DSpace date parsing from o.d.util.MultiFormatDateParser for
more robust date support when creating of Solr browse/sort indexes.
2025-06-24 22:08:07 +02:00
dependabot[bot]
230bf80b5f Bump log4j.version from 2.24.3 to 2.25.0
Bumps `log4j.version` from 2.24.3 to 2.25.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.3 to 2.25.0

Updates `org.apache.logging.log4j:log4j-core` from 2.24.3 to 2.25.0

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.24.3 to 2.25.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-24 20:04:48 +00:00
max.nuding
b8923c986f fix imports for checkstyle 2025-06-24 07:01:56 +02:00
Alan Orth
c587d70a09 Merge pull request #10955 from tdonohue/fix_handle_ITs 2025-06-23 23:09:55 +02:00
Tim Donohue
8a84cba371 Fix broken ITs by removing unnecessary registrations and managing context permissions better 2025-06-23 15:33:50 -05:00
Tim Donohue
973c5f9daa Merge pull request #10918 from tuub/backport-10580-to-dspace-7_x
Backport 10580 to dspace 7 x
2025-06-23 11:54:43 -05:00
max.nuding
61c6e59a06 remove jakarta import 2025-06-23 11:44:22 +02:00
max.nuding
e90f792869 add missing imports 2025-06-23 11:36:52 +02:00
max.nuding
1732285d59 add import for Intstant 2025-06-23 10:12:56 +02:00
Mykhaylo Boychuk
03992be08d [DURACOM-318] remove unused import
(cherry picked from commit ed91462ccd7f99f5cf0dc326ed06ab42c13b80e0)
(cherry picked from commit 8df4e35e76)
2025-06-23 10:06:27 +02:00
Mykhaylo Boychuk
2104d605bd [DURACOM-318] improve code
(cherry picked from commit 8e0ca2e6f88b0251edf8a840f65135590c65f088)
(cherry picked from commit 4270170d40)
2025-06-23 10:06:25 +02:00
Adamo
a24340a197 [DURACOM-318] IT fix
(cherry picked from commit accba0738f)
2025-06-23 10:05:48 +02:00
Mykhaylo Boychuk
de5908725a [DURACOM-318] improve sucurity plugin
(cherry picked from commit b1ce88925ea36e84a77e667a94ae5577b5ee05b6)
(cherry picked from commit e9be8435ec)
2025-06-23 10:05:47 +02:00
Mykhaylo Boychuk
f92e376896 [DURACOM-318] update security annotations on ResourcePolicyRepository
(cherry picked from commit fabcc692db68e5232986ff062e849e4ec5c68c8b)
(cherry picked from commit 95836c271c)
2025-06-23 10:04:04 +02:00
Mykhaylo Boychuk
39def52592 [DURACOM-318] add new ITs for ResourcePolicy
(cherry picked from commit d78d4f00d94ef0d4b147031b075b8df1e8896fe4)
(cherry picked from commit 98c2b99421)
2025-06-23 10:04:01 +02:00
Alan Orth
6337f2fa67 Merge pull request #10838 from DSpace/dependabot/maven/dspace-7_x/bouncycastle.version-1.81 2025-06-17 14:38:05 +03:00
Sascha Szott
07e840b675 removal of configuration file sword-client.cfg 2025-06-16 13:38:06 +02:00
Sascha Szott
34134b3c3b remove inclusion of sword-client.cfg 2025-06-16 13:37:49 +02:00
Alan Orth
309e25e8c8 Merge pull request #10591 from alanorth/port-dspace7-10537
[Port dspace-7_x] Optimize count-only Solr queries
2025-06-13 07:13:37 +03:00
Tim Donohue
bc7a681428 Merge pull request #10883 from DSpace/backport-10583-to-dspace-7_x
[Port dspace-7_x] Introduce custom contributor for PubMed's abstract format on metadata import
2025-06-11 10:00:06 -05:00
Alan Orth
9eef166b7e dspace-api: set search fields in Solr query only if we are interested in the actual search results 2025-06-11 17:18:35 +03:00
Alan Orth
bd753005e6 dspace-api: do not request actual search hits in count-only query 2025-06-11 17:18:35 +03:00
Alan Orth
d9cc564ace dspace-api: use static variable RESOURCE_TYPE_FIELD 2025-06-11 17:18:35 +03:00
DSpace Bot
2abbe67ea6 [Port dspace-7_x] improve robustness of search in index field submit (use filter query) (#10890)
* improve robustness of search in index field submit (use filter query)

(cherry picked from commit a65ef008b7)

* fix checkstyle warnings

(cherry picked from commit 183d5ca671)

* fix checkstyle warning

(cherry picked from commit fe251f39e3)

---------

Co-authored-by: Sascha Szott <szott@gmx.de>
2025-06-11 15:26:49 +03:00
DSpace Bot
2c400bf2da [Port dspace-7_x] Optimization of Solr Queries: Transition to Filter Queries (#10887)
* use filter query instead of generic query

(cherry picked from commit f2417feeca)

* use filter query instead of generic query

(cherry picked from commit d83a2525ad)

* use filter query instead of generic query

(cherry picked from commit f3a976107e)

* remove obsolete comment

(cherry picked from commit 3ee2dbcc56)

* use filter query instead of generic query

(cherry picked from commit 318afc769a)

* add static imports

(cherry picked from commit 8ad19c42df)

* move static import to the top of the import block

(cherry picked from commit b85585c34e)

* move static imports to the top of the import block

(cherry picked from commit 4b446e24a0)

---------

Co-authored-by: Sascha Szott <szott@gmx.de>
2025-06-11 15:20:59 +03:00
Alan Orth
4afd54cbbb Merge pull request #10872 from tdonohue/remove_commons-fileupload
[dspace-7_x] Remove `commons-fileupload` as it is no longer used.
2025-06-11 08:58:21 +03:00
Jens Vannerum
1f174f4657 129944: Introduce custom abstract xpath contributor for pubmed to respect their labelled structure - modify IT for it
(cherry picked from commit 28bc4970b7)
2025-06-10 22:01:23 +00:00
Tim Donohue
144d9a25d2 Merge pull request #10864 from DSpace/dependabot/maven/dspace-7_x/net.handle-handle-9.3.2
Bump net.handle:handle from 9.3.1 to 9.3.2
2025-06-09 12:37:44 -05:00
Tim Donohue
a5ae3705e7 Remove commons-fileupload as it is no longer used. 2025-06-09 10:15:00 -05:00
Tim Donohue
d740232199 Merge pull request #10862 from DSpace/dependabot/maven/dspace-7_x/build-tools-0af78e14c7
Bump org.codehaus.mojo:build-helper-maven-plugin from 3.6.0 to 3.6.1 in the build-tools group
2025-06-09 09:23:58 -05:00
Tim Donohue
ec27f96d5f Merge pull request #10861 from DSpace/dependabot/maven/dspace-7_x/test-tools-05bec946dc
Bump the test-tools group with 6 updates
2025-06-09 09:22:38 -05:00
dependabot[bot]
358c00c199 Bump net.handle:handle from 9.3.1 to 9.3.2
Bumps net.handle:handle from 9.3.1 to 9.3.2.

---
updated-dependencies:
- dependency-name: net.handle:handle
  dependency-version: 9.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 03:09:56 +00:00
dependabot[bot]
a458fbd6ce Bump org.codehaus.mojo:build-helper-maven-plugin
Bumps the build-tools group with 1 update: [org.codehaus.mojo:build-helper-maven-plugin](https://github.com/mojohaus/build-helper-maven-plugin).


Updates `org.codehaus.mojo:build-helper-maven-plugin` from 3.6.0 to 3.6.1
- [Release notes](https://github.com/mojohaus/build-helper-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/build-helper-maven-plugin/compare/3.6.0...3.6.1)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:build-helper-maven-plugin
  dependency-version: 3.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 03:08:40 +00:00
dependabot[bot]
0bc41bfaaf Bump the test-tools group with 6 updates
Bumps the test-tools group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [io.netty:netty-buffer](https://github.com/netty/netty) | `4.2.1.Final` | `4.2.2.Final` |
| [io.netty:netty-transport](https://github.com/netty/netty) | `4.2.1.Final` | `4.2.2.Final` |
| [io.netty:netty-transport-native-unix-common](https://github.com/netty/netty) | `4.2.1.Final` | `4.2.2.Final` |
| [io.netty:netty-common](https://github.com/netty/netty) | `4.2.1.Final` | `4.2.2.Final` |
| [io.netty:netty-handler](https://github.com/netty/netty) | `4.2.1.Final` | `4.2.2.Final` |
| [io.netty:netty-codec](https://github.com/netty/netty) | `4.2.1.Final` | `4.2.2.Final` |


Updates `io.netty:netty-buffer` from 4.2.1.Final to 4.2.2.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.1.Final...netty-4.2.2.Final)

Updates `io.netty:netty-transport` from 4.2.1.Final to 4.2.2.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.1.Final...netty-4.2.2.Final)

Updates `io.netty:netty-transport-native-unix-common` from 4.2.1.Final to 4.2.2.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.1.Final...netty-4.2.2.Final)

Updates `io.netty:netty-common` from 4.2.1.Final to 4.2.2.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.1.Final...netty-4.2.2.Final)

Updates `io.netty:netty-handler` from 4.2.1.Final to 4.2.2.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.1.Final...netty-4.2.2.Final)

Updates `io.netty:netty-codec` from 4.2.1.Final to 4.2.2.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.1.Final...netty-4.2.2.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-buffer
  dependency-version: 4.2.2.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-version: 4.2.2.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-version: 4.2.2.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-version: 4.2.2.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-version: 4.2.2.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-version: 4.2.2.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 03:07:54 +00:00
Alan Orth
415be6283a Merge pull request #10842 from DSpace/dependabot/maven/dspace-7_x/com.amazonaws-aws-java-sdk-s3-1.12.785
Bump com.amazonaws:aws-java-sdk-s3 from 1.12.783 to 1.12.785
2025-06-05 12:18:31 +03:00
kshepherd
94fe90f9d8 Merge pull request #10850 from DSpace/backport-10786-to-dspace-7_x
[Port dspace-7_x] Add HTTP timeouts in LiveImportClient to improve robustness
2025-06-04 23:06:19 +02:00
Sascha Szott
87ce9fd136 Add HTTP timeouts to improve robustness
(cherry picked from commit cabf5a7a44)
2025-06-04 19:24:16 +00:00
Tim Donohue
f2cbcca4c5 Merge pull request #10811 from DSpace/dependabot/maven/dspace-7_x/build-tools-137e7ca1b5
Bump org.apache.maven.plugins:maven-clean-plugin from 3.4.1 to 3.5.0 in the build-tools group
2025-06-04 14:08:28 -05:00
dependabot[bot]
a6cc912e62 Bump com.amazonaws:aws-java-sdk-s3 from 1.12.783 to 1.12.785
Bumps [com.amazonaws:aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.783 to 1.12.785.
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.783...1.12.785)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-version: 1.12.785
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 14:25:57 +00:00
dependabot[bot]
21c56aeda7 Bump bouncycastle.version from 1.80 to 1.81
Bumps `bouncycastle.version` from 1.80 to 1.81.

Updates `org.bouncycastle:bcpkix-jdk18on` from 1.80 to 1.81
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

Updates `org.bouncycastle:bcprov-jdk18on` from 1.80 to 1.81
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

Updates `org.bouncycastle:bcutil-jdk18on` from 1.80 to 1.81
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

---
updated-dependencies:
- dependency-name: org.bouncycastle:bcpkix-jdk18on
  dependency-version: '1.81'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.bouncycastle:bcprov-jdk18on
  dependency-version: '1.81'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.bouncycastle:bcutil-jdk18on
  dependency-version: '1.81'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 14:25:16 +00:00
dependabot[bot]
25ad6039dc Bump org.apache.maven.plugins:maven-clean-plugin
Bumps the build-tools group with 1 update: [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin).


Updates `org.apache.maven.plugins:maven-clean-plugin` from 3.4.1 to 3.5.0
- [Release notes](https://github.com/apache/maven-clean-plugin/releases)
- [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.4.1...maven-clean-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-clean-plugin
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 14:25:05 +00:00
Alan Orth
de7fd98a34 Merge pull request #10812 from DSpace/dependabot/maven/dspace-7_x/com.opencsv-opencsv-5.11.1
Bump com.opencsv:opencsv from 5.11 to 5.11.1
2025-06-04 12:26:14 +03:00
kshepherd
3396233f2d Merge pull request #10822 from tdonohue/port_10806_to_7x
[Port dspace-7_x] Alphabetize external source importers by service name (on MyDSpace, etc)
2025-06-02 17:16:23 +02:00
Tim Donohue
19e22c10f1 Alphabetize importers by service name 2025-06-02 09:26:24 -05:00
dependabot[bot]
32bd615ba8 Bump com.opencsv:opencsv from 5.11 to 5.11.1
Bumps com.opencsv:opencsv from 5.11 to 5.11.1.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-version: 5.11.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 02:30:57 +00:00
Tim Donohue
91d845563a Merge pull request #10796 from DSpace/dependabot/maven/dspace-7_x/io.grpc-grpc-context-1.73.0
Bump io.grpc:grpc-context from 1.72.0 to 1.73.0
2025-05-28 15:47:03 -05:00
Tim Donohue
0ad9699128 Merge pull request #10797 from DSpace/dependabot/maven/dspace-7_x/org.postgresql-postgresql-42.7.6
Bump org.postgresql:postgresql from 42.7.5 to 42.7.6
2025-05-28 15:44:19 -05:00
Tim Donohue
9b1899de48 Merge pull request #10791 from DSpace/dependabot/maven/dspace-7_x/apache-commons-3e71c7e148
Bump commons-beanutils:commons-beanutils from 1.10.1 to 1.11.0 in the apache-commons group
2025-05-28 15:41:30 -05:00
dependabot[bot]
4367eebef2 Bump org.postgresql:postgresql from 42.7.5 to 42.7.6
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.5 to 42.7.6.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.5...REL42.7.6)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-version: 42.7.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-28 16:28:25 +00:00
dependabot[bot]
b7960bd42e Bump io.grpc:grpc-context from 1.72.0 to 1.73.0
Bumps [io.grpc:grpc-context](https://github.com/grpc/grpc-java) from 1.72.0 to 1.73.0.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-context
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-28 16:26:54 +00:00
dependabot[bot]
3fef856ef0 Bump commons-beanutils:commons-beanutils in the apache-commons group
Bumps the apache-commons group with 1 update: commons-beanutils:commons-beanutils.


Updates `commons-beanutils:commons-beanutils` from 1.10.1 to 1.11.0

---
updated-dependencies:
- dependency-name: commons-beanutils:commons-beanutils
  dependency-version: 1.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-28 16:25:45 +00:00
Tim Donohue
53b819b4b5 Merge pull request #10779 from DSpace/dependabot/maven/dspace-7_x/org.xmlunit-xmlunit-core-2.10.2
Bump org.xmlunit:xmlunit-core from 2.10.0 to 2.10.2
2025-05-28 08:03:47 -05:00
dependabot[bot]
a2a6838390 Bump org.xmlunit:xmlunit-core from 2.10.0 to 2.10.2
Bumps [org.xmlunit:xmlunit-core](https://github.com/xmlunit/xmlunit) from 2.10.0 to 2.10.2.
- [Release notes](https://github.com/xmlunit/xmlunit/releases)
- [Changelog](https://github.com/xmlunit/xmlunit/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/xmlunit/xmlunit/compare/v2.10.0...v2.10.2)

---
updated-dependencies:
- dependency-name: org.xmlunit:xmlunit-core
  dependency-version: 2.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-26 22:15:28 +00:00
Tim Donohue
c791ac1460 Merge pull request #10486 from atmire/issue-10484_fix-invalid-cast-in-DOIOrganiser
Fix invalid cast in DOIOrganiser exception handling
2025-05-23 09:43:10 -05:00
Tim Donohue
2330ff37b5 Merge pull request #10760 from tdonohue/port_10758_to_7x
[Port dspace-7_x] Bump XOAI to 3.4.1
2025-05-19 14:40:09 -05:00
Tim Donohue
a1582d9477 Bump XOAI to 3.4.1 2025-05-19 14:07:02 -05:00
Tim Donohue
46440dcc2d Merge pull request #10752 from DSpace/backport-10611-to-dspace-7_x
[Port dspace-7_x] Use application/json as mime type for iiif manifests
2025-05-15 12:07:03 -05:00
Kim Shepherd
8b3618f583 [#10611] Remove json mime test from findOneCanvas
(cherry picked from commit e07e051e67)
2025-05-15 15:42:16 +00:00
Kim Shepherd
878ecdc09d [#10611] Add mime type checks in IIIFControllerIT
(cherry picked from commit 87c82f234c)
2025-05-15 15:42:16 +00:00
Pascal-Nicolas Becker
a46e01d6db Use application/json as mime type for iiif manifests
(cherry picked from commit 643e9984c7)
2025-05-15 15:42:16 +00:00
Tim Donohue
e26fd0d9dc Merge pull request #10748 from DSpace/backport-10745-to-dspace-7_x
[Port dspace-7_x] Improve DSpaceObjectService string comparison tests
2025-05-14 15:53:11 -05:00
Kim Shepherd
a2a0649227 [#10744] Update Javadoc in DSpaceObjectService (Item.ANY usage)
(cherry picked from commit 9aa74b8e68)
2025-05-14 19:53:23 +00:00
Kim Shepherd
359dc609a8 [#10744] Improve String comparison in DSpaceObjectServiceImpl
(cherry picked from commit b089fd6442)
2025-05-14 19:53:23 +00:00
Tim Donohue
e6475dc04f Merge pull request #10746 from DSpace/backport-10184-to-dspace-7_x
[Port dspace-7_x] conditional rendering of metadata section in style.xsl
2025-05-14 14:42:04 -05:00
Sascha Szott
fa603b2a58 add conditional check in metadata card rendering
(cherry picked from commit b681145343)
2025-05-14 18:30:19 +00:00
Sascha Szott
bbfc6874a4 conditional rendering for metadata section in style.xsl
(cherry picked from commit addc26ad19)
2025-05-14 18:30:19 +00:00
Tim Donohue
92a92abe9f Merge pull request #10734 from DSpace/dependabot/maven/dspace-7_x/webjars-36a72e2b67
Bump org.webjars.npm:json-editor__json-editor from 2.15.1 to 2.15.2 in the webjars group
2025-05-13 14:41:06 -05:00
Tim Donohue
66b6ed3f4a Must update version in index.html to complete upgrade 2025-05-13 12:12:50 -05:00
Tim Donohue
02ead6997f Merge pull request #10733 from DSpace/dependabot/maven/dspace-7_x/test-tools-3dcec26f7e
Bump the test-tools group with 6 updates
2025-05-13 12:06:25 -05:00
dependabot[bot]
5765bff79c Bump org.webjars.npm:json-editor__json-editor in the webjars group
Bumps the webjars group with 1 update: [org.webjars.npm:json-editor__json-editor](https://github.com/json-editor/json-editor).


Updates `org.webjars.npm:json-editor__json-editor` from 2.15.1 to 2.15.2
- [Changelog](https://github.com/json-editor/json-editor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/json-editor/json-editor/compare/2.15.1...2.15.2)

---
updated-dependencies:
- dependency-name: org.webjars.npm:json-editor__json-editor
  dependency-version: 2.15.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: webjars
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-12 22:49:31 +00:00
dependabot[bot]
42e979a021 Bump the test-tools group with 6 updates
Bumps the test-tools group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [io.netty:netty-buffer](https://github.com/netty/netty) | `4.2.0.Final` | `4.2.1.Final` |
| [io.netty:netty-transport](https://github.com/netty/netty) | `4.2.0.Final` | `4.2.1.Final` |
| [io.netty:netty-transport-native-unix-common](https://github.com/netty/netty) | `4.2.0.Final` | `4.2.1.Final` |
| [io.netty:netty-common](https://github.com/netty/netty) | `4.2.0.Final` | `4.2.1.Final` |
| [io.netty:netty-handler](https://github.com/netty/netty) | `4.2.0.Final` | `4.2.1.Final` |
| [io.netty:netty-codec](https://github.com/netty/netty) | `4.2.0.Final` | `4.2.1.Final` |


Updates `io.netty:netty-buffer` from 4.2.0.Final to 4.2.1.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.0.Final...netty-4.2.1.Final)

Updates `io.netty:netty-transport` from 4.2.0.Final to 4.2.1.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.0.Final...netty-4.2.1.Final)

Updates `io.netty:netty-transport-native-unix-common` from 4.2.0.Final to 4.2.1.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.0.Final...netty-4.2.1.Final)

Updates `io.netty:netty-common` from 4.2.0.Final to 4.2.1.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.0.Final...netty-4.2.1.Final)

Updates `io.netty:netty-handler` from 4.2.0.Final to 4.2.1.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.0.Final...netty-4.2.1.Final)

Updates `io.netty:netty-codec` from 4.2.0.Final to 4.2.1.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.2.0.Final...netty-4.2.1.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-buffer
  dependency-version: 4.2.1.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-version: 4.2.1.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-version: 4.2.1.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-version: 4.2.1.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-version: 4.2.1.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-version: 4.2.1.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-12 22:48:26 +00:00
Tim Donohue
102649b404 Merge pull request #10726 from DSpace/backport-10725-to-dspace-7_x
[Port dspace-7_x] Potential fix for code scanning alert no. 3549: Arbitrary file access during archive extraction ("Zip Slip")
2025-05-09 16:03:49 -05:00
Tim Donohue
086a26d3b4 Potential fix for code scanning alert no. 3549: Arbitrary file access during archive extraction ("Zip Slip")
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
(cherry picked from commit 5fbdfc218f)
2025-05-09 19:15:44 +00:00
Tim Donohue
44d657da1e Merge pull request #10724 from 4Science/task/dspace-7_x/DURACOM-109
[Port dspace-7_x] Proxy Configuration and Connection Leak using HTTP Clients
2025-05-09 12:16:51 -05:00
Stefano Maffei
53e4147910 [DURACOM-109] fix dependency error 2025-05-09 16:12:50 +02:00
Stefano Maffei
2c6f02f74c [DURACOM-109] fix missing dependency 2025-05-09 15:59:50 +02:00
Stefano Maffei
01527712c1 Merge remote-tracking branch 'dspaceCommunity/dspace-7_x' into task/dspace-7_x/DURACOM-109 2025-05-09 15:28:48 +02:00
Tim Donohue
e975ed42b0 Merge pull request #10716 from 4Science/task/dspace-7_x/DURACOM-328
[Port dspace-7_x] FIX Submission patch operation weird recognition check
2025-05-07 09:48:46 -05:00
Elios Buzo
1ade960988 [DURACOM-109] Fixed conflicts 2025-05-07 12:28:43 +02:00
Stefano Maffei
ac20eefe4b [DURACOM-328] fix tests 2025-05-07 10:43:19 +02:00
Stefano Maffei
0ef3b27189 [DURACOM-328] fix test 2025-05-07 09:24:38 +02:00
Stefano Maffei
032252664b [DURACOM-328] fix error in check for Patch request 2025-05-07 09:24:06 +02:00
Tim Donohue
05f96db258 Merge pull request #10706 from DSpace/dependabot/maven/dspace-7_x/com.amazonaws-aws-java-sdk-s3-1.12.783
Bump com.amazonaws:aws-java-sdk-s3 from 1.12.782 to 1.12.783
2025-05-06 12:41:44 -05:00
Tim Donohue
c8fa70073d Merge pull request #10708 from DSpace/dependabot/maven/dspace-7_x/com.opencsv-opencsv-5.11
Bump com.opencsv:opencsv from 5.10 to 5.11
2025-05-06 12:40:26 -05:00
Tim Donohue
5169c48632 Merge pull request #10707 from DSpace/dependabot/maven/dspace-7_x/tika.version-2.9.4
Bump tika.version from 2.9.3 to 2.9.4
2025-05-06 11:58:01 -05:00
Stefano Maffei
409b775d35 [DURACOM-109] fix TruncatedChunkException error 2025-05-06 17:27:21 +02:00
Stefano Maffei
dbcaac4b08 [DURACOM-109] added checkstyle rules to forbid usage of HttpClientBuilder.create() 2025-05-06 17:27:07 +02:00
Stefano Maffei
9d6c482cc4 [DURACOM-109] Orcid connector fix and improvement 2025-05-06 17:26:07 +02:00
Stefano Maffei
0f1679ed72 [DURACOM-109] fix typo and correct logic for ORCID connector 2025-05-06 17:25:34 +02:00
Elios Buzo
7f865ad956 [DURACOM-109] Linter error fix 2025-05-06 17:22:50 +02:00
Elios Buzo
f4390fef52 [DURACOM-109] Continued fixing http connection leaks 2025-05-06 17:22:26 +02:00
Elios Buzo
f9307b617c [DURACOM-109] Minor fix 2025-05-06 17:20:09 +02:00
Elios Buzo
b9352c9149 [DURACOM-109] Fixed http connection leaks 2025-05-06 17:19:29 +02:00
Elios Buzo
32dd1a3dd2 [DURACOM-109] Minor fix 2025-05-06 17:18:38 +02:00
Elios Buzo
a8d33d3ad0 [DURACOM-109] Continued configuring proxy for other classes 2025-05-06 17:17:07 +02:00
Elios Buzo
c2c41e65f8 [DURACOM-109] Configured proxy settings for all clients 2025-05-06 17:10:17 +02:00
Alan Orth
4c7d9223cb Merge pull request #10713 from DSpace/backport-10556-to-dspace-7_x
[Port dspace-7_x] Fix tests failing in TikaTextExtractionFilterTest
2025-05-06 09:56:05 +03:00
abhinav
930565efff 129614: Fixed tests failing in TikaTextExtractionFilterTest when textextractor.use-temp-file is set to true
(cherry picked from commit f9f29f49cb)
2025-05-06 06:20:23 +00:00
dependabot[bot]
8b089be727 Bump com.opencsv:opencsv from 5.10 to 5.11
Bumps com.opencsv:opencsv from 5.10 to 5.11.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-version: '5.11'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 23:11:48 +00:00
dependabot[bot]
f5e83433c4 Bump tika.version from 2.9.3 to 2.9.4
Bumps `tika.version` from 2.9.3 to 2.9.4.

Updates `org.apache.tika:tika-core` from 2.9.3 to 2.9.4
- [Changelog](https://github.com/apache/tika/blob/2.9.4/CHANGES.txt)
- [Commits](https://github.com/apache/tika/compare/2.9.3...2.9.4)

Updates `org.apache.tika:tika-parsers-standard-package` from 2.9.3 to 2.9.4

---
updated-dependencies:
- dependency-name: org.apache.tika:tika-core
  dependency-version: 2.9.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.tika:tika-parsers-standard-package
  dependency-version: 2.9.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 23:02:34 +00:00
dependabot[bot]
a26ef22a46 Bump com.amazonaws:aws-java-sdk-s3 from 1.12.782 to 1.12.783
Bumps [com.amazonaws:aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.782 to 1.12.783.
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.782...1.12.783)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-version: 1.12.783
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 22:58:31 +00:00
Tim Donohue
1052e6b787 Merge pull request #10705 from tdonohue/port_10693_to_7x
[Port dspace-7_x] ISSN code not imported when using SHERPA import
2025-05-05 13:50:04 -05:00
Adamo
d7948d5f7b [DURACOM-356] Updated tests to use metadata constants 2025-05-05 12:32:26 -05:00
Adamo
5dd4e4248c [DURACOM-356] Updated Sherpa Journal mapping to use creativeworkseries.issn instead of dc.identifier.issn 2025-05-05 12:29:32 -05:00
Adamo
bacbe06b2c [DURACOM-356] Fixed tests 2025-05-05 12:29:24 -05:00
Adamo
a0c2891226 [DURACOM-356] Updated Sherpa mapping to use creativeworkseries.issn instead of dc.identifier.issn 2025-05-05 12:29:17 -05:00
Tim Donohue
663ffcf2b1 Merge pull request #10698 from DSpace/backport-10697-to-dspace-7_x
[Port dspace-7_x] Bulk access control fails to iterate over each item in a collection, producing duplicate policies for some items
2025-05-02 16:46:58 -05:00
Tim Donohue
3f9f5639f6 Must use older Java syntax in DSpace 7 2025-05-02 15:49:00 -05:00
Adamo
605956b073 [DURACOM-311] Ensure stable pagination in bulk access control by adding explicit sort
(cherry picked from commit ced9e9b9f7)
2025-05-02 19:56:23 +00:00
Tim Donohue
fd33cee025 Merge pull request #10695 from DSpace/backport-10692-to-dspace-7_x
[Port dspace-7_x] Error when using WOS import service
2025-05-02 10:42:35 -05:00
Adamo
eb5f09f3f2 [DURACOM-355] Update to avoid NPE during WOS live import when no api key is found
(cherry picked from commit 70f1c83bf0)
2025-05-02 15:08:39 +00:00
Jens Vannerum
fae4130d41 119612: Fix limit not applying on export
(cherry picked from commit bcf48821d9)
2025-05-02 11:14:58 +02:00
Jens Vannerum
5929fdc926 124504: Move configuration to be included in the bulkedit module and apply the configured limit earlier, never obtaining a larger list than actually required
(cherry picked from commit b63ffd2eb4)
2025-05-02 11:14:49 +02:00
Jens Vannerum
c5c8417848 119612: Remove group configuration and expose property to angular
(cherry picked from commit c73c739deb)
2025-05-02 11:14:19 +02:00
Jens Vannerum
4626b06d7f 119612: property should be commented by default and have a normal limit
(cherry picked from commit a8b98bb7b7)
2025-05-02 11:12:49 +02:00
Jens Vannerum
4ec611bf79 119612: configurable limit on exporting items since it can take up a bunch of resources
(cherry picked from commit b634e1e380)
2025-05-02 11:12:46 +02:00
Tim Donohue
bf917357a6 Merge pull request #10687 from tdonohue/port_10685_to_7x
[Port dspace-7_x] Remove `javax.el` dependency & replace `MethodNotFoundException` with `UnsupportedOperationException`
2025-05-01 13:46:54 -05:00
Tim Donohue
d83779022e Remove javax.el dependency 2025-05-01 12:53:41 -05:00
Tim Donohue
b04eb9d725 Replace MethodNotFoundException with more appropriate UnsupportedOperationException 2025-05-01 12:53:13 -05:00
Tim Donohue
4821e75294 Merge pull request #10353 from atmire/cli-speed-improvements-periodically-uncache-entities-when-processing-many_7-x
[Port dspace-7_x] Index discovery speed improvement - periodically uncache entities when processing many items
2025-04-30 11:55:34 -05:00
kshepherd
f4e02b73f2 Merge pull request #10681 from DSpace/backport-10668-to-dspace-7_x
[Port dspace-7_x] Fix Collection Admin cannot see withdrawn item metadata
2025-04-30 14:16:51 +02:00
Stefano Maffei
4a89a68736 [DURACOM-357] improved javadoc
(cherry picked from commit f1cb3c3ad1)
2025-04-30 11:45:56 +00:00
Stefano Maffei
2429a0ba29 [DURACOM-357] improved admin check
(cherry picked from commit bb3935a047)
2025-04-30 11:45:56 +00:00
Stefano Maffei
8ca8bd4543 [DURACOM-357] improved check for authorization on objects in ItemConverter
(cherry picked from commit a70dede20b)
2025-04-30 11:45:56 +00:00
Stefano Maffei
c6098c0232 [DURACOM-357] fix Collection Admin cannot see withdrawn item metadata
(cherry picked from commit 5e2bb4fb92)
2025-04-30 11:45:56 +00:00
kshepherd
b937fa8799 Merge pull request #10677 from DSpace/backport-10675-to-dspace-7_x
[Port dspace-7_x] Resolving XML external entity in user-controlled data in PubMedImport
2025-04-30 13:24:05 +02:00
Tim Donohue
90ea371e0b Cannot disable DTDs with PubMed, so instead disallow external entities & entity expansion
(cherry picked from commit f9614c41a6)
2025-04-30 10:24:14 +00:00
Tim Donohue
6fe9af84bd Potential fix for code scanning alert no. 30: Resolving XML external entity in user-controlled data
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
(cherry picked from commit a0ce50b2a4)
2025-04-30 10:24:14 +00:00
Tim Donohue
1494732989 Merge pull request #10673 from DSpace/backport-10640-to-dspace-7_x
[Port dspace-7_x] Improve CLI RegistryLoader, InitializeEntities, Curation commands
2025-04-29 15:37:28 -05:00
Kim Shepherd
85a9e4b731 Let Curation CLI accept uuid identifiers
(cherry picked from commit 5020689095)
2025-04-29 19:50:29 +00:00
Kim Shepherd
fbb496e1c6 Improve help and docs for RegistryLoader
And a few other small improvements

(cherry picked from commit f1b4e6ef17)
2025-04-29 19:50:29 +00:00
Kim Shepherd
98921724f4 Add help opt and javadoc to InitializeEntities
(cherry picked from commit 5240a02996)
2025-04-29 19:50:29 +00:00
Tim Donohue
f94a4e4b71 Merge pull request #10671 from DSpace/backport-10669-to-dspace-7_x
[Port dspace-7_x] Make DiscoveryConfigurationService "get all facet configs" return UNIQUE set
2025-04-29 14:00:45 -05:00
Kim Shepherd
e94d934a5c Make getAllFacetConfigs unique
Improve performance and debuggability by
refactoring getAllFacetConfigs to
getAllUniqueFacetConfigs. Used only by
ChoiceAuthorityService to generate hierarchical
vocabulary map for the browse menu, etc.

(cherry picked from commit 159bd18529)
2025-04-29 17:23:57 +00:00
Tim Donohue
160a70ed16 Merge pull request #10663 from DSpace/dependabot/maven/dspace-7_x/google-apis-b1f0883f77
Bump the google-apis group with 3 updates
2025-04-29 06:56:21 -05:00
Tim Donohue
d63a088e70 Merge pull request #10661 from DSpace/dependabot/maven/dspace-7_x/apache-commons-f6cb4980f5
Bump the apache-commons group with 2 updates
2025-04-29 06:55:48 -05:00
Tim Donohue
46880b025e Merge pull request #10658 from DSpace/dependabot/maven/dspace-7_x/fasterxml-111bca66b8
Bump the fasterxml group with 3 updates
2025-04-29 06:54:28 -05:00
Alan Orth
23dfcf0af6 Merge pull request #10665 from DSpace/dependabot/maven/dspace-7_x/pdfbox-version-2.0.34
Bump pdfbox-version from 2.0.33 to 2.0.34
2025-04-29 12:52:24 +03:00
dependabot[bot]
19010353c9 Bump pdfbox-version from 2.0.33 to 2.0.34
Bumps `pdfbox-version` from 2.0.33 to 2.0.34.

Updates `org.apache.pdfbox:pdfbox` from 2.0.33 to 2.0.34

Updates `org.apache.pdfbox:fontbox` from 2.0.33 to 2.0.34

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:pdfbox
  dependency-version: 2.0.34
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.pdfbox:fontbox
  dependency-version: 2.0.34
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-29 00:15:34 +00:00
dependabot[bot]
5400e3f8a8 Bump the google-apis group with 3 updates
Bumps the google-apis group with 3 updates: [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client), [com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client) and [com.google.http-client:google-http-client-gson](https://github.com/googleapis/google-http-java-client).


Updates `com.google.http-client:google-http-client` from 1.46.3 to 1.47.0
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.46.3...v1.47.0)

Updates `com.google.http-client:google-http-client-jackson2` from 1.46.3 to 1.47.0
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.46.3...v1.47.0)

Updates `com.google.http-client:google-http-client-gson` from 1.46.3 to 1.47.0
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.46.3...v1.47.0)

---
updated-dependencies:
- dependency-name: com.google.http-client:google-http-client
  dependency-version: 1.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-jackson2
  dependency-version: 1.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-gson
  dependency-version: 1.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-29 00:02:22 +00:00
dependabot[bot]
ff67241bc9 Bump the apache-commons group with 2 updates
Bumps the apache-commons group with 2 updates: org.apache.commons:commons-collections4 and org.apache.commons:commons-configuration2.


Updates `org.apache.commons:commons-collections4` from 4.4 to 4.5.0

Updates `org.apache.commons:commons-configuration2` from 2.11.0 to 2.12.0

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-collections4
  dependency-version: 4.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-configuration2
  dependency-version: 2.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-29 00:01:34 +00:00
dependabot[bot]
b949bdd4c0 Bump the fasterxml group with 3 updates
Bumps the fasterxml group with 3 updates: [com.fasterxml.jackson.core:jackson-annotations](https://github.com/FasterXML/jackson), [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) and [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson).


Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.18.3...jackson-core-2.19.0)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.18.3...jackson-core-2.19.0)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 23:58:24 +00:00
Tim Donohue
e4d5d7cbcc Merge pull request #10241 from atmire/w2p-124362_VersionedHandleIdentifierProviderWithCanonicalHandles-and-com-col-handles
Fix issue with VersionedHandleIdentifierProviderWithCanonicalHandles and com/col handles
2025-04-28 16:05:21 -05:00
Tim Donohue
1278068eaa Merge pull request #10647 from DSpace/backport-10636-to-dspace-7_x
[Port dspace-7_x] Fix: import public email from ORCID person
2025-04-25 16:35:47 -05:00
Jesiel Viana
106936967e removing duplicated files
(cherry picked from commit c6d1121cbe)
2025-04-25 20:08:08 +00:00
Jesiel Viana
cf9e5c1cd4 fix: Checkstyle violations
(cherry picked from commit 9a831e5393)
2025-04-25 20:08:08 +00:00
Jesiel Viana
ac7dfc562f fix: import public email from ORCID person
(cherry picked from commit 82ca80cd6b)
2025-04-25 20:08:08 +00:00
Tim Donohue
37338424e3 Merge pull request #10645 from tdonohue/port_10549_to_7x
[Port dspace-7_x] restrict maximum value of URL parameter rpp in OpenSearchController to a reasonable default
2025-04-25 08:50:03 -05:00
Sascha Szott
1a619b2833 restrict maximum value of URL parameter rpp 2025-04-24 16:49:59 -05:00
Sascha Szott
ca3b2de1a8 add configuration key websvc.opensearch.max_num_of_items_per_request 2025-04-24 16:48:54 -05:00
Sascha Szott
869d122eac implement method getMaxNumOfItemsPerRequest 2025-04-24 16:48:48 -05:00
Sascha Szott
045a5c0b0e add method getMaxNumOfItemsPerRequest 2025-04-24 16:48:42 -05:00
Tim Donohue
9d1e2d5f9d Merge pull request #10641 from DSpace/backport-10505-to-dspace-7_x
[Port dspace-7_x] Fix incorrect parsing of access-status metadata
2025-04-24 15:15:51 -05:00
Agustina Martinez
440bb64809 Update dim.xsl
Added template to correctly parse elements under "others" metadata element

(cherry picked from commit ac7da6a477)
2025-04-24 19:44:57 +00:00
Tim Donohue
0695b6756c Merge pull request #10623 from DSpace/backport-10599-to-dspace-7_x
[Port dspace-7_x] Fix login endpoints not automatically closing their Context
2025-04-23 11:12:18 -05:00
Tim Donohue
c8a0c94f78 Merge pull request #10630 from DSpace/dependabot/maven/dspace-7_x/io.grpc-grpc-context-1.72.0
Bump io.grpc:grpc-context from 1.71.0 to 1.72.0
2025-04-22 09:41:48 -05:00
dependabot[bot]
5d880bcf2d Bump io.grpc:grpc-context from 1.71.0 to 1.72.0
Bumps [io.grpc:grpc-context](https://github.com/grpc/grpc-java) from 1.71.0 to 1.72.0.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-context
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 23:03:07 +00:00
Alexandre Vryghem
133c280883 126885: Removed database connection leak on logout
(cherry picked from commit b299a96076)
2025-04-18 19:01:50 +00:00
Alexandre Vryghem
0a79903f30 126885: Removed database connection leak on login
Also:
- Updated EPersonRestAuthenticationProvider to not open an additional DB connection, and reuse the existing one instead
- Normalized the behaviour of OidcLoginFilter by not calling the redirectAfterSuccess instead of doing a chain.doFilter(req, res). This way we don't need to reopen a new Context

(cherry picked from commit 518fb3b1d8)
2025-04-18 19:01:50 +00:00
kshepherd
4ec40054b1 Merge pull request #10617 from DSpace/backport-10519-to-dspace-7_x
[Port dspace-7_x] Fix metadata browsing in descending order using a json.facet to retrieve index values
2025-04-17 15:56:50 +02:00
Toni Prieto
b2f44f57f9 Add test for browse entries pagination
(cherry picked from commit a7bc82084e)
2025-04-17 13:21:02 +00:00
Toni Prieto
d6ff41d9f5 Refactor browse entries facet query to use JSON facet query
(cherry picked from commit 8e88547932)
2025-04-17 13:21:02 +00:00
Tim Donohue
6817d2aa59 Merge pull request #10614 from DSpace/backport-10613-to-dspace-7_x
[Port dspace-7_x] [DURACOM-346] SubscribeServiceImpl : the method "isSubscribed" returns incorrect result
2025-04-16 12:05:37 -05:00
Piaget Bouaka Donfack
3a894e5f5d [DURACOM-346] SubscribeServiceImpl : the method "isSubscribed" returns incorrect result
(cherry picked from commit 23468d4ee3)
2025-04-16 16:28:22 +00:00
Tim Donohue
d74ae7345e Merge pull request #10604 from DSpace/dependabot/maven/dspace-7_x/apache-commons-9d0a8b4b96
Bump the apache-commons group with 2 updates
2025-04-15 09:45:46 -05:00
Alan Orth
3f653411cf Merge pull request #10605 from DSpace/backport-10109-to-dspace-7_x 2025-04-15 10:23:35 +03:00
Toni Prieto
086e54cb31 Modify Solr query to find collections with submit permissions in searches with spaces
(cherry picked from commit 425dc1556e)
2025-04-15 06:32:12 +00:00
dependabot[bot]
dd62a57564 Bump the apache-commons group with 2 updates
Bumps the apache-commons group with 2 updates: commons-io:commons-io and org.apache.commons:commons-text.


Updates `commons-io:commons-io` from 2.18.0 to 2.19.0

Updates `org.apache.commons:commons-text` from 1.13.0 to 1.13.1

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-text
  dependency-version: 1.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 23:11:31 +00:00
Tim Donohue
e8ee694f21 Merge pull request #10588 from atmire/backport-10485-to-dspace-7_x
[Port dspace-7_x] SEOHealthIndicator which verifies all relevant parameters for SEO issues
2025-04-11 09:27:54 -05:00
Jens Vannerum
5b8782509f 127746: Include success result for robots.txt check if other checks fail
(cherry picked from commit 5dc12775fa)
2025-04-11 15:48:48 +02:00
Jens Vannerum
64c5f82209 127746: Add more detailed information messages on how to solve problems
(cherry picked from commit 170dc9a44c)
2025-04-11 15:48:48 +02:00
Jens Vannerum
7a876999f8 127746: Implement different failures for robots file so we can differentiate between a missing file or an invalid file
(cherry picked from commit 32c0484280)
2025-04-11 15:48:48 +02:00
Jens Vannerum
31549bdace Disable new actuator in IT
(cherry picked from commit 20ab43cccc)
2025-04-11 15:48:45 +02:00
Jens Vannerum
e122a90674 Implement a SEOHealthIndicator which verifies all relevant parameters for SEO are ok
(cherry picked from commit 4bd8a24ca7)
2025-04-11 15:46:34 +02:00
Tim Donohue
ac7eee6465 Merge pull request #10472 from DSpace/dependabot/maven/dspace-7_x/fasterxml-560de934c1
Bump the fasterxml group with 3 updates
2025-04-09 10:12:10 -05:00
Tim Donohue
503f78f065 Merge pull request #10571 from DSpace/dependabot/maven/dspace-7_x/build-tools-8be766aa5b
Bump the build-tools group across 1 directory with 5 updates
2025-04-09 10:11:14 -05:00
Tim Donohue
8d79120eec Merge pull request #10469 from DSpace/dependabot/maven/dspace-7_x/google-apis-88ea69a71a
Bump the google-apis group across 1 directory with 4 updates
2025-04-08 13:24:57 -05:00
Tim Donohue
76018e0048 Merge pull request #10482 from DSpace/dependabot/maven/dspace-7_x/io.grpc-grpc-context-1.71.0
Bump io.grpc:grpc-context from 1.70.0 to 1.71.0
2025-04-08 13:24:11 -05:00
Tim Donohue
5fd134d7cf Merge pull request #10544 from DSpace/dependabot/maven/dspace-7_x/joda-time-joda-time-2.14.0
Bump joda-time:joda-time from 2.13.1 to 2.14.0
2025-04-08 13:23:15 -05:00
Tim Donohue
3de7bab453 Merge pull request #10449 from DSpace/dependabot/maven/dspace-7_x/com.amazonaws-aws-java-sdk-s3-1.12.782
Bump com.amazonaws:aws-java-sdk-s3 from 1.12.781 to 1.12.782
2025-04-08 13:21:39 -05:00
dependabot[bot]
16239433f6 Bump io.grpc:grpc-context from 1.70.0 to 1.71.0
Bumps [io.grpc:grpc-context](https://github.com/grpc/grpc-java) from 1.70.0 to 1.71.0.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-context
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 15:47:34 +00:00
dependabot[bot]
bb2ed04ed3 Bump the build-tools group across 1 directory with 5 updates
Bumps the build-tools group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [com.github.spotbugs:spotbugs](https://github.com/spotbugs/spotbugs) | `4.9.1` | `4.9.3` |
| [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) | `3.13.0` | `3.14.0` |
| [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) | `4.9.1.0` | `4.9.3.0` |
| [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin) | `3.4.0` | `3.4.1` |
| [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) | `0.8.12` | `0.8.13` |



Updates `com.github.spotbugs:spotbugs` from 4.9.1 to 4.9.3
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.9.1...4.9.3)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.13.0 to 3.14.0
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)

Updates `com.github.spotbugs:spotbugs-maven-plugin` from 4.9.1.0 to 4.9.3.0
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.9.1.0...spotbugs-maven-plugin-4.9.3.0)

Updates `org.apache.maven.plugins:maven-clean-plugin` from 3.4.0 to 3.4.1
- [Release notes](https://github.com/apache/maven-clean-plugin/releases)
- [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.4.0...maven-clean-plugin-3.4.1)

Updates `org.jacoco:jacoco-maven-plugin` from 0.8.12 to 0.8.13
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.12...v0.8.13)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs
  dependency-version: 4.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.3.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-clean-plugin
  dependency-version: 3.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-version: 0.8.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 15:36:26 +00:00
dependabot[bot]
a5806fb518 Bump the google-apis group across 1 directory with 4 updates
Bumps the google-apis group with 4 updates in the / directory: [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client), [com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client), [com.google.oauth-client:google-oauth-client](https://github.com/googleapis/google-oauth-java-client) and [com.google.http-client:google-http-client-gson](https://github.com/googleapis/google-http-java-client).


Updates `com.google.http-client:google-http-client` from 1.46.1 to 1.46.3
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.46.1...v1.46.3)

Updates `com.google.http-client:google-http-client-jackson2` from 1.46.1 to 1.46.3
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.46.1...v1.46.3)

Updates `com.google.oauth-client:google-oauth-client` from 1.37.0 to 1.38.0
- [Release notes](https://github.com/googleapis/google-oauth-java-client/releases)
- [Changelog](https://github.com/googleapis/google-oauth-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-oauth-java-client/compare/v1.37.0...v1.38.0)

Updates `com.google.http-client:google-http-client-gson` from 1.46.1 to 1.46.3
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.46.1...v1.46.3)

---
updated-dependencies:
- dependency-name: com.google.http-client:google-http-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-jackson2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: google-apis
- dependency-name: com.google.oauth-client:google-oauth-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-gson
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: google-apis
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 15:35:52 +00:00
dependabot[bot]
b64b79973d Bump the fasterxml group with 3 updates
Bumps the fasterxml group with 3 updates: [com.fasterxml.jackson.core:jackson-annotations](https://github.com/FasterXML/jackson), [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) and [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson).


Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.18.2 to 2.18.3
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.18.2 to 2.18.3
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.18.2...jackson-core-2.18.3)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.18.2 to 2.18.3
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.18.2...jackson-core-2.18.3)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.2 to 2.18.3
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fasterxml
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 15:35:47 +00:00
Tim Donohue
7d5db89889 Merge pull request #10470 from DSpace/dependabot/maven/dspace-7_x/test-tools-fd1863f7f0
Bump the test-tools group with 6 updates
2025-04-08 09:26:20 -05:00
dependabot[bot]
c8cc425357 Bump com.amazonaws:aws-java-sdk-s3 from 1.12.781 to 1.12.782
Bumps [com.amazonaws:aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.781 to 1.12.782.
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.781...1.12.782)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 14:23:43 +00:00
Tim Donohue
5fa01ef63e Merge pull request #10570 from tdonohue/remove_unused_sword_client_7x
[Port dspace-7_x] Remove unused, unmaintained SWORD v1 client code
2025-04-08 06:58:52 -05:00
dependabot[bot]
68cffba5fa Bump the test-tools group with 6 updates
Bumps the test-tools group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [io.netty:netty-buffer](https://github.com/netty/netty) | `4.1.118.Final` | `4.1.119.Final` |
| [io.netty:netty-transport](https://github.com/netty/netty) | `4.1.118.Final` | `4.1.119.Final` |
| [io.netty:netty-transport-native-unix-common](https://github.com/netty/netty) | `4.1.118.Final` | `4.1.119.Final` |
| [io.netty:netty-common](https://github.com/netty/netty) | `4.1.118.Final` | `4.1.119.Final` |
| [io.netty:netty-handler](https://github.com/netty/netty) | `4.1.118.Final` | `4.1.119.Final` |
| [io.netty:netty-codec](https://github.com/netty/netty) | `4.1.118.Final` | `4.1.119.Final` |


Updates `io.netty:netty-buffer` from 4.1.118.Final to 4.1.119.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.118.Final...netty-4.1.119.Final)

Updates `io.netty:netty-transport` from 4.1.118.Final to 4.1.119.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.118.Final...netty-4.1.119.Final)

Updates `io.netty:netty-transport-native-unix-common` from 4.1.118.Final to 4.1.119.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.118.Final...netty-4.1.119.Final)

Updates `io.netty:netty-common` from 4.1.118.Final to 4.1.119.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.118.Final...netty-4.1.119.Final)

Updates `io.netty:netty-handler` from 4.1.118.Final to 4.1.119.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.118.Final...netty-4.1.119.Final)

Updates `io.netty:netty-codec` from 4.1.118.Final to 4.1.119.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.118.Final...netty-4.1.119.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-buffer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-07 23:48:45 +00:00
Tim Donohue
bfe7e7871e Remove unused SWORD v1 client code. This is "dead code" which is unmaintained and obsolete 2025-04-07 17:10:43 -05:00
Tim Donohue
a6fcdeab9e Merge pull request #10567 from tdonohue/port_10565_to_7x
[Port dspace-7_x][GitHub Actions] Update Docker scripts to use new Ubuntu ARM64 runner instead of emulation
2025-04-07 12:53:01 -05:00
Tim Donohue
4c73e4b01f Update reusable-docker-build to use Ubuntu ARM64 runner for those images 2025-04-07 11:56:20 -05:00
Tim Donohue
a2a56d416e Merge pull request #10551 from DSpace/backport-9876-to-dspace-7_x
[Port dspace-7_x] Fix DSpace startup failures when ORCID http connections fail
2025-04-02 14:08:35 -05:00
Kim Shepherd
1fe697a19e Fix some ORCID mock / test usage
(cherry picked from commit 038ddeee97)
2025-04-02 18:28:28 +00:00
Kim Shepherd
3fa57d7c0e More robust ORCID accessToken init, REST con. usage
* Ensure that http client / IO exceptions don't cause a
  total DSpace startup failure because of unhandled
  exceptions in Spring service init methods.
* Centralise access token retrieval method in factory utils.
* Check for NULL rest connector since that can now happen
  and handle gracefully, with error logging

(cherry picked from commit b72344ecfb)
2025-04-02 18:28:28 +00:00
dependabot[bot]
d68c5ac8eb Bump joda-time:joda-time from 2.13.1 to 2.14.0
Bumps [joda-time:joda-time](https://github.com/JodaOrg/joda-time) from 2.13.1 to 2.14.0.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.13.1...v2.14.0)

---
updated-dependencies:
- dependency-name: joda-time:joda-time
  dependency-version: 2.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 22:52:59 +00:00
DSpace Bot
c797441b86 [Port dspace-7_x] Add null check in SolrServiceFileInfoPlugin for index-discovery (#10517)
* Add null check in SolrServiceFileInfoPlugin for index-discovery

(cherry picked from commit d07f1e0caa)

* Fix starting curly brace.

(cherry picked from commit e11994c0ee)

* Update SolrServiceFileInfoPlugin.java

(cherry picked from commit 18372ae072)

---------

Co-authored-by: jameswsullivan <81947235+jameswsullivan@users.noreply.github.com>
2025-03-24 14:04:03 -05:00
Tim Donohue
56e8322079 Merge pull request #10515 from DSpace/backport-10511-to-dspace-7_x
[Port dspace-7_x] Add bitstream null check to XOAI.java
2025-03-24 10:59:57 -05:00
Tim Donohue
0a3174551f Merge pull request #10513 from DSpace/backport-10509-to-dspace-7_x
[Port dspace-7_x] DiscoverQueryBuilder: add missing whitespace in exception message
2025-03-24 10:58:45 -05:00
jameswsullivan
bdfe2bfe2e Add bitstream null check to XOAI
(cherry picked from commit 54602f47b1)
2025-03-24 14:58:37 +00:00
Sascha Szott
00da667ba5 add missing whitespace
(cherry picked from commit 4ea4958093)
2025-03-24 14:55:00 +00:00
Sascha Szott
fbec7f2e56 add missing whitespace in exception message
(cherry picked from commit 9a904ab4c9)
2025-03-24 14:55:00 +00:00
Zahraa Chreim
238893ce6d Fix invalid cast in DOIOrganiser exception handling 2025-03-11 16:02:03 +02:00
Tim Donohue
4c0bbeffa3 Merge pull request #10474 from DSpace/backport-10460-to-dspace-7_x
[Port dspace-7_x] Refactoring the function to retrieve the number of browse entries (fix errors using Solr 9.x)
2025-03-04 10:11:01 -06:00
Toni Prieto
15dab1e41e Use NestableJsonFacet to process browse entries count response
(cherry picked from commit 7ba09b7a85)
2025-03-04 15:24:29 +00:00
Tim Donohue
1d4117f4ba Merge pull request #9895 from minurmin/DSpace-9665
[Port dspace-7_x] BitstreamRestController etag/content-length calculation fix when coverpages are enabled
2025-02-27 14:25:31 -06:00
Tim Donohue
4972a5d8f9 Merge pull request #10416 from DSpace/dependabot/maven/dspace-7_x/net.minidev-json-smart-2.5.2
Bump net.minidev:json-smart from 2.5.1 to 2.5.2
2025-02-18 12:09:53 -06:00
Tim Donohue
8fd3429c9a Merge pull request #10417 from DSpace/dependabot/maven/dspace-7_x/com.amazonaws-aws-java-sdk-s3-1.12.781
Bump com.amazonaws:aws-java-sdk-s3 from 1.12.780 to 1.12.781
2025-02-18 12:05:10 -06:00
Tim Donohue
f1ddc78729 Merge pull request #10415 from DSpace/dependabot/maven/dspace-7_x/apache-commons-6a14420bb4
Bump commons-beanutils:commons-beanutils from 1.10.0 to 1.10.1 in the apache-commons group
2025-02-18 12:04:01 -06:00
Tim Donohue
0cb3020442 Merge pull request #10414 from DSpace/dependabot/maven/dspace-7_x/build-tools-4f90ff9816
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.8.6.6 to 4.9.1.0 in the build-tools group
2025-02-18 12:02:57 -06:00
dependabot[bot]
1d85653ed0 Bump com.amazonaws:aws-java-sdk-s3 from 1.12.780 to 1.12.781
Bumps [com.amazonaws:aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.780 to 1.12.781.
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.780...1.12.781)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 22:27:07 +00:00
dependabot[bot]
51c766caa3 Bump net.minidev:json-smart from 2.5.1 to 2.5.2
Bumps [net.minidev:json-smart](https://github.com/netplex/json-smart-v2) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/netplex/json-smart-v2/releases)
- [Commits](https://github.com/netplex/json-smart-v2/compare/2.5.1...2.5.2)

---
updated-dependencies:
- dependency-name: net.minidev:json-smart
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 22:26:49 +00:00
dependabot[bot]
edbf9ef605 Bump commons-beanutils:commons-beanutils in the apache-commons group
Bumps the apache-commons group with 1 update: commons-beanutils:commons-beanutils.


Updates `commons-beanutils:commons-beanutils` from 1.10.0 to 1.10.1

---
updated-dependencies:
- dependency-name: commons-beanutils:commons-beanutils
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 22:25:48 +00:00
dependabot[bot]
b63329b45a Bump com.github.spotbugs:spotbugs-maven-plugin in the build-tools group
Bumps the build-tools group with 1 update: [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin).


Updates `com.github.spotbugs:spotbugs-maven-plugin` from 4.8.6.6 to 4.9.1.0
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.8.6.6...spotbugs-maven-plugin-4.9.1.0)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 22:25:23 +00:00
Tim Donohue
8adbe244bf Merge pull request #10409 from DSpace/backport-10406-to-dspace-7_x
[Port dspace-7_x] Fix #10405 bug in log4j-cli
2025-02-13 12:59:05 -06:00
Martin Walk
268b5fc8b7 Fix #10405 bug in log4j-cli
(cherry picked from commit 4c044adcf3)
2025-02-13 16:40:50 +00:00
Tim Donohue
fedbccae49 Merge pull request #10392 from DSpace/dependabot/maven/dspace-7_x/tika.version-2.9.3
Bump tika.version from 2.9.2 to 2.9.3
2025-02-12 17:11:40 -06:00
Tim Donohue
fcc4dcf5b3 Merge pull request #10174 from atmire/w2p-121973_openaire-compliance-updates-7.x
[Port dspace-7_x] OpenAIRE v4 compliance updates
2025-02-12 12:36:10 -06:00
Paulo Graça
ee762260cf [Port dspace-7_x] Fixing Crossref document type issue with new metadata mapping processor (#9909)
* new metadata mapping processor for crossref document type

* licence and code style fixes

* adjust crossref test to consider mapped dc.type to Article

* correcting english

* remove trailing space
2025-02-12 15:26:27 +03:00
Tim Donohue
63bb639e68 Merge pull request #10346 from DSpace/dependabot/maven/dspace-7_x/io.grpc-grpc-context-1.70.0
Bump io.grpc:grpc-context from 1.69.0 to 1.70.0
2025-02-11 10:52:49 -06:00
Tim Donohue
dfe5628ed9 Merge pull request #10389 from DSpace/dependabot/maven/dspace-7_x/google-apis-4ffec14d6f
Bump the google-apis group across 1 directory with 3 updates
2025-02-11 10:52:11 -06:00
Tim Donohue
fc4a7628ef Merge pull request #10391 from DSpace/dependabot/maven/dspace-7_x/apache-commons-8f079b07b9
Bump commons-logging:commons-logging from 1.3.4 to 1.3.5 in the apache-commons group
2025-02-11 10:42:35 -06:00
Tim Donohue
102c347455 Dependency convergence fix 2025-02-11 10:40:51 -06:00
Tim Donohue
cf7370e2bc Merge pull request #10390 from DSpace/dependabot/maven/dspace-7_x/test-tools-104c99f93b
Bump the test-tools group with 6 updates
2025-02-11 09:51:01 -06:00
Tim Donohue
1c59295693 Merge pull request #10388 from DSpace/dependabot/maven/dspace-7_x/build-tools-2e3c11379d
Bump com.github.spotbugs:spotbugs from 4.9.0 to 4.9.1 in the build-tools group
2025-02-11 09:49:45 -06:00
dependabot[bot]
2c13ee40fe Bump tika.version from 2.9.2 to 2.9.3
Bumps `tika.version` from 2.9.2 to 2.9.3.

Updates `org.apache.tika:tika-core` from 2.9.2 to 2.9.3
- [Changelog](https://github.com/apache/tika/blob/2.9.3/CHANGES.txt)
- [Commits](https://github.com/apache/tika/compare/2.9.2...2.9.3)

Updates `org.apache.tika:tika-parsers-standard-package` from 2.9.2 to 2.9.3

---
updated-dependencies:
- dependency-name: org.apache.tika:tika-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.tika:tika-parsers-standard-package
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 22:27:33 +00:00
dependabot[bot]
090001b685 Bump commons-logging:commons-logging in the apache-commons group
Bumps the apache-commons group with 1 update: commons-logging:commons-logging.


Updates `commons-logging:commons-logging` from 1.3.4 to 1.3.5

---
updated-dependencies:
- dependency-name: commons-logging:commons-logging
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 22:26:31 +00:00
dependabot[bot]
ba318d9710 Bump the test-tools group with 6 updates
Bumps the test-tools group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [io.netty:netty-buffer](https://github.com/netty/netty) | `4.1.117.Final` | `4.1.118.Final` |
| [io.netty:netty-transport](https://github.com/netty/netty) | `4.1.117.Final` | `4.1.118.Final` |
| [io.netty:netty-transport-native-unix-common](https://github.com/netty/netty) | `4.1.117.Final` | `4.1.118.Final` |
| [io.netty:netty-common](https://github.com/netty/netty) | `4.1.117.Final` | `4.1.118.Final` |
| [io.netty:netty-handler](https://github.com/netty/netty) | `4.1.117.Final` | `4.1.118.Final` |
| [io.netty:netty-codec](https://github.com/netty/netty) | `4.1.117.Final` | `4.1.118.Final` |


Updates `io.netty:netty-buffer` from 4.1.117.Final to 4.1.118.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.117.Final...netty-4.1.118.Final)

Updates `io.netty:netty-transport` from 4.1.117.Final to 4.1.118.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.117.Final...netty-4.1.118.Final)

Updates `io.netty:netty-transport-native-unix-common` from 4.1.117.Final to 4.1.118.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.117.Final...netty-4.1.118.Final)

Updates `io.netty:netty-common` from 4.1.117.Final to 4.1.118.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.117.Final...netty-4.1.118.Final)

Updates `io.netty:netty-handler` from 4.1.117.Final to 4.1.118.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.117.Final...netty-4.1.118.Final)

Updates `io.netty:netty-codec` from 4.1.117.Final to 4.1.118.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.117.Final...netty-4.1.118.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-buffer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 22:26:17 +00:00
dependabot[bot]
06a5458205 Bump the google-apis group across 1 directory with 3 updates
Bumps the google-apis group with 3 updates in the / directory: [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client), [com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client) and [com.google.http-client:google-http-client-gson](https://github.com/googleapis/google-http-java-client).


Updates `com.google.http-client:google-http-client` from 1.45.3 to 1.46.1
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.45.3...v1.46.1)

Updates `com.google.http-client:google-http-client-jackson2` from 1.45.3 to 1.46.1
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.45.3...v1.46.1)

Updates `com.google.http-client:google-http-client-gson` from 1.43.3 to 1.46.1
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/v1.43.3...v1.46.1)

---
updated-dependencies:
- dependency-name: com.google.http-client:google-http-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-jackson2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-gson
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 22:25:53 +00:00
dependabot[bot]
8e411ac70c Bump com.github.spotbugs:spotbugs in the build-tools group
Bumps the build-tools group with 1 update: [com.github.spotbugs:spotbugs](https://github.com/spotbugs/spotbugs).


Updates `com.github.spotbugs:spotbugs` from 4.9.0 to 4.9.1
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.9.0...4.9.1)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 22:25:47 +00:00
Tim Donohue
ce1dbb6d2c Merge pull request #10372 from DSpace/dependabot/maven/dspace-7_x/joda-time-joda-time-2.13.1
Bump joda-time:joda-time from 2.13.0 to 2.13.1
2025-02-10 14:15:36 -06:00
Tim Donohue
cb4fb777c5 Merge pull request #10347 from DSpace/dependabot/maven/dspace-7_x/dnsjava-dnsjava-3.6.3
Bump dnsjava:dnsjava from 3.6.2 to 3.6.3
2025-02-10 14:11:56 -06:00
Tim Donohue
72cedb7722 Merge pull request #10344 from DSpace/dependabot/maven/dspace-7_x/apache-commons-f9d9c8ba39
Bump the apache-commons group with 2 updates
2025-02-10 14:10:41 -06:00
Tim Donohue
dd6183b9cb Merge pull request #10383 from tdonohue/port_10381_to_7x
[Port dspace-7_x] Remove unused/unnecessary dependencies : `byte-buddy`
2025-02-10 14:03:48 -06:00
Tim Donohue
a2cb8cc838 Remove unused byte-buddy 2025-02-10 11:37:26 -06:00
Tim Donohue
e0aa56ca82 [maven-release-plugin] prepare for next development iteration 2025-02-07 10:57:05 -06:00
Tim Donohue
6181f2723c [maven-release-plugin] prepare release dspace-7.6.3 2025-02-07 10:57:02 -06:00
Tim Donohue
7e4fc1daaf Update LICENSES_THIRD_PARTY for 7.6.3 2025-02-07 10:22:53 -06:00
Tim Donohue
ae0b9a4bdb Merge pull request #10378 from 4Science/task/dspace-7_x/DURACOM-288
[Port dspace-7_x] Provide a setting to use a different REST url during SSR execution
2025-02-07 09:30:59 -06:00
Giuseppe Digilio
7e7a4c9da0 Merge remote-tracking branch 'upstreamdspace/dspace-7_x' into task/dspace-7_x/DURACOM-288
# Conflicts:
#	dspace-server-webapp/src/test/java/org/dspace/app/rest/AuthorizationRestRepositoryIT.java
2025-02-06 18:08:15 +01:00
Giuseppe Digilio
888edc4597 [DURACOM-288] Fix wrong imports 2025-02-06 18:03:23 +01:00
Giuseppe Digilio
81642ea139 [DURACOM-288] Change logic in order to use dspaceUrl as default fallback 2025-02-06 17:05:56 +01:00
Giuseppe Digilio
e6f565e90f [DURACOM-288] Build endpoint map according to request origin, in order to get internal urls if used 2025-02-06 17:05:38 +01:00
Giuseppe Digilio
648d9f6972 [DURACOM-288] Set dspace.server.ssr.url as dspace.server.url by default 2025-02-06 17:05:18 +01:00
Giuseppe Digilio
c39042095a [DURACOM-288] Code refactoring and test improvements 2025-02-06 17:05:02 +01:00
Giuseppe Digilio
a2e518444c [DURACOM-288] Fix test 2025-02-06 17:04:50 +01:00
Giuseppe Digilio
369bda130a [DURACOM-288] Add dspace.server.ssr.uri in the local.cfg.EXAMPLE 2025-02-06 17:04:39 +01:00
Giuseppe Digilio
ea15a3b965 [DURACOM-288] Add check to allow base object uri containing dspace.server.ssr.uri 2025-02-06 17:04:28 +01:00
Giuseppe Digilio
94ad5744e2 [DURACOM-288] Add DSpace property to specify addition rest url 2025-02-06 17:04:18 +01:00
dependabot[bot]
723ad07ae9 Bump joda-time:joda-time from 2.13.0 to 2.13.1
Bumps [joda-time:joda-time](https://github.com/JodaOrg/joda-time) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.13.0...v2.13.1)

---
updated-dependencies:
- dependency-name: joda-time:joda-time
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 23:20:40 +00:00
dependabot[bot]
63fbffc963 Bump the apache-commons group with 2 updates
Bumps the apache-commons group with 2 updates: [commons-codec:commons-codec](https://github.com/apache/commons-codec) and org.apache.commons:commons-pool2.


Updates `commons-codec:commons-codec` from 1.17.2 to 1.18.0
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.17.2...rel/commons-codec-1.18.0)

Updates `org.apache.commons:commons-pool2` from 2.12.0 to 2.12.1

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-pool2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 23:19:27 +00:00
Tim Donohue
ec32897f50 Merge pull request #10358 from DSpace/backport-10293-to-dspace-7_x
[Port dspace-7_x] Fix ClamAV curation task crashing on exceptions instead of ending gracefully
2025-02-03 09:54:43 -06:00
Jens Vannerum
094af861b3 124579: catch any exceptions during process and end task gracefully
(cherry picked from commit 11a1c9ab06)
2025-02-01 09:53:29 +00:00
Jens Vannerum
6b4c7a773d 124579: If no ORIGINAL bundle exists, end the process gracefully instead of throwing NPE
(cherry picked from commit 046c1b5d05)
2025-02-01 09:53:29 +00:00
Marie Verdonck
bf520782d8 Merge branch 'cli-speed-improvements-periodically-uncache-entities-when-processing-many_7.6' into cli-speed-improvements-periodically-uncache-entities-when-processing-many_7-x
# Conflicts:
#	dspace-api/src/main/java/org/dspace/core/Context.java
#	dspace-api/src/main/java/org/dspace/core/DBConnection.java
#	dspace-api/src/main/java/org/dspace/core/HibernateDBConnection.java
2025-01-29 22:11:03 +01:00
Tim Donohue
6bf4d142a4 Merge pull request #10111 from atmire/issue-10110_w2p-109807_arxiv-author-mapping-fix-7_x
[Port dspace-7_x] ArXiv Live Import - Author mapping fix
2025-01-29 12:08:08 -06:00
Marie Verdonck
e8a54e698c cli speed improvement: periodically uncache entities when processing many 2025-01-29 12:42:25 +01:00
dependabot[bot]
3885966b4d Bump dnsjava:dnsjava from 3.6.2 to 3.6.3
Bumps [dnsjava:dnsjava](https://github.com/dnsjava/dnsjava) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/dnsjava/dnsjava/releases)
- [Changelog](https://github.com/dnsjava/dnsjava/blob/master/Changelog)
- [Commits](https://github.com/dnsjava/dnsjava/compare/v3.6.2...v3.6.3)

---
updated-dependencies:
- dependency-name: dnsjava:dnsjava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 23:07:21 +00:00
dependabot[bot]
859dd4c69d Bump io.grpc:grpc-context from 1.69.0 to 1.70.0
Bumps [io.grpc:grpc-context](https://github.com/grpc/grpc-java) from 1.69.0 to 1.70.0.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.69.0...v1.70.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-context
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 23:07:18 +00:00
Tim Donohue
c27084724b Merge pull request #10336 from DSpace/backport-10331-to-dspace-7_x
[Port dspace-7_x] Remove unused configuration `csvexport.dir`
2025-01-27 11:15:20 -06:00
Tim Donohue
8cb693ab62 Merge pull request #10334 from DSpace/backport-9835-to-dspace-7_x
[Port dspace-7_x] On error in DOI Organiser bulk operations, continue instead of panic-stopping.
2025-01-27 10:27:19 -06:00
Tim Donohue
338e17d197 Remove unused configuration
(cherry picked from commit 845c706cac)
2025-01-27 16:03:36 +00:00
Mark H. Wood
6d187a08fd Document and handle the actual exceptions returned by register.
(cherry picked from commit 2edea69ca3)
2025-01-27 15:44:58 +00:00
Mark H. Wood
cc3841d212 Reorganize some documentation.
(cherry picked from commit 77425163f2)
2025-01-27 15:44:57 +00:00
Mark H. Wood
f7902bce00 On error in bulk operations, continue instead of panic-stopping.
(cherry picked from commit bfeba1aa7a)
2025-01-27 15:44:57 +00:00
Tim Donohue
a54d61923a Merge pull request #10283 from DSpace/dependabot/maven/dspace-7_x/net.cnri-cnri-servlet-container-3.1.0
Bump net.cnri:cnri-servlet-container from 3.0.0 to 3.1.0
2025-01-24 17:01:08 -06:00
Tim Donohue
125716efeb Merge pull request #10306 from DSpace/dependabot/maven/dspace-7_x/net.minidev-json-smart-2.5.1
Bump net.minidev:json-smart from 2.5.0 to 2.5.1
2025-01-24 16:34:55 -06:00
Tim Donohue
1cc98e6c2d Fix missing dependency errors for javax.el 2025-01-24 16:31:05 -06:00
Tim Donohue
5408f317d7 Merge pull request #10226 from DSpace/dependabot/maven/dspace-7_x/google-apis-05b77a15af
Bump the google-apis group with 4 updates
2025-01-24 15:57:09 -06:00
Tim Donohue
5169a55437 Resolve dependency convergence issue 2025-01-24 15:56:12 -06:00
Tim Donohue
96451f7391 Dependency convergence fixes 2025-01-24 15:06:43 -06:00
Tim Donohue
c7883e0f0a Merge pull request #10302 from DSpace/dependabot/maven/dspace-7_x/org.atteo-evo-inflector-1.3
Bump org.atteo:evo-inflector from 1.2.1 to 1.3
2025-01-24 14:42:36 -06:00
Tim Donohue
6d466ccde9 Merge pull request #10328 from DSpace/dependabot/maven/dspace-7_x/de.digitalcollections.iiif-iiif-apis-0.3.11
Bump de.digitalcollections.iiif:iiif-apis from 0.3.10 to 0.3.11
2025-01-24 11:40:33 -06:00
Tim Donohue
140588de8b Merge pull request #10330 from tdonohue/port_9950_to_7x
[Port dspace-7_x] added expunge request param and enabled workflowitem delete based on it
2025-01-24 10:47:25 -06:00
Oscar Chacón
10b3f06480 added expunge request param and enabled workflowitem delete based on it (#9950)
* added expunge request param and enabled workflowitem delete based on it

* enabled expunge param only in workflowitem delete endpoint and IT

* Remove invalid param from JavaDocs

---------

Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org>
2025-01-24 10:11:23 -06:00
Tim Donohue
6486f61010 Merge pull request #10320 from tdonohue/port_10158_to_7x
[Port dspace-7_x] Processes should only be failed after a Tomcat restart
2025-01-24 08:53:07 -06:00
Tim Donohue
6d9278e6f0 Merge pull request #10325 from DSpace/dependabot/maven/dspace-7_x/com.ibm.icu-icu4j-62.2
Bump com.ibm.icu:icu4j from 62.1 to 62.2
2025-01-24 07:00:45 -06:00
Tim Donohue
f7f2d23399 Merge pull request #10327 from DSpace/dependabot/maven/dspace-7_x/com.opencsv-opencsv-5.10
Bump com.opencsv:opencsv from 5.9 to 5.10
2025-01-24 06:58:52 -06:00
dependabot[bot]
25be075b3c Bump de.digitalcollections.iiif:iiif-apis from 0.3.10 to 0.3.11
Bumps [de.digitalcollections.iiif:iiif-apis](https://github.com/dbmdz/iiif-apis) from 0.3.10 to 0.3.11.
- [Release notes](https://github.com/dbmdz/iiif-apis/releases)
- [Commits](https://github.com/dbmdz/iiif-apis/compare/0.3.10...0.3.11)

---
updated-dependencies:
- dependency-name: de.digitalcollections.iiif:iiif-apis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 00:22:28 +00:00
dependabot[bot]
63081494d8 Bump com.opencsv:opencsv from 5.9 to 5.10
Bumps com.opencsv:opencsv from 5.9 to 5.10.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 00:22:13 +00:00
dependabot[bot]
77efa5ce88 Bump com.ibm.icu:icu4j from 62.1 to 62.2
Bumps [com.ibm.icu:icu4j](https://github.com/unicode-org/icu) from 62.1 to 62.2.
- [Release notes](https://github.com/unicode-org/icu/releases)
- [Commits](https://github.com/unicode-org/icu/commits)

---
updated-dependencies:
- dependency-name: com.ibm.icu:icu4j
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 00:21:41 +00:00
dependabot[bot]
62959008f8 Bump the google-apis group with 4 updates
Bumps the google-apis group with 4 updates: [com.google.api-client:google-api-client](https://github.com/googleapis/google-api-java-client), [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client), [com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client) and [com.google.oauth-client:google-oauth-client](https://github.com/googleapis/google-oauth-java-client).


Updates `com.google.api-client:google-api-client` from 1.23.0 to 1.35.2
- [Release notes](https://github.com/googleapis/google-api-java-client/releases)
- [Changelog](https://github.com/googleapis/google-api-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-java-client/compare/1.23.0...v1.35.2)

Updates `com.google.http-client:google-http-client` from 1.23.0 to 1.45.3
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/1.23.0...v1.45.3)

Updates `com.google.http-client:google-http-client-jackson2` from 1.23.0 to 1.45.3
- [Release notes](https://github.com/googleapis/google-http-java-client/releases)
- [Changelog](https://github.com/googleapis/google-http-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-http-java-client/compare/1.23.0...v1.45.3)

Updates `com.google.oauth-client:google-oauth-client` from 1.33.3 to 1.37.0
- [Release notes](https://github.com/googleapis/google-oauth-java-client/releases)
- [Changelog](https://github.com/googleapis/google-oauth-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-oauth-java-client/compare/v1.33.3...v1.37.0)

---
updated-dependencies:
- dependency-name: com.google.api-client:google-api-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.http-client:google-http-client-jackson2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
- dependency-name: com.google.oauth-client:google-oauth-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: google-apis
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 00:21:38 +00:00
Tim Donohue
bcd837fab6 Merge pull request #10301 from DSpace/dependabot/maven/dspace-7_x/com.amazonaws-aws-java-sdk-s3-1.12.780
Bump com.amazonaws:aws-java-sdk-s3 from 1.12.261 to 1.12.780
2025-01-23 17:06:00 -06:00
Tim Donohue
06c02192ea Merge pull request #10310 from DSpace/dependabot/maven/dspace-7_x/org.postgresql-postgresql-42.7.5
Bump org.postgresql:postgresql from 42.7.3 to 42.7.5
2025-01-23 17:01:19 -06:00
Tim Donohue
951637f610 Merge pull request #10311 from DSpace/dependabot/maven/dspace-7_x/org.jboss.logging-jboss-logging-3.6.1.Final
Bump org.jboss.logging:jboss-logging from 3.4.3.Final to 3.6.1.Final
2025-01-23 16:55:01 -06:00
Tim Donohue
a7fb760fee Merge pull request #10314 from DSpace/dependabot/maven/dspace-7_x/org.apache.james-apache-mime4j-core-0.8.12
Bump org.apache.james:apache-mime4j-core from 0.8.10 to 0.8.12
2025-01-23 16:52:12 -06:00
Nona Luypaert
0d069354f7 122350: Move failRunningProcesses during tomcat startup to RestRepository 2025-01-23 16:32:55 -06:00
Tim Donohue
ae3cc23025 Merge pull request #10281 from DSpace/dependabot/maven/dspace-7_x/joda-time-joda-time-2.13.0
Bump joda-time:joda-time from 2.12.5 to 2.13.0
2025-01-23 14:12:42 -06:00
dependabot[bot]
75d747e40a Bump org.apache.james:apache-mime4j-core from 0.8.10 to 0.8.12
Bumps org.apache.james:apache-mime4j-core from 0.8.10 to 0.8.12.

---
updated-dependencies:
- dependency-name: org.apache.james:apache-mime4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 18:23:46 +00:00
dependabot[bot]
daa29e582a Bump org.jboss.logging:jboss-logging from 3.4.3.Final to 3.6.1.Final
Bumps [org.jboss.logging:jboss-logging](https://github.com/jboss-logging/jboss-logging) from 3.4.3.Final to 3.6.1.Final.
- [Release notes](https://github.com/jboss-logging/jboss-logging/releases)
- [Commits](https://github.com/jboss-logging/jboss-logging/compare/3.4.3.Final...3.6.1.Final)

---
updated-dependencies:
- dependency-name: org.jboss.logging:jboss-logging
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 18:23:43 +00:00
dependabot[bot]
0f3fc0eccb Bump org.postgresql:postgresql from 42.7.3 to 42.7.5
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.3 to 42.7.5.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.3...REL42.7.5)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 18:23:37 +00:00
dependabot[bot]
1b850aaf0b Bump net.minidev:json-smart from 2.5.0 to 2.5.1
Bumps [net.minidev:json-smart](https://github.com/netplex/json-smart-v2) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/netplex/json-smart-v2/releases)
- [Commits](https://github.com/netplex/json-smart-v2/compare/2.5.0...2.5.1)

---
updated-dependencies:
- dependency-name: net.minidev:json-smart
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 18:23:27 +00:00
dependabot[bot]
3767093c15 Bump org.atteo:evo-inflector from 1.2.1 to 1.3
Bumps [org.atteo:evo-inflector](https://github.com/atteo/evo-inflector) from 1.2.1 to 1.3.
- [Commits](https://github.com/atteo/evo-inflector/compare/1.2.1...1.3)

---
updated-dependencies:
- dependency-name: org.atteo:evo-inflector
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 18:23:11 +00:00
dependabot[bot]
f451307e6f Bump com.amazonaws:aws-java-sdk-s3 from 1.12.261 to 1.12.780
Bumps [com.amazonaws:aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.261 to 1.12.780.
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.261...1.12.780)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 18:23:01 +00:00
dependabot[bot]
0a55995b7c Remove unused joad-time dependency
Bumps [joda-time:joda-time](https://github.com/JodaOrg/joda-time) from 2.12.5 to 2.13.0.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.12.5...v2.13.0)

---
updated-dependencies:
- dependency-name: joda-time:joda-time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 17:08:10 +00:00
Tim Donohue
1a9ae38675 Merge pull request #10284 from DSpace/dependabot/maven/dspace-7_x/org.apache.ant-ant-1.10.15
Bump org.apache.ant:ant from 1.10.14 to 1.10.15
2025-01-22 16:50:29 -06:00
Tim Donohue
6e4365757e Merge pull request #10285 from DSpace/dependabot/maven/dspace-7_x/dnsjava-dnsjava-3.6.2
Bump dnsjava:dnsjava from 3.6.0 to 3.6.2
2025-01-22 16:50:03 -06:00
Tim Donohue
e6dcbb8412 Merge pull request #10282 from DSpace/dependabot/maven/dspace-7_x/org.apache.velocity-velocity-engine-core-2.4.1
Bump org.apache.velocity:velocity-engine-core from 2.3 to 2.4.1
2025-01-22 16:48:28 -06:00
Tim Donohue
1dbd23e247 Merge pull request #10277 from DSpace/dependabot/maven/dspace-7_x/net.bytebuddy-byte-buddy-1.16.1
Bump net.bytebuddy:byte-buddy from 1.11.13 to 1.16.1
2025-01-22 16:47:15 -06:00
Tim Donohue
f14b8bfe6c Merge pull request #10275 from DSpace/dependabot/maven/dspace-7_x/bouncycastle.version-1.80
Bump bouncycastle.version from 1.78.1 to 1.80
2025-01-22 16:46:11 -06:00
Tim Donohue
18cf98be4f Merge pull request #10278 from DSpace/dependabot/maven/dspace-7_x/pdfbox-version-2.0.33
Bump pdfbox-version from 2.0.31 to 2.0.33
2025-01-22 15:09:29 -06:00
Tim Donohue
8bcd3980d8 Merge pull request #9722 from 4Science/task/dspace-7_x/CST-14901
[Port dspace-7_x] Handles versioning for ORCID publications.
2025-01-22 14:51:02 -06:00
Tim Donohue
f94bbfca45 Merge pull request #10295 from DSpace/backport-10209-to-dspace-7_x
[Port dspace-7_x] Avoid IllegalArgumentException thrown during creating a new version in special DSpace settings
2025-01-22 14:22:56 -06:00
Tim Donohue
1f53491140 Merge pull request #10254 from DSpace/dependabot/maven/dspace-7_x/org.scala-lang-scala-library-2.13.16
Bump org.scala-lang:scala-library from 2.13.11 to 2.13.16
2025-01-22 10:38:12 -06:00
Eike Martin Löhden
da3584759b Add check to avoid adding empty array of values to an item.
(cherry picked from commit 6e0124fcbb)
2025-01-22 16:19:54 +00:00
dependabot[bot]
cd2fbbf51b Bump dnsjava:dnsjava from 3.6.0 to 3.6.2
Bumps [dnsjava:dnsjava](https://github.com/dnsjava/dnsjava) from 3.6.0 to 3.6.2.
- [Release notes](https://github.com/dnsjava/dnsjava/releases)
- [Changelog](https://github.com/dnsjava/dnsjava/blob/master/Changelog)
- [Commits](https://github.com/dnsjava/dnsjava/compare/v3.6.0...v3.6.2)

---
updated-dependencies:
- dependency-name: dnsjava:dnsjava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 23:28:54 +00:00
dependabot[bot]
9d46a45191 Bump org.apache.ant:ant from 1.10.14 to 1.10.15
Bumps org.apache.ant:ant from 1.10.14 to 1.10.15.

---
updated-dependencies:
- dependency-name: org.apache.ant:ant
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 23:28:48 +00:00
dependabot[bot]
9bca0c928b Bump net.cnri:cnri-servlet-container from 3.0.0 to 3.1.0
Bumps [net.cnri:cnri-servlet-container](https://gitlab.com/cnri/cnri-servlet-container) from 3.0.0 to 3.1.0.
- [Commits](https://gitlab.com/cnri/cnri-servlet-container/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: net.cnri:cnri-servlet-container
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 23:28:37 +00:00
dependabot[bot]
e3abd1c129 Bump org.apache.velocity:velocity-engine-core from 2.3 to 2.4.1
Bumps org.apache.velocity:velocity-engine-core from 2.3 to 2.4.1.

---
updated-dependencies:
- dependency-name: org.apache.velocity:velocity-engine-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 23:28:34 +00:00
dependabot[bot]
39e2ef2b30 Bump pdfbox-version from 2.0.31 to 2.0.33
Bumps `pdfbox-version` from 2.0.31 to 2.0.33.

Updates `org.apache.pdfbox:pdfbox` from 2.0.31 to 2.0.33

Updates `org.apache.pdfbox:fontbox` from 2.0.31 to 2.0.33

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:pdfbox
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.pdfbox:fontbox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 23:28:19 +00:00
dependabot[bot]
9705c30f8a Bump net.bytebuddy:byte-buddy from 1.11.13 to 1.16.1
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.11.13 to 1.16.1.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.11.13...byte-buddy-1.16.1)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 23:28:11 +00:00
dependabot[bot]
7d4a5fc311 Bump bouncycastle.version from 1.78.1 to 1.80
Bumps `bouncycastle.version` from 1.78.1 to 1.80.

Updates `org.bouncycastle:bcpkix-jdk18on` from 1.78.1 to 1.80
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

Updates `org.bouncycastle:bcprov-jdk18on` from 1.78.1 to 1.80
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

Updates `org.bouncycastle:bcutil-jdk18on` from 1.78.1 to 1.80
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

---
updated-dependencies:
- dependency-name: org.bouncycastle:bcpkix-jdk18on
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.bouncycastle:bcprov-jdk18on
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.bouncycastle:bcutil-jdk18on
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 23:28:06 +00:00
Tim Donohue
4ca723573b Merge pull request #10256 from DSpace/dependabot/maven/dspace-7_x/log4j.version-2.24.3
Bump log4j.version from 2.23.1 to 2.24.3
2025-01-21 16:48:02 -06:00
Tim Donohue
a40620514a Merge pull request #10255 from DSpace/dependabot/maven/dspace-7_x/org.apache.bcel-bcel-6.10.0
Bump org.apache.bcel:bcel from 6.7.0 to 6.10.0
2025-01-21 16:42:50 -06:00
Tim Donohue
6bd6686e57 Merge pull request #10269 from DSpace/dependabot/maven/dspace-7_x/io.swagger-swagger-core-1.6.15
Remove unused swagger:swagger-core
2025-01-21 15:54:53 -06:00
Tim Donohue
b3e1139006 Remove swagger-core as it is unused 2025-01-21 13:41:10 -06:00
Tim Donohue
1c82598c3f Merge pull request #10268 from DSpace/dependabot/maven/dspace-7_x/solr.client.version-8.11.4
Bump solr.client.version from 8.11.3 to 8.11.4
2025-01-21 13:25:48 -06:00
Tim Donohue
3d0006ee73 Merge pull request #10264 from DSpace/dependabot/maven/dspace-7_x/build-tools-907e20f2d5
Bump com.github.spotbugs:spotbugs from 4.8.6 to 4.9.0 in the build-tools group across 1 directory
2025-01-21 13:10:09 -06:00
Tim Donohue
86dd22acab Merge pull request #10220 from DSpace/dependabot/maven/dspace-7_x/test-tools-6cdf6921de
Bump the test-tools group with 8 updates
2025-01-21 13:09:19 -06:00
Tim Donohue
5ff9702254 Merge pull request #10253 from DSpace/dependabot/maven/dspace-7_x/spring-e4edb82a34
Bump the spring group with 4 updates
2025-01-21 13:06:38 -06:00
dependabot[bot]
8076745a09 Bump io.swagger:swagger-core from 1.6.2 to 1.6.15
Bumps [io.swagger:swagger-core](https://github.com/swagger-api/swagger-core) from 1.6.2 to 1.6.15.
- [Release notes](https://github.com/swagger-api/swagger-core/releases)
- [Commits](https://github.com/swagger-api/swagger-core/compare/v1.6.2...v1.6.15)

---
updated-dependencies:
- dependency-name: io.swagger:swagger-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 22:43:53 +00:00
dependabot[bot]
bf1aa3da7a Bump solr.client.version from 8.11.3 to 8.11.4
Bumps `solr.client.version` from 8.11.3 to 8.11.4.

Updates `org.apache.solr:solr-solrj` from 8.11.3 to 8.11.4

Updates `org.apache.lucene:lucene-core` from 8.11.3 to 8.11.4

Updates `org.apache.lucene:lucene-analyzers-icu` from 8.11.3 to 8.11.4

Updates `org.apache.lucene:lucene-analyzers-smartcn` from 8.11.3 to 8.11.4

Updates `org.apache.lucene:lucene-analyzers-stempel` from 8.11.3 to 8.11.4

Updates `org.apache.solr:solr-core` from 8.11.3 to 8.11.4

---
updated-dependencies:
- dependency-name: org.apache.solr:solr-solrj
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.lucene:lucene-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.lucene:lucene-analyzers-icu
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.lucene:lucene-analyzers-smartcn
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.lucene:lucene-analyzers-stempel
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.solr:solr-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 22:43:50 +00:00
dependabot[bot]
9dcc4e6f7c Bump the spring group with 4 updates
Bumps the spring group with 4 updates: [org.springframework.security:spring-security-test](https://github.com/spring-projects/spring-security), [org.springframework.security:spring-security-core](https://github.com/spring-projects/spring-security), [org.springframework.security:spring-security-web](https://github.com/spring-projects/spring-security) and [org.springframework.security:spring-security-config](https://github.com/spring-projects/spring-security).


Updates `org.springframework.security:spring-security-test` from 5.7.12 to 5.7.14
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.12...5.7.14)

Updates `org.springframework.security:spring-security-core` from 5.7.12 to 5.7.14
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.12...5.7.14)

Updates `org.springframework.security:spring-security-web` from 5.7.12 to 5.7.14
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.12...5.7.14)

Updates `org.springframework.security:spring-security-config` from 5.7.12 to 5.7.14
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.12...5.7.14)

Updates `org.springframework.security:spring-security-core` from 5.7.12 to 5.7.14
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.12...5.7.14)

Updates `org.springframework.security:spring-security-web` from 5.7.12 to 5.7.14
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.12...5.7.14)

Updates `org.springframework.security:spring-security-config` from 5.7.12 to 5.7.14
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.12...5.7.14)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: spring
- dependency-name: org.springframework.security:spring-security-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: spring
- dependency-name: org.springframework.security:spring-security-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: spring
- dependency-name: org.springframework.security:spring-security-config
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: spring
- dependency-name: org.springframework.security:spring-security-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: spring
- dependency-name: org.springframework.security:spring-security-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: spring
- dependency-name: org.springframework.security:spring-security-config
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: spring
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 22:43:38 +00:00
dependabot[bot]
75e291d867 Bump the test-tools group with 8 updates
Bumps the test-tools group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [com.h2database:h2](https://github.com/h2database/h2database) | `2.2.224` | `2.3.232` |
| [org.mock-server:mockserver-junit-rule](https://github.com/jamesdbloom/mockservice) | `5.11.2` | `5.15.0` |
| [io.netty:netty-buffer](https://github.com/netty/netty) | `4.1.106.Final` | `4.1.117.Final` |
| [io.netty:netty-transport](https://github.com/netty/netty) | `4.1.106.Final` | `4.1.117.Final` |
| [io.netty:netty-transport-native-unix-common](https://github.com/netty/netty) | `4.1.106.Final` | `4.1.117.Final` |
| [io.netty:netty-common](https://github.com/netty/netty) | `4.1.106.Final` | `4.1.117.Final` |
| [io.netty:netty-handler](https://github.com/netty/netty) | `4.1.106.Final` | `4.1.117.Final` |
| [io.netty:netty-codec](https://github.com/netty/netty) | `4.1.106.Final` | `4.1.117.Final` |


Updates `com.h2database:h2` from 2.2.224 to 2.3.232
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.2.224...version-2.3.232)

Updates `org.mock-server:mockserver-junit-rule` from 5.11.2 to 5.15.0
- [Changelog](https://github.com/mock-server/mockserver/blob/master/changelog.md)
- [Commits](https://github.com/jamesdbloom/mockservice/compare/mockserver-5.11.2...mockserver-5.15.0)

Updates `io.netty:netty-buffer` from 4.1.106.Final to 4.1.117.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.117.Final)

Updates `io.netty:netty-transport` from 4.1.106.Final to 4.1.117.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.117.Final)

Updates `io.netty:netty-transport-native-unix-common` from 4.1.106.Final to 4.1.117.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.117.Final)

Updates `io.netty:netty-common` from 4.1.106.Final to 4.1.117.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.117.Final)

Updates `io.netty:netty-handler` from 4.1.106.Final to 4.1.117.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.117.Final)

Updates `io.netty:netty-codec` from 4.1.106.Final to 4.1.117.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.117.Final)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: test-tools
- dependency-name: org.mock-server:mockserver-junit-rule
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: test-tools
- dependency-name: io.netty:netty-buffer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-transport-native-unix-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-handler
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
- dependency-name: io.netty:netty-codec
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 22:43:27 +00:00
Vincenzo Mecca
6c99c25d34 [CST-14901][DSC-1357][#8662] Adds IT for isLatestVersion 2025-01-20 13:30:26 +01:00
dependabot[bot]
6b2e4c185e Bump com.github.spotbugs:spotbugs
Bumps the build-tools group with 1 update in the / directory: [com.github.spotbugs:spotbugs](https://github.com/spotbugs/spotbugs).


Updates `com.github.spotbugs:spotbugs` from 4.8.6 to 4.9.0
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.8.6...4.9.0)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-18 01:09:25 +00:00
Tim Donohue
100470d4aa Merge pull request #10218 from DSpace/dependabot/maven/dspace-7_x/build-tools-cee8dec2eb
Bump the build-tools group with 21 updates
2025-01-17 17:01:41 -06:00
Tim Donohue
d3014fde19 Merge pull request #10230 from DSpace/dependabot/maven/dspace-7_x/jersey.version-2.46
Bump jersey.version from 2.39.1 to 2.46
2025-01-17 16:29:15 -06:00
Tim Donohue
82a610c71d Merge pull request #10229 from DSpace/dependabot/maven/dspace-7_x/com.google.guava-guava-32.1.3-jre
Bump com.google.guava:guava from 32.0.0-jre to 32.1.3-jre
2025-01-17 16:05:49 -06:00
dependabot[bot]
80e39f7669 Bump log4j.version from 2.23.1 to 2.24.3
Bumps `log4j.version` from 2.23.1 to 2.24.3.

Updates `org.apache.logging.log4j:log4j-api` from 2.23.1 to 2.24.3

Updates `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.3

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.23.1 to 2.24.3

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-17 21:13:06 +00:00
dependabot[bot]
bd16f7a982 Bump org.apache.bcel:bcel from 6.7.0 to 6.10.0
Bumps [org.apache.bcel:bcel](https://github.com/apache/commons-bcel) from 6.7.0 to 6.10.0.
- [Changelog](https://github.com/apache/commons-bcel/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-bcel/compare/rel/commons-bcel-6.7.0...rel/commons-bcel-6.10.0)

---
updated-dependencies:
- dependency-name: org.apache.bcel:bcel
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-17 21:13:00 +00:00
dependabot[bot]
2b5db943b2 Bump org.scala-lang:scala-library from 2.13.11 to 2.13.16
Bumps [org.scala-lang:scala-library](https://github.com/scala/scala) from 2.13.11 to 2.13.16.
- [Release notes](https://github.com/scala/scala/releases)
- [Commits](https://github.com/scala/scala/compare/v2.13.11...v2.13.16)

---
updated-dependencies:
- dependency-name: org.scala-lang:scala-library
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-17 21:12:56 +00:00
Tim Donohue
4c46bc33be Remove unused dependency 2025-01-17 15:07:10 -06:00
Tim Donohue
c657f7770f Sync a few dependency exclusions from dspace-8_x to dspace-7_x to fix convergence issues 2025-01-17 14:12:38 -06:00
Tim Donohue
6b8a17c3e2 Revert to Errorprone 2.31.0, as that's the last version that supports Java 11 2025-01-17 12:45:52 -06:00
Mark H. Wood
95d7a013f9 Fix ErrorProne errors in tests.
Also fix some of the hundreds of warnings.  This uncovered still more
warnings that hadn't been previously reported, probably because there are
simply too many.
2025-01-17 12:26:15 -06:00
Mark H. Wood
b4dce26749 Fix new ErrorProne errors from new EP version, and a few ancient warnings. 2025-01-17 12:26:15 -06:00
Yana De Pauw
507aade92c Merge remote-tracking branch 'upstream/dspace-7_x' into w2p-124362_VersionedHandleIdentifierProviderWithCanonicalHandles-and-com-col-handles 2025-01-17 15:58:07 +01:00
Yana De Pauw
997945d85d 124362: Restore default config and add tests 2025-01-17 13:37:35 +01:00
Tim Donohue
84ea8af092 Merge pull request #10228 from DSpace/dependabot/maven/dspace-7_x/webjars-694cad7f5e
Bump org.webjars.npm:json-editor__json-editor from 2.6.1 to 2.15.1 in the webjars group
2025-01-16 17:10:40 -06:00
Tim Donohue
1581c737e2 Update jsoneditor.js reference in Hal Browser 2025-01-16 16:43:47 -06:00
Tim Donohue
f04e01eacb Merge pull request #10231 from DSpace/dependabot/maven/dspace-7_x/jetty.version-9.4.57.v20241219
Bump jetty.version from 9.4.54.v20240208 to 9.4.57.v20241219
2025-01-16 16:33:50 -06:00
Tim Donohue
709095a91a Merge pull request #10224 from DSpace/dependabot/maven/dspace-7_x/fasterxml-6e3d9a09b6
Bump the fasterxml group with 4 updates
2025-01-16 16:25:13 -06:00
Tim Donohue
69ca399967 Merge pull request #10222 from DSpace/dependabot/maven/dspace-7_x/apache-commons-25c65aad98
Bump the apache-commons group with 11 updates
2025-01-16 16:23:25 -06:00
Yana De Pauw
745e9c468a 124362: Fix issue with the VersionedHandleIdentifierProviderWithCanonicalHandles and creating communities / collections 2025-01-16 12:01:13 +01:00
Tim Donohue
f7ee509423 Fix duplicate code warning from errorprone. This "else if" clause is the same as the "else" and can be removed 2025-01-15 17:01:07 -06:00
Tim Donohue
5d7b42603d Add newly required "should-stop" flag to errorprone config. See https://errorprone.info/docs/installation 2025-01-15 17:00:57 -06:00
Tim Donohue
eee743a72d Minor checkstyle fixes after bump to 8.45.1. All are indentation / spacing fixes which are more strict now. 2025-01-15 17:00:43 -06:00
Tim Donohue
a01983c230 Fix checkstyle.xml syntax for bump to 8.45.1 2025-01-15 16:59:31 -06:00
dependabot[bot]
9d17009cf3 Bump jetty.version from 9.4.54.v20240208 to 9.4.57.v20241219
Bumps `jetty.version` from 9.4.54.v20240208 to 9.4.57.v20241219.

Updates `org.eclipse.jetty:jetty-server` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-alpn-java-server` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-deploy` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-http` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-io` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-servlet` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-servlets` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-util` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-webapp` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty:jetty-xml` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty.http2:http2-common` from 9.4.54.v20240208 to 9.4.57.v20241219

Updates `org.eclipse.jetty.http2:http2-server` from 9.4.54.v20240208 to 9.4.57.v20241219

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-alpn-java-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-deploy
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-http
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-io
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-servlets
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-webapp
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty:jetty-xml
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty.http2:http2-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.eclipse.jetty.http2:http2-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 21:04:17 +00:00
dependabot[bot]
d9945b27b9 Bump jersey.version from 2.39.1 to 2.46
Bumps `jersey.version` from 2.39.1 to 2.46.

Updates `org.glassfish.jersey.core:jersey-client` from 2.39.1 to 2.46

Updates `org.glassfish.jersey.inject:jersey-hk2` from 2.39.1 to 2.46

Updates `org.glassfish.jersey.core:jersey-server` from 2.39.1 to 2.46

Updates `org.glassfish.jersey.containers:jersey-container-servlet` from 2.39.1 to 2.46

Updates `org.glassfish.jersey.media:jersey-media-json-jackson` from 2.39.1 to 2.46

Updates `org.glassfish.jersey.media:jersey-media-jaxb` from 2.39.1 to 2.46

Updates `org.glassfish.jersey.ext:jersey-spring5` from 2.39.1 to 2.46

---
updated-dependencies:
- dependency-name: org.glassfish.jersey.core:jersey-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.inject:jersey-hk2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.core:jersey-server
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.containers:jersey-container-servlet
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.media:jersey-media-json-jackson
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.media:jersey-media-jaxb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.glassfish.jersey.ext:jersey-spring5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 21:03:55 +00:00
dependabot[bot]
75d740ec86 Bump com.google.guava:guava from 32.0.0-jre to 32.1.3-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.0-jre to 32.1.3-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 21:03:43 +00:00
dependabot[bot]
bec1ee84e5 Bump org.webjars.npm:json-editor__json-editor in the webjars group
Bumps the webjars group with 1 update: [org.webjars.npm:json-editor__json-editor](https://github.com/json-editor/json-editor).


Updates `org.webjars.npm:json-editor__json-editor` from 2.6.1 to 2.15.1
- [Changelog](https://github.com/json-editor/json-editor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/json-editor/json-editor/compare/2.6.1...2.15.1)

---
updated-dependencies:
- dependency-name: org.webjars.npm:json-editor__json-editor
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: webjars
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 21:03:40 +00:00
dependabot[bot]
4a20a4c37f Bump the fasterxml group with 4 updates
Bumps the fasterxml group with 4 updates: [com.fasterxml:classmate](https://github.com/FasterXML/java-classmate), [com.fasterxml.jackson.core:jackson-annotations](https://github.com/FasterXML/jackson), [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) and [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson).


Updates `com.fasterxml:classmate` from 1.6.0 to 1.7.0
- [Commits](https://github.com/FasterXML/java-classmate/compare/classmate-1.6.0...classmate-1.7.0)

Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.16.0 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.16.0 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.16.0...jackson-core-2.18.2)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.16.0 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.16.0...jackson-core-2.18.2)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.16.0 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml:classmate
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: fasterxml
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 21:02:28 +00:00
dependabot[bot]
d7b0e26179 Bump the apache-commons group with 11 updates
Bumps the apache-commons group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| commons-beanutils:commons-beanutils | `1.9.4` | `1.10.0` |
| commons-cli:commons-cli | `1.6.0` | `1.9.0` |
| [commons-codec:commons-codec](https://github.com/apache/commons-codec) | `1.16.0` | `1.17.2` |
| org.apache.commons:commons-configuration2 | `2.10.1` | `2.11.0` |
| org.apache.commons:commons-dbcp2 | `2.11.0` | `2.13.0` |
| commons-io:commons-io | `2.15.1` | `2.18.0` |
| org.apache.commons:commons-lang3 | `3.14.0` | `3.17.0` |
| commons-logging:commons-logging | `1.3.0` | `1.3.4` |
| org.apache.commons:commons-compress | `1.26.0` | `1.27.1` |
| org.apache.commons:commons-text | `1.10.0` | `1.13.0` |
| commons-validator:commons-validator | `1.7` | `1.9.0` |


Updates `commons-beanutils:commons-beanutils` from 1.9.4 to 1.10.0

Updates `commons-cli:commons-cli` from 1.6.0 to 1.9.0

Updates `commons-codec:commons-codec` from 1.16.0 to 1.17.2
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.16.0...rel/commons-codec-1.17.2)

Updates `org.apache.commons:commons-configuration2` from 2.10.1 to 2.11.0

Updates `org.apache.commons:commons-dbcp2` from 2.11.0 to 2.13.0

Updates `commons-io:commons-io` from 2.15.1 to 2.18.0

Updates `org.apache.commons:commons-lang3` from 3.14.0 to 3.17.0

Updates `commons-logging:commons-logging` from 1.3.0 to 1.3.4

Updates `org.apache.commons:commons-compress` from 1.26.0 to 1.27.1

Updates `org.apache.commons:commons-text` from 1.10.0 to 1.13.0

Updates `commons-validator:commons-validator` from 1.7 to 1.9.0

---
updated-dependencies:
- dependency-name: commons-beanutils:commons-beanutils
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: commons-cli:commons-cli
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: commons-codec:commons-codec
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-configuration2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-dbcp2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-lang3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: commons-logging:commons-logging
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: org.apache.commons:commons-text
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
- dependency-name: commons-validator:commons-validator
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: apache-commons
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 21:02:16 +00:00
dependabot[bot]
1492ed7f61 Bump the build-tools group with 21 updates
Bumps the build-tools group with 21 updates:

| Package | From | To |
| --- | --- | --- |
| [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) | `2.10.0` | `2.36.0` |
| [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) | `8.38` | `8.45.1` |
| [com.github.spotbugs:spotbugs](https://github.com/spotbugs/spotbugs) | `4.8.2` | `4.8.6` |
| [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) | `3.0.0-M3` | `3.5.0` |
| [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) | `3.8.1` | `3.13.0` |
| [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) | `3.2.0` | `3.4.2` |
| [org.apache.maven.plugins:maven-war-plugin](https://github.com/apache/maven-war-plugin) | `3.2.3` | `3.4.0` |
| [org.apache.maven.plugins:maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) | `3.3.1` | `3.6.0` |
| [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) | `4.8.2.0` | `4.8.6.6` |
| [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin) | `3.1.0` | `3.4.0` |
| [org.apache.maven.plugins:maven-assembly-plugin](https://github.com/apache/maven-assembly-plugin) | `3.6.0` | `3.7.1` |
| [org.apache.maven.plugins:maven-dependency-plugin](https://github.com/apache/maven-dependency-plugin) | `3.1.2` | `3.8.1` |
| [org.apache.maven.plugins:maven-resources-plugin](https://github.com/apache/maven-resources-plugin) | `3.1.0` | `3.3.1` |
| org.sonatype.plugins:nexus-staging-maven-plugin | `1.6.8` | `1.7.0` |
| [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) | `3.2.0` | `3.11.2` |
| [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) | `3.2.1` | `3.3.1` |
| [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) | `0.8.5` | `0.8.12` |
| [org.codehaus.mojo:xml-maven-plugin](https://github.com/mojohaus/xml-maven-plugin) | `1.0.2` | `1.1.0` |
| [org.codehaus.mojo:license-maven-plugin](https://github.com/mojohaus/license-maven-plugin) | `2.0.0` | `2.5.0` |
| [org.codehaus.mojo:build-helper-maven-plugin](https://github.com/mojohaus/build-helper-maven-plugin) | `3.4.0` | `3.6.0` |
| [org.codehaus.mojo:buildnumber-maven-plugin](https://github.com/mojohaus/buildnumber-maven-plugin) | `3.2.0` | `3.2.1` |


Updates `com.google.errorprone:error_prone_core` from 2.10.0 to 2.36.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.10.0...v2.36.0)

Updates `com.puppycrawl.tools:checkstyle` from 8.38 to 8.45.1
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.38...checkstyle-8.45.1)

Updates `com.github.spotbugs:spotbugs` from 4.8.2 to 4.8.6
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.8.2...4.8.6)

Updates `org.apache.maven.plugins:maven-enforcer-plugin` from 3.0.0-M3 to 3.5.0
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.0.0-M3...enforcer-3.5.0)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.8.1 to 3.13.0
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.8.1...maven-compiler-plugin-3.13.0)

Updates `org.apache.maven.plugins:maven-jar-plugin` from 3.2.0 to 3.4.2
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.0...maven-jar-plugin-3.4.2)

Updates `org.apache.maven.plugins:maven-war-plugin` from 3.2.3 to 3.4.0
- [Commits](https://github.com/apache/maven-war-plugin/compare/maven-war-plugin-3.2.3...maven-war-plugin-3.4.0)

Updates `org.apache.maven.plugins:maven-checkstyle-plugin` from 3.3.1 to 3.6.0
- [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.3.1...maven-checkstyle-plugin-3.6.0)

Updates `com.github.spotbugs:spotbugs-maven-plugin` from 4.8.2.0 to 4.8.6.6
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.8.2.0...spotbugs-maven-plugin-4.8.6.6)

Updates `org.apache.maven.plugins:maven-clean-plugin` from 3.1.0 to 3.4.0
- [Release notes](https://github.com/apache/maven-clean-plugin/releases)
- [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.1.0...maven-clean-plugin-3.4.0)

Updates `org.apache.maven.plugins:maven-assembly-plugin` from 3.6.0 to 3.7.1
- [Release notes](https://github.com/apache/maven-assembly-plugin/releases)
- [Commits](https://github.com/apache/maven-assembly-plugin/compare/maven-assembly-plugin-3.6.0...maven-assembly-plugin-3.7.1)

Updates `org.apache.maven.plugins:maven-dependency-plugin` from 3.1.2 to 3.8.1
- [Release notes](https://github.com/apache/maven-dependency-plugin/releases)
- [Commits](https://github.com/apache/maven-dependency-plugin/compare/maven-dependency-plugin-3.1.2...maven-dependency-plugin-3.8.1)

Updates `org.apache.maven.plugins:maven-resources-plugin` from 3.1.0 to 3.3.1
- [Release notes](https://github.com/apache/maven-resources-plugin/releases)
- [Commits](https://github.com/apache/maven-resources-plugin/compare/maven-resources-plugin-3.1.0...maven-resources-plugin-3.3.1)

Updates `org.sonatype.plugins:nexus-staging-maven-plugin` from 1.6.8 to 1.7.0

Updates `org.apache.maven.plugins:maven-javadoc-plugin` from 3.2.0 to 3.11.2
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.2.0...maven-javadoc-plugin-3.11.2)

Updates `org.apache.maven.plugins:maven-source-plugin` from 3.2.1 to 3.3.1
- [Release notes](https://github.com/apache/maven-source-plugin/releases)
- [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.2.1...maven-source-plugin-3.3.1)

Updates `org.jacoco:jacoco-maven-plugin` from 0.8.5 to 0.8.12
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.5...v0.8.12)

Updates `org.codehaus.mojo:xml-maven-plugin` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/mojohaus/xml-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/xml-maven-plugin/compare/xml-maven-plugin-1.0.2...1.1.0)

Updates `org.codehaus.mojo:license-maven-plugin` from 2.0.0 to 2.5.0
- [Release notes](https://github.com/mojohaus/license-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/license-maven-plugin/compare/license-maven-plugin-2.0.0...2.5.0)

Updates `org.codehaus.mojo:build-helper-maven-plugin` from 3.4.0 to 3.6.0
- [Release notes](https://github.com/mojohaus/build-helper-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/build-helper-maven-plugin/compare/3.4.0...3.6.0)

Updates `org.codehaus.mojo:buildnumber-maven-plugin` from 3.2.0 to 3.2.1
- [Release notes](https://github.com/mojohaus/buildnumber-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/buildnumber-maven-plugin/compare/3.2.0...3.2.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: com.puppycrawl.tools:checkstyle
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: com.github.spotbugs:spotbugs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-war-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-clean-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-assembly-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-dependency-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-resources-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.sonatype.plugins:nexus-staging-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
- dependency-name: org.codehaus.mojo:xml-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.codehaus.mojo:license-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.codehaus.mojo:build-helper-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build-tools
- dependency-name: org.codehaus.mojo:buildnumber-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 21:01:16 +00:00
Tim Donohue
e46f02550a Merge pull request #10205 from tdonohue/enable_dependabot_on_7x
[Port dspace-7_x] Create `dependabot.yml` to auto-update Maven dependencies
2025-01-14 16:26:16 -06:00
Tim Donohue
a236b8b975 Merge pull request #10206 from DSpace/backport-9832-to-dspace-7_x
[Port dspace-7_x] Separate log file for cli jobs, fixing corruption of main log file
2025-01-14 15:56:57 -06:00
Jens Vannerum
1a6088388f apply fix to windows env and remove duplicate logging for checksum checker
(cherry picked from commit 9f39a3d6a5)
2025-01-14 21:10:10 +00:00
Kevin Van de Velde
04ec6381cb Modifying it so that the cli file content is stored in a file using the date
(cherry picked from commit 529c3a77c1)
2025-01-14 21:10:10 +00:00
Jens Vannerum
0b46a0963c 113811: cli logs should be written to a different file
(cherry picked from commit d30468a09f)
2025-01-14 21:10:10 +00:00
Tim Donohue
fe28962e96 Exclude spring from build-tools group in dependabot.yml 2025-01-14 15:02:18 -06:00
Tim Donohue
e840ca2731 Create dependabot.yml 2025-01-14 15:02:15 -06:00
Tim Donohue
5201d90b19 Merge pull request #10200 from tdonohue/port_9690_to_7x
[Port dspace-7_x] option to exclude the submitter being indexed to solr in archived items
2025-01-13 16:07:08 -06:00
Gantner, Florian Klaus
62596ad863 option to exclude the submitter being indexed to solr in archived items
https://github.com/DSpace/DSpace/issues/9660
2025-01-13 15:01:20 -06:00
Tim Donohue
024f88b1e0 Merge pull request #10196 from DSpace/backport-9687-to-dspace-7_x
[Port dspace-7_x] Scopus metadata import: put DOIs in dc.relation.hasversion
2025-01-10 15:13:39 -06:00
Sascha Szott
d109eac2a0 use dc.relation.hasversion instead of dc.identifier.doi
(cherry picked from commit d61dc8d911)
2025-01-10 19:54:42 +00:00
Sascha Szott
09a722a029 use dc.relation.hasversion for externally generated DOIs
(cherry picked from commit 29067b6572)
2025-01-10 19:54:42 +00:00
Sascha Szott
5d0e9871e9 fix broken test
(cherry picked from commit 2eff833fab)
2025-01-10 19:54:42 +00:00
Sascha Szott
5973c67eff put DOIs in dc.identifier.doi
(cherry picked from commit 3d1bef9d0e)
2025-01-10 19:54:42 +00:00
Tim Donohue
d11bbc9c15 Merge pull request #10194 from DSpace/backport-10193-to-dspace-7_x
[Port dspace-7_x] Refactor AbstractIntegrationTestWithDatabase to use EPersonBuilder for test users
2025-01-10 13:32:00 -06:00
Tim Donohue
49b3deef77 Refactor AbstractIntegrationTestWithDatabase to use Builders to create test EPersons.
(cherry picked from commit 0b8b7be22b)
2025-01-10 17:40:32 +00:00
Tim Donohue
a2a9494859 Merge pull request #9724 from 4Science/task/dspace-7_x/CST-14905
[Port dspace-7_x] Orcid revoke token feature
2025-01-10 11:29:24 -06:00
Tim Donohue
a0fd518cb4 Merge pull request #10191 from DSpace/backport-10189-to-dspace-7_x
[Port dspace-7_x] switch IT search core to MockSolrSearchCore
2025-01-09 10:17:11 -06:00
Gantner, Florian Klaus
97a5439e3a switch IT search core to MockSolrSearchCore
https://github.com/DSpace/DSpace/issues/10188
(cherry picked from commit 6d781e8f83)
2025-01-09 14:24:20 +00:00
Tim Donohue
0a9ecee819 Merge pull request #10186 from DSpace/backport-10185-to-dspace-7_x
[Port dspace-7_x] Fix for flakey IdentifierProvider Integration Tests
2025-01-08 11:28:07 -06:00
Tim Donohue
41207d5dee Update CreateMissingIdentifiers to better identify when CanonicalHandles provider is enabled. Update CreateMissingIdentifiersIT to verify that we are accurately resetting to our default IdentifierProvider
(cherry picked from commit 2385c13f2d)
2025-01-08 15:59:55 +00:00
Tim Donohue
22511a17b6 Refactor identifier ITs to ensure they unregister all utilized IdentifierProviders which are non-default. Cannot use "getApplicationContext().refresh()" as that seems to result in empty test database in Hibernate 6.6.
(cherry picked from commit cfca2adbb1)
2025-01-08 15:59:54 +00:00
Tim Donohue
da4535ddfd Merge pull request #10183 from tdonohue/port_9340_to_7x
[Port dspace-7_x] Bugfix: Enforce unique item id in workspace table (#9340)
2025-01-07 10:45:37 -06:00
Koen Pauwels
6c82e2dba4 Bugfix: Enforce unique item id in workspace table (#9340)
* 106798 Enforce values in item_id column of workspaceitem table to be unique, both at database level and at WorkspaceItemService level

* 106798 Removed Oracle SQL migration

* 106798 workspaceitem table migration: delete duplicate rows before introducing uniqueness constraint

* 106798: update migration for H2

---------

Co-authored-by: Koen Pauwels <koen.pauwels@atmire.com>
Co-authored-by: wout <wout.atmire@gmail.com>
2025-01-07 08:59:13 -06:00
Tim Donohue
09fad6dc7e Merge pull request #10179 from DSpace/backport-10104-to-dspace-7_x
[Port dspace-7_x] style.xsl: fix missing +1 offset in result-count template
2025-01-06 12:12:12 -06:00
Tim Donohue
2780ebab74 Merge pull request #10177 from DSpace/backport-10157-to-dspace-7_x
[Port dspace-7_x] remove deprecated constructor call in org.dspace.curate.Curation
2025-01-06 11:52:16 -06:00
Sascha Szott
214c669e80 fix missing +1 offset
(cherry picked from commit ab00de05b4)
2025-01-06 17:07:29 +00:00
Sascha Szott
964e4bf476 remove usage of deprecated constructor call
(cherry picked from commit 45cdb4d9d4)
2025-01-06 16:46:17 +00:00
Nona Luypaert
82b0944137 Merge remote-tracking branch 'origin/dspace-7_x' into w2p-121973_openaire-compliance-updates-7.x 2024-12-31 16:53:08 +01:00
Alan Orth
78194071b8 Merge pull request #10166 from DSpace/backport-10089-to-dspace-7_x 2024-12-24 12:31:57 +03:00
Toni Prieto
e856ae3291 Uncache all entities during OAI indexing to reduce memory usage
(cherry picked from commit 9af2e2e17c)
2024-12-24 06:59:53 +00:00
Tim Donohue
a36f0e606c Merge pull request #10154 from DSpace/backport-3253-to-dspace-7_x
[Port dspace-7_x] Add Context method to uncache all entities
2024-12-19 14:29:35 -06:00
Chris Wilper
8849212895 Add Context method to uncache all entities
(cherry picked from commit 8ea664adb2)
2024-12-19 18:57:47 +00:00
Tim Donohue
9b651b7ab3 Merge pull request #9893 from bkeese/patch-1
Fix full-text indexing for files over the character limit
2024-12-19 12:28:37 -06:00
Tim Donohue
66281d3a6d Merge pull request #10149 from DSpace/backport-10059-to-dspace-7_x
[Port dspace-7_x] Statistics scope fix
2024-12-19 08:56:17 -06:00
Tim Donohue
3fa86d43f6 Merge pull request #10147 from DSpace/backport-9815-to-dspace-7_x
[Port dspace-7_x] fix for #9311: set default configFile
2024-12-19 08:56:07 -06:00
Kristof De Langhe
51df5c1fe6 119664: Search event scope fix
(cherry picked from commit 48956d90b7)
2024-12-18 22:50:42 +00:00
DSpace Bot
1ce4e08333 [Port dspace-7_x] Fix issue with submission sections visibility (#10140)
* README.md: v8 is the current release, not v7

(cherry picked from commit 2b698eff60)
(cherry picked from commit 83460afb37)

* Update README.md

(cherry picked from commit 671234b08f)
(cherry picked from commit 7a6785b1c3)

* [DURACOM-291] Expose section scope attribute

(cherry picked from commit 4107f937fd)

* README.md: v8 is the current release, not v7

(cherry picked from commit 2b698eff60)
(cherry picked from commit d98499a394)

* Update README.md

(cherry picked from commit 671234b08f)
(cherry picked from commit 6a707548ff)

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Giuseppe Digilio <giuseppe.digilio@4science.com>
2024-12-18 16:45:16 -06:00
Tim Donohue
0d8c5f12a3 Merge pull request #10145 from DSpace/backport-9817-to-dspace-7_x
[Port dspace-7_x] fix for #9312: properly type in field id, adjust use of getProperty and add error handling
2024-12-18 16:05:38 -06:00
Tim Donohue
ad033ef1ba Merge pull request #10143 from DSpace/backport-9913-to-dspace-7_x
[Port dspace-7_x] Submission scope naming for input field validation fixed
2024-12-18 15:56:13 -06:00
igorbaptist4
c86d082d5f fix: set default configFile
(cherry picked from commit a5e8d7aa15)
2024-12-18 21:02:37 +00:00
igorbaptist4
3a223e3fef fix line length checkstyle
(cherry picked from commit 338f3b1d3e)
2024-12-18 20:57:22 +00:00
igorbaptist4
973beee2ce fix: properly type in field id, adjust use of getProperty and add error handling when dbPath is null (when property usage-statistics.dbfile is commented
(cherry picked from commit 412d5751f2)
2024-12-18 20:57:22 +00:00
Jukka Lipka
31faf809d1 fix(submission): Submission scope naming fixed
Corrected wording in related code comment

(cherry picked from commit ec2187ea65)
2024-12-18 20:47:49 +00:00
Jukka Lipka
95742fe4f3 fix(submission): Submission scope naming fixed
According to the documentation, the value for the <visibility> property is 'submission' in the 'submission-forms.xml'. Without this change, an empty input field will never be marked as an error, even if the field is marked as 'required'.

(cherry picked from commit 02f52c7d5c)
2024-12-18 20:47:49 +00:00
Tim Donohue
026a0aa9ab Merge pull request #10138 from DSpace/backport-10057-to-dspace-7_x
[Port dspace-7_x] Add limit, offset, and total facet count to Solr query for the metadata browse index
2024-12-18 12:57:36 -06:00
Toni Prieto
fcc650e1a6 Add limit, offset, and a new parameter to calculate the total entry count in the Solr query used for the metadata navigation index
(cherry picked from commit e71de8a4d0)
2024-12-18 18:05:26 +00:00
Tim Donohue
b4d4588d34 Merge pull request #10136 from DSpace/backport-9834-to-dspace-7_x
[Port dspace-7_x] More information about failed DOI registrations.
2024-12-17 16:01:36 -06:00
Tim Donohue
89b8e92512 Merge pull request #10134 from DSpace/backport-10132-to-dspace-7_x
[Port dspace-7_x] [Docker] Minor Dockerfile enhancements to stabilize & speed up automated builds
2024-12-17 16:01:01 -06:00
Mark H. Wood
e5568157c8 More information about failed DOI registrations.
(cherry picked from commit b8f4ab0eb3)
2024-12-17 21:11:32 +00:00
Tim Donohue
58af9fd224 Significantly speed up build of dspace-dependencies by only copying over POM files
(cherry picked from commit 6d7a3fcb72)
2024-12-17 20:52:35 +00:00
Tim Donohue
aa027aefae Improve Apache Ant download process. Switch to using curl so that we can retry the request if it initially fails.
(cherry picked from commit e236634a4c)
2024-12-17 20:52:35 +00:00
Tim Donohue
4e59693da5 Merge pull request #10131 from tdonohue/port_9760_to_7x
[Port dspace-7_x] Improve Group2GroupCache computation
2024-12-17 12:12:35 -06:00
autavares-dev
05bac14716 Refactor 'var' variables to explicit types 2024-12-17 11:11:37 -06:00
autavares-dev
64cb3bda00 Changes Group2GroupCache computation 2024-12-17 11:11:20 -06:00
Nona Luypaert
ecbb8682a7 Merge remote-tracking branch 'contributions/w2p-121971_openaire-compliance-updates-7.6' into w2p-121973_openaire-compliance-updates-7.x 2024-12-17 11:43:38 +01:00
Tim Donohue
8e6371c9b5 Merge pull request #10122 from DSpace/backport-10120-to-dspace-7_x
[Port dspace-7_x] [GitHub Actions] Refactor Docker build process to use ghcr.io for build, and then copy to docker.io once build completes
2024-12-16 15:14:37 -06:00
Tim Donohue
a27f1ed175 Ensure "docker-deploy" job also uses ghcr.io by default. 2024-12-16 13:57:18 -06:00
Tim Donohue
296c9a12f4 PRs must also login to ghcr.io in order to read private images for the build process 2024-12-16 13:57:11 -06:00
Tim Donohue
2a6c60e139 Refactor Docker build process to use ghcr.io for build, and then copy to docker.io once build completes 2024-12-16 13:56:53 -06:00
Tim Donohue
5869f03b51 Merge pull request #10115 from tdonohue/port_10800_to_7x
[Port dspace-7_x] [Docker] Use fully qualified image names & allow for other registries to be used
2024-12-12 16:49:44 -06:00
Tim Donohue
2ee328ff18 Minor Dockerfile cleanup. Use new syntax for ENV variables 2024-12-12 16:15:10 -06:00
Tim Donohue
a6d2c4897b Add Docker registry to all scripts. Allow it to be configurable for DSpace images (only). Other minor Dockerfile cleanup 2024-12-12 16:15:10 -06:00
Nona Luypaert
e540168594 121971: #9867 - Remove objectType attribute from openaire crosswalk 2024-12-12 09:18:40 +01:00
Nona Luypaert
52e5b35c06 121971: #9664 - Make cclicense step required in openaire submission form 2024-12-12 09:16:21 +01:00
Nona Luypaert
31c79500ce 121971: #9716 - Only dc.date.embargo should have date type Available 2024-12-11 21:49:37 +01:00
Nona Luypaert
04953b94d9 121971: #9715 - Only dc.date.issued should have date types Accepted and Issued 2024-12-11 21:46:17 +01:00
Nona Luypaert
c017a662e0 121971: #9669 - Remove unsupported OpenAIRE date types 2024-12-11 21:26:42 +01:00
Tim Donohue
ac9f7c16e6 Merge pull request #10101 from tdonohue/port_10091_to_7x
[Port dspace-7_x] [GitHub Actions] Ensure PRs against main also use "latest" tag when running test Docker deployment
2024-12-10 12:14:12 -06:00
Tim Donohue
b8c88ef284 Ensure PRs against main also use "latest" tag 2024-12-10 11:33:51 -06:00
Tim Donohue
f0bb57a4c2 Merge pull request #10087 from tdonohue/port_github_action_docker_to_7x
[Port dspace-7_x] [GitHub Actions] Port several Docker building improvements
2024-12-09 11:56:32 -06:00
Tim Donohue
78855cdbba Ensure we use the main Docker image, and not the "-test" image. 2024-12-09 10:18:32 -06:00
Tim Donohue
3c0e7158a2 Ensure each image has a separate cache. This allows later builds of that same image to inherit that cache. 2024-12-06 17:16:40 -06:00
Tim Donohue
020fec96d8 Ensure PRs are tagging their images with same tag as the base branch the PR was created against 2024-12-06 17:16:26 -06:00
Tim Donohue
46c169fb79 Refactor to use the same local TAR image build for PRs and non-PRs. These TAR images act as a cache for our current build. 2024-12-06 17:16:19 -06:00
Tim Donohue
0fc0f181fd Enable caching of Docker builds using GitHub Actions cache 2024-12-06 17:16:14 -06:00
Tim Donohue
1f5defe643 Ensure non-PRs run image build twice. First for a DockerHub image, then to export a local tarball. Since these are different image types they cannot be combined 2024-12-06 17:16:06 -06:00
Tim Donohue
8d34f06396 Update Actions to always deploy the locally created image. non-PRs do not need to redownload images from DockerHub. 2024-12-06 17:16:01 -06:00
Tim Donohue
f8bf278f06 Ensure login occurs *before* setup-buildx, as some buildx commands appear to be unauthenticated. 2024-12-06 17:15:54 -06:00
Tim Donohue
f26a732ab8 Merge pull request #10082 from DSpace/backport-9728-to-dspace-7_x
[Port dspace-7_x] Improve observability of running processes + Fail them during startup
2024-12-05 15:43:01 -06:00
Nona Luypaert
8bc100375a 116609: Add try catch to init method in ProcessServiceImpl
(cherry picked from commit 070fe689d7)
2024-12-05 21:00:48 +00:00
Nona Luypaert
3f836ae7a5 116687: Never handle exception with null message
(cherry picked from commit bdf7069cb7)
2024-12-05 21:00:48 +00:00
Nona Luypaert
1ba7ca3bdd 116609: Add tomcat shutdown line to process log
(cherry picked from commit 156ad471b5)
2024-12-05 21:00:48 +00:00
Nona Luypaert
25fb8111f1 116609: Improve running process observability
- keep temp process log files in [dspace]/log/processes/ instead of temp dir
- reformat file names of process logs
- ensure that running and scheduled processes are cleaned up during startup

(cherry picked from commit d80f49e023)
2024-12-05 21:00:48 +00:00
Tim Donohue
a1d2504ab3 Merge pull request #10068 from DSpace/backport-9658-to-dspace-7_x
[Port dspace-7_x] Feature curation link checker customizations
2024-12-03 09:53:43 -06:00
Nathan Buckingham
3ff38ec4b4 115778: Adjust redirect check to only follow a limited amount defined in curate.cfg
(cherry picked from commit ef381aa151)
2024-12-03 15:17:19 +00:00
Marie Verdonck
be905a0887 110719: IT checking redirect links accepted by checklinks curate task
(cherry picked from commit e826660cb0)
2024-12-03 15:17:19 +00:00
Nathan Buckingham
2136dbf690 110719: Port fix to checkLinks that works on redirects
(cherry picked from commit 3dab2a7cea)
2024-12-03 15:17:19 +00:00
Tim Donohue
df4ddc8197 Merge pull request #10061 from DSpace/backport-9941-to-dspace-7_x
[Port dspace-7_x] Fixed dso endpoint returning 500 for unauthorized users
2024-12-02 10:58:09 -06:00
Alexandre Vryghem
38a71cc664 119960: Fixed NPE when retrieving a DSpace object with the api/dso/find endpoint without the required permissions
(cherry picked from commit dd8b1d91cb)
2024-12-02 16:07:46 +00:00
Tim Donohue
88b5ce81a6 Merge pull request #10041 from DSpace/backport-10040-to-dspace-7_x
[Port dspace-7_x] [GitHub Actions] Ensure all optional modules are enabled in our test Docker deployment
2024-11-22 16:28:05 -06:00
Tim Donohue
cf99694a84 Fix startup errors for SWORDv2. Requires the log4jv1->v2 bridge to be installed. 2024-11-22 16:03:16 -06:00
Tim Donohue
66a9782eee Fix syntax error in #10040. Env variables cannot have dashes or periods 2024-11-22 16:03:16 -06:00
Tim Donohue
f44dba60cb Enable all optional modules/controllers to test their deployment in Spring Boot
(cherry picked from commit 98768d6f4f)
2024-11-22 16:03:15 -06:00
Tim Donohue
bbf9ccf2ab Merge pull request #10034 from tdonohue/port_10032_to_7x
[Port dspace-7_x] Remove unused dependencies from several modules
2024-11-21 11:58:16 -06:00
Tim Donohue
9f8240987b Remove unused dependencies from several modules 2024-11-21 11:24:23 -06:00
Tim Donohue
888332a8d5 Merge pull request #10020 from tdonohue/port_10014_to_7x
[Port dspace-7_x] Dependency cleanup for OAI-PMH and Log4j (removing log4j v1 bridge & settings which used it)
2024-11-18 14:40:16 -06:00
Tim Donohue
f3d15e5c04 Log4j cleanup. Remove last traces of log4j v1 (and remove log4j1 bridge to avoid them coming back). Create log4j2 settings for Handle Plugin. 2024-11-18 14:02:14 -06:00
Tim Donohue
d952fea6a2 Remove parboiled-java and minor cleanup of unused OAI dependencies 2024-11-18 13:39:06 -06:00
Tim Donohue
ca176b77b2 Merge pull request #10017 from DSpace/backport-10016-to-dspace-7_x
[Port dspace-7_x] [GitHub Actions] More fixes to Docker deployment builds
2024-11-15 17:13:00 -06:00
Tim Donohue
f0c92ac96b Ensure only main branch uses "latest". Other branches should use the tag corresponding to the branch name
(cherry picked from commit e0b7241acb)
2024-11-15 22:42:11 +00:00
Tim Donohue
7e18e743ee Merge pull request #10011 from DSpace/backport-10010-to-dspace-7_x
[Port dspace-7_x] [GitHub Actions] Minor bug fix to Docker deployment builds
2024-11-15 10:26:42 -06:00
Tim Donohue
7fa31e2131 Ensure we use "pr-testing" images for PRs, but use "latest" images for other builds (e.g. after PR is merged to a branch).
(cherry picked from commit aa537c4490)
2024-11-15 15:34:38 +00:00
Tim Donohue
90b58833ec Merge pull request #9995 from DSpace/backport-9746-to-dspace-7_x
[Port dspace-7_x] Fix 9734: Check configured workflow.reviewer.file-edit to show item e…
2024-11-14 14:54:50 -06:00
Agustina Martinez
aa71e4840b Fix 9734: Check configured workflow.reviewer.file-edit to show item edit functionality in workflow UI
(cherry picked from commit e8ec0c1b1d)
2024-11-14 20:11:05 +00:00
Tim Donohue
3f1f4cb217 Merge pull request #9993 from tdonohue/port_9973_to_7x
[Port dspace-7_x] [GitHub Actions] Add a job to test Docker deployment with newly built images & test Handle Server
2024-11-13 16:45:25 -06:00
Tim Donohue
5bb65c6b56 Fix error in Handle Server startup caused by having multiple versions of BouncyCastle in our classpath. Exclude the old version brought in by cnri-servlet-container 2024-11-13 15:11:36 -06:00
Tim Donohue
d6d78298b3 Add check for Handle Server error.log 2024-11-13 15:11:30 -06:00
Tim Donohue
a0ed4a40ea Bug fixes. Ensure all steps of docker-deploy use the same environment variables. Ensure Handle Server HTTP port is open 2024-11-13 15:11:12 -06:00
Tim Donohue
faca14ad40 Ensure "host" command is installed in images, so "bin/make-handle-config" will work. 2024-11-13 15:09:47 -06:00
Tim Donohue
9853aa5bb4 Fix error in running Handle Server in GitHub Actions. Must exclude "spring-jcl" from dependencies as it conflicts with "commons-logging" (used by more of our dependencies) 2024-11-13 15:06:41 -06:00
Tim Donohue
c1f168245b Ensure Docker images built from PRs are stored as artifacts. This allows us to use those new images when testing deployment (in docker-deploy) 2024-11-13 15:06:32 -06:00
Tim Donohue
3ce85a2df3 Add a check that the Handle Server can be started & works properly 2024-11-13 15:06:25 -06:00
Tim Donohue
c66dde2aa8 Add a job to test Docker deployment with the built images 2024-11-13 15:06:18 -06:00
Tim Donohue
7017f5ecb1 Merge pull request #9976 from DSpace/backport-9861-to-dspace-7_x
[Port dspace-7_x] performance of claiming workflow task fix
2024-11-11 16:00:36 -06:00
Andrew
fde825265d fix: performance of claiming workflow task
(cherry picked from commit 27dd5a2ec5)
2024-11-11 21:15:41 +00:00
Tim Donohue
426d3abde0 Merge pull request #9974 from DSpace/backport-9890-to-dspace-7_x
[Port dspace-7_x] Status of DOI object should be set to TO_BE_DELETED when the related item is removed
2024-11-11 12:20:45 -06:00
Jens Vannerum
831db33018 118774: status of doi should be set to TO_BE_DELETED when related item is removed permanently
(cherry picked from commit 352f4c2152)
2024-11-11 16:40:56 +00:00
Tim Donohue
a452f035c3 Merge pull request #9969 from DSpace/backport-9968-to-dspace-7_x
[Port dspace-7_x] Improve logging of Unit & Integration Tests.  Ensure all tests log which method they are running.
2024-11-06 15:53:10 -06:00
Tim Donohue
68266cd3c1 Move logging of test methods to Abstract*Test classes in dspace-api. That way they work for **both** dspace-server-webapp and dspace-api tests.
(cherry picked from commit bd20c9262b)
2024-11-06 21:12:01 +00:00
Andreas Awouters
30cd44c196 Merge branch 'accessibility-settings-7.6' into accessibility-settings-7_x 2024-11-06 09:41:36 +01:00
Andreas Awouters
10a95ae92a 119602: Add accessibility settings metadata field 2024-11-06 09:39:33 +01:00
Tim Donohue
68b800f070 Merge pull request #9897 from DSpace/backport-9894-to-dspace-7_x
[Port dspace-7_x] Add Eclipse JDT .factorypath to .gitignore
2024-10-16 10:31:32 -05:00
Kim Shepherd
6018f926d7 Add Eclipse JDT .factorypath to .gitignore
(cherry picked from commit 9ce645e08b)
2024-10-16 15:28:30 +00:00
Miika Nurminen
31d36e7abf Bugfix: BitstreamRestController etag/content-length calculation does not consider cover page
Ported Alphonse Bendt's PR #9666 to DSpace 7 branch (squashed 5 commits).
This PR fixes a bug where the etag/content-length calculation did not respect the potential existence of a coverpage.
The controller now will use the post processed pdf if coverpages are enabled.
2024-10-16 11:48:10 +03:00
Brian Keese
4a4a8bcb22 Fix full-text indexing for files over the character limit
The error handler for files over the limit logged the correct message, but never actually added the full text to the index doc.
2024-10-15 11:38:54 -05:00
Tim Donohue
e9290f4bdc Merge pull request #9888 from tdonohue/update_latest_spring5
Bump `dspace-7_x` to Spring 5.3.39 and Spring Security 5.7.12
2024-10-14 08:42:57 -05:00
Tim Donohue
70dd847759 Revert to Spring Security 5.7.12. Spring Security 5.8.x changes behavior of CSRF tokens 2024-10-11 16:41:40 -05:00
Tim Donohue
1e47fa61d9 Bump to Spring 5.3.39 and Spring Security 5.8.14 2024-10-11 14:38:47 -05:00
Tim Donohue
ce1edc3bd3 Merge pull request #9877 from DSpace/backport-9777-to-dspace-7_x
[Port dspace-7_x] several optimizations in HAL browser login page
2024-10-08 14:11:57 -05:00
Sascha Szott
4669d8f760 applied change suggested by reviewer: use String.prototype.includes
(cherry picked from commit 546afb189e)
2024-10-08 19:11:02 +00:00
Sascha Szott
a721f8c41e fix failed first login attempt in HAL browser
(cherry picked from commit 002e637d4f)
2024-10-08 19:11:02 +00:00
Tim Donohue
5ad4adbddc Merge pull request #9862 from DSpace/backport-9859-to-dspace-7_x
[Port dspace-7_x] minor fix in parameter description in subscriptions_content
2024-09-27 10:47:18 -05:00
Sascha Szott
702ff9cf4c minor fix in parameter description
(cherry picked from commit 5758d9e903)
2024-09-27 15:44:49 +00:00
Tim Donohue
7b98632152 Merge pull request #9857 from DSpace/backport-9678-to-dspace-7_x
[Port dspace-7_x] LDAPAuthentication considers update of eperson's attributes
2024-09-26 16:12:58 -05:00
Sascha Szott
31af49ea72 fix Checkstyle violations
(cherry picked from commit aaa74b88c9)
2024-09-26 18:27:55 +00:00
Sascha Szott
b0370a064b add missing import
(cherry picked from commit c5ad32a9b3)
2024-09-26 18:27:55 +00:00
Sascha Szott
405397b8b0 update eperson's attributes right after successful login
(cherry picked from commit 428489ca52)
2024-09-26 18:27:55 +00:00
kshepherd
43c25c9972 Merge pull request #9838 from DSpace/backport-9581-to-dspace-7_x
[Port dspace-7_x] Add missing wosPublisherContrib key-ref in wos-integration.xml (#9579)
2024-09-19 15:49:16 +02:00
Mikhail Schastlivtsev
a49ee62450 add missing publisher metadatum in test (#9579)
(cherry picked from commit cde892c8c7)
2024-09-19 12:05:06 +00:00
Mikhail Schastlivtsev
9031322e7d add missing wosPublisherContrib key-ref in wos-integration.xml (#9579)
(cherry picked from commit 6a8c76bbe1)
2024-09-19 12:05:06 +00:00
Tim Donohue
b6209e0a95 Merge pull request #9801 from tdonohue/port_9668_to_7x
[Port dspace-7_x] Fix for DSpace#9667: Request-a-copy link generation for base URLs that have sub-paths
2024-09-06 16:40:59 -05:00
Tim Donohue
4ac4c911cf Singular name needed in 7.x 2024-09-06 16:08:49 -05:00
Kim Shepherd
7ec746d005 lint fixes (RequestItemRepository) 2024-09-06 13:54:01 -05:00
Kim Shepherd
ab43b86066 Tidy implementation of link token generation 2024-09-06 13:54:01 -05:00
Kim Shepherd
1914aac18b Improved URI build method as per review 2024-09-06 13:54:01 -05:00
Kim Shepherd
64255ffb05 #9668: Ensure proper handling of non-subpath URLs in link tokens 2024-09-06 13:54:01 -05:00
Kim Shepherd
cdb255feca Make RequestItemRepository#getLinkTokenEmail public, write test 2024-09-06 13:54:01 -05:00
Kim Shepherd
724f821bee Fix request a copy link token generation
Ensure DSpace URLs with extra segments are included
fully in the generated link
2024-09-06 13:54:00 -05:00
Tim Donohue
65232f64d3 Merge pull request #9812 from DSpace/backport-9807-to-dspace-7_x
[Port dspace-7_x] Rewrite DSpace integration tests to consistently use AbstractBuilder<T> builders
2024-09-06 12:21:42 -05:00
Kim Shepherd
123aedde04 #9806: Move cleanup of handle provider to destroy in VersionedHandleIdentifierProviderIT
(cherry picked from commit f6cabe648d)
2024-09-06 16:49:19 +00:00
Kim Shepherd
89796ece6b #9806: Set explicit id provider before VersioningWithRelationshipsIT
(cherry picked from commit 4af6900650)
2024-09-06 16:49:19 +00:00
Kim Shepherd
48c8848fc2 #9806: Use builders for creation in VersioningWithRelationshipsIT
I am a bit uncertain about the createBean() calls here, why do
we not simply *get* the configured beans using the service manager
instead, but will look at that in a separate change

(cherry picked from commit 3521ab6d35)
2024-09-06 16:49:19 +00:00
Kim Shepherd
282d4db36b #9806: Align provider reg in CreateMissingIdentifiersIT with other tests
VersionedHandlerIdentifierProviderIT uses this registerProvider method
which looks more reliable and doesn't do a refresh/reload of
applicationContext after (which I suspected might have an odd interaction
with VersioningWithRelationshipsIT and its createBean() calls?)

(cherry picked from commit 90536e443b)
2024-09-06 16:49:19 +00:00
Kim Shepherd
5fd99d8b14 #9806: Update object cleanup in GroupRestRepositoryIT
(cherry picked from commit 8cfb433c40)
2024-09-06 16:49:19 +00:00
Kim Shepherd
e6a0bb8943 #9806: Builders for comm, coll, group in CommunityAdminGroupRestControllerIT
(cherry picked from commit 2d9988f77c)
2024-09-06 16:49:19 +00:00
Kim Shepherd
968559bbaf #9806: Use builders for comm, coll, group creation in CollectionGroupRestControllerIT
(cherry picked from commit f4629d8351)
2024-09-06 16:49:19 +00:00
Kim Shepherd
b9278cbf33 #9806: Use builders for comm, coll, group creation in SupervisionOrderServiceIT
(cherry picked from commit 6e9181e3f7)
2024-09-06 16:49:19 +00:00
Kim Shepherd
ffc807205f #9806: Refactor WorkspaceItemBuilder to support specific item uuid
(cherry picked from commit b99b1eec29)
2024-09-06 16:49:19 +00:00
Kim Shepherd
8d576f8300 #9806: Use builders for group, comm, coll creation in StructBuilderIT
(cherry picked from commit 2ef69045d1)
2024-09-06 16:49:18 +00:00
Kim Shepherd
67fa262b83 #9806: Use builders for group, comm, coll creation in PackagerIT
(cherry picked from commit 1f475aa731)
2024-09-06 16:49:18 +00:00
Kim Shepherd
690dfa0809 #9806: Tidy imports for GroupRestRepositoryIT
(cherry picked from commit 80328eaca5)
2024-09-06 16:49:18 +00:00
Kim Shepherd
b9b135163f #9806: Use builders for coll, comm, group creation in GroupRestRepositoryIT
(cherry picked from commit 9205773802)
2024-09-06 16:49:18 +00:00
Kim Shepherd
2ff2297b1f #9806: Use builders for coll, comm, group creation in BitstreamRestRepositoryIT
(cherry picked from commit b13abac753)
2024-09-06 16:49:18 +00:00
Kim Shepherd
404039ade6 #9806: Add new create methods to group builder
Now supports admin groups, default read, workflow role

(cherry picked from commit cdb167e55a)
2024-09-06 16:49:18 +00:00
Tim Donohue
730e87536d Merge pull request #9798 from DSpace/backport-9796-to-dspace-7_x
[Port dspace-7_x] Translate underscores to dashes in xml:lang attr for DIM2DataCite.xsl
2024-09-03 13:33:06 -05:00
Kim Shepherd
e15f60abd3 Translate underscores to dashes in xml:lang attr for DIM2DataCite.xsl
Modified the DataCite crosswalk to ensure that the xml:lang attribute translates any underscores in the value of @lang to dashes. This change aligns the attribute formatting with standard language code conventions.

(cherry picked from commit a898afd5ac)
2024-09-03 17:19:12 +00:00
Tim Donohue
2ad5172120 Merge pull request #9790 from DSpace/backport-9775-to-dspace-7_x
[Port dspace-7_x] Make statistics autocommit much more frequently
2024-08-29 16:50:41 -05:00
Mark H. Wood
41312eec6e Make statistics autocommit much more frequent.
(cherry picked from commit 5c9af9764e)
2024-08-29 21:22:50 +00:00
kshepherd
8b3bf176fb Merge pull request #9784 from DSpace/backport-9684-to-dspace-7_x
[Port dspace-7_x] Crossref metadata import: change order of person name parts
2024-08-29 20:40:17 +02:00
Tim Donohue
94fca6fe35 Merge pull request #9789 from tdonohue/port_9497_to_7x
[Port dspace-7_x] In workflow-attached curation, separate task-list building from execution.
2024-08-29 12:11:20 -05:00
Tim Donohue
e570135689 Merge pull request #9786 from DSpace/backport-9765-to-dspace-7_x
[Port dspace-7_x] Fix index-discovery process when using handle
2024-08-29 10:41:47 -05:00
Mark H. Wood
0d74bd9f18 Separate task-list building from execution.
The old code would curate the object once for each task, meaning that all
but one task would be executed N times up to the length of the list.
2024-08-29 10:32:56 -05:00
autavares-dev
ffc99d06a1 Fix index-discovery process when using handle
(cherry picked from commit 077aed38dc)
2024-08-29 15:10:11 +00:00
Sascha Szott
7e87d57672 fix broken unit tests
(cherry picked from commit 1712b9f078)
2024-08-29 15:03:01 +00:00
Sascha Szott
f61c45bdc6 change order of name parts: familyName, givenName
(cherry picked from commit 076f1f233e)
2024-08-29 15:03:01 +00:00
Bram Luyten
8a997abf6a Merge pull request #9771 from DSpace/backport-9671-to-dspace-7_x
[Port dspace-7_x] DataCite DOI error fixes
2024-08-23 14:16:27 +02:00
Kristof De Langhe
c1be5f8e4e 115693: Pass doi metadatafield with xsl parameters
(cherry picked from commit 9e11e1f9ae)
2024-08-23 11:24:58 +00:00
Kristof De Langhe
d240a16b05 115693: DataCiteConnector fallback for blank metadata doi
(cherry picked from commit 021e424347)
2024-08-23 11:24:58 +00:00
Kristof De Langhe
f1dc25195f 115693: data-cite xsl targetting dc.identifier.uri fixes doi registration error
(cherry picked from commit c5d08f037c)
2024-08-23 11:24:58 +00:00
Tim Donohue
d23bf4c3cd Merge pull request #9743 from DSpace/backport-9742-to-dspace-7_x
[Port dspace-7_x] Fix potentially invalid usages of == operator
2024-08-02 11:57:54 -05:00
Sascha Szott
36ff5ca6cb use equals instead of ==
(cherry picked from commit a13cc82d40)
2024-08-02 16:24:13 +00:00
Sascha Szott
6a5236f2f9 use equals instead of ==
(cherry picked from commit d2ef7b01ef)
2024-08-02 16:24:13 +00:00
Sascha Szott
dc09d06ed6 use equals instead of ==
(cherry picked from commit 5e3552ee38)
2024-08-02 16:24:13 +00:00
Sascha Szott
b8f638b3b6 use equals instead of ==
(cherry picked from commit 80de8f6fb5)
2024-08-02 16:24:13 +00:00
Tim Donohue
275b0f89b7 Merge pull request #9740 from DSpace/backport-9737-to-dspace-7_x
[Port dspace-7_x] fix invalid usage of == operator
2024-08-02 11:08:28 -05:00
Sascha Szott
24318e01b8 fix invalid usage of == operator
(cherry picked from commit fa0fb14a18)
2024-08-02 14:49:40 +00:00
Tim Donohue
54bd5dd189 Merge pull request #9710 from atmire/w2p-116319_fix-metadata-import-setting-language-as-any-instead-of-null-upstream-7-x
[Port dspace-7_x] Fix issue where CSV Import / Export can clear metadata if there are metadata values with language "*" (Item.ANY)
2024-07-25 10:22:55 -05:00
Vincenzo Mecca
26905b7d45 [CST-14901][DSC-1357][#8662] Handles versioning for ORCID publications.
feat:
 - ORCID publications waiting to be published are removed whenever a new version is created
 - ORCID publications already published will be updated with the ref to the last item version
 - ORCID consumer will process only latest item versions, ignoring all the other ones
2024-07-25 11:44:37 +02:00
Vincenzo Mecca
affa4b00ff [CST-14905] Orcid revoke token feature 2024-07-24 19:39:21 +02:00
Tim Donohue
f6208bc1ce Merge pull request #9719 from DSpace/backport-9717-to-dspace-7_x
[Port dspace-7_x] Update spider list URLs to satisfy Cloudflare redirects
2024-07-23 14:28:03 -05:00
Kim Shepherd
30b6eddeb6 Update spider list URLs to satisfy cloudflare redirects
Update spider list URLs to satisfy cloudflare redirects

Update spider list URLs to satisfy cloudflare redirects

(cherry picked from commit d22ea117ca)
2024-07-23 18:53:56 +00:00
Tim Donohue
a3b27bdfb6 Merge pull request #9712 from DSpace/backport-9711-to-dspace-7_x
[Port dspace-7_x] Bump dnsjava:dnsjava from 2.1.9 to 3.6.0 in /dspace-api
2024-07-22 14:00:51 -05:00
dependabot[bot]
fff8cc3cb4 Bump dnsjava:dnsjava from 2.1.9 to 3.6.0 in /dspace-api
Bumps [dnsjava:dnsjava](https://github.com/dnsjava/dnsjava) from 2.1.9 to 3.6.0.
- [Release notes](https://github.com/dnsjava/dnsjava/releases)
- [Changelog](https://github.com/dnsjava/dnsjava/blob/master/Changelog)
- [Commits](https://github.com/dnsjava/dnsjava/compare/v2.1.9...v3.6.0)

---
updated-dependencies:
- dependency-name: dnsjava:dnsjava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 1775c88919)
2024-07-22 18:19:36 +00:00
Jens Vannerum
7082e32595 116542: resolve issues after merge with latest 7-x branch 2024-07-22 15:18:44 +02:00
Jens Vannerum
8f049579dc Merge branch 'w2p-116319_fix-metadata-import-setting-language-as-any-instead-of-null' into w2p-116319_fix-metadata-import-setting-language-as-any-instead-of-null-upstream-7-x 2024-07-22 15:14:12 +02:00
Jens Vannerum
03cff072c3 116542: fix issues with CSV importing and the Any language being set on metadata values 2024-07-22 15:08:59 +02:00
Tim Donohue
086655712d Merge pull request #9707 from tdonohue/port_9704_to_7x
[Port dspace-7_x] Docker build: fix FromAsCasing warnings
2024-07-17 12:00:06 -05:00
Sascha Szott
e4209d5d0b fix FromAsCasing warning 2024-07-17 11:26:47 -05:00
Sascha Szott
9b6b7ded97 fix FromAsCasing warning 2024-07-17 11:26:36 -05:00
Sascha Szott
f340dfadbe fix FromAsCasing warning 2024-07-17 11:25:33 -05:00
Sascha Szott
83f3ea4d05 fix FromAsCasing warning 2024-07-17 11:24:15 -05:00
Tim Donohue
9e1ea61a0b Merge pull request #9693 from tdonohue/port_9691_to_7x
[Port dspace-7_x] Fix random test failures in LinksetRestControllerIT and ManageGroupsFeatureIT
2024-07-10 15:49:27 -05:00
Tim Donohue
3bb93be793 Fix random pagination failures in ManageGroupsFeatureIT by using the "feature" param to filter for the feature we are looking for. If this feature appeared on page 2, then the tests would fail. 2024-07-10 15:17:56 -05:00
Tim Donohue
17a46a2fb6 Remove unused services & unnecessary cache cleanup. This can result in random failures if these services are not yet loaded by another test. 2024-07-10 15:15:47 -05:00
Tim Donohue
e4874c9f2f Merge pull request #9683 from TexasDigitalLibrary/port_9682_to_7x
updated creative commons licenses version from 3.0 to 4.0
2024-07-09 15:43:21 -05:00
Tim Donohue
86b28bf927 [maven-release-plugin] prepare for next development iteration 2024-07-09 14:10:05 -05:00
Tim Donohue
08947bc34e [maven-release-plugin] prepare release dspace-7.6.2 2024-07-09 14:10:01 -05:00
Tim Donohue
98c661d8d0 Update redeployment of demo.dspace.org to use dspace-8_x branch. 2024-07-09 13:43:15 -05:00
Tim Donohue
12c3cc5b3e Update LICENSES_THIRD_PARTY (and related configs) for 7.6.2 release 2024-07-09 13:35:16 -05:00
nwoodward
2cb8204d3c updated creative commons licenses version from 3.0 to 4.0 2024-07-08 12:33:07 -05:00
kshepherd
d47c00a24b Merge pull request #9599 from tdonohue/port_new_csrf_endpoint_to_7x
[Port dspace-7_x] Add a GET `/csrf` endpoint to allow for forcing refresh of CSRF token
2024-06-29 14:57:45 +02:00
Tim Donohue
324020ac81 Merge pull request #9651 from DSpace/backport-9638-to-dspace-7_x
[Port dspace-7_x] Update configuration to always download HTML/JS/XML Bitstreams (no inline display)
2024-06-17 09:23:22 -05:00
Tim Donohue
3bcd33d92a To avoid misconfiguration, hardcode HTML, XML, RDF, JS to download only. Add a new wildcard setting to allow sites to force all files to download only.
(cherry picked from commit a091d343b9)
2024-06-17 07:23:16 +00:00
Tim Donohue
c30ff35448 For additional security, ensure "unknown" formats are always downloaded. Update test to prove behavior.
(cherry picked from commit 6da072de9e)
2024-06-17 07:23:16 +00:00
Tim Donohue
7951c8e428 Add a test to prove the default settings are to always download these formats
(cherry picked from commit e6bfb833ee)
2024-06-17 07:23:16 +00:00
Tim Donohue
7ba150f4fc Add XML to the list of formats to always download
(cherry picked from commit 39975e45cf)
2024-06-17 07:23:16 +00:00
Tim Donohue
7143c97248 Fix failing IT by increasing number of formats by one
(cherry picked from commit c61b7033f2)
2024-06-17 07:23:16 +00:00
Tim Donohue
0f74cb22bf Avoid inline display of HTML/JS bitstreams. Add JS to list of known formats so that it can be recognized by DSpace.
(cherry picked from commit 356a028186)
2024-06-17 07:23:16 +00:00
Tim Donohue
0b67aa3070 Merge pull request #9649 from DSpace/backport-9509-to-dspace-7_x
[Port dspace-7_x] Fix bug where empty metadata List can result in "Index 0 out of bounds for length 0" exceptions in several scenarios
2024-06-14 11:53:31 -05:00
Tim Donohue
c890199cfe Add tests to verify behavior of addMetadata() when encountering virtual metadata
(cherry picked from commit 2eb7dbca6b)
2024-06-14 14:58:15 +00:00
Tim Donohue
872af33155 Fix bug in MetadataImport where it could call addMetadata() with empty values. Minor refactors to MetadataImportIT to make findItemByName more efficient.
(cherry picked from commit f8ac8edc49)
2024-06-14 14:58:15 +00:00
Tim Donohue
30dafa09d0 Fix testAddMetadata_5args_2 to no longer be *identical* to testAddMetadata_5args_1. It appears this second test was meant to test a different addMetadata() method which accepts a single Value instead of a List
(cherry picked from commit 25f722ed98)
2024-06-14 14:58:15 +00:00
Tim Donohue
8407c571db Throw IllegalArgumentException if addMetadata() called without values. Add unit tests to prove it works
(cherry picked from commit ed918a8d0c)
2024-06-14 14:58:15 +00:00
Tim Donohue
928dad1c5c Ensure List is not empty before returning first value
(cherry picked from commit 068bcdf3af)
2024-06-14 14:58:15 +00:00
Tim Donohue
370550c06b Merge pull request #9643 from DSpace/backport-9621-to-dspace-7_x
[Port dspace-7_x] Fixed item edit relationships with same type name but different entities all being shown under same label
2024-06-10 09:37:09 -05:00
Tim Donohue
2bf663e5a1 Merge pull request #9642 from DSpace/backport-9594-to-dspace-7_x
[Port dspace-7_x] Metadata Import via Scopus API: improved handling of empty search results
2024-06-07 15:52:26 -05:00
Alexandre Vryghem
7789304ebe 115434: Added test proving that different values for relatedEntityType return different results
(cherry picked from commit bbae1fb0d1)
2024-06-07 20:09:19 +00:00
Alexandre Vryghem
8d82457eb7 115434: Added relatedEntityType parameter to byLabel endpoint to differentiate relationships with same label and different entity types
(cherry picked from commit 8512fab392)
2024-06-07 20:09:19 +00:00
Sascha Szott
8e56fdd95b fixed failed test
(cherry picked from commit 6989cb6f15)
2024-06-07 19:59:21 +00:00
Sascha Szott
2b1270197e improve handling of 0 hits responses of Scopus API
(cherry picked from commit b12bd6ce56)
2024-06-07 19:59:21 +00:00
Sascha Szott
6e5c5089ab Update scopus-empty-resp.xml
(cherry picked from commit 4b2ea66f19)
2024-06-07 19:59:21 +00:00
Sascha Szott
26658b6665 evaluate surname and given-name if authname is not present
(cherry picked from commit 8b5f044537)
2024-06-07 19:59:21 +00:00
Tim Donohue
e8991992fc Merge pull request #9637 from DSpace/backport-9629-to-dspace-7_x
[Port dspace-7_x] Ensure work directory is cleaned up even when Zip export fails
2024-06-06 10:44:27 -05:00
Tim Donohue
95fc68b3ee Ensure work directory is cleaned up whether zip file is created successfully or an error occurs.
(cherry picked from commit b7f764746c)
2024-06-06 14:53:00 +00:00
Tim Donohue
1769f16d7a Merge pull request #9635 from DSpace/backport-9539-to-dspace-7_x
[Port dspace-7_x] Fixed too long classpath bug in test_databaseFixed classpath issue in test_database target
2024-06-05 15:27:53 -05:00
Jean-François Morin
4cd3b75e67 Fixed classpath issue in test_database target
(cherry picked from commit 6937c19973)
2024-06-05 19:14:17 +00:00
Tim Donohue
3ad22bf977 Merge pull request #9634 from tdonohue/port_9625_to_7x
[Port dspace-7_x] updates creativecommons.org links to https
2024-06-05 12:01:26 -05:00
nwoodward
c5d139c9e1 updates creativecommons.org links to https 2024-06-05 11:24:30 -05:00
Tim Donohue
a95ed84b75 Merge pull request #9632 from DSpace/backport-9605-to-dspace-7_x
[Port dspace-7_x] Fix for Bump org.apache.commons:commons-configuration2 from 2.9.0 to 2.10.1
2024-06-05 10:35:53 -05:00
Andrea Bollini
7fc74bdc56 DURACOM-267 assure that our custom DSpaceConfigurationPropertySource is used also for the spring context created by the DSpace kernel
(cherry picked from commit 4fcf995b69)
2024-06-05 14:38:44 +00:00
Andrea Bollini
b9e6af6758 DURACOM-267 improve handling of empty configuration property
(cherry picked from commit 0422b8786f)
2024-06-05 14:38:44 +00:00
Andrea Bollini
4b5248fe15 DURACOM-267 update commons-configuration2 fix according to the community feedback
(cherry picked from commit f2d4ffc49c)
2024-06-05 14:38:44 +00:00
Andrea Bollini
0d4d065d45 Create a temporary version of the ConfigurationPlaceholderConfigurer to overcome bu in 2.10
(cherry picked from commit d44d76ea03)
2024-06-05 14:38:44 +00:00
dependabot[bot]
fe76579d04 Bump org.apache.commons:commons-configuration2 from 2.9.0 to 2.10.1
Bumps org.apache.commons:commons-configuration2 from 2.9.0 to 2.10.1.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-configuration2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit df7220bd98)
2024-06-05 14:38:44 +00:00
Tim Donohue
6b23e6fac0 Merge pull request #9628 from DSpace/backport-9627-to-dspace-7_x
[Port dspace-7_x] Cleanup doi filters
2024-06-04 11:55:20 -05:00
Pascal-Nicolas Becker
2d150cb86c Cleanup doi filters
We can set filters in identifier-service.xml. Setting them in
modules/identifiers.cfg is just overidding the other one. To keep things
simple, we should avoid having two different filters for the same issue.
The filter configured in spring is working for any new DOI, while the
one we take out here, is just working for items being run through the
install item service.

(cherry picked from commit 59aaf3e57c)
2024-06-04 16:25:51 +00:00
Tim Donohue
1827b89937 Merge pull request #9626 from DSpace/backport-9619-to-dspace-7_x
[Port dspace-7_x] Remove the is-archived_condition from the doi-filter
2024-06-03 17:02:42 -05:00
Pascal-Nicolas Becker
b8a6711140 Remove the is_archived_condition from the doi-filter
In the conversation of #9271 kshepherd states that he had issues to
register DOIs when the doi-filter is usint the is_archived_condition. I
was able to reproduce these issues. This removes the reference to that
condition from the filter. The item is not archived when the
InstallItemService is trying to apply a DOI to it.

(cherry picked from commit 24da6fe769)
2024-06-03 21:24:15 +00:00
Tim Donohue
77827cdfaa Merge pull request #9624 from DSpace/backport-9618-to-dspace-7_x
[Port dspace-7_x] Update comments in identifier-service.xml
2024-06-03 12:04:20 -05:00
Pascal-Nicolas Becker
ac07f08497 Update comments in identifier-service.xml
The DOIIdentifierProvider using a filter was commented out twice. We
should show that it works with and without a filter. Furthermore one
comments looked cut off.

(cherry picked from commit 3dd49f4ac3)
2024-06-03 16:33:25 +00:00
Tim Donohue
0d014e5e9e Merge pull request #9617 from tdonohue/port_9273_to_7x
[Port dspace-7_x] MediaFilter over large repository result in downtime
2024-05-31 16:00:03 -05:00
Andrea Bollini
a09d46d8e4 DURACOM-225 fix lazy initialization traversing comms/colls 2024-05-31 14:30:11 -05:00
Andrea Bollini
88b44e9281 DURACOM-225 porting of the uuid iterator implementation from dspace-cris to retrie just the uuid from the database in the initial query 2024-05-31 14:30:04 -05:00
Andrea Bollini
86286474cc DURACOM-225 commit after each item to release DB resources 2024-05-31 14:29:59 -05:00
Andrea Bollini
96f490a3a0 DURACOM-225 add IT for the media filter script 2024-05-31 14:29:52 -05:00
Tim Donohue
4651ba8797 Merge pull request #9614 from DSpace/backport-9576-to-dspace-7_x
[Port dspace-7_x] Remove old UI references from OpenSearch / RSS feeds
2024-05-29 16:54:10 -05:00
Tim Donohue
fcbf8b80e3 Merge pull request #9609 from tdonohue/port_9583_to_7x
[dspace-7_x] Fix Item Counts (webui.strengths) by refactoring ItemCounter and ItemCountDAO to act like other Spring beans
2024-05-29 16:42:12 -05:00
Tim Donohue
3e831123b7 Add a basic test that refactoring of code results in correct logo URLs. Also enable/fix a test for special characters.
(cherry picked from commit 8c22915adf)
2024-05-29 20:56:51 +00:00
Tim Donohue
3b1cf3e35e Remove references to UI type from OpenSearch / RSS feeds
(cherry picked from commit 47b79bb2cb)
2024-05-29 20:56:51 +00:00
damian
ab0b80e57a Merge remote-tracking branch 'origin/refactor_item_counter' into refactor_item_counter 2024-05-24 16:50:51 -05:00
damian
a5901af564 Level up counting items methods - both now use the same flags from Item model (discoverable, archived, withdrawn) 2024-05-24 16:48:56 -05:00
damian
8ae9f9f251 Check withdrawn flag at item count method 2024-05-24 16:44:05 -05:00
Tim Donohue
be4dfeb140 Refactor ItemCounter and ItemCountDAO to act like other DSpace beans. Also ensure they do not cache a Context object. 2024-05-24 16:43:49 -05:00
Tim Donohue
eb9f63ab95 DSpace 7 requires using jvax not jakarta 2024-05-17 09:17:33 -05:00
Tim Donohue
fabd60db43 Update test to prove CSRF token changes for every GET request to endpoint 2024-05-16 16:46:44 -05:00
Tim Donohue
a6c369686d Add a GET /csrf endpoint to allow for forcing refresh of CSRF token 2024-05-16 16:39:17 -05:00
Tim Donohue
b3a4571d4c Merge pull request #9596 from paulo-graca/bugfixes/issue-7464
Fixing issue #7464 for DSpace 7
2024-05-16 13:13:23 -05:00
Paulo Graça
11062ae869 Fixing issue #7464 for DSpace 7 2024-05-16 17:03:25 +01:00
Tim Donohue
598fb1831f Merge pull request #9484 from 4Science/s3lazy_7x
Porting of Improve S3 Bitstream Storage to Lazy download object from S3 to 7_x
2024-05-16 10:59:23 -05:00
Tim Donohue
94965116ee Merge pull request #9590 from DSpace/backport-9588-to-dspace-7_x
[Port dspace-7_x] I18nUtil: reduce log level error to info or warn
2024-05-16 08:37:13 -05:00
Tim Donohue
c875f1c8e1 Merge pull request #9591 from DSpace/backport-9580-to-dspace-7_x
[Port dspace-7_x] improve interoperability: replace hard-coded slash by File.separator
2024-05-16 08:36:48 -05:00
Sascha Szott
f7a5c7375a replaced slash by File.separator
(cherry picked from commit 3e23fea0b8)
2024-05-15 21:59:43 +00:00
Sascha Szott
caf0671ce2 reduce log level error to info or warn
(cherry picked from commit bc4c6742d3)
2024-05-15 21:51:40 +00:00
Tim Donohue
5f29b52e4e Merge pull request #9586 from DSpace/backport-9582-to-dspace-7_x
[Port dspace-7_x] Add additional DOI prefixes
2024-05-15 13:36:06 -05:00
max.nuding
1d6ab238c0 Add additional DOI prefixes
(cherry picked from commit ba4edeed15)
2024-05-15 17:58:05 +00:00
Tim Donohue
33b6b4ba09 Merge pull request #9578 from DSpace/backport-9577-to-dspace-7_x
[Port dspace-7_x] Fix broken ITs after merger of #9485
2024-05-13 17:27:48 -05:00
Tim Donohue
fd755bf810 Merge pull request #9575 from DSpace/backport-9485-to-dspace-7_x
[Port dspace-7_x] Fix person lookup on project submission #2959
2024-05-13 17:27:18 -05:00
Tim Donohue
ed9ff262d6 Fix broken ITs after merger of #9485
(cherry picked from commit 16343d68bf)
2024-05-13 22:23:38 +00:00
Eike Martin Löhden
b0995cdf6c Set correct metadata field for virtual metadata of persons in projects.
(cherry picked from commit ff7d96b82c)
2024-05-13 19:27:54 +00:00
Eike Martin Löhden
2309496f67 Correct relationship direction for persons in the project submission step.
(cherry picked from commit ee2abfaf88)
2024-05-13 19:27:54 +00:00
Tim Donohue
d99ad4736e Merge pull request #9574 from tdonohue/port_9573_to_7x
[Port dspace-7_x] remove outdated comment as RSS feeds are supported in DS 7.3+
2024-05-13 10:03:35 -05:00
Sascha Szott
1128b0eb10 remove outdated comment as RSS feeds are supported in DS 7.3+ 2024-05-13 10:01:59 -05:00
Tim Donohue
71b8f1d3b2 Merge pull request #9571 from DSpace/backport-9400-to-dspace-7_x
[Port dspace-7_x] fix datacite import recordscount and pagination options
2024-05-10 16:57:09 -05:00
Gantner, Florian Klaus
17c68323db avoid empty data to create phantom records for datacite import
(cherry picked from commit 9667a3374d)
2024-05-10 21:29:16 +00:00
Gantner, Florian Klaus
e35f859e06 datacite api test for no results count
(cherry picked from commit 9cd1a1093d)
2024-05-10 21:29:16 +00:00
Gantner, Florian Klaus
d14f113024 use datacite api response for recordscount and paginated calls. update test file for response as expected from the api.
(cherry picked from commit 65ac01a4a6)
2024-05-10 21:29:16 +00:00
Tim Donohue
132bf49397 Merge pull request #9570 from DSpace/backport-9569-to-dspace-7_x
[Port dspace-7_x] potential array index out of bounds access in SubscriptionDsoMetadataForEmailCompose
2024-05-10 11:53:05 -05:00
Sascha Szott
2976ae3971 bugfix: array index can be out of bound
(cherry picked from commit 4fc6b07466)
2024-05-10 16:21:44 +00:00
Tim Donohue
2481a6f700 Merge pull request #9567 from DSpace/backport-9566-to-dspace-7_x
[Port dspace-7_x] Remove not unique id from inner beans to avoid xml validation issues
2024-05-09 13:02:39 -05:00
Andrea Bollini
ca27ea5fc2 Remove not unique id from inner beans to avoid xml validation issues
(cherry picked from commit 844b73ff49)
2024-05-09 16:31:04 +00:00
Tim Donohue
d71350da4e Merge pull request #9565 from DSpace/backport-9433-to-dspace-7_x
[Port dspace-7_x] Restore batch templates mail
2024-05-09 11:28:21 -05:00
Roy Bruschini
d90cf24a21 Fix typo
(cherry picked from commit 74c15e8d55)
2024-05-09 15:42:55 +00:00
Roy Bruschini
31020d1d4f Create templates mail and renamed name in getEmailFileName
(cherry picked from commit 7a637e6871)
2024-05-09 15:42:55 +00:00
Tim Donohue
ead90b6bbf Merge pull request #9455 from paulo-graca/organisation2organization
Replace organisation->organization
2024-05-09 10:12:15 -05:00
Paulo Graça
2fdc422b24 change IT from organisation to organization 2024-05-09 14:39:51 +01:00
Tim Donohue
2219ca80f0 Merge pull request #9557 from DSpace/backport-9555-to-dspace-7_x
[Port dspace-7_x] Updated CheckStyle to support newer Java features while not changing anything else
2024-05-08 16:49:58 -05:00
Tim Donohue
ebff350216 Merge pull request #9432 from DSpace/bugfix-9425
adding Unicode filtering for sorts
2024-05-08 16:22:21 -05:00
Jean-François Morin
532e21ffb9 Updated CheckStyle so that new Java features such as string blocks are supported, but without requiring to change anything else
(cherry picked from commit ef8c621a0f)
2024-05-08 21:01:06 +00:00
Tim Donohue
44090605b0 Merge pull request #9556 from DSpace/backport-9410-to-dspace-7_x
[Port dspace-7_x] Fix OAIHarvester#extractHandle not handling config properly
2024-05-08 15:17:52 -05:00
Tim Donohue
a4a09209f8 Merge pull request #9554 from DSpace/backport-9551-to-dspace-7_x
[Port dspace-7_x] Ensure Process `user_id` is nullified when referenced EPerson is deleted
2024-05-08 14:45:16 -05:00
Nona Luypaert
1b091a033e Fix OAIHarvester#extractHandle not handling config properly
- defaults for oai.harvester.acceptedHandleServer and oai.harvester.rejectedHandlePrefix are now set
- rejected handles no longer pass if multiple prefixes were configured for oai.harvester.rejectedHandlePrefix

(cherry picked from commit 862a6c5be6)
2024-05-08 19:44:05 +00:00
Tim Donohue
448a69483b Fix NullPointerException. Only return userid if EPerson not null
(cherry picked from commit f34c592352)
2024-05-08 19:07:01 +00:00
Tim Donohue
606b10ccb7 Add migration to set user_id to null if EPerson no longer exists & enforce it for future
(cherry picked from commit ef24645cbf)
2024-05-08 19:07:01 +00:00
Tim Donohue
c0b36a9e9c Merge pull request #9549 from DSpace/backport-9548-to-dspace-7_x
[Port dspace-7_x] Ensure potentially large Solr query uses POST, not GET
2024-05-07 09:36:19 -05:00
Tim Donohue
dbf063dfb9 Ensure potentially large Solr query uses POST, not GET
(cherry picked from commit 0a21a11c9a)
2024-05-07 14:09:09 +00:00
Tim Donohue
28bb6c7e95 Merge pull request #9547 from tdonohue/port_9542_to_7x
Upgrade Tika and bcprov-jdk18on to latest versions
2024-05-06 11:16:04 -05:00
Tim Donohue
03f8a0c56d Merge pull request #9507 from atmire/w2p-105866_Submission-performance-7_x
7.x - Submission performance
2024-05-06 11:11:21 -05:00
Tim Donohue
e22f9a211f Upgrade Tika and bcprov-jdk18on to latest versions. Synced other dependencies with versions used on main (where possible to do so) 2024-05-06 10:09:23 -05:00
Tim Donohue
7a9c8c1ea3 Merge pull request #9538 from DSpace/backport-9453-to-dspace-7_x
[Port dspace-7_x] DS-9452: Updates query to get collections referenced in the subscribers table
2024-05-03 16:12:42 -05:00
Tim Donohue
a2b9bf256f Merge pull request #9482 from dsteelma-umd/opensearch_npe_fix_for_valid_unknown_uuids
Fix OpenSearch NullPointerException for "scope" UUID that is not a community or collection
2024-05-03 15:46:09 -05:00
Tim Donohue
2754549156 Merge pull request #9541 from DSpace/backport-9386-to-dspace-7_x
[Port dspace-7_x] CrossRef metadata import: improve handling of JATS markup in CrossRef JSON response
2024-05-03 15:23:55 -05:00
Tim Donohue
6b3e3cf044 Merge pull request #9540 from DSpace/backport-9385-to-dspace-7_x
[Port dspace-7_x] CrossRef metadata import: trim trailing whitespaces in search query
2024-05-03 14:47:42 -05:00
Sascha Szott
263b45046c sort imports lexicographically
(cherry picked from commit 2867b36ebb)
2024-05-03 19:47:30 +00:00
Sascha Szott
71798f0f74 fix code style violations
(cherry picked from commit 23b8b696a0)
2024-05-03 19:47:30 +00:00
Sascha Szott
6b57079569 add header in class file
(cherry picked from commit b772004397)
2024-05-03 19:47:30 +00:00
Sascha Szott
a000f1430a add CrossRefAbstractProcessor
(cherry picked from commit fa3f10e0b6)
2024-05-03 19:47:29 +00:00
Sascha Szott
1606862aa3 add processor to handle CrossRef abstracts
(cherry picked from commit 498d137970)
2024-05-03 19:47:29 +00:00
Sascha Szott
cef170ad12 extend trimming
(cherry picked from commit 2c6f43d48f)
2024-05-03 19:21:05 +00:00
Sascha Szott
4d54f74ae1 trim trailing whitespaces in search query
(cherry picked from commit 43e2a1d402)
2024-05-03 19:21:05 +00:00
nwoodward
1da7c6b933 make sure collections list is unique
(cherry picked from commit d27331a0b3)
2024-05-03 17:31:19 +00:00
nwoodward
d6f6444f58 updated query to get collections referenced in the subscribers table
(cherry picked from commit c5989c65bb)
2024-05-03 17:31:19 +00:00
Tim Donohue
8205c07586 Merge pull request #9537 from DSpace/backport-9436-to-dspace-7_x
[Port dspace-7_x] Issue-9435
2024-05-03 11:30:30 -05:00
Xiqinger
1920101273 avoid outputStream write after close
(cherry picked from commit 214568d480)
2024-05-03 16:00:42 +00:00
Xiqinger
cbfe0beede Add empty check before call iterator().next()
(cherry picked from commit b2663c810c)
2024-05-03 16:00:42 +00:00
Xiqinger
24f2bca4b3 check path before mkdirs
(cherry picked from commit fda62bc101)
2024-05-03 16:00:41 +00:00
Tim Donohue
5b89effeb9 Merge pull request #9191 from atmire/w2p-106812_enforce-resource-policies-to-have-group-or-eperson
[Port to dspace-7_x] Enforce resource policies to have group or eperson
2024-05-03 10:16:02 -05:00
Kristof De Langhe
ce9129c961 105866: Remove commented code 2024-05-03 14:20:58 +02:00
Yana De Pauw
ce869e55d0 Merge remote-tracking branch 'upstream/dspace-7_x' into w2p-106812_enforce-resource-policies-to-have-group-or-eperson 2024-05-03 14:07:25 +02:00
Tim Donohue
d935ab26d7 Merge pull request #9487 from toniprieto/form-by-entity-type-with-map-v7
[Port dspace-7_x] Refactor SubmissionConfigReader to use a map for the item process configurations based on entityType
2024-05-02 11:01:20 -05:00
Tim Donohue
15fa850bcb Merge pull request #9531 from DSpace/backport-9358-to-dspace-7_x
[Port dspace-7_x] PreloadLevel config vocabulary issue
2024-05-02 08:33:46 -05:00
Tim Donohue
930e63f01a Merge pull request #9532 from DSpace/backport-9429-to-dspace-7_x
[Port dspace-7_x] Fix packager NPE if using the passwords=true option
2024-05-02 08:33:33 -05:00
Agustina Martinez
62b42ff2d1 Update RoleDisseminator.java
Fix NPE if empty password hash string

(cherry picked from commit 04824a2e98)
2024-05-01 21:49:13 +00:00
Marie Verdonck
097d253063 Make sure vocab init is run for vocabulary returned in /api/submission/vocabularies
(cherry picked from commit 42437dd65b)
2024-05-01 21:28:25 +00:00
Tim Donohue
5626fa1adc Merge pull request #9528 from DSpace/backport-9523-to-dspace-7_x
[Port dspace-7_x] Bump org.xmlunit:xmlunit-core from 2.9.1 to 2.10.0 in /dspace-api
2024-05-01 15:08:00 -05:00
dependabot[bot]
08c46bd0a1 Bump org.xmlunit:xmlunit-core from 2.9.1 to 2.10.0 in /dspace-api
Bumps [org.xmlunit:xmlunit-core](https://github.com/xmlunit/xmlunit) from 2.9.1 to 2.10.0.
- [Release notes](https://github.com/xmlunit/xmlunit/releases)
- [Changelog](https://github.com/xmlunit/xmlunit/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/xmlunit/xmlunit/compare/v2.9.1...v2.10.0)

---
updated-dependencies:
- dependency-name: org.xmlunit:xmlunit-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 1fdc3ce220)
2024-05-01 19:37:54 +00:00
Tim Donohue
25108cb9a1 Merge pull request #9387 from MW3000/fix-9383-email-subject-for-request-a-copy
Fix #9383: Set email subject for request copy form
2024-05-01 14:27:35 -05:00
Tim Donohue
d96916c19b Merge pull request #9526 from DSpace/backport-9522-to-dspace-7_x
[Port dspace-7_x] Remove obsolete "version" tag from Docker Compose files
2024-05-01 14:14:06 -05:00
Tim Donohue
0c7a41e47c Merge pull request #9524 from tdonohue/update_spring
[dspace-7_x] Minor update to latest Spring version
2024-05-01 13:20:24 -05:00
Tim Donohue
c030bcfa5a Merge pull request #9525 from DSpace/backport-9521-to-dspace-7_x
[Port dspace-7_x] Install unzip util in built dspace-cli image
2024-05-01 13:11:03 -05:00
Tim Donohue
e1dc695102 Remove obsolete "version" tag from compose files
(cherry picked from commit 9ca0ad5579)
2024-05-01 17:18:01 +00:00
John Abrahams
735906c429 Install unzip util in final built image
(cherry picked from commit 3eae430bec)
2024-05-01 16:56:22 +00:00
Tim Donohue
a97d72f993 Minor update to latest Spring version 2024-05-01 11:50:22 -05:00
Tim Donohue
6024a42448 Merge pull request #9520 from DSpace/backport-9296-to-dspace-7_x
[Port dspace-7_x] Fix resource policy type not set for bitstreams when importing items
2024-05-01 11:38:21 -05:00
Agustina Martinez
30e3cde30d Update ItemImportServiceImpl.java
expand setPermission to take the rpType string

(cherry picked from commit 679df52bbd)
2024-05-01 14:54:23 +00:00
Tim Donohue
aafc111c98 Merge pull request #9518 from DSpace/backport-9289-to-dspace-7_x
[Port dspace-7_x] Validation of page url in FeedbackRestRepository
2024-04-30 13:42:32 -05:00
Sascha Szott
0cfe4aec73 allow empty feedback page url
(cherry picked from commit c4cc56a429)
2024-04-30 17:40:22 +00:00
Sascha Szott
f9d3efd1e7 added validation of page url
(cherry picked from commit 771f37a1fa)
2024-04-30 17:40:22 +00:00
Tim Donohue
4636410894 Merge pull request #9516 from DSpace/backport-9515-to-dspace-7_x
[Port dspace-7_x] Fix SWORDv2 Deletion for Workflow / Archived Items
2024-04-30 11:27:28 -05:00
Tim Donohue
67d7c0bf3b Fix deletion by only cleaning up wrapper for Workspace/workflow items
(cherry picked from commit 5c13569d0f)
2024-04-30 16:00:25 +00:00
Tim Donohue
07377d12c8 Add ITs which test SWORD deletion for workspace vs workflow items (we already have a test for archived items)
(cherry picked from commit 70b0a28749)
2024-04-30 16:00:25 +00:00
Tim Donohue
0434cd9c92 Merge pull request #9513 from DSpace/backport-9285-to-dspace-7_x
[Port dspace-7_x] Fix deleting workspace items via SWORDv2 endpoint
2024-04-30 10:59:12 -05:00
Yana De Pauw
435988ca00 Swap the delete and constraint db lines 2024-04-30 16:40:47 +02:00
Tim Donohue
74c43d4027 Merge pull request #9512 from DSpace/backport-9229-to-dspace-7_x
[Port dspace-7_x] [DS-3439] Copy collection template item specified metadata during …
2024-04-29 17:09:36 -05:00
Agustina Martinez
849a252fa8 Update ContainerManagerDSpace.java
Remove duplicate item.delete call that causes hibernate errors as item is already deleted

(cherry picked from commit 57032050b9)
2024-04-29 22:02:08 +00:00
haoueclf
2f99646417 [DS-3439] Copy collection template item specified metadata during Sword v2 METS deposit ingestion.
(cherry picked from commit 7ead4ae7f0)
2024-04-29 21:42:21 +00:00
DSpace Bot
75c688daef [Port dspace-7_x] Drop not null for EPerson in Process table (#9510)
* Set EPerson nullable in ProcessTable

(cherry picked from commit 9ed997d2dd)

* chore: Remove nullable = false in EPerson Entity

(cherry picked from commit f1a38c2485)

* chore: Avoid NPE when getEPerson is called

(cherry picked from commit 2f9ad72298)

* test: Add test for insert nullable EPerson in Process' table

(cherry picked from commit 8fe264ee69)

* Revert "Set EPerson nullable in ProcessTable"

This reverts commit aea7b9385b6c6972b0ac27e061d082bb92eaf4a6.

(cherry picked from commit 7de931c7be)

* feat: Drop NOT NULL for user_id in Process table

(cherry picked from commit 3b73786c55)

* chore: add endline

(cherry picked from commit 27ed14c38c)

* fix: add headers file

(cherry picked from commit a3ea7cbaaa)

* Rename file sql

(cherry picked from commit eb22285924)

* Rename sql script to 7.6.x

(cherry picked from commit d2ef87eab6)

* fix: Set fetch lazy in EPerson Process

(cherry picked from commit d6340403ff)

* fix: set the user attached to a process to null if none is found in the DB

(cherry picked from commit afb734df5f)

---------

Co-authored-by: Roy Bruschini <r.bruschini@key2.it>
Co-authored-by: Jens Vannerum <jens.vannerum@atmire.com>
2024-04-29 14:31:20 -05:00
Kristof De Langhe
d139d06c58 105866: test fixes 2024-04-29 12:58:20 +02:00
Yana De Pauw
9d12600d13 [Ticket 2124] Slow response times 2024-04-26 17:09:00 +02:00
Toni Prieto
10aa318919 Add comment to clarify in which use case the consumer submissionconfig is useful 2024-04-26 14:50:30 +02:00
Toni Prieto
1cfa041a31 Remove unused function findAllCollectionsByEntityType of CollectionService 2024-04-26 14:50:17 +02:00
Tim Donohue
9c0281018c Merge pull request #9500 from DSpace/backport-9406-to-dspace-7_x
[Port dspace-7_x] Change from openjdk to eclipse-temurin base images
2024-04-24 14:00:05 -05:00
Thomas Misilo
362c80136b Change from openjdk to eclipse-temurin base images
Since the opendjk image has been deprecated, it was suggested to change to eclipse-temurin

Fixes #9277

(cherry picked from commit 86ca5aabf9)
2024-04-24 18:23:29 +00:00
Yana De Pauw
80a7e48536 Merge remote-tracking branch 'upstream/dspace-7_x' into w2p-106812_enforce-resource-policies-to-have-group-or-eperson 2024-04-24 17:06:14 +02:00
Tim Donohue
13d2a96443 Merge pull request #9494 from DSpace/backport-9492-to-dspace-7_x
[Port dspace-7_x] Remove unnecessary "exit" statements which stop running Postgres container
2024-04-22 15:53:23 -05:00
Tim Donohue
b1fb884aec Remove unnecessary "exit" statements which stop running container
(cherry picked from commit 11158ae525)
2024-04-22 20:03:02 +00:00
Tim Donohue
6755b0e77f Merge pull request #9491 from tdonohue/docker_fixes_7x
Fixes to Docker scripts for DSpace 7.x
2024-04-22 11:24:43 -05:00
Tim Donohue
69f7f85def Minor fixes to DB scripts. Use Postgres 15. Don't error out if pgcrypto already installed. 2024-04-22 10:50:21 -05:00
Tim Donohue
d5e2c71da4 Minor fixes to Entities import. MUST run "ignored" migrations. Also modifying submission configs no longer needed 2024-04-22 10:50:15 -05:00
Toni Prieto
770b38c793 Add test for item process submission forms mapped by entityType 2024-04-19 22:35:55 +02:00
Toni Prieto
1a65dfb15b Remove the consumer submissionconfig from default configuration because it is not needed to reload forms if a collection entitytype is changed 2024-04-19 21:39:19 +02:00
Toni Prieto
cf6008271a Refactor SubmissionConfigReader to use a map for the collections configured through the entityType value 2024-04-19 21:38:31 +02:00
Toni Prieto
15d9d1c042 Port from #9259 the changes to use a collection object to return the item process submission configured 2024-04-19 21:03:45 +02:00
Andrea Bollini
23ee2fd6cd DURACOM-249 fix checkstyle issues, add javadoc 2024-04-19 07:58:01 +02:00
Andrea Bollini
e82b94fa43 Add support for LazyDownload of files from S3 2024-04-19 07:58:01 +02:00
David P. Steelman
9b47b2215c Fix OpenSearch NullPointerException for unknown valid UUIDs in scope
Fixes a NullPointerException when the "scope" parameter provided to
the OpenSearch endpoint is a valid UUID, but is not a UUID associated
with a Community or Collection.

Instead of throwing a NullPointerException, this change modifies the
code to return a null scope (resulting in an "unscoped" OpenSearch
request), which is the same behavior that occurs when the UUID
is invalid, or otherwise not usable.
2024-04-17 13:55:34 -04:00
Tim Donohue
15e246ae88 Merge pull request #9474 from DSpace/backport-9473-to-dspace-7_x
[Port dspace-7_x] Add Space in ePerson's Name in Rejection Emails and Metadata
2024-04-12 16:11:48 -05:00
Tom Misilo
8d45c1f94d Add Space in ePerson's Name for rejection metadata and email
(cherry picked from commit ec3089dc4d)
2024-04-12 21:04:37 +00:00
Tim Donohue
3160e42ff9 Merge pull request #9465 from DSpace/backport-9344-to-dspace-7_x
[Port dspace-7_x] httpd-shibd-foreground.sh needs to be executable
2024-04-10 15:13:44 -05:00
Thomas Misilo
2f7ee4bc76 httpd-shibd-foreground.sh needs to be executable
In order for the shib container to start, the file that is running needs to be executable

(cherry picked from commit 3f9274f23f)
2024-04-10 19:46:21 +00:00
Tim Donohue
68bb3c5583 Merge pull request #9269 from atmire/w2p-90830-104654_issue-8125_pr-8267_Issue-stale-record-cleanup-7.x
7.x - Issue predb status cleanup
2024-04-10 12:57:07 -05:00
Tim Donohue
2afc9b158e Docker build IDs must all be unique to avoid image conflicts. Avoid conflict with "-loadsql" build by appending "-prod" on main build id. 2024-04-10 09:27:46 -05:00
Tim Donohue
7c505e113e Docker build IDs must all be unique to avoid image conflicts. Ensure no builds use a generic name like "dspace". 2024-04-09 15:04:46 -05:00
Tim Donohue
92c71df5a4 Merge pull request #9463 from DSpace/backport-9462-to-dspace-7_x
[Port dspace-7_x] Refactor SubmissionConfigConsumer to avoid reload the submission config multiple times
2024-04-09 14:26:27 -05:00
Toni Prieto
e22bf93a97 Refactor SubmissionConfigConsumer to avoid reload the submission config multiple times during the creation of a collection
(cherry picked from commit 00d0a01e1f)
2024-04-09 19:21:52 +00:00
Tim Donohue
49e54eb34f Ensure build digest name does NOT have slashes by changing arch to use dashes 2024-04-09 12:37:50 -05:00
Tim Donohue
cae7eeaee9 Merge pull request #9461 from DSpace/backport-9460-to-dspace-7_x
[Port dspace-7_x] Fix bug in Docker `amd64` build in GitHub Actions
2024-04-09 11:55:49 -05:00
Tim Donohue
a1d7c47f1e Fix Docker build by ensuring all artifacts are named with architecture (amd64 vs arm64)
(cherry picked from commit f4edf92860)
2024-04-09 16:53:46 +00:00
Tim Donohue
51c43602ef Merge pull request #9459 from tdonohue/port_9454_to_7x
[Port dspace-7_x] Update all GitHub Actions & add token for Codecov.io
2024-04-09 09:54:55 -05:00
Tim Donohue
5aa32dfd5a Update all GitHub Actions. Add newly required CODECOV_TOKEN to codecov action 2024-04-08 17:06:08 -05:00
Paulo Graça
9779c175db Replace organisation->organization 2024-04-08 16:44:43 +01:00
Tim Donohue
a6dd759ee6 Merge pull request #9448 from DSpace/backport-9271-to-dspace-7_x
[Port dspace-7_x] Fix generating versioned identifiers if pre-registration is enabled
2024-04-04 14:42:36 -05:00
Agustina Martinez
acfe272fbc Fix generating versioned identifiers if pre-registration is enabled
(cherry picked from commit 1844fd28a0)
2024-04-04 19:02:43 +00:00
Paulo Graça
48079d70a9 adding Unicode filtering for sorts 2024-03-22 12:19:43 +00:00
Alan Orth
a75717fc08 Merge pull request #9423 from DSpace/backport-9409-to-dspace-7_x
[Port dspace-7_x] Bump org.apache.solr:solr-solrj from 8.11.2 to 8.11.3
2024-03-20 10:27:59 +03:00
dependabot[bot]
3817f3ff9d Bump org.apache.solr:solr-solrj from 8.11.2 to 8.11.3
Bumps org.apache.solr:solr-solrj from 8.11.2 to 8.11.3.

---
updated-dependencies:
- dependency-name: org.apache.solr:solr-solrj
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit e934557966)
2024-03-20 06:59:09 +00:00
Alan Orth
889f3997bd Merge pull request #9422 from saschaszott/patch-30
dependency update: Spring Framework v5.3.32 → v5.3.33
2024-03-20 08:15:33 +03:00
Sascha Szott
78d8e86369 upgrade to Spring Framework v5.3.33 2024-03-19 15:18:28 +01:00
Martin Walk
b36613951b Fix #9383: Set email subject for request copy form 2024-02-29 15:21:15 +01:00
Tim Donohue
f46f49a3cc Merge pull request #9380 from DSpace/backport-9363-to-dspace-7_x
[Port dspace-7_x] Bump org.eclipse.jetty.http2:http2-common from 9.4.53.v20231009 to 9.4.54.v20240208
2024-02-28 13:48:27 -06:00
Tim Donohue
10eb906099 Merge pull request #9379 from DSpace/backport-9350-to-dspace-7_x
[Port dspace-7_x] Bump org.postgresql:postgresql from 42.6.0 to 42.7.2
2024-02-28 13:20:21 -06:00
dependabot[bot]
678aa9bad5 Bump org.eclipse.jetty.http2:http2-common
Bumps org.eclipse.jetty.http2:http2-common from 9.4.53.v20231009 to 9.4.54.v20240208.

---
updated-dependencies:
- dependency-name: org.eclipse.jetty.http2:http2-common
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit a6e3d7a55a)
2024-02-28 18:48:28 +00:00
Tim Donohue
6dc3936acb Merge pull request #9377 from DSpace/backport-9370-to-dspace-7_x
[Port dspace-7_x] Bump org.apache.james:apache-mime4j-core from 0.8.9 to 0.8.10
2024-02-28 12:35:00 -06:00
dependabot[bot]
ae2ee43df8 Bump org.postgresql:postgresql from 42.6.0 to 42.7.2
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.6.0 to 42.7.2.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/commits)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 0b2b81682a)
2024-02-28 18:34:00 +00:00
Tim Donohue
b17596c7b3 Merge pull request #9376 from DSpace/backport-9371-to-dspace-7_x
[Port dspace-7_x] Update to latest Spring 5
2024-02-28 12:15:08 -06:00
dependabot[bot]
e28a083ef7 Bump org.apache.james:apache-mime4j-core from 0.8.9 to 0.8.10
Bumps org.apache.james:apache-mime4j-core from 0.8.9 to 0.8.10.

---
updated-dependencies:
- dependency-name: org.apache.james:apache-mime4j-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 7f91661f84)
2024-02-28 17:57:52 +00:00
Tim Donohue
26a683f4d5 Update to latest Spring 5
(cherry picked from commit 8252d05ee2)
2024-02-28 17:39:01 +00:00
kshepherd
0ef8094b07 Merge pull request #9367 from DSpace/backport-9266-to-dspace-7_x
[Port dspace-7_x] S3store is always enabled
2024-02-27 17:15:08 +13:00
frabacche
54f816e08c DURACOM-211 s3bitstoreService IT class fix
(cherry picked from commit 2beb604255)
2024-02-27 03:40:14 +00:00
frabacche
44bf7bfdb3 DURACOM-211 S3store enabling checkstyle
(cherry picked from commit 584d178a95)
2024-02-27 03:40:14 +00:00
frabacche
df66f8401d DURACOM-211 S3store enabling according to assetstore.s3.enabled config
(cherry picked from commit 772eaa7666)
2024-02-27 03:40:14 +00:00
kshepherd
e0974b9469 Merge pull request #9366 from DSpace/backport-8986-to-dspace-7_x
[Port dspace-7_x] fix: add default HandleIdentifierProvider for disabled versioning
2024-02-27 16:04:31 +13:00
Mirko Scherf
4e721bfbb0 fix: add default HandleIdentifierProvider for disabled versioning
Setting versioning.enabled = false in versioning.cfg is not enough to
disable versioning. It is also required to replace the bean class
VersionedHandleIdentifierProvider with a HandleIdentifierProvider
in identifier-service.xml. I've added one that is commented out as by
default versioning is enabled.

(cherry picked from commit 92c38de99e)
2024-02-27 02:33:26 +00:00
kshepherd
fb76988909 Merge pull request #9334 from atmire/sword-configuration-old-style-fixes-7.x
Sword configuration old style fixes 7.x
2024-02-27 14:59:37 +13:00
Tim Donohue
b1f2d5f487 Merge pull request #9364 from DSpace/backport-9336-to-dspace-7_x
[Port dspace-7_x] Add more SWORDv2 Integration Tests
2024-02-26 17:15:41 -06:00
Tim Donohue
2c57c68a81 Add more ITs to SWORDv2 to verify basic upload, edit, delete functionality. These all pass prior to any SWORDv2 refactoring
(cherry picked from commit eeee029510)
2024-02-26 22:43:34 +00:00
Tim Donohue
99aec7fffa Merge pull request #9356 from DSpace/backport-9339-to-dspace-7_x
[Port dspace-7_x] Update of DataCite crosswalk to metadata schema 4.5
2024-02-22 11:32:10 -06:00
Pascal-Nicolas Becker
ab56ad09ab Changing a comment on DIM2DataCite.xsl
(cherry picked from commit 1a567827df)
2024-02-22 16:05:55 +00:00
Yannick Paulsen
61053cab8d Update of DataCite crosswalk to metadata schema 4.5
(cherry picked from commit 5db110a19f)
2024-02-22 16:05:55 +00:00
Alan Orth
1716d5a15b Merge pull request #9353 from DSpace/backport-9320-to-dspace-7_x
[Port dspace-7_x] Community/Collection admins can't edit logo for communities/collections
2024-02-22 16:26:19 +03:00
eskander
d172865f52 [DURACOM-232] solved Community/Collection admins can't edit logo for communities/collections
(cherry picked from commit d1812866a6)
2024-02-22 12:57:22 +00:00
Yana De Pauw
dddd500bd1 106812: Add flyway migration to remove faulty rp entries 2024-02-19 10:06:33 +01:00
Tim Donohue
80368e1467 Merge pull request #9347 from DSpace/backport-9346-to-dspace-7_x
[Port dspace-7_x] [DS-9345] Correct the package name of the IIIF search plugin
2024-02-16 11:09:41 -06:00
haoueclf
adec8e2e60 [DS-9345] Correct the package name of the IIIF search plugin
(cherry picked from commit 03fe586681)
2024-02-16 17:08:38 +00:00
Tim Donohue
9d2daafd79 Merge pull request #9337 from DSpace/backport-9263-to-dspace-7_x
[Port dspace-7_x] Repository indexing fails when item tika fulltext processing fails with error
2024-02-15 16:59:57 -06:00
mohamed eskander
14f593e097 [DURACOM-143] Fix license
(cherry picked from commit 324d2e3184)
2024-02-15 22:32:50 +00:00
mohamed eskander
b97b093d6c [DURACOM-143] Fix indexing errors & further improvements
(cherry picked from commit d645939baf)
2024-02-15 22:32:50 +00:00
Marie Verdonck
16d44370f1 Merge remote-tracking branch 'origin/dspace-7_x' into sword-configuration-old-style-fixes-7.x 2024-02-15 18:37:58 +01:00
Marie Verdonck
2cbcf9006d SWORD config fixes: Instances where old style module/fileName, configName params are used from long-deprecated ConfigurationManager instead of configName, defaultValue 2024-02-15 18:36:45 +01:00
Marie Verdonck
124a05b16f Merge remote-tracking branch 'atmire/w2p-111719_sword-embargo-bugfix' into sword-configuration-old-style-fixes-7.6 2024-02-15 18:32:11 +01:00
Yana De Pauw
4942fd272c 106812: Fix compile issue due to new test 2024-02-15 10:31:04 +01:00
Yana De Pauw
24cd78469c Merge remote-tracking branch 'upstream/dspace-7_x' into w2p-106812_enforce-resource-policies-to-have-group-or-eperson 2024-02-15 10:08:39 +01:00
Tim Donohue
b60d66d508 Merge pull request #9325 from DSpace/backport-8896-to-dspace-7_x
[Port dspace-7_x] Fast fail error when creating administrator, if there is no database connection
2024-02-13 09:27:07 -06:00
MajoBerger
09357b133e added failsafe while creating admin when db is not connected
(cherry picked from commit efcf9dba20)
2024-02-12 22:51:11 +00:00
Tim Donohue
6f380ec011 Merge pull request #9310 from DSpace/backport-9309-to-dspace-7_x
[Port dspace-7_x] Improve default identifiers.cfg properties
2024-02-07 11:48:36 -06:00
Kim Shepherd
6624248c7a Improve default identifiers.cfg properties
(Related to dspace-angular#2765)

(cherry picked from commit 40b7427d88)
2024-02-07 16:59:22 +00:00
Tim Donohue
c1f9206c0a Merge pull request #9308 from DSpace/backport-9278-to-dspace-7_x
[Port dspace-7_x] Bump com.jayway.jsonpath:json-path from 2.6.0 to 2.9.0
2024-02-07 08:47:23 -06:00
Koen Pauwels
1dada28c89 111719 Fix bug where old style of retrieving config value was being used 2024-02-07 14:35:46 +01:00
dependabot[bot]
6d5949729d Bump com.jayway.jsonpath:json-path from 2.6.0 to 2.9.0
Bumps [com.jayway.jsonpath:json-path](https://github.com/jayway/JsonPath) from 2.6.0 to 2.9.0.
- [Release notes](https://github.com/jayway/JsonPath/releases)
- [Changelog](https://github.com/json-path/JsonPath/blob/master/changelog.md)
- [Commits](https://github.com/jayway/JsonPath/compare/json-path-2.6.0...json-path-2.9.0)

---
updated-dependencies:
- dependency-name: com.jayway.jsonpath:json-path
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit db56de3887)
2024-02-06 22:49:57 +00:00
Tim Donohue
a9e3a354df Merge pull request #9307 from DSpace/backport-9225-to-dspace-7_x
[Port dspace-7_x] Bump dependencies
2024-02-06 12:23:14 -06:00
Alan Orth
9274a11759 dspace-server-webapp/pom.xml: upgrade zjsonpatch
Upgrade zjsonpatch from v0.4.6 to v0.4.16.

(cherry picked from commit 20fc8e4fb7)
2024-02-06 16:30:00 +00:00
Alan Orth
762c0397fe pom.xml: update commons-dbcp2 and commons-pool2
Update commons-dbcp2 and commons-pool2 to latest stable versions.

(cherry picked from commit bafb1b5657)
2024-02-06 16:30:00 +00:00
Alan Orth
c5398670f9 pom.xml: bump jackson version
Bump jackson-core and jackson-databind to v2.16.0.

(cherry picked from commit b90f043744)
2024-02-06 16:30:00 +00:00
renovate[bot]
bdb19787bb Update dependency org.apache.commons:commons-collections4 to v4.4
(cherry picked from commit 6de85adeb7)
2024-02-06 16:30:00 +00:00
renovate[bot]
1f67a2bffe Update dependency org.apache.commons:commons-configuration2 to v2.9.0
(cherry picked from commit b583029a7d)
2024-02-06 16:30:00 +00:00
renovate[bot]
186453eb3f Update dependency commons-logging:commons-logging to v1.3.0
(cherry picked from commit e76132b4d8)
2024-02-06 16:30:00 +00:00
renovate[bot]
4682db506e Update dependency org.apache.commons:commons-lang3 to v3.14.0
(cherry picked from commit 3f675d9cd5)
2024-02-06 16:30:00 +00:00
renovate[bot]
4dcbe16e24 Update dependency org.webjars.bowergithub.jquery:jquery-dist to v3.7.1
(cherry picked from commit 6d0b5deb8e)
2024-02-06 16:30:00 +00:00
renovate[bot]
9cb4eac802 Update dependency org.webjars.bowergithub.twbs:bootstrap to v4.6.2
(cherry picked from commit 2c1a45bc88)
2024-02-06 16:30:00 +00:00
renovate[bot]
88edfbbfdf Update dependency org.apache.maven.plugins:maven-assembly-plugin to v3.6.0
(cherry picked from commit 275757e6d4)
2024-02-06 16:30:00 +00:00
renovate[bot]
752d94efb4 Update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.3.1
(cherry picked from commit ae12f1865f)
2024-02-06 16:30:00 +00:00
Alan Orth
c7c8062f01 Update hamcrest to v2.2
Due to changes in hamcrest packaging we only need the main artifact
now, but we add hamcrest-core (which is an empty pom) so it doesn't
get pulled in by other deps. Last, the hamcrest docs recommend that
we put hamcrest first so that we don't have dependency convergence
issues from junit.

See: https://hamcrest.org/JavaHamcrest/distributables
(cherry picked from commit 710feb798d)
2024-02-06 16:30:00 +00:00
renovate[bot]
b2494c6be2 Update json-path.version to v2.8.0
(cherry picked from commit 8809e98a18)
2024-02-06 16:30:00 +00:00
renovate[bot]
5342d54075 Update dependency org.apache.ant:ant to v1.10.14
(cherry picked from commit 4e071b2428)
2024-02-06 16:30:00 +00:00
Alan Orth
487202e246 pom.xml: update spotbugs and spotbugs-maven-plugin
Update to latest versions:

- spotbugs v4.1.2→v4.8.2
- spotbugs-maven-plugin v4.0.4→v4.8.2.0

These are not run in CI and seem to only run manually when asked,
ie via maven:

    $ mvn spotbugs:spotbugs

(cherry picked from commit fc6a9ca5cb)
2024-02-06 16:30:00 +00:00
Alan Orth
b603776a08 pom.xml: update Spring
We need to keep Spring Framework, Spring Boot, and Spring Security
versions updated together:

- Spring Framework: 5.3.28→5.3.31
- Spring Boot: 2.7.13→2.7.18
- Spring Security: 5.7.9→5.7.11

(cherry picked from commit f42a981d1b)
2024-02-06 16:30:00 +00:00
renovate[bot]
4840b1de83 Update netty monorepo to v4.1.106.Final
(cherry picked from commit 71ea2a7526)
2024-02-06 16:29:59 +00:00
renovate[bot]
a77628bd1e Update dependency com.maxmind.geoip2:geoip2 to v2.17.0
(cherry picked from commit 68caa1dcf8)
2024-02-06 16:29:59 +00:00
renovate[bot]
28d051e88d Update dependency org.xmlunit:xmlunit-core to v2.9.1
(cherry picked from commit 0958a98b1f)
2024-02-06 16:29:59 +00:00
renovate[bot]
8edd8bc09b Update dependency com.fasterxml:classmate to v1.6.0
(cherry picked from commit 07ec54832a)
2024-02-06 16:29:59 +00:00
renovate[bot]
279a315301 Update log4j.version to v2.22.1
(cherry picked from commit a697813720)
2024-02-06 16:29:59 +00:00
renovate[bot]
ed74d3198c Update dependency commons-io:commons-io to v2.15.1
(cherry picked from commit 70646a30de)
2024-02-06 16:29:59 +00:00
renovate[bot]
f7c7abc362 Update dependency com.opencsv:opencsv to v5.9
(cherry picked from commit ab9279cbb8)
2024-02-06 16:29:59 +00:00
renovate[bot]
602e9e854f Update dependency commons-cli:commons-cli to v1.6.0
(cherry picked from commit f67e0f6509)
2024-02-06 16:29:59 +00:00
renovate[bot]
a50534d617 Update pdfbox-version to v2.0.30
(cherry picked from commit fe7800ab5a)
2024-02-06 16:29:59 +00:00
renovate[bot]
7a38f0097d Update dependency org.glassfish.jaxb:jaxb-runtime to v2.3.9
(cherry picked from commit 8d6f6e37b3)
2024-02-06 16:29:59 +00:00
renovate[bot]
0d1dd13c84 Update dependency com.h2database:h2 to v2.2.224
(cherry picked from commit 0d4c1ea63a)
2024-02-06 16:29:59 +00:00
Tim Donohue
d928d8c672 Merge pull request #9305 from tdonohue/port_8884_to_7x
[Port dspace-7_x] Bump dependencies
2024-02-06 09:09:35 -06:00
renovate[bot]
79178e3b62 Update pdfbox-version to v2.0.29 2024-02-05 17:10:57 -06:00
Alan Orth
16b1104b01 pom.xml: bump spring core version to v5.3.28
Minor version bump with some bug fixes.

See: https://github.com/spring-projects/spring-framework/releases/tag/v5.3.28
2024-02-05 17:10:57 -06:00
Alan Orth
ad061c962b pom.xml: update spring boot to v2.7.13
Minor update. Also bump the spring security version to 5.7.9 as is
used by spring boot.

See: https://github.com/spring-projects/spring-boot/releases/tag/v2.7.13
2024-02-05 17:10:57 -06:00
renovate[bot]
972c2d69c8 Update dependency commons-codec:commons-codec to v1.16.0 2024-02-05 17:10:57 -06:00
renovate[bot]
5152e99bda Update dependency org.exparity:hamcrest-date to v2.0.8 2024-02-05 17:10:57 -06:00
renovate[bot]
af29486965 Update dependency commons-io:commons-io to v2.13.0 2024-02-05 17:10:57 -06:00
renovate[bot]
e92e5ee6d8 Update dependency org.scala-lang:scala-library to v2.13.11 2024-02-05 17:10:57 -06:00
renovate[bot]
6b4e5ed9c8 Update dependency org.apache.bcel:bcel to v6.7.0 2024-02-05 17:10:57 -06:00
Alan Orth
096fb3fb74 Bump jaxen:jaxen dependency to 2.0.0
Should be mostly drop-in API compatible with Jaxen 1.1.x, but more
importantly it makes the xom dependency optional so we can remove
the exclusions in our various pom.xml files.

See: http://cafeconleche.org/jaxen/releases.html
2024-02-05 17:10:57 -06:00
Alan Orth
69e1ff98a0 Bump xom:xom dependency
No breaking changes, but some bug fixes, performance improvements,
and compatibility fixes with Java 17+.

See: https://xom.nu/history.html
2024-02-05 17:10:57 -06:00
renovate[bot]
7b0b21f84d Update dependency org.webjars.bowergithub.jquery:jquery-dist to v3.7.0 2024-02-05 17:10:57 -06:00
renovate[bot]
fe8c3ef388 Update dependency com.fasterxml:classmate to v1.5.1 2024-02-05 17:10:57 -06:00
renovate[bot]
36c042bc98 Update dependency org.webjars.bowergithub.medialize:uri.js to v1.19.11 2024-02-05 17:10:57 -06:00
Alan Orth
f9469c9b6f dspace-api/pom.xml: add exclusion for javassist
Add an exclusion for org.javassist:javassist due to a dependency
convergence error caused by eu.openaire:funders-model pulling in a
version conflicting with Jersey's transitive dependency.
2024-02-05 17:10:57 -06:00
Alan Orth
8e66812dbb pom.xml: bump Jersey
Bump jersey due to jersey-media-json-jackson pulling in a conflicting
jakarta.xml.bind-api via transitive dependency in dspace-rest, which
is the legacy DSpace 6 REST API.
2024-02-05 17:10:57 -06:00
renovate[bot]
b5a59c76e8 Update dependency joda-time:joda-time to v2.12.5 2024-02-05 17:10:57 -06:00
renovate[bot]
a9a8021cf6 Update dependency commons-cli:commons-cli to v1.5.0 2024-02-05 17:10:57 -06:00
renovate[bot]
167033d830 Update dependency commons-codec:commons-codec to v1.15 2024-02-05 17:10:57 -06:00
renovate[bot]
8895aca3eb Update dependency commons-validator:commons-validator to v1.7 2024-02-05 17:10:56 -06:00
renovate[bot]
53c4e18159 Update dependency commons-io:commons-io to v2.12.0 2024-02-05 17:10:56 -06:00
renovate[bot]
e14f267229 Update dependency org.apache.james:apache-mime4j-core to v0.8.9 2024-02-05 17:10:56 -06:00
renovate[bot]
ba95c1852f Update dependency org.glassfish.jaxb:jaxb-runtime to v2.3.8 2024-02-05 17:10:56 -06:00
renovate[bot]
91f9d8c4dd Update dependency com.opencsv:opencsv to v5.7.1 2024-02-05 17:10:56 -06:00
renovate[bot]
e2d809ffb4 Update dependency org.flywaydb:flyway-core to v8.5.13 2024-02-05 17:10:56 -06:00
renovate[bot]
bbe05833a9 Update dependency org.ehcache:ehcache to v3.10.8 2024-02-05 17:10:56 -06:00
Alan Orth
95ac7dea42 pom.xml: bump org.apache.httpcomponents
Closes: https://github.com/alanorth/DSpace/pull/21
Closes: https://github.com/alanorth/DSpace/pull/22
Closes: https://github.com/alanorth/DSpace/pull/23
2024-02-05 17:10:56 -06:00
renovate[bot]
969bee4871 Update dependency junit:junit to v4.13.2 2024-02-05 17:10:56 -06:00
renovate[bot]
be7bdcf398 Update dependency org.apache.ant:ant to v1.10.13 2024-02-05 17:10:56 -06:00
renovate[bot]
84452a97d8 Update dependency net.handle:handle to v9.3.1 2024-02-05 17:10:56 -06:00
renovate[bot]
aeb5300c6f Update dependency javax.cache:cache-api to v1.1.1 2024-02-05 17:10:56 -06:00
Alan Orth
bd7214ad1f pom.xml: bump com.google.code.findbugs:jsr305
Closes: https://github.com/alanorth/DSpace/pull/12
2024-02-05 17:10:56 -06:00
renovate[bot]
5893c7768e Update dependency dnsjava:dnsjava to v2.1.9 2024-02-05 17:10:56 -06:00
renovate[bot]
774f3bbcd5 Update dependency de.digitalcollections.iiif:iiif-apis to v0.3.10 2024-02-05 17:09:59 -06:00
renovate[bot]
3bfcf82977 Update dependency com.flipkart.zjsonpatch:zjsonpatch to v0.4.14 2024-02-05 17:09:44 -06:00
Tim Donohue
66a4a036e0 Merge pull request #9304 from tdonohue/port_9303_to_7x
[Port dspace-7_x] Fix Docker image build issues for new versions of Docker (25.0.2) and Docker Compose (2.24.3)
2024-02-02 15:53:17 -06:00
Tim Donohue
414837a12a Fix 'dspacesolr' build issues in GitHub actions by adding 'solrconfig' as an additional_context 2024-02-02 14:47:15 -06:00
Tim Donohue
250e82af9d Fix build issues with dockersolr by using "additional_contexts" to pass solr config path to Dockerfile. 2024-02-02 14:45:55 -06:00
Tim Donohue
a0ba470197 Fix "cannot override networks.dspacenet" by updating all compose files to reference 'dspacenet' network 2024-02-02 14:43:09 -06:00
Tim Donohue
f46742510b Merge pull request #9297 from DSpace/backport-9293-to-dspace-7_x
[Port dspace-7_x] Call cas.init() method in the VocabularyRestRepositoryIT#setup method
2024-01-29 12:19:04 -06:00
milanmajchrak
2549663081 The cas.init() method is called in the VocabularyRestRepositoryIT#setup() method
(cherry picked from commit 85b5e06fb0)
2024-01-29 17:52:28 +00:00
Alan Orth
5f7af6b3fc Merge pull request #9280 from DSpace/backport-9276-to-dspace-7_x
[Port dspace-7_x] Search on the label of an authority, not the value in a submission context
2024-01-23 11:48:44 +03:00
Jens Vannerum
a22a01aa5c search on labels, not values on DCInputs
(cherry picked from commit 5ebe1a9402)
2024-01-23 08:05:25 +00:00
Tim Donohue
c509d495b1 Merge pull request #9270 from DSpace/backport-9261-to-dspace-7_x
[Port dspace-7_x] DS-9142: prevent UUID exception by adding check for -1 value for the id field
2024-01-19 09:43:45 -06:00
nwoodward
dc57aceeaf catch exceptions stemming from invalid id's
(cherry picked from commit 848df25984)
2024-01-19 15:15:26 +00:00
Marie Verdonck
4fc19da34a Merge remote-tracking branch 'origin/dspace-7_x' into w2p-90830-104654_issue-8125_pr-8267_Issue-stale-record-cleanup-7.x 2024-01-18 19:36:57 +01:00
Marie Verdonck
91f53c2287 90830/104654: issue PR#8267 - Only first 10 predb records resynced (default size) - Fix:
- Query with 0 rows to get total number of records to process
- Process them in batches of 100
2023-12-29 05:58:25 +01:00
Marie Verdonck
7536537206 90830/104654: issue PR#8267 - Only first 10 predb records resynced (default size) - IT proving issue 2023-12-29 05:55:48 +01:00
Yana De Pauw
9b1234fc85 106812: Remove stray settting of group for an rp 2023-11-10 14:05:38 +01:00
Yana De Pauw
9880e697b6 106812: Add h2 sql file 2023-09-29 15:36:53 +02:00
Yana De Pauw
1cf13e3bfe 106812: Fix old rest resource policy creations 2023-09-29 11:44:29 +02:00
Yana De Pauw
b923e13726 106812: Fix and add new tests 2023-09-29 10:36:43 +02:00
Yana De Pauw
16159f3761 106812: Refactor resource policies to have either group or eperson 2023-09-28 15:07:14 +02:00
603 changed files with 16024 additions and 11900 deletions

118
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,118 @@
#-------------------
# DSpace's dependabot rules. Enables maven updates for all dependencies on a weekly basis
# for main and any maintenance branches. Security updates only apply to main.
#-------------------
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
# Allow up to 10 open PRs for dependencies
open-pull-requests-limit: 10
# Group together some upgrades in a single PR
groups:
# Group together all Build Tools in a single PR
build-tools:
applies-to: version-updates
patterns:
- "org.apache.maven.plugins:*"
- "*:*-maven-plugin"
- "*:maven-*-plugin"
- "com.github.spotbugs:spotbugs"
- "com.google.code.findbugs:*"
- "com.google.errorprone:*"
- "com.puppycrawl.tools:checkstyle"
- "org.sonatype.plugins:*"
exclude-patterns:
# Exclude anything from Spring, as that is in a separate group
- "org.springframework.*:*"
update-types:
- "minor"
- "patch"
test-tools:
applies-to: version-updates
patterns:
- "junit:*"
- "com.github.stefanbirker:system-rules"
- "com.h2database:*"
- "io.findify:s3mock*"
- "io.netty:*"
- "org.hamcrest:*"
- "org.mock-server:*"
- "org.mockito:*"
update-types:
- "minor"
- "patch"
# Group together all Apache Commons deps in a single PR
apache-commons:
applies-to: version-updates
patterns:
- "org.apache.commons:*"
- "commons-*:commons-*"
update-types:
- "minor"
- "patch"
# Group together all fasterxml deps in a single PR
fasterxml:
applies-to: version-updates
patterns:
- "com.fasterxml:*"
- "com.fasterxml.*:*"
update-types:
- "minor"
- "patch"
# Group together all Hibernate deps in a single PR
hibernate:
applies-to: version-updates
patterns:
- "org.hibernate.*:*"
update-types:
- "minor"
- "patch"
# Group together all Jakarta deps in a single PR
jakarta:
applies-to: version-updates
patterns:
- "jakarta.*:*"
- "org.eclipse.angus:jakarta.mail"
- "org.glassfish.jaxb:jaxb-runtime"
update-types:
- "minor"
- "patch"
# Group together all Google deps in a single PR
google-apis:
applies-to: version-updates
patterns:
- "com.google.apis:*"
- "com.google.api-client:*"
- "com.google.http-client:*"
- "com.google.oauth-client:*"
update-types:
- "minor"
- "patch"
# Group together all Spring deps in a single PR
spring:
applies-to: version-updates
patterns:
- "org.springframework:*"
- "org.springframework.*:*"
update-types:
- "minor"
- "patch"
# Group together all WebJARs deps in a single PR
webjars:
applies-to: version-updates
patterns:
- "org.webjars:*"
- "org.webjars.*:*"
update-types:
- "minor"
- "patch"
ignore:
# Don't try to auto-update any DSpace dependencies
- dependency-name: "org.dspace:*"
- dependency-name: "org.dspace.*:*"
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
- dependency-name: "*"
update-types: ["version-update:semver-major"]

View File

@@ -49,7 +49,7 @@ jobs:
# https://github.com/actions/setup-java
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
@@ -65,14 +65,14 @@ jobs:
# (This artifact is downloadable at the bottom of any job's summary page)
- name: Upload Results of ${{ matrix.type }} to Artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type }} results
path: ${{ matrix.resultsdir }}
# Upload code coverage report to artifact, so that it can be shared with the 'codecov' job (see below)
- name: Upload code coverage report to Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type }} coverage report
path: 'dspace/target/site/jacoco-aggregate/jacoco.xml'
@@ -91,7 +91,7 @@ jobs:
# Download artifacts from previous 'tests' job
- name: Download coverage artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
# Now attempt upload to Codecov using its action.
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
@@ -101,10 +101,11 @@ jobs:
- name: Upload coverage to Codecov.io
uses: Wandalen/wretry.action@v1.3.0
with:
action: codecov/codecov-action@v3
action: codecov/codecov-action@v4
# Ensure codecov-action throws an error when it fails to upload
with: |
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
# Try re-running action 5 times max
attempt_limit: 5
# Run again in 30 seconds

View File

@@ -39,7 +39,7 @@ jobs:
# https://github.com/actions/setup-java
- name: Install JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
@@ -47,7 +47,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
# https://github.com/github/codeql-action
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
# Codescan Javascript as well since a few JS files exist in REST API's interface
languages: java, javascript
@@ -56,8 +56,8 @@ jobs:
# NOTE: Based on testing, this autobuild process works well for DSpace. A custom
# DSpace build w/caching (like in build.yml) was about the same speed as autobuild.
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# Perform GitHub Code Scanning.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View File

@@ -15,6 +15,7 @@ on:
permissions:
contents: read # to fetch code (actions/checkout)
packages: write # to write images to GitHub Container Registry (GHCR)
jobs:
####################################################
@@ -43,7 +44,7 @@ jobs:
needs: dspace-dependencies
uses: ./.github/workflows/reusable-docker-build.yml
with:
build_id: dspace
build_id: dspace-prod
image_name: dspace/dspace
dockerfile_path: ./Dockerfile
secrets:
@@ -102,6 +103,8 @@ jobs:
build_id: dspace-solr
image_name: dspace/dspace-solr
dockerfile_path: ./dspace/src/main/docker/dspace-solr/Dockerfile
# Must pass solrconfigs to the Dockerfile so that it can find the required Solr config files
dockerfile_additional_contexts: 'solrconfigs=./dspace/solr/'
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -118,7 +121,7 @@ jobs:
if: github.repository == 'dspace/dspace'
uses: ./.github/workflows/reusable-docker-build.yml
with:
build_id: dspace-postgres-pgcrypto
build_id: dspace-postgres-pgcrypto-prod
image_name: dspace/dspace-postgres-pgcrypto
# Must build out of subdirectory to have access to install script for pgcrypto.
# NOTE: this context will build the image based on the Dockerfile in the specified directory
@@ -145,4 +148,114 @@ jobs:
tags_flavor: suffix=-loadsql
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
#################################################################################
# Test Deployment via Docker to ensure newly built images are working properly
#################################################################################
docker-deploy:
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace'
if: github.repository == 'dspace/dspace'
runs-on: ubuntu-latest
# Must run after all major images are built
needs: [dspace, dspace-test, dspace-cli, dspace-postgres-pgcrypto, dspace-solr]
env:
# Override defaults dspace.server.url because backend starts at http://127.0.0.1:8080
dspace__P__server__P__url: http://127.0.0.1:8080/server
# Enable all optional modules / controllers for this test deployment.
# This helps check for errors in deploying these modules via Spring Boot
iiif__P__enabled: true
oai__P__enabled: true
rdf__P__enabled: true
signposting__P__enabled: true
sword__D__server__P__enabled: true
swordv2__D__server__P__enabled: true
# If this is a PR against main (default branch), use "latest".
# Else if this is a PR against a different branch, used the base branch name.
# Else if this is a commit on main (default branch), use the "latest" tag.
# Else, just use the branch name.
# NOTE: DSPACE_VER is used because our docker compose scripts default to using the "-test" image.
DSPACE_VER: ${{ (github.event_name == 'pull_request' && github.event.pull_request.base.ref == github.event.repository.default_branch && 'latest') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref) || (github.ref_name == github.event.repository.default_branch && 'latest') || github.ref_name }}
# Docker Registry to use for Docker compose scripts below.
# We use GitHub's Container Registry to avoid aggressive rate limits at DockerHub.
DOCKER_REGISTRY: ghcr.io
steps:
# Checkout our codebase (to get access to Docker Compose scripts)
- name: Checkout codebase
uses: actions/checkout@v4
# Download Docker image artifacts (which were just built by reusable-docker-build.yml)
- name: Download Docker image artifacts
uses: actions/download-artifact@v4
with:
# Download all amd64 Docker images (TAR files) into the /tmp/docker directory
pattern: docker-image-*-linux-amd64
path: /tmp/docker
merge-multiple: true
# Load each of the images into Docker by calling "docker image load" for each.
# This ensures we are using the images just built & not any prior versions on DockerHub
- name: Load all downloaded Docker images
run: |
find /tmp/docker -type f -name "*.tar" -exec docker image load --input "{}" \;
docker image ls -a
# Start backend using our compose script in the codebase.
- name: Start backend in Docker
run: |
docker compose -f docker-compose.yml up -d
sleep 10
docker container ls
# Create a test admin account. Load test data from a simple set of AIPs as defined in cli.ingest.yml
- name: Load test data into Backend
run: |
docker compose -f docker-compose-cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en
docker compose -f docker-compose-cli.yml -f dspace/src/main/docker-compose/cli.ingest.yml run --rm dspace-cli
# Verify backend started successfully.
# 1. Make sure root endpoint is responding (check for dspace.name defined in docker-compose.yml)
# 2. Also check /collections endpoint to ensure the test data loaded properly (check for a collection name in AIPs)
- name: Verify backend is responding properly
run: |
result=$(wget -O- -q http://127.0.0.1:8080/server/api)
echo "$result"
echo "$result" | grep -oE "\"DSpace Started with Docker Compose\","
result=$(wget -O- -q http://127.0.0.1:8080/server/api/core/collections)
echo "$result"
echo "$result" | grep -oE "\"Dog in Yard\","
# Verify basic backend logging is working.
# 1. Access the top communities list. Verify that the "Before request" INFO statement is logged
# 2. Access an invalid endpoint (and ignore 404 response). Verify that a "status:404" WARN statement is logged
- name: Verify backend is logging properly
run: |
wget -O/dev/null -q http://127.0.0.1:8080/server/api/core/communities/search/top
logs=$(docker compose -f docker-compose.yml logs -n 5 dspace)
echo "$logs"
echo "$logs" | grep -o "Before request \[GET /server/api/core/communities/search/top\]"
wget -O/dev/null -q http://127.0.0.1:8080/server/api/does/not/exist || true
logs=$(docker compose -f docker-compose.yml logs -n 5 dspace)
echo "$logs"
echo "$logs" | grep -o "status:404 exception: The repository type does.not was not found"
# Verify Handle Server can be stared and is working properly
# 1. First generate the "[dspace]/handle-server" folder with the sitebndl.zip
# 2. Start the Handle Server (and wait 20 seconds to let it start up)
# 3. Verify logs do NOT include "Exception" in the text (as that means an error occurred)
# 4. Check that Handle Proxy HTML page is responding on default port (8000)
- name: Verify Handle Server is working properly
run: |
docker exec -i dspace /dspace/bin/make-handle-config
echo "Starting Handle Server..."
docker exec -i dspace /dspace/bin/start-handle-server
sleep 20
echo "Checking for errors in error.log"
result=$(docker exec -i dspace sh -c "cat /dspace/handle-server/logs/error.log* || echo ''")
echo "$result"
echo "$result" | grep -vqz "Exception"
echo "Checking for errors in handle-server.log..."
result=$(docker exec -i dspace cat /dspace/log/handle-server.log)
echo "$result"
echo "$result" | grep -vqz "Exception"
echo "Checking to see if Handle Proxy webpage is available..."
result=$(wget -O- -q http://127.0.0.1:8000/)
echo "$result"
echo "$result" | grep -oE "Handle Proxy"
# Shutdown our containers
- name: Shutdown Docker containers
run: |
docker compose -f docker-compose.yml down

View File

@@ -16,7 +16,7 @@ jobs:
# Only add to project board if issue is flagged as "needs triage" or has no labels
# NOTE: By default we flag new issues as "needs triage" in our issue template
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
uses: actions/add-to-project@v0.5.0
uses: actions/add-to-project@v1.0.0
# Note, the authentication token below is an ORG level Secret.
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token

View File

@@ -21,4 +21,4 @@ jobs:
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
# See https://github.com/toshimaru/auto-author-assign
- name: Assign PR to creator
uses: toshimaru/auto-author-assign@v2.0.1
uses: toshimaru/auto-author-assign@v2.1.0

View File

@@ -24,6 +24,12 @@ on:
dockerfile_context:
required: false
type: string
default: '.'
# Optionally a list of "additional_contexts" to pass to Dockerfile. Defaults to empty
dockerfile_additional_contexts:
required: false
type: string
default: ''
# If Docker image should have additional tag flavor details (e.g. a suffix), it may be passed in.
tags_flavor:
required: false
@@ -48,10 +54,13 @@ env:
# For a new commit on default branch (main), use the literal tag 'latest' on Docker image.
# For a new commit on other branches, use the branch name as the tag for Docker image.
# For a new tag, copy that tag name as the tag for Docker image.
# For a pull request, use the name of the base branch that the PR was created against or "latest" (for main).
# e.g. PR against 'main' will use "latest". a PR against 'dspace-7_x' will use 'dspace-7_x'.
IMAGE_TAGS: |
type=raw,value=latest,enable=${{ github.ref_name == github.event.repository.default_branch }}
type=ref,event=branch,enable=${{ github.ref_name != github.event.repository.default_branch }}
type=ref,event=tag
type=raw,value=${{ (github.event.pull_request.base.ref == github.event.repository.default_branch && 'latest') || github.event.pull_request.base.ref }},enable=${{ github.event_name == 'pull_request' }}
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# We manage the 'latest' tag ourselves to the 'main' branch (see settings above)
@@ -64,8 +73,12 @@ env:
REDEPLOY_DEMO_URL: ${{ secrets.REDEPLOY_DEMO_URL }}
# Current DSpace maintenance branch (and architecture) which is deployed to demo.dspace.org / sandbox.dspace.org
# (NOTE: No deployment branch specified for sandbox.dspace.org as it uses the default_branch)
DEPLOY_DEMO_BRANCH: 'dspace-7_x'
DEPLOY_DEMO_BRANCH: 'dspace-9_x'
DEPLOY_SANDBOX_BRANCH: 'main'
DEPLOY_ARCH: 'linux/amd64'
# Registry used during building of Docker images. (All images are later copied to docker.io registry)
# We use GitHub's Container Registry to avoid aggressive rate limits at DockerHub.
DOCKER_BUILD_REGISTRY: ghcr.io
jobs:
docker-build:
@@ -74,66 +87,87 @@ jobs:
matrix:
# Architectures / Platforms for which we will build Docker images
arch: [ 'linux/amd64', 'linux/arm64' ]
os: [ ubuntu-latest ]
isPr:
- ${{ github.event_name == 'pull_request' }}
# If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work.
# The below exclude therefore ensures we do NOT build ARM64 for PRs.
exclude:
- isPr: true
os: ubuntu-latest
arch: linux/arm64
runs-on: ${{ matrix.os }}
# If ARM64, then use the Ubuntu ARM64 runner. Otherwise, use the Ubuntu AMD64 runner
runs-on: ${{ matrix.arch == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
steps:
# This step converts the slashes in the "arch" matrix values above into dashes & saves to env.ARCH_NAME
# E.g. "linux/amd64" becomes "linux-amd64"
# This is necessary because all upload artifacts CANNOT have special chars (like slashes)
# NOTE: The regex-like syntax below is Bash Parameter Substitution
- name: Prepare
run: |
platform=${{ matrix.arch }}
echo "ARCH_NAME=${platform//\//-}" >> $GITHUB_ENV
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v4
# https://github.com/docker/login-action
# NOTE: This login occurs for BOTH non-PRs or PRs. PRs *must* also login to access private images from GHCR
# during the build process
- name: Login to ${{ env.DOCKER_BUILD_REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_BUILD_REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU emulation to build for multiple architectures
uses: docker/setup-qemu-action@v3
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: ${{ ! matrix.isPr }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
# https://github.com/docker/metadata-action
# Get Metadata for docker_build_deps step below
- name: Sync metadata (tags, labels) from GitHub to Docker for image
# Extract metadata used for Docker images in all build steps below
- name: Extract metadata (tags, labels) from GitHub for Docker image
id: meta_build
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
images: ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}
#--------------------------------------------------------------------
# First, for all branch commits (non-PRs) we build the image & upload
# to GitHub Container Registry (GHCR). After uploading the image
# to GHCR, we store the image digest in an artifact, so we can
# create a merged manifest later (see 'docker-build_manifest' job).
#
# NOTE: We use GHCR in order to avoid aggressive rate limits at DockerHub.
#--------------------------------------------------------------------
# https://github.com/docker/build-push-action
- name: Build and push image
- name: Build and push image to ${{ env.DOCKER_BUILD_REGISTRY }}
if: ${{ ! matrix.isPr }}
id: docker_build
uses: docker/build-push-action@v5
with:
context: ${{ inputs.dockerfile_context || '.' }}
build-contexts: |
${{ inputs.dockerfile_additional_contexts }}
context: ${{ inputs.dockerfile_context }}
file: ${{ inputs.dockerfile_path }}
# Tell DSpace's Docker files to use the build registry instead of DockerHub
build-args:
DOCKER_REGISTRY=${{ env.DOCKER_BUILD_REGISTRY }}
platforms: ${{ matrix.arch }}
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ ! matrix.isPr }}
push: true
# Use tags / labels provided by 'docker/metadata-action' above
tags: ${{ steps.meta_build.outputs.tags }}
labels: ${{ steps.meta_build.outputs.labels }}
# Use GitHub cache to load cached Docker images and cache the results of this build
# This decreases the number of images we need to fetch from DockerHub
cache-from: type=gha,scope=${{ inputs.build_id }}
cache-to: type=gha,scope=${{ inputs.build_id }},mode=min
# Export the digest of Docker build locally (for non PRs only)
# Export the digest of Docker build locally
- name: Export Docker build digest
if: ${{ ! matrix.isPr }}
run: |
@@ -141,53 +175,90 @@ jobs:
digest="${{ steps.docker_build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
# Upload digest to an artifact, so that it can be used in manifest below
# Upload digest to an artifact, so that it can be used in combined manifest below
# (The purpose of the combined manifest is to list both amd64 and arm64 builds under same tag)
- name: Upload Docker build digest to artifact
if: ${{ ! matrix.isPr }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: digests-${{ inputs.build_id }}
name: digests-${{ inputs.build_id }}-${{ env.ARCH_NAME }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
# If this build is NOT a PR and passed in a REDEPLOY_SANDBOX_URL secret,
# Then redeploy https://sandbox.dspace.org if this build is for our deployment architecture and 'main' branch.
- name: Redeploy sandbox.dspace.org (based on main branch)
if: |
!matrix.isPR &&
env.REDEPLOY_SANDBOX_URL != '' &&
matrix.arch == env.DEPLOY_ARCH &&
github.ref_name == github.event.repository.default_branch
run: |
curl -X POST $REDEPLOY_SANDBOX_URL
#------------------------------------------------------------------------------
# Second, we build the image again in order to store it in a local TAR file.
# This TAR of the image is cached/saved as an artifact, so that it can be used
# by later jobs to install the brand-new images for automated testing.
# This TAR build is performed BOTH for PRs and for branch commits (non-PRs).
#
# (This approach has the advantage of avoiding having to download the newly built
# image from DockerHub or GHCR during automated testing.)
#
# See the 'docker-deploy' job in docker.yml as an example of where this TAR is used.
#-------------------------------------------------------------------------------
# Build local image (again) and store in a TAR file in /tmp directory
# This step is only done for AMD64, as that's the only image we use in our automated testing (at this time).
# NOTE: This step cannot be combined with the build above as it's a different type of output.
- name: Build and push image to local TAR file
if: ${{ matrix.arch == 'linux/amd64'}}
uses: docker/build-push-action@v5
with:
build-contexts: |
${{ inputs.dockerfile_additional_contexts }}
context: ${{ inputs.dockerfile_context }}
file: ${{ inputs.dockerfile_path }}
# Tell DSpace's Docker files to use the build registry instead of DockerHub
build-args:
DOCKER_REGISTRY=${{ env.DOCKER_BUILD_REGISTRY }}
platforms: ${{ matrix.arch }}
tags: ${{ steps.meta_build.outputs.tags }}
labels: ${{ steps.meta_build.outputs.labels }}
# Use GitHub cache to load cached Docker images and cache the results of this build
# This decreases the number of images we need to fetch from DockerHub
cache-from: type=gha,scope=${{ inputs.build_id }}
cache-to: type=gha,scope=${{ inputs.build_id }},mode=min
# Export image to a local TAR file
outputs: type=docker,dest=/tmp/${{ inputs.build_id }}.tar
# If this build is NOT a PR and passed in a REDEPLOY_DEMO_URL secret,
# Then redeploy https://demo.dspace.org if this build is for our deployment architecture and demo branch.
- name: Redeploy demo.dspace.org (based on maintenace branch)
if: |
!matrix.isPR &&
env.REDEPLOY_DEMO_URL != '' &&
matrix.arch == env.DEPLOY_ARCH &&
github.ref_name == env.DEPLOY_DEMO_BRANCH
run: |
curl -X POST $REDEPLOY_DEMO_URL
# Upload the local docker image (in TAR file) to a build Artifact
# This step is only done for AMD64, as that's the only image we use in our automated testing (at this time).
- name: Upload local image TAR to artifact
if: ${{ matrix.arch == 'linux/amd64'}}
uses: actions/upload-artifact@v4
with:
name: docker-image-${{ inputs.build_id }}-${{ env.ARCH_NAME }}
path: /tmp/${{ inputs.build_id }}.tar
if-no-files-found: error
retention-days: 1
# Merge Docker digests (from various architectures) into a manifest.
# This runs after all Docker builds complete above, and it tells hub.docker.com
# that these builds should be all included in the manifest for this tag.
# (e.g. AMD64 and ARM64 should be listed as options under the same tagged Docker image)
##########################################################################################
# Merge Docker digests (from various architectures) into a single manifest.
# This runs after all Docker builds complete above. The purpose is to include all builds
# under a single manifest for this tag.
# (e.g. both linux/amd64 and linux/arm64 should be listed under the same tagged Docker image)
##########################################################################################
docker-build_manifest:
# Only run if this is NOT a PR
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
needs:
- docker-build
steps:
- name: Download Docker build digests
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: digests-${{ inputs.build_id }}
path: /tmp/digests
# Download digests for both AMD64 and ARM64 into same directory
pattern: digests-${{ inputs.build_id }}-*
merge-multiple: true
- name: Login to ${{ env.DOCKER_BUILD_REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_BUILD_REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -195,23 +266,89 @@ jobs:
- name: Add Docker metadata for image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}
- name: Create manifest list from digests and push to ${{ env.DOCKER_BUILD_REGISTRY }}
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
- name: Inspect manifest in ${{ env.DOCKER_BUILD_REGISTRY }}
run: |
docker buildx imagetools inspect ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
##########################################################################################
# Copy images / manifest to DockerHub.
# This MUST run after *both* images (AMD64 and ARM64) are built and uploaded to GitHub
# Container Registry (GHCR). Attempting to run this in parallel to GHCR builds can result
# in a race condition...i.e. the copy to DockerHub may fail if GHCR image has been updated
# at the moment when the copy occurs.
##########################################################################################
docker-copy_to_dockerhub:
# Only run if this is NOT a PR
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
needs:
- docker-build_manifest
steps:
# 'regctl' is used to more easily copy the image to DockerHub and obtain the digest from DockerHub
# See https://github.com/regclient/regclient/blob/main/docs/regctl.md
- name: Install regctl for Docker registry tools
uses: regclient/actions/regctl-installer@main
with:
release: 'v0.8.0'
# This recreates Docker tags for DockerHub
- name: Add Docker metadata for image
id: meta_dockerhub
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}
- name: Login to Docker Hub
# Login to source registry first, as this is where we are copying *from*
- name: Login to ${{ env.DOCKER_BUILD_REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_BUILD_REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Login to DockerHub, since this is where we are copying *to*
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Create manifest list from digests and push
working-directory: /tmp/digests
# Copy the image from source to DockerHub
- name: Copy image from ${{ env.DOCKER_BUILD_REGISTRY }} to docker.io
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *)
regctl image copy ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta_dockerhub.outputs.version }} docker.io/${{ env.IMAGE_NAME }}:${{ steps.meta_dockerhub.outputs.version }}
- name: Inspect image
#--------------------------------------------------------------------
# Finally, check whether demo.dspace.org or sandbox.dspace.org need
# to be redeployed based on these new DockerHub images.
#--------------------------------------------------------------------
# If this build is for the branch that Sandbox uses and passed in a REDEPLOY_SANDBOX_URL secret,
# Then redeploy https://sandbox.dspace.org
- name: Redeploy sandbox.dspace.org (based on main branch)
if: |
env.REDEPLOY_SANDBOX_URL != '' &&
github.ref_name == env.DEPLOY_SANDBOX_BRANCH
run: |
docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
curl -X POST $REDEPLOY_SANDBOX_URL
# If this build is for the branch that Demo uses and passed in a REDEPLOY_DEMO_URL secret,
# Then redeploy https://demo.dspace.org
- name: Redeploy demo.dspace.org (based on maintenance branch)
if: |
env.REDEPLOY_DEMO_URL != '' &&
github.ref_name == env.DEPLOY_DEMO_BRANCH
run: |
curl -X POST $REDEPLOY_DEMO_URL

1
.gitignore vendored
View File

@@ -10,6 +10,7 @@ tags
.project
.classpath
.checkstyle
.factorypath
## Ignore project files created by IntelliJ IDEA
*.iml

View File

@@ -6,9 +6,14 @@
# This Dockerfile uses JDK11 by default, but has also been tested with JDK17.
# To build with JDK17, use "--build-arg JDK_VERSION=17"
ARG JDK_VERSION=11
# The Docker version tag to build from
ARG DSPACE_VERSION=dspace-7_x
# The Docker registry to use for DSpace images. Defaults to "docker.io"
# NOTE: non-DSpace images are hardcoded to use "docker.io" and are not impacted by this build argument
ARG DOCKER_REGISTRY=docker.io
# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
FROM ${DOCKER_REGISTRY}/dspace/dspace-dependencies:${DSPACE_VERSION} AS build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
@@ -28,35 +33,38 @@ RUN mvn --no-transfer-progress package ${MAVEN_FLAGS} && \
mvn clean
# Step 2 - Run Ant Deploy
FROM openjdk:${JDK_VERSION}-slim as ant_build
FROM docker.io/eclipse-temurin:${JDK_VERSION} AS ant_build
ARG TARGET_DIR=dspace-installer
# COPY the /install directory from 'build' container to /dspace-src in this container
COPY --from=build /install /dspace-src
WORKDIR /dspace-src
# Create the initial install deployment using ANT
ENV ANT_VERSION 1.10.13
ENV ANT_HOME /tmp/ant-$ANT_VERSION
ENV PATH $ANT_HOME/bin:$PATH
# Need wget to install ant
RUN apt-get update \
&& apt-get install -y --no-install-recommends wget \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
ENV ANT_VERSION=1.10.13
ENV ANT_HOME=/tmp/ant-$ANT_VERSION
ENV PATH=$ANT_HOME/bin:$PATH
# Download and install 'ant'
RUN mkdir $ANT_HOME && \
wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C $ANT_HOME
curl --silent --show-error --location --fail --retry 5 --output /tmp/apache-ant.tar.gz \
https://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && \
tar -zx --strip-components=1 -f /tmp/apache-ant.tar.gz -C $ANT_HOME && \
rm /tmp/apache-ant.tar.gz
# Run necessary 'ant' deploy scripts
RUN ant init_installation update_configs update_code update_webapps
# Step 3 - Run tomcat
# Create a new tomcat image that does not retain the the build directory contents
FROM tomcat:9-jdk${JDK_VERSION}
FROM docker.io/tomcat:9-jdk${JDK_VERSION}
# NOTE: DSPACE_INSTALL must align with the "dspace.dir" default configuration.
ENV DSPACE_INSTALL=/dspace
# Copy the /dspace directory from 'ant_build' container to /dspace in this container
COPY --from=ant_build /dspace $DSPACE_INSTALL
# Expose Tomcat port and AJP port
EXPOSE 8080 8009
# Need host command for "[dspace]/bin/make-handle-config"
RUN apt-get update \
&& apt-get install -y --no-install-recommends host \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
# Expose Tomcat port (8080) and AJP port (8009) and Handle Server HTTP port (8000)
EXPOSE 8080 8009 8000
# Give java extra memory (2GB)
ENV JAVA_OPTS=-Xmx2000m

View File

@@ -6,9 +6,14 @@
# This Dockerfile uses JDK11 by default, but has also been tested with JDK17.
# To build with JDK17, use "--build-arg JDK_VERSION=17"
ARG JDK_VERSION=11
# The Docker version tag to build from
ARG DSPACE_VERSION=dspace-7_x
# The Docker registry to use for DSpace images. Defaults to "docker.io"
# NOTE: non-DSpace images are hardcoded to use "docker.io" and are not impacted by this build argument
ARG DOCKER_REGISTRY=docker.io
# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
FROM ${DOCKER_REGISTRY}/dspace/dspace-dependencies:${DSPACE_VERSION} AS build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
@@ -24,31 +29,34 @@ RUN mvn --no-transfer-progress package && \
mvn clean
# Step 2 - Run Ant Deploy
FROM openjdk:${JDK_VERSION}-slim as ant_build
FROM docker.io/eclipse-temurin:${JDK_VERSION} AS ant_build
ARG TARGET_DIR=dspace-installer
# COPY the /install directory from 'build' container to /dspace-src in this container
COPY --from=build /install /dspace-src
WORKDIR /dspace-src
# Create the initial install deployment using ANT
ENV ANT_VERSION 1.10.13
ENV ANT_HOME /tmp/ant-$ANT_VERSION
ENV PATH $ANT_HOME/bin:$PATH
# Need wget to install ant, and unzip for managing AIPs
RUN apt-get update \
&& apt-get install -y --no-install-recommends wget unzip \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
ENV ANT_VERSION=1.10.13
ENV ANT_HOME=/tmp/ant-$ANT_VERSION
ENV PATH=$ANT_HOME/bin:$PATH
# Download and install 'ant'
RUN mkdir $ANT_HOME && \
wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C $ANT_HOME
curl --silent --show-error --location --fail --retry 5 --output /tmp/apache-ant.tar.gz \
https://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && \
tar -zx --strip-components=1 -f /tmp/apache-ant.tar.gz -C $ANT_HOME && \
rm /tmp/apache-ant.tar.gz
# Run necessary 'ant' deploy scripts
RUN ant init_installation update_configs update_code
# Step 3 - Run jdk
FROM openjdk:${JDK_VERSION}
FROM docker.io/eclipse-temurin:${JDK_VERSION}
# NOTE: DSPACE_INSTALL must align with the "dspace.dir" default configuration.
ENV DSPACE_INSTALL=/dspace
# Copy the /dspace directory from 'ant_build' container to /dspace in this container
COPY --from=ant_build /dspace $DSPACE_INSTALL
# Give java extra memory (1GB)
ENV JAVA_OPTS=-Xmx1000m
# Install unzip for AIPs
RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -6,8 +6,8 @@
# To build with JDK17, use "--build-arg JDK_VERSION=17"
ARG JDK_VERSION=11
# Step 1 - Run Maven Build
FROM maven:3-openjdk-${JDK_VERSION}-slim as build
# Step 1 - Download all Dependencies
FROM docker.io/maven:3-eclipse-temurin-${JDK_VERSION} AS build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# Create the 'dspace' user account & home directory
@@ -19,16 +19,60 @@ RUN chown -Rv dspace: /app
# Switch to dspace user & run below commands as that user
USER dspace
# Copy the DSpace source code (from local machine) into the workdir (excluding .dockerignore contents)
ADD --chown=dspace . /app/
# This next part may look odd, but it speeds up the build of this image *significantly*.
# Copy ONLY the POMs to this image (from local machine). This will allow us to download all dependencies *without*
# performing any code compilation steps.
# Parent POM
ADD --chown=dspace pom.xml /app/
RUN mkdir -p /app/dspace
# 'dspace' module POM. Includes 'additions' ONLY, as it's the only submodule that is required to exist.
ADD --chown=dspace dspace/pom.xml /app/dspace/
RUN mkdir -p /app/dspace/modules/
ADD --chown=dspace dspace/modules/pom.xml /app/dspace/modules/
RUN mkdir -p /app/dspace/modules/additions
ADD --chown=dspace dspace/modules/additions/pom.xml /app/dspace/modules/additions/
# 'dspace-api' module POM
RUN mkdir -p /app/dspace-api
ADD --chown=dspace dspace-api/pom.xml /app/dspace-api/
# 'dspace-iiif' module POM
RUN mkdir -p /app/dspace-iiif
ADD --chown=dspace dspace-iiif/pom.xml /app/dspace-iiif/
# 'dspace-oai' module POM
RUN mkdir -p /app/dspace-oai
ADD --chown=dspace dspace-oai/pom.xml /app/dspace-oai/
# 'dspace-rdf' module POM
RUN mkdir -p /app/dspace-rdf
ADD --chown=dspace dspace-rdf/pom.xml /app/dspace-rdf/
# 'dspace-server-webapp' module POM
RUN mkdir -p /app/dspace-server-webapp
ADD --chown=dspace dspace-server-webapp/pom.xml /app/dspace-server-webapp/
# 'dspace-services' module POM
RUN mkdir -p /app/dspace-services
ADD --chown=dspace dspace-services/pom.xml /app/dspace-services/
# 'dspace-sword' module POM
RUN mkdir -p /app/dspace-sword
ADD --chown=dspace dspace-sword/pom.xml /app/dspace-sword/
# 'dspace-swordv2' module POM
RUN mkdir -p /app/dspace-swordv2
ADD --chown=dspace dspace-swordv2/pom.xml /app/dspace-swordv2/
# Trigger the installation of all maven dependencies (hide download progress messages)
# Maven flags here ensure that we skip final assembly, skip building test environment and skip all code verification checks.
# These flags speed up this installation as much as reasonably possible.
ENV MAVEN_FLAGS="-P-assembly -P-test-environment -Denforcer.skip=true -Dcheckstyle.skip=true -Dlicense.skip=true -Dxml.skip=true"
RUN mvn --no-transfer-progress install ${MAVEN_FLAGS}
# These flags speed up this installation and skip tasks we cannot perform as we don't have the full source code.
ENV MAVEN_FLAGS="-P-assembly -P-test-environment -Denforcer.skip=true -Dcheckstyle.skip=true -Dlicense.skip=true -Dxjc.skip=true -Dxml.skip=true"
RUN mvn --no-transfer-progress verify ${MAVEN_FLAGS}
# Clear the contents of the /app directory (including all maven builds), so no artifacts remain.
# Clear the contents of the /app directory (including all maven target folders), so no artifacts remain.
# This ensures when dspace:dspace is built, it will use the Maven local cache (~/.m2) for dependencies
USER root
RUN rm -rf /app/*

View File

@@ -8,9 +8,14 @@
# This Dockerfile uses JDK11 by default, but has also been tested with JDK17.
# To build with JDK17, use "--build-arg JDK_VERSION=17"
ARG JDK_VERSION=11
# The Docker version tag to build from
ARG DSPACE_VERSION=dspace-7_x
# The Docker registry to use for DSpace images. Defaults to "docker.io"
# NOTE: non-DSpace images are hardcoded to use "docker.io" and are not impacted by this build argument
ARG DOCKER_REGISTRY=docker.io
# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
FROM ${DOCKER_REGISTRY}/dspace/dspace-dependencies:${DSPACE_VERSION} AS build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
@@ -27,33 +32,36 @@ RUN mvn --no-transfer-progress package -Pdspace-rest && \
mvn clean
# Step 2 - Run Ant Deploy
FROM openjdk:${JDK_VERSION}-slim as ant_build
FROM docker.io/eclipse-temurin:${JDK_VERSION} AS ant_build
ARG TARGET_DIR=dspace-installer
# COPY the /install directory from 'build' container to /dspace-src in this container
COPY --from=build /install /dspace-src
WORKDIR /dspace-src
# Create the initial install deployment using ANT
ENV ANT_VERSION 1.10.12
ENV ANT_HOME /tmp/ant-$ANT_VERSION
ENV PATH $ANT_HOME/bin:$PATH
# Need wget to install ant
RUN apt-get update \
&& apt-get install -y --no-install-recommends wget \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
ENV ANT_VERSION=1.10.12
ENV ANT_HOME=/tmp/ant-$ANT_VERSION
ENV PATH=$ANT_HOME/bin:$PATH
# Download and install 'ant'
RUN mkdir $ANT_HOME && \
wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C $ANT_HOME
curl --silent --show-error --location --fail --retry 5 --output /tmp/apache-ant.tar.gz \
https://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && \
tar -zx --strip-components=1 -f /tmp/apache-ant.tar.gz -C $ANT_HOME && \
rm /tmp/apache-ant.tar.gz
# Run necessary 'ant' deploy scripts
RUN ant init_installation update_configs update_code update_webapps
# Step 3 - Run tomcat
# Create a new tomcat image that does not retain the the build directory contents
FROM tomcat:9-jdk${JDK_VERSION}
FROM docker.io/tomcat:9-jdk${JDK_VERSION}
ENV DSPACE_INSTALL=/dspace
ENV TOMCAT_INSTALL=/usr/local/tomcat
# Copy the /dspace directory from 'ant_build' containger to /dspace in this container
COPY --from=ant_build /dspace $DSPACE_INSTALL
# Need host command for "[dspace]/bin/make-handle-config"
RUN apt-get update \
&& apt-get install -y --no-install-recommends host \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
# Enable the AJP connector in Tomcat's server.xml
# NOTE: secretRequired="false" should only be used when AJP is NOT accessible from an external network. But, secretRequired="true" isn't supported by mod_proxy_ajp until Apache 2.5
RUN sed -i '/Service name="Catalina".*/a \\n <Connector protocol="AJP/1.3" port="8009" address="0.0.0.0" redirectPort="8443" URIEncoding="UTF-8" secretRequired="false" />' $TOMCAT_INSTALL/conf/server.xml

File diff suppressed because it is too large Load Diff

View File

@@ -7,4 +7,5 @@
<!-- TODO: We should have these turned on. But, currently there's a known bug with indentation checks
on JMockIt Expectations blocks and similar. See https://github.com/checkstyle/checkstyle/issues/3739 -->
<suppress checks="Indentation" files="src[/\\]test[/\\]java"/>
<suppress checks="Regexp" files="DSpaceHttpClientFactory\.java"/>
</suppressions>

View File

@@ -92,7 +92,7 @@ For more information on CheckStyle configurations below, see: http://checkstyle.
<!-- Requirements for Javadocs for methods -->
<module name="JavadocMethod">
<!-- All public methods MUST HAVE Javadocs -->
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<!-- Allow params, throws and return tags to be optional -->
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
@@ -136,5 +136,22 @@ For more information on CheckStyle configurations below, see: http://checkstyle.
<module name="OneStatementPerLine"/>
<!-- Require that "catch" statements are not empty (must at least contain a comment) -->
<module name="EmptyCatchBlock"/>
<!-- Require to use DSpaceHttpClientFactory.getClient() statement instead of creating directly the client -->
<module name="Regexp">
<property name="format" value="HttpClientBuilder\.create\s*\(\s*\)" />
<property name="message" value="Use DSpaceHttpClientFactory.getClient() instead of HttpClientBuilder.create()" />
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="true"/>
</module>
<!-- Require to use DSpaceHttpClientFactory.getClient() statement instead of creating directly the client -->
<module name="Regexp">
<property name="format" value="HttpClients\.createDefault\s*\(\s*\)" />
<property name="message" value="Use DSpaceHttpClientFactory.getClient() instead of HttpClients.createDefault()" />
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="true"/>
</module>
</module>
</module>

View File

@@ -1,8 +1,12 @@
version: "3.7"
networks:
# Default to using network named 'dspacenet' from docker-compose.yml.
# Its full name will be prepended with the project name (e.g. "-p d7" means it will be named "d7_dspacenet")
default:
name: ${COMPOSE_PROJECT_NAME}_dspacenet
external: true
services:
dspace-cli:
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-dspace-7_x}"
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-dspace-7_x}"
container_name: dspace-cli
build:
context: .
@@ -26,13 +30,8 @@ services:
- ./dspace/config:/dspace/config
entrypoint: /dspace/bin/dspace
command: help
networks:
- dspacenet
tty: true
stdin_open: true
volumes:
assetstore:
networks:
dspacenet:

View File

@@ -1,4 +1,3 @@
version: '3.7'
networks:
dspacenet:
ipam:
@@ -29,14 +28,14 @@ services:
# from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above.
proxies__P__trusted__P__ipranges: '172.23.0'
LOGGING_CONFIG: /dspace/config/log4j2-container.xml
image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-7_x-test}"
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-7_x-test}"
build:
context: .
dockerfile: Dockerfile.test
depends_on:
- dspacedb
networks:
dspacenet:
- dspacenet
ports:
- published: 8080
target: 8080
@@ -67,7 +66,7 @@ services:
dspacedb:
container_name: dspacedb
# Uses a custom Postgres image with pgcrypto installed
image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-dspace-7_x}"
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-dspace-7_x}"
build:
# Must build out of subdirectory to have access to install script for pgcrypto
context: ./dspace/src/main/docker/dspace-postgres-pgcrypto/
@@ -87,10 +86,12 @@ services:
# DSpace Solr container
dspacesolr:
container_name: dspacesolr
image: "${DOCKER_OWNER:-dspace}/dspace-solr:${DSPACE_VER:-dspace-7_x}"
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-solr:${DSPACE_VER:-dspace-7_x}"
build:
context: .
dockerfile: ./dspace/src/main/docker/dspace-solr/Dockerfile
context: ./dspace/src/main/docker/dspace-solr/
# Provide path to Solr configs necessary to build Docker image
additional_contexts:
solrconfigs: ./dspace/solr/
args:
SOLR_VERSION: "${SOLR_VER:-8.11}"
networks:

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>7.6.2-SNAPSHOT</version>
<version>7.6.6-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
@@ -99,24 +99,10 @@
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>maven-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>
<configuration>
<revisionOnScmFailure>UNKNOWN_REVISION</revisionOnScmFailure>
</configuration>
@@ -396,6 +382,13 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<exclusions>
<!-- Spring JCL is unnecessary and conflicts with commons-logging when both are on classpath -->
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@@ -420,6 +413,16 @@
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
<!-- Excluded BouncyCastle dependencies because we use a later version of BouncyCastle.
Having two versions of BouncyCastle in the classpath can cause Handle Server to throw errors. -->
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Jetty is needed to run Handle Server -->
@@ -458,10 +461,6 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -495,12 +494,6 @@
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<exclusions>
<exclusion>
<artifactId>xom</artifactId>
<groupId>xom</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
@@ -534,7 +527,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -626,7 +619,7 @@
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
<version>2.11.0</version>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
@@ -635,7 +628,7 @@
<dependency>
<groupId>dnsjava</groupId>
<artifactId>dnsjava</artifactId>
<version>2.1.7</version>
<version>3.6.3</version>
</dependency>
<dependency>
@@ -671,7 +664,7 @@
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>8.4.4</version>
<version>8.5.13</version>
</dependency>
<!-- Google Analytics -->
@@ -745,7 +738,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.12.261</version>
<version>1.12.791</version>
</dependency>
<dependency>
@@ -794,7 +787,7 @@
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.6</version>
<version>5.12.0</version>
</dependency>
<!-- Email templating -->
@@ -812,7 +805,7 @@
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.6.0</version>
<version>6.10.0</version>
<scope>test</scope>
</dependency>
@@ -821,12 +814,19 @@
<groupId>eu.openaire</groupId>
<artifactId>funders-model</artifactId>
<version>2.0.0</version>
<exclusions>
<!-- Newer version pulled in via Jersey below -->
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-junit-rule</artifactId>
<version>5.11.2</version>
<version>5.15.0</version>
<scope>test</scope>
<exclusions>
<!-- Exclude snakeyaml to avoid conflicts with: spring-boot-starter-cache -->
@@ -853,6 +853,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
@@ -864,42 +870,42 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>4.1.94.Final</version>
<version>4.2.6.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>4.1.94.Final</version>
<version>4.2.6.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>4.1.94.Final</version>
<version>4.2.6.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>4.1.94.Final</version>
<version>4.2.6.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.94.Final</version>
<version>4.2.6.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.1.94.Final</version>
<version>4.2.6.Final</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.3</version>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-core</artifactId>
<version>2.8.0</version>
<version>2.10.3</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -917,15 +923,10 @@
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.13.9</version>
<version>2.13.16</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@@ -116,6 +116,17 @@ public final class CreateAdministrator {
protected CreateAdministrator()
throws Exception {
context = new Context();
try {
context.getDBConfig();
} catch (NullPointerException npr) {
// if database is null, there is no point in continuing. Prior to this exception and catch,
// NullPointerException was thrown, that wasn't very helpful.
throw new IllegalStateException("Problem connecting to database. This " +
"indicates issue with either network or version (or possibly some other). " +
"If you are running this in docker-compose, please make sure dspace-cli was " +
"built from the same sources as running dspace container AND that they are in " +
"the same project/network.");
}
groupService = EPersonServiceFactory.getInstance().getGroupService();
ePersonService = EPersonServiceFactory.getInstance().getEPersonService();
}

View File

@@ -10,7 +10,6 @@ package org.dspace.administer;
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.xpath.XPath;
@@ -18,6 +17,7 @@ import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.dspace.app.util.XMLUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -49,8 +49,9 @@ public class RegistryImporter {
*/
public static Document loadXML(String filename)
throws IOException, ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
// This XML builder will *not* disable external entities as XML
// registries are considered trusted content
DocumentBuilder builder = XMLUtils.getTrustedDocumentBuilder();
Document document = builder.parse(new File(filename));

View File

@@ -13,7 +13,6 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.xpath.XPath;
@@ -21,7 +20,15 @@ import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.factory.ContentServiceFactory;
@@ -41,7 +48,7 @@ import org.xml.sax.SAXException;
* <P>
* <code>RegistryLoader -bitstream bitstream-formats.xml</code>
* <P>
* <code>RegistryLoader -dc dc-types.xml</code>
* <code>RegistryLoader -metadata dc-types.xml</code>
*
* @author Robert Tansley
* @version $Revision$
@@ -50,7 +57,7 @@ public class RegistryLoader {
/**
* log4j category
*/
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(RegistryLoader.class);
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(RegistryLoader.class);
protected static BitstreamFormatService bitstreamFormatService = ContentServiceFactory.getInstance()
.getBitstreamFormatService();
@@ -67,50 +74,99 @@ public class RegistryLoader {
* @throws Exception if error
*/
public static void main(String[] argv) throws Exception {
String usage = "Usage: " + RegistryLoader.class.getName()
+ " (-bitstream | -metadata) registry-file.xml";
Context context = null;
// Set up command-line options and parse arguments
CommandLineParser parser = new DefaultParser();
Options options = createCommandLineOptions();
try {
context = new Context();
CommandLine line = parser.parse(options, argv);
// Check if help option was entered or no options provided
if (line.hasOption('h') || line.getOptions().length == 0) {
printHelp(options);
System.exit(0);
}
Context context = new Context();
// Can't update registries anonymously, so we need to turn off
// authorisation
context.turnOffAuthorisationSystem();
// Work out what we're loading
if (argv[0].equalsIgnoreCase("-bitstream")) {
RegistryLoader.loadBitstreamFormats(context, argv[1]);
} else if (argv[0].equalsIgnoreCase("-metadata")) {
// Call MetadataImporter, as it handles Metadata schema updates
MetadataImporter.loadRegistry(argv[1], true);
} else {
System.err.println(usage);
try {
// Work out what we're loading
if (line.hasOption('b')) {
String filename = line.getOptionValue('b');
if (StringUtils.isEmpty(filename)) {
System.err.println("No file path provided for bitstream format registry");
printHelp(options);
System.exit(1);
}
RegistryLoader.loadBitstreamFormats(context, filename);
} else if (line.hasOption('m')) {
String filename = line.getOptionValue('m');
if (StringUtils.isEmpty(filename)) {
System.err.println("No file path provided for metadata registry");
printHelp(options);
System.exit(1);
}
// Call MetadataImporter, as it handles Metadata schema updates
MetadataImporter.loadRegistry(filename, true);
} else {
System.err.println("No registry type specified");
printHelp(options);
System.exit(1);
}
// Commit changes and close Context
context.complete();
System.exit(0);
} catch (Exception e) {
log.fatal(LogHelper.getHeader(context, "error_loading_registries", ""), e);
System.err.println("Error: \n - " + e.getMessage());
System.exit(1);
} finally {
// Clean up our context, if it still exists & it was never completed
if (context != null && context.isValid()) {
context.abort();
}
}
// Commit changes and close Context
context.complete();
System.exit(0);
} catch (ArrayIndexOutOfBoundsException ae) {
System.err.println(usage);
} catch (ParseException e) {
System.err.println("Error parsing command-line arguments: " + e.getMessage());
printHelp(options);
System.exit(1);
} catch (Exception e) {
log.fatal(LogHelper.getHeader(context, "error_loading_registries",
""), e);
System.err.println("Error: \n - " + e.getMessage());
System.exit(1);
} finally {
// Clean up our context, if it still exists & it was never completed
if (context != null && context.isValid()) {
context.abort();
}
}
}
/**
* Create the command-line options
* @return the command-line options
*/
private static Options createCommandLineOptions() {
Options options = new Options();
options.addOption("b", "bitstream", true, "load bitstream format registry from specified file");
options.addOption("m", "metadata", true, "load metadata registry from specified file");
options.addOption("h", "help", false, "print this help message");
return options;
}
/**
* Print the help message
* @param options the command-line options
*/
private static void printHelp(Options options) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("RegistryLoader",
"Load bitstream format or metadata registries into the database\n",
options,
"\nExamples:\n" +
" RegistryLoader -b bitstream-formats.xml\n" +
" RegistryLoader -m dc-types.xml",
true);
}
/**
* Load Bitstream Format metadata
*
@@ -210,8 +266,9 @@ public class RegistryLoader {
*/
private static Document loadXML(String filename) throws IOException,
ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
// This XML builder will *not* disable external entities as XML
// registries are considered trusted content
DocumentBuilder builder = XMLUtils.getTrustedDocumentBuilder();
return builder.parse(new File(filename));
}
@@ -221,7 +278,7 @@ public class RegistryLoader {
* contains:
* <P>
* <code>
* &lt;foo&gt;&lt;mimetype&gt;application/pdf&lt;/mimetype&gt;&lt;/foo&gt;
* <foo><mimetype>application/pdf</mimetype></foo>
* </code>
* passing this the <code>foo</code> node and <code>mimetype</code> will
* return <code>application/pdf</code>.
@@ -262,10 +319,10 @@ public class RegistryLoader {
* document contains:
* <P>
* <code>
* &lt;foo&gt;
* &lt;bar&gt;val1&lt;/bar&gt;
* &lt;bar&gt;val2&lt;/bar&gt;
* &lt;/foo&gt;
* <foo>
* <bar>val1</bar>
* <bar>val2</bar>
* </foo>
* </code>
* passing this the <code>foo</code> node and <code>bar</code> will
* return <code>val1</code> and <code>val2</code>.

View File

@@ -27,7 +27,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.xpath.XPath;
@@ -43,6 +42,7 @@ import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.lang3.StringUtils;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
@@ -613,8 +613,8 @@ public class StructBuilder {
*/
private static org.w3c.dom.Document loadXML(InputStream input)
throws IOException, ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
// This builder factory does not disable external DTD, entities, etc.
DocumentBuilder builder = XMLUtils.getTrustedDocumentBuilder();
org.w3c.dom.Document document = builder.parse(input);
@@ -802,7 +802,7 @@ public class StructBuilder {
// default the short description to the empty string
collectionService.setMetadataSingleValue(context, collection,
MD_SHORT_DESCRIPTION, Item.ANY, " ");
MD_SHORT_DESCRIPTION, null, " ");
// import the rest of the metadata
for (Map.Entry<String, MetadataFieldName> entry : collectionMap.entrySet()) {

View File

@@ -18,6 +18,7 @@ import java.io.InputStream;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.ZoneOffset;
import java.util.Arrays;
import java.util.Date;
import java.util.Iterator;
@@ -154,7 +155,7 @@ public class BulkAccessControl extends DSpaceRunnable<BulkAccessControlScriptCon
}
ObjectMapper mapper = new ObjectMapper();
mapper.setTimeZone(TimeZone.getTimeZone("UTC"));
mapper.setTimeZone(TimeZone.getTimeZone(ZoneOffset.UTC));
BulkAccessControlInput accessControl;
context = new Context(Context.Mode.BATCH_EDIT);
setEPerson(context);
@@ -416,7 +417,7 @@ public class BulkAccessControl extends DSpaceRunnable<BulkAccessControlScriptCon
discoverQuery.setQuery(query);
discoverQuery.setStart(start);
discoverQuery.setMaxResults(limit);
discoverQuery.setSortField("search.resourceid", DiscoverQuery.SORT_ORDER.asc);
return discoverQuery;
}

View File

@@ -188,6 +188,15 @@ public class DSpaceCSV implements Serializable {
// Verify that the heading is valid in the metadata registry
String[] clean = element.split("\\[");
String[] parts = clean[0].split("\\.");
// Check language if present, if it's ANY then throw an exception
if (clean.length > 1 && clean[1].equals(Item.ANY + "]")) {
throw new MetadataImportInvalidHeadingException("Language ANY (*) was found in the heading " +
"of the metadata value to import, " +
"this should never be the case",
MetadataImportInvalidHeadingException.ENTRY,
columnCounter);
}
if (parts.length < 2) {
throw new MetadataImportInvalidHeadingException(element,
@@ -223,6 +232,15 @@ public class DSpaceCSV implements Serializable {
}
}
// Verify there isnt already a header that is the same; if it already exists,
// throw MetadataImportInvalidHeadingException
String header = authorityPrefix + element;
if (headings.contains(header)) {
throw new MetadataImportInvalidHeadingException("Duplicate heading found: " + header,
MetadataImportInvalidHeadingException.ENTRY,
columnCounter);
}
// Store the heading
headings.add(authorityPrefix + element);
}

View File

@@ -14,6 +14,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.DefaultParser.Builder;
import org.apache.commons.cli.ParseException;
import org.dspace.content.Item;
import org.dspace.content.MetadataDSpaceCsvExportServiceImpl;
@@ -143,7 +145,7 @@ public class MetadataExportSearch extends DSpaceRunnable<MetadataExportSearchScr
Iterator<Item> itemIterator = searchService.iteratorSearch(context, dso, discoverQuery);
handler.logDebug("creating dspacecsv");
DSpaceCSV dSpaceCSV = metadataDSpaceCsvExportService.export(context, itemIterator, true);
DSpaceCSV dSpaceCSV = metadataDSpaceCsvExportService.export(context, itemIterator, true, handler);
handler.logDebug("writing to file " + getFileNameOrExportFile());
handler.writeFilestream(context, getFileNameOrExportFile(), dSpaceCSV.getInputStream(), EXPORT_CSV);
context.restoreAuthSystemState();
@@ -167,4 +169,14 @@ public class MetadataExportSearch extends DSpaceRunnable<MetadataExportSearchScr
}
return scopeObj;
}
@Override
protected StepResult parse(String[] args) throws ParseException {
commandLine = new DefaultParser().parse(getScriptConfiguration().getOptions(), args);
Builder builder = new DefaultParser().builder();
builder.setStripLeadingAndTrailingQuotes(false);
commandLine = builder.build().parse(getScriptConfiguration().getOptions(), args);
setup();
return StepResult.Continue;
}
}

View File

@@ -494,7 +494,7 @@ public class MetadataImport extends DSpaceRunnable<MetadataImportScriptConfigura
// Check it has an owning collection
List<String> collections = line.get("collection");
if (collections == null) {
if (collections == null || collections.isEmpty()) {
throw new MetadataImportException(
"New items must have a 'collection' assigned in the form of a handle");
}
@@ -825,8 +825,10 @@ public class MetadataImport extends DSpaceRunnable<MetadataImportScriptConfigura
addRelationships(c, item, element, values);
} else {
itemService.clearMetadata(c, item, schema, element, qualifier, language);
itemService.addMetadata(c, item, schema, element, qualifier,
language, values, authorities, confidences);
if (!values.isEmpty()) {
itemService.addMetadata(c, item, schema, element, qualifier,
language, values, authorities, confidences);
}
itemService.update(c, item);
}
}
@@ -1121,8 +1123,8 @@ public class MetadataImport extends DSpaceRunnable<MetadataImportScriptConfigura
.getAuthoritySeparator() + dcv.getConfidence();
}
// Add it
if ((value != null) && (!"".equals(value))) {
// Add it, if value is not blank
if (value != null && StringUtils.isNotBlank(value)) {
changes.registerAdd(dcv);
}
}

View File

@@ -0,0 +1,152 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.client;
import static org.apache.commons.collections4.ListUtils.emptyIfNull;
import java.util.List;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.dspace.services.ConfigurationService;
import org.dspace.utils.DSpace;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Factory of {@link HttpClient} with common configurations.
*
* @author Luca Giamminonni (luca.giamminonni at 4science.it)
*
*/
public class DSpaceHttpClientFactory {
@Autowired
private ConfigurationService configurationService;
@Autowired
private DSpaceProxyRoutePlanner proxyRoutePlanner;
@Autowired(required = false)
private List<HttpRequestInterceptor> requestInterceptors;
@Autowired(required = false)
private List<HttpResponseInterceptor> responseInterceptors;
/**
* Get an instance of {@link DSpaceHttpClientFactory} from the Spring context.
* @return the bean instance
*/
public static DSpaceHttpClientFactory getInstance() {
return new DSpace().getSingletonService(DSpaceHttpClientFactory.class);
}
/**
* Build an instance of {@link HttpClient} setting the proxy if configured.
*
* @return the client
*/
public CloseableHttpClient build() {
return build(HttpClientBuilder.create(), true);
}
/**
* return a Builder if an instance of {@link HttpClient} pre-setting the proxy if configured.
*
* @return the client
*/
public HttpClientBuilder builder(boolean setProxy) {
HttpClientBuilder clientBuilder = HttpClientBuilder.create();
if (setProxy) {
clientBuilder.setRoutePlanner(proxyRoutePlanner);
}
getRequestInterceptors().forEach(clientBuilder::addInterceptorLast);
getResponseInterceptors().forEach(clientBuilder::addInterceptorLast);
return clientBuilder;
}
/**
* Build an instance of {@link HttpClient} without setting the proxy, even if
* configured.
*
* @return the client
*/
public CloseableHttpClient buildWithoutProxy() {
return build(HttpClientBuilder.create(), false);
}
/**
* Build an instance of {@link HttpClient} setting the proxy if configured,
* disabling automatic retries and setting the maximum total connection.
*
* @param maxConnTotal the maximum total connection value
* @return the client
*/
public CloseableHttpClient buildWithoutAutomaticRetries(int maxConnTotal) {
HttpClientBuilder clientBuilder = HttpClientBuilder.create()
.disableAutomaticRetries()
.setMaxConnTotal(maxConnTotal);
return build(clientBuilder, true);
}
/**
* Build an instance of {@link HttpClient} setting the proxy if configured with
* the given request configuration.
* @param requestConfig the request configuration
* @return the client
*/
public CloseableHttpClient buildWithRequestConfig(RequestConfig requestConfig) {
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create()
.setDefaultRequestConfig(requestConfig);
return build(httpClientBuilder, true);
}
private CloseableHttpClient build(HttpClientBuilder clientBuilder, boolean setProxy) {
if (setProxy) {
clientBuilder.setRoutePlanner(proxyRoutePlanner);
}
getRequestInterceptors().forEach(clientBuilder::addInterceptorLast);
getResponseInterceptors().forEach(clientBuilder::addInterceptorLast);
return clientBuilder.build();
}
public ConfigurationService getConfigurationService() {
return configurationService;
}
public void setConfigurationService(ConfigurationService configurationService) {
this.configurationService = configurationService;
}
public List<HttpRequestInterceptor> getRequestInterceptors() {
return emptyIfNull(requestInterceptors);
}
public void setRequestInterceptors(List<HttpRequestInterceptor> requestInterceptors) {
this.requestInterceptors = requestInterceptors;
}
public List<HttpResponseInterceptor> getResponseInterceptors() {
return emptyIfNull(responseInterceptors);
}
public void setResponseInterceptors(List<HttpResponseInterceptor> responseInterceptors) {
this.responseInterceptors = responseInterceptors;
}
public DSpaceProxyRoutePlanner getProxyRoutePlanner() {
return proxyRoutePlanner;
}
public void setProxyRoutePlanner(DSpaceProxyRoutePlanner proxyRoutePlanner) {
this.proxyRoutePlanner = proxyRoutePlanner;
}
}

View File

@@ -0,0 +1,73 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.client;
import java.util.Arrays;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.impl.conn.DefaultRoutePlanner;
import org.apache.http.protocol.HttpContext;
import org.dspace.services.ConfigurationService;
/**
* Extension of {@link DefaultRoutePlanner} that determine the proxy based on
* the configuration service, ignoring configured hosts.
*
* @author Luca Giamminonni (luca.giamminonni at 4science.it)
*
*/
public class DSpaceProxyRoutePlanner extends DefaultRoutePlanner {
private ConfigurationService configurationService;
public DSpaceProxyRoutePlanner(ConfigurationService configurationService) {
super(null);
this.configurationService = configurationService;
}
@Override
protected HttpHost determineProxy(HttpHost target, HttpRequest request, HttpContext context) throws HttpException {
if (isTargetHostConfiguredToBeIgnored(target)) {
return null;
}
String proxyHost = configurationService.getProperty("http.proxy.host");
String proxyPort = configurationService.getProperty("http.proxy.port");
if (StringUtils.isAnyBlank(proxyHost, proxyPort)) {
return null;
}
try {
return new HttpHost(proxyHost, Integer.parseInt(proxyPort), "http");
} catch (NumberFormatException e) {
throw new RuntimeException("Invalid proxy port configuration: " + proxyPort);
}
}
private boolean isTargetHostConfiguredToBeIgnored(HttpHost target) {
String[] hostsToIgnore = configurationService.getArrayProperty("http.proxy.hosts-to-ignore");
if (ArrayUtils.isEmpty(hostsToIgnore)) {
return false;
}
return Arrays.stream(hostsToIgnore)
.anyMatch(host -> matchesHost(host, target.getHostName()));
}
private boolean matchesHost(String hostPattern, String hostName) {
if (hostName.equals(hostPattern)) {
return true;
} else if (hostPattern.startsWith("*")) {
return hostName.endsWith(StringUtils.removeStart(hostPattern, "*"));
} else if (hostPattern.endsWith("*")) {
return hostName.startsWith(StringUtils.removeEnd(hostPattern, "*"));
}
return false;
}
}

View File

@@ -352,7 +352,7 @@ public class ItemExportServiceImpl implements ItemExportService {
/**
* Create the 'collections' file. List handles of all Collections which
* contain this Item. The "owning" Collection is listed first.
* contain this Item. The "owning" Collection is listed first.
*
* @param item list collections holding this Item.
* @param destDir write the file here.
@@ -363,12 +363,14 @@ public class ItemExportServiceImpl implements ItemExportService {
File outFile = new File(destDir, "collections");
if (outFile.createNewFile()) {
try (PrintWriter out = new PrintWriter(new FileWriter(outFile))) {
String ownerHandle = item.getOwningCollection().getHandle();
out.println(ownerHandle);
Collection owningCollection = item.getOwningCollection();
// The owning collection is null for workspace and workflow items
if (owningCollection != null) {
out.println(owningCollection.getHandle());
}
for (Collection collection : item.getCollections()) {
String collectionHandle = collection.getHandle();
if (!collectionHandle.equals(ownerHandle)) {
out.println(collectionHandle);
if (!collection.equals(owningCollection)) {
out.println(collection.getHandle());
}
}
}
@@ -490,7 +492,7 @@ public class ItemExportServiceImpl implements ItemExportService {
File wkDir = new File(workDir);
if (!wkDir.exists() && !wkDir.mkdirs()) {
logError("Unable to create working direcory");
logError("Unable to create working directory");
}
File dnDir = new File(destDirName);
@@ -498,11 +500,18 @@ public class ItemExportServiceImpl implements ItemExportService {
logError("Unable to create destination directory");
}
// export the items using normal export method
exportItem(context, items, workDir, seqStart, migrate, excludeBitstreams);
try {
// export the items using normal export method (this exports items to our workDir)
exportItem(context, items, workDir, seqStart, migrate, excludeBitstreams);
// now zip up the export directory created above
zip(workDir, destDirName + System.getProperty("file.separator") + zipFileName);
// now zip up the workDir directory created above
zip(workDir, destDirName + System.getProperty("file.separator") + zipFileName);
} finally {
// Cleanup workDir created above, if it still exists
if (wkDir.exists()) {
deleteDirectory(wkDir);
}
}
}
@Override

View File

@@ -22,6 +22,7 @@ import java.util.UUID;
import org.apache.commons.cli.ParseException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.tika.Tika;
import org.dspace.app.itemimport.factory.ItemImportServiceFactory;
@@ -333,33 +334,38 @@ public class ItemImport extends DSpaceRunnable<ItemImportScriptConfiguration> {
protected void readZip(Context context, ItemImportService itemImportService) throws Exception {
Optional<InputStream> optionalFileStream = Optional.empty();
Optional<InputStream> validationFileStream = Optional.empty();
if (!remoteUrl) {
// manage zip via upload
optionalFileStream = handler.getFileStream(context, zipfilename);
validationFileStream = handler.getFileStream(context, zipfilename);
} else {
// manage zip via remote url
optionalFileStream = Optional.ofNullable(new URL(zipfilename).openStream());
validationFileStream = Optional.ofNullable(new URL(zipfilename).openStream());
}
if (validationFileStream.isPresent()) {
// validate zip file
if (validationFileStream.isPresent()) {
validateZip(validationFileStream.get());
try {
if (!remoteUrl) {
// manage zip via upload
optionalFileStream = handler.getFileStream(context, zipfilename);
validationFileStream = handler.getFileStream(context, zipfilename);
} else {
// manage zip via remote url
optionalFileStream = Optional.ofNullable(new URL(zipfilename).openStream());
validationFileStream = Optional.ofNullable(new URL(zipfilename).openStream());
}
workFile = new File(itemImportService.getTempWorkDir() + File.separator
+ zipfilename + "-" + context.getCurrentUser().getID());
FileUtils.copyInputStreamToFile(optionalFileStream.get(), workFile);
} else {
throw new IllegalArgumentException(
"Error reading file, the file couldn't be found for filename: " + zipfilename);
}
if (validationFileStream.isPresent()) {
// validate zip file
if (validationFileStream.isPresent()) {
validateZip(validationFileStream.get());
}
workDir = new File(itemImportService.getTempWorkDir() + File.separator + TEMP_DIR
+ File.separator + context.getCurrentUser().getID());
sourcedir = itemImportService.unzip(workFile, workDir.getAbsolutePath());
workFile = new File(itemImportService.getTempWorkDir() + File.separator
+ zipfilename + "-" + context.getCurrentUser().getID());
FileUtils.copyInputStreamToFile(optionalFileStream.get(), workFile);
} else {
throw new IllegalArgumentException(
"Error reading file, the file couldn't be found for filename: " + zipfilename);
}
workDir = new File(itemImportService.getTempWorkDir() + File.separator + TEMP_DIR
+ File.separator + context.getCurrentUser().getID());
sourcedir = itemImportService.unzip(workFile, workDir.getAbsolutePath());
} finally {
optionalFileStream.ifPresent(IOUtils::closeQuietly);
validationFileStream.ifPresent(IOUtils::closeQuietly);
}
}
/**

View File

@@ -17,6 +17,7 @@ import java.util.Optional;
import java.util.UUID;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.dspace.app.itemimport.service.ItemImportService;
import org.dspace.content.Collection;
@@ -111,7 +112,11 @@ public class ItemImportCLI extends ItemImport {
// validate zip file
InputStream validationFileStream = new FileInputStream(myZipFile);
validateZip(validationFileStream);
try {
validateZip(validationFileStream);
} finally {
IOUtils.closeQuietly(validationFileStream);
}
workDir = new File(itemImportService.getTempWorkDir() + File.separator + TEMP_DIR
+ File.separator + context.getCurrentUser().getID());
@@ -120,22 +125,28 @@ public class ItemImportCLI extends ItemImport {
} else {
// manage zip via remote url
Optional<InputStream> optionalFileStream = Optional.ofNullable(new URL(zipfilename).openStream());
if (optionalFileStream.isPresent()) {
// validate zip file via url
Optional<InputStream> validationFileStream = Optional.ofNullable(new URL(zipfilename).openStream());
if (validationFileStream.isPresent()) {
validateZip(validationFileStream.get());
}
Optional<InputStream> validationFileStream = Optional.ofNullable(new URL(zipfilename).openStream());
try {
if (optionalFileStream.isPresent()) {
// validate zip file via url
workFile = new File(itemImportService.getTempWorkDir() + File.separator
+ zipfilename + "-" + context.getCurrentUser().getID());
FileUtils.copyInputStreamToFile(optionalFileStream.get(), workFile);
workDir = new File(itemImportService.getTempWorkDir() + File.separator + TEMP_DIR
+ File.separator + context.getCurrentUser().getID());
sourcedir = itemImportService.unzip(workFile, workDir.getAbsolutePath());
} else {
throw new IllegalArgumentException(
"Error reading file, the file couldn't be found for filename: " + zipfilename);
if (validationFileStream.isPresent()) {
validateZip(validationFileStream.get());
}
workFile = new File(itemImportService.getTempWorkDir() + File.separator
+ zipfilename + "-" + context.getCurrentUser().getID());
FileUtils.copyInputStreamToFile(optionalFileStream.get(), workFile);
workDir = new File(itemImportService.getTempWorkDir() + File.separator + TEMP_DIR
+ File.separator + context.getCurrentUser().getID());
sourcedir = itemImportService.unzip(workFile, workDir.getAbsolutePath());
} else {
throw new IllegalArgumentException(
"Error reading file, the file couldn't be found for filename: " + zipfilename);
}
} finally {
optionalFileStream.ifPresent(IOUtils::closeQuietly);
validationFileStream.ifPresent(IOUtils::closeQuietly);
}
}
}

View File

@@ -29,6 +29,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.URL;
import java.nio.file.Path;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -48,7 +49,6 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import javax.mail.MessagingException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.xpath.XPath;
@@ -67,6 +67,7 @@ import org.apache.logging.log4j.Logger;
import org.dspace.app.itemimport.service.ItemImportService;
import org.dspace.app.util.LocalSchemaFilenameFilter;
import org.dspace.app.util.RelationshipUtils;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.ResourcePolicy;
import org.dspace.authorize.service.AuthorizeService;
@@ -179,6 +180,8 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
@Autowired(required = true)
protected MetadataValueService metadataValueService;
protected DocumentBuilder builder;
protected String tempWorkDir;
protected boolean isTest = false;
@@ -742,15 +745,22 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
myitem = wi.getItem();
}
// normalize and validate path to make sure itemname doesn't contain path traversal
Path itemPath = new File(path + File.separatorChar + itemname + File.separatorChar)
.toPath().normalize();
if (!itemPath.startsWith(path)) {
throw new IOException("Illegal item metadata path: '" + itemPath);
}
// Normalization chops off the last separator, and we need to put it back
String itemPathDir = itemPath.toString() + File.separatorChar;
// now fill out dublin core for item
loadMetadata(c, myitem, path + File.separatorChar + itemname
+ File.separatorChar);
loadMetadata(c, myitem, itemPathDir);
// and the bitstreams from the contents file
// process contents file, add bistreams and bundles, return any
// non-standard permissions
List<String> options = processContentsFile(c, myitem, path
+ File.separatorChar + itemname, "contents");
List<String> options = processContentsFile(c, myitem, itemPathDir, "contents");
if (useWorkflow) {
// don't process handle file
@@ -768,8 +778,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
}
} else {
// only process handle file if not using workflow system
String myhandle = processHandleFile(c, myitem, path
+ File.separatorChar + itemname, "handle");
String myhandle = processHandleFile(c, myitem, itemPathDir, "handle");
// put item in system
if (!isTest) {
@@ -1001,6 +1010,34 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
}
}
/**
* Ensures a file path does not attempt to access files outside the designated parent directory.
*
* @param parentDir The absolute path to the parent directory that should contain the file
* @param fileName The name or path of the file to validate
* @throws IOException If an error occurs while resolving canonical paths, or the file path attempts
* to access a location outside the parent directory
*/
private void validateFilePath(String parentDir, String fileName) throws IOException {
File parent = new File(parentDir);
File file = new File(fileName);
// If the fileName is not an absolute path, we resolve it against the parentDir
if (!file.isAbsolute()) {
file = new File(parent, fileName);
}
String parentCanonicalPath = parent.getCanonicalPath();
String fileCanonicalPath = file.getCanonicalPath();
if (!fileCanonicalPath.startsWith(parentCanonicalPath)) {
log.error("File path outside of canonical root requested: fileCanonicalPath={} does not begin " +
"with parentCanonicalPath={}", fileCanonicalPath, parentCanonicalPath);
throw new IOException("Illegal file path '" + fileName + "' encountered. This references a path " +
"outside of the import package. Please see the system logs for more details.");
}
}
/**
* Read the collections file inside the item directory. If there
* is one and it is not empty return a list of collections in
@@ -1201,6 +1238,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
sDescription = sDescription.replaceFirst("description:", "");
}
validateFilePath(path, sFilePath);
registerBitstream(c, i, iAssetstore, sFilePath, sBundle, sDescription);
logInfo("\tRegistering Bitstream: " + sFilePath
+ "\tAssetstore: " + iAssetstore
@@ -1414,6 +1452,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
return;
}
validateFilePath(path, fileName);
String fullpath = path + File.separatorChar + fileName;
// get an input stream
@@ -1743,7 +1782,8 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
} else {
logInfo("\tSetting special permissions for "
+ bitstreamName);
setPermission(c, myGroup, actionID, bs);
String rpType = useWorkflow ? ResourcePolicy.TYPE_SUBMISSION : ResourcePolicy.TYPE_INHERITED;
setPermission(c, myGroup, rpType, actionID, bs);
}
}
@@ -1801,24 +1841,25 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
*
* @param c DSpace Context
* @param g Dspace Group
* @param rpType resource policy type string
* @param actionID action identifier
* @param bs Bitstream
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @see org.dspace.core.Constants
*/
protected void setPermission(Context c, Group g, int actionID, Bitstream bs)
protected void setPermission(Context c, Group g, String rpType, int actionID, Bitstream bs)
throws SQLException, AuthorizeException {
if (!isTest) {
// remove the default policy
authorizeService.removeAllPolicies(c, bs);
// add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, g);
rp.setdSpaceObject(bs);
rp.setAction(actionID);
rp.setGroup(g);
rp.setRpType(rpType);
resourcePolicyService.update(c, rp);
} else {
@@ -1886,9 +1927,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
*/
protected Document loadXML(String filename) throws IOException,
ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
DocumentBuilder builder = XMLUtils.getDocumentBuilder();
return builder.parse(new File(filename));
}
@@ -1957,58 +1996,57 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
try {
while (entries.hasMoreElements()) {
entry = entries.nextElement();
String entryName = entry.getName();
File outFile = new File(zipDir + entryName);
// Verify that this file/directory will be extracted into our zipDir (and not somewhere else!)
if (!outFile.toPath().normalize().startsWith(zipDir)) {
throw new IOException("Bad zip entry: '" + entryName
+ "' in file '" + zipfile.getAbsolutePath() + "'!"
+ " Cannot process this file or directory.");
}
if (entry.isDirectory()) {
if (!new File(zipDir + entry.getName()).mkdirs()) {
if (!outFile.mkdirs()) {
logError("Unable to create contents directory: " + zipDir + entry.getName());
}
} else {
String entryName = entry.getName();
File outFile = new File(zipDir + entryName);
// Verify that this file will be extracted into our zipDir (and not somewhere else!)
if (!outFile.toPath().normalize().startsWith(zipDir)) {
throw new IOException("Bad zip entry: '" + entryName
+ "' in file '" + zipfile.getAbsolutePath() + "'!"
+ " Cannot process this file.");
} else {
logInfo("Extracting file: " + entryName);
logInfo("Extracting file: " + entryName);
int index = entryName.lastIndexOf('/');
if (index == -1) {
// Was it created on Windows instead?
index = entryName.lastIndexOf('\\');
}
if (index > 0) {
File dir = new File(zipDir + entryName.substring(0, index));
if (!dir.exists() && !dir.mkdirs()) {
logError("Unable to create directory: " + dir.getAbsolutePath());
}
//Entries could have too many directories, and we need to adjust the sourcedir
// file1.zip (SimpleArchiveFormat / item1 / contents|dublin_core|...
// SimpleArchiveFormat / item2 / contents|dublin_core|...
// or
// file2.zip (item1 / contents|dublin_core|...
// item2 / contents|dublin_core|...
//regex supports either windows or *nix file paths
String[] entryChunks = entryName.split("/|\\\\");
if (entryChunks.length > 2) {
if (StringUtils.equals(sourceDirForZip, sourcedir)) {
sourceDirForZip = sourcedir + "/" + entryChunks[0];
}
}
}
byte[] buffer = new byte[1024];
int len;
InputStream in = zf.getInputStream(entry);
BufferedOutputStream out = new BufferedOutputStream(
new FileOutputStream(outFile));
while ((len = in.read(buffer)) >= 0) {
out.write(buffer, 0, len);
}
in.close();
out.close();
int index = entryName.lastIndexOf('/');
if (index == -1) {
// Was it created on Windows instead?
index = entryName.lastIndexOf('\\');
}
if (index > 0) {
File dir = new File(zipDir + entryName.substring(0, index));
if (!dir.exists() && !dir.mkdirs()) {
logError("Unable to create directory: " + dir.getAbsolutePath());
}
//Entries could have too many directories, and we need to adjust the sourcedir
// file1.zip (SimpleArchiveFormat / item1 / contents|dublin_core|...
// SimpleArchiveFormat / item2 / contents|dublin_core|...
// or
// file2.zip (item1 / contents|dublin_core|...
// item2 / contents|dublin_core|...
//regex supports either windows or *nix file paths
String[] entryChunks = entryName.split("/|\\\\");
if (entryChunks.length > 2) {
if (StringUtils.equals(sourceDirForZip, sourcedir)) {
sourceDirForZip = sourcedir + "/" + entryChunks[0];
}
}
}
byte[] buffer = new byte[1024];
int len;
InputStream in = zf.getInputStream(entry);
BufferedOutputStream out = new BufferedOutputStream(
new FileOutputStream(outFile));
while ((len = in.read(buffer)) >= 0) {
out.write(buffer, 0, len);
}
in.close();
out.close();
}
}
} finally {
@@ -2233,7 +2271,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
String fileName) throws MessagingException {
try {
Locale supportedLocale = I18nUtil.getEPersonLocale(eperson);
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "bte_batch_import_success"));
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "batch_import_success"));
email.addRecipient(eperson.getEmail());
email.addArgument(fileName);
@@ -2249,7 +2287,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
logError("An error occurred during item import, the user will be notified. " + error);
try {
Locale supportedLocale = I18nUtil.getEPersonLocale(eperson);
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "bte_batch_import_error"));
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "batch_import_error"));
email.addRecipient(eperson.getEmail());
email.addArgument(error);
email.addArgument(configurationService.getProperty("dspace.ui.url") + "/feedback");

View File

@@ -70,16 +70,19 @@ public class DeleteBitstreamsAction extends UpdateBitstreamsAction {
}
}
if (alterProvenance) {
if (alterProvenance && !bundles.isEmpty()) {
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
String append = "Bitstream " + bs.getName() + " deleted on " + DCDate
.getCurrent() + "; ";
Item item = bundles.iterator().next().getItems().iterator().next();
ItemUpdate.pr("Append provenance with: " + append);
List<Item> items = bundles.iterator().next().getItems();
if (!items.isEmpty()) {
Item item = items.iterator().next();
ItemUpdate.pr("Append provenance with: " + append);
if (!isTest) {
MetadataUtilities.appendMetadata(context, item, dtom, false, append);
if (!isTest) {
MetadataUtilities.appendMetadata(context, item, dtom, false, append);
}
}
}
}

View File

@@ -23,8 +23,6 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
@@ -33,6 +31,7 @@ import javax.xml.transform.TransformerFactory;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.LocalSchemaFilenameFilter;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
@@ -52,7 +51,6 @@ public class ItemArchive {
public static final String DUBLIN_CORE_XML = "dublin_core.xml";
protected static DocumentBuilder builder = null;
protected Transformer transformer = null;
protected List<DtoMetadata> dtomList = null;
@@ -95,14 +93,14 @@ public class ItemArchive {
InputStream is = null;
try {
is = new FileInputStream(new File(dir, DUBLIN_CORE_XML));
itarch.dtomList = MetadataUtilities.loadDublinCore(getDocumentBuilder(), is);
itarch.dtomList = MetadataUtilities.loadDublinCore(XMLUtils.getDocumentBuilder(), is);
//The code to search for local schema files was copied from org.dspace.app.itemimport
// .ItemImportServiceImpl.java
File file[] = dir.listFiles(new LocalSchemaFilenameFilter());
for (int i = 0; i < file.length; i++) {
is = new FileInputStream(file[i]);
itarch.dtomList.addAll(MetadataUtilities.loadDublinCore(getDocumentBuilder(), is));
itarch.dtomList.addAll(MetadataUtilities.loadDublinCore(XMLUtils.getDocumentBuilder(), is));
}
} finally {
if (is != null) {
@@ -126,14 +124,6 @@ public class ItemArchive {
return itarch;
}
protected static DocumentBuilder getDocumentBuilder()
throws ParserConfigurationException {
if (builder == null) {
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
}
return builder;
}
/**
* Getter for Transformer
*
@@ -318,7 +308,7 @@ public class ItemArchive {
try {
out = new FileOutputStream(new File(dir, "dublin_core.xml"));
Document doc = MetadataUtilities.writeDublinCore(getDocumentBuilder(), undoDtomList);
Document doc = MetadataUtilities.writeDublinCore(XMLUtils.getDocumentBuilder(), undoDtomList);
MetadataUtilities.writeDocument(doc, getTransformer(), out);
// if undo has delete bitstream

View File

@@ -19,6 +19,7 @@ import java.util.TreeMap;
import org.apache.commons.cli.ParseException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.XMLUtils;
import org.dspace.core.Context;
import org.dspace.scripts.DSpaceRunnable;
import org.dspace.scripts.DSpaceRunnable.StepResult;
@@ -314,7 +315,7 @@ public class ScriptLauncher {
String config = kernelImpl.getConfigurationService().getProperty("dspace.dir") +
System.getProperty("file.separator") + "config" +
System.getProperty("file.separator") + "launcher.xml";
SAXBuilder saxBuilder = new SAXBuilder();
SAXBuilder saxBuilder = XMLUtils.getSAXBuilder();
Document doc = null;
try {
doc = saxBuilder.build(config);

View File

@@ -33,7 +33,8 @@ public class MediaFilterScriptConfiguration<T extends MediaFilterScript> extends
options.addOption("v", "verbose", false, "print all extracted text and other details to STDOUT");
options.addOption("q", "quiet", false, "do not print anything except in the event of errors.");
options.addOption("f", "force", false, "force all bitstreams to be processed");
options.addOption("i", "identifier", true, "ONLY process bitstreams belonging to identifier");
options.addOption("i", "identifier", true,
"ONLY process bitstreams belonging to the provided handle identifier");
options.addOption("m", "maximum", true, "process no more than maximum items");
options.addOption("h", "help", false, "help");

View File

@@ -132,12 +132,18 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
@Override
public void applyFiltersCommunity(Context context, Community community)
throws Exception { //only apply filters if community not in skip-list
// ensure that the community is attached to the current hibernate session
// as we are committing after each item (handles, sub-communties and
// collections are lazy attributes)
community = context.reloadEntity(community);
if (!inSkipList(community.getHandle())) {
List<Community> subcommunities = community.getSubcommunities();
for (Community subcommunity : subcommunities) {
applyFiltersCommunity(context, subcommunity);
}
// ensure that the community is attached to the current hibernate session
// as we are committing after each item
community = context.reloadEntity(community);
List<Collection> collections = community.getCollections();
for (Collection collection : collections) {
applyFiltersCollection(context, collection);
@@ -148,6 +154,9 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
@Override
public void applyFiltersCollection(Context context, Collection collection)
throws Exception {
// ensure that the collection is attached to the current hibernate session
// as we are committing after each item (handles are lazy attributes)
collection = context.reloadEntity(collection);
//only apply filters if collection not in skip-list
if (!inSkipList(collection.getHandle())) {
Iterator<Item> itemIterator = itemService.findAllByCollection(context, collection);
@@ -171,6 +180,8 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
}
// clear item objects from context cache and internal cache
c.uncacheEntity(currentItem);
// commit after each item to release DB resources
c.commit();
currentItem = null;
}
}

View File

@@ -18,6 +18,7 @@ import java.nio.charset.StandardCharsets;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.util.IOUtils;
import org.apache.tika.Tika;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
@@ -37,6 +38,8 @@ import org.xml.sax.SAXException;
public class TikaTextExtractionFilter
extends MediaFilter {
private final static Logger log = LogManager.getLogger();
private static final int DEFAULT_MAX_CHARS = 100_000;
private static final int DEFAULT_MAX_ARRAY = 100_000_000;
@Override
public String getFilteredName(String oldFilename) {
@@ -70,9 +73,12 @@ public class TikaTextExtractionFilter
}
// Not using temporary file. We'll use Tika's default in-memory parsing.
// Get maximum characters to extract. Default is 100,000 chars, which is also Tika's default setting.
String extractedText;
int maxChars = configurationService.getIntProperty("textextractor.max-chars", 100000);
// Get maximum characters to extract. Default is 100,000 chars, which is also Tika's default setting.
int maxChars = configurationService.getIntProperty("textextractor.max-chars", DEFAULT_MAX_CHARS);
// Get maximum size of structure that Tika will try to buffer.
int maxArray = configurationService.getIntProperty("textextractor.max-array", DEFAULT_MAX_ARRAY);
IOUtils.setByteArrayMaxOverride(maxArray);
try {
// Use Tika to extract text from input. Tika will automatically detect the file type.
Tika tika = new Tika();
@@ -80,13 +86,13 @@ public class TikaTextExtractionFilter
extractedText = tika.parseToString(source);
} catch (IOException e) {
System.err.format("Unable to extract text from bitstream in Item %s%n", currentItem.getID().toString());
e.printStackTrace();
e.printStackTrace(System.err);
log.error("Unable to extract text from bitstream in Item {}", currentItem.getID().toString(), e);
throw e;
} catch (OutOfMemoryError oe) {
System.err.format("OutOfMemoryError occurred when extracting text from bitstream in Item %s. " +
"You may wish to enable 'textextractor.use-temp-file'.%n", currentItem.getID().toString());
oe.printStackTrace();
oe.printStackTrace(System.err);
log.error("OutOfMemoryError occurred when extracting text from bitstream in Item {}. " +
"You may wish to enable 'textextractor.use-temp-file'.", currentItem.getID().toString(), oe);
throw oe;
@@ -138,7 +144,7 @@ public class TikaTextExtractionFilter
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
try {
writer.append(new String(ch), start, length);
writer.append(new String(ch, start, length));
} catch (IOException e) {
String errorMsg = String.format("Could not append to temporary file at %s " +
"when performing text extraction",
@@ -156,7 +162,7 @@ public class TikaTextExtractionFilter
@Override
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
try {
writer.append(new String(ch), start, length);
writer.append(new String(ch, start, length));
} catch (IOException e) {
String errorMsg = String.format("Could not append to temporary file at %s " +
"when performing text extraction",
@@ -167,6 +173,10 @@ public class TikaTextExtractionFilter
}
});
ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
int maxArray = configurationService.getIntProperty("textextractor.max-array", DEFAULT_MAX_ARRAY);
IOUtils.setByteArrayMaxOverride(maxArray);
AutoDetectParser parser = new AutoDetectParser();
Metadata metadata = new Metadata();
// parse our source InputStream using the above custom handler

View File

@@ -18,6 +18,7 @@ import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.sfx.service.SFXFileReaderService;
import org.dspace.app.util.XMLUtils;
import org.dspace.content.DCPersonName;
import org.dspace.content.Item;
import org.dspace.content.MetadataValue;
@@ -79,9 +80,9 @@ public class SFXFileReaderServiceImpl implements SFXFileReaderService {
log.info("Parsing XML file... " + fileName);
DocumentBuilder docBuilder;
Document doc = null;
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
docBuilderFactory.setIgnoringElementContentWhitespace(true);
try {
DocumentBuilderFactory docBuilderFactory = XMLUtils.getDocumentBuilderFactory();
docBuilderFactory.setIgnoringElementContentWhitespace(true);
docBuilder = docBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
log.error("Wrong parser configuration: " + e.getMessage());

View File

@@ -17,15 +17,15 @@ import javax.annotation.PostConstruct;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.app.client.DSpaceHttpClientFactory;
import org.dspace.app.sherpa.v2.SHERPAPublisherResponse;
import org.dspace.app.sherpa.v2.SHERPAResponse;
import org.dspace.app.sherpa.v2.SHERPAUtils;
@@ -45,8 +45,6 @@ import org.springframework.cache.annotation.Cacheable;
*/
public class SHERPAService {
private CloseableHttpClient client = null;
private int maxNumberOfTries;
private long sleepBetweenTimeouts;
private int timeout = 5000;
@@ -59,19 +57,6 @@ public class SHERPAService {
@Autowired
ConfigurationService configurationService;
/**
* Create a new HTTP builder with sensible defaults in constructor
*/
public SHERPAService() {
HttpClientBuilder builder = HttpClientBuilder.create();
// httpclient 4.3+ doesn't appear to have any sensible defaults any more. Setting conservative defaults as
// not to hammer the SHERPA service too much.
client = builder
.disableAutomaticRetries()
.setMaxConnTotal(5)
.build();
}
/**
* Complete initialization of the Bean.
*/
@@ -132,46 +117,47 @@ public class SHERPAService {
timeout,
sleepBetweenTimeouts));
try {
try (CloseableHttpClient client = DSpaceHttpClientFactory.getInstance().buildWithoutAutomaticRetries(5)) {
Thread.sleep(sleepBetweenTimeouts);
// Construct a default HTTP method (first result)
method = constructHttpGet(type, field, predicate, value, start, limit);
// Execute the method
HttpResponse response = client.execute(method);
int statusCode = response.getStatusLine().getStatusCode();
try (CloseableHttpResponse response = client.execute(method)) {
int statusCode = response.getStatusLine().getStatusCode();
log.debug(response.getStatusLine().getStatusCode() + ": "
+ response.getStatusLine().getReasonPhrase());
log.debug(response.getStatusLine().getStatusCode() + ": "
+ response.getStatusLine().getReasonPhrase());
if (statusCode != HttpStatus.SC_OK) {
sherpaResponse = new SHERPAPublisherResponse("SHERPA/RoMEO return not OK status: "
+ statusCode);
String errorBody = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
log.error("Error from SHERPA HTTP request: " + errorBody);
}
HttpEntity responseBody = response.getEntity();
// If the response body is valid, pass to SHERPAResponse for parsing as JSON
if (null != responseBody) {
log.debug("Non-null SHERPA resonse received for query of " + value);
InputStream content = null;
try {
content = responseBody.getContent();
sherpaResponse =
new SHERPAPublisherResponse(content, SHERPAPublisherResponse.SHERPAFormat.JSON);
} catch (IOException e) {
log.error("Encountered exception while contacting SHERPA/RoMEO: " + e.getMessage(), e);
} finally {
if (content != null) {
content.close();
}
if (statusCode != HttpStatus.SC_OK) {
sherpaResponse = new SHERPAPublisherResponse("SHERPA/RoMEO return not OK status: "
+ statusCode);
String errorBody = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
log.error("Error from SHERPA HTTP request: " + errorBody);
}
HttpEntity responseBody = response.getEntity();
// If the response body is valid, pass to SHERPAResponse for parsing as JSON
if (null != responseBody) {
log.debug("Non-null SHERPA response received for query of " + value);
InputStream content = null;
try {
content = responseBody.getContent();
sherpaResponse =
new SHERPAPublisherResponse(content, SHERPAPublisherResponse.SHERPAFormat.JSON);
} catch (IOException e) {
log.error("Encountered exception while contacting SHERPA/RoMEO: " + e.getMessage(), e);
} finally {
if (content != null) {
content.close();
}
}
} else {
log.debug("Empty SHERPA response body for query on " + value);
sherpaResponse = new SHERPAPublisherResponse("SHERPA/RoMEO returned no response");
}
} else {
log.debug("Empty SHERPA response body for query on " + value);
sherpaResponse = new SHERPAPublisherResponse("SHERPA/RoMEO returned no response");
}
} catch (URISyntaxException e) {
String errorMessage = "Error building SHERPA v2 API URI: " + e.getMessage();
@@ -235,45 +221,46 @@ public class SHERPAService {
timeout,
sleepBetweenTimeouts));
try {
try (CloseableHttpClient client = DSpaceHttpClientFactory.getInstance().buildWithoutAutomaticRetries(5)) {
Thread.sleep(sleepBetweenTimeouts);
// Construct a default HTTP method (first result)
method = constructHttpGet(type, field, predicate, value, start, limit);
// Execute the method
HttpResponse response = client.execute(method);
int statusCode = response.getStatusLine().getStatusCode();
try (CloseableHttpResponse response = client.execute(method)) {
int statusCode = response.getStatusLine().getStatusCode();
log.debug(response.getStatusLine().getStatusCode() + ": "
+ response.getStatusLine().getReasonPhrase());
log.debug(response.getStatusLine().getStatusCode() + ": "
+ response.getStatusLine().getReasonPhrase());
if (statusCode != HttpStatus.SC_OK) {
sherpaResponse = new SHERPAResponse("SHERPA/RoMEO return not OK status: "
+ statusCode);
String errorBody = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
log.error("Error from SHERPA HTTP request: " + errorBody);
}
HttpEntity responseBody = response.getEntity();
// If the response body is valid, pass to SHERPAResponse for parsing as JSON
if (null != responseBody) {
log.debug("Non-null SHERPA resonse received for query of " + value);
InputStream content = null;
try {
content = responseBody.getContent();
sherpaResponse = new SHERPAResponse(content, SHERPAResponse.SHERPAFormat.JSON);
} catch (IOException e) {
log.error("Encountered exception while contacting SHERPA/RoMEO: " + e.getMessage(), e);
} finally {
if (content != null) {
content.close();
}
if (statusCode != HttpStatus.SC_OK) {
sherpaResponse = new SHERPAResponse("SHERPA/RoMEO return not OK status: "
+ statusCode);
String errorBody = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
log.error("Error from SHERPA HTTP request: " + errorBody);
}
HttpEntity responseBody = response.getEntity();
// If the response body is valid, pass to SHERPAResponse for parsing as JSON
if (null != responseBody) {
log.debug("Non-null SHERPA response received for query of " + value);
InputStream content = null;
try {
content = responseBody.getContent();
sherpaResponse = new SHERPAResponse(content, SHERPAResponse.SHERPAFormat.JSON);
} catch (IOException e) {
log.error("Encountered exception while contacting SHERPA/RoMEO: " + e.getMessage(), e);
} finally {
if (content != null) {
content.close();
}
}
} else {
log.debug("Empty SHERPA response body for query on " + value);
sherpaResponse = new SHERPAResponse("SHERPA/RoMEO returned no response");
}
} else {
log.debug("Empty SHERPA response body for query on " + value);
sherpaResponse = new SHERPAResponse("SHERPA/RoMEO returned no response");
}
} catch (URISyntaxException e) {
String errorMessage = "Error building SHERPA v2 API URI: " + e.getMessage();
@@ -283,7 +270,7 @@ public class SHERPAService {
String errorMessage = "Encountered exception while contacting SHERPA/RoMEO: " + e.getMessage();
log.error(errorMessage, e);
sherpaResponse = new SHERPAResponse(errorMessage);
} catch (InterruptedException e) {
} catch (InterruptedException e) {
String errorMessage = "Encountered exception while sleeping thread: " + e.getMessage();
log.error(errorMessage, e);
sherpaResponse = new SHERPAResponse(errorMessage);

View File

@@ -7,6 +7,8 @@
*/
package org.dspace.app.sitemap;
import static org.dspace.discovery.SearchUtils.RESOURCE_TYPE_FIELD;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
@@ -189,7 +191,8 @@ public class GenerateSitemaps {
try {
DiscoverQuery discoveryQuery = new DiscoverQuery();
discoveryQuery.setMaxResults(PAGE_SIZE);
discoveryQuery.setQuery("search.resourcetype:Community");
discoveryQuery.setQuery("*:*");
discoveryQuery.addFilterQueries(RESOURCE_TYPE_FIELD + ":Community");
do {
discoveryQuery.setStart(offset);
DiscoverResult discoverResult = searchService.search(c, discoveryQuery);
@@ -213,7 +216,8 @@ public class GenerateSitemaps {
offset = 0;
discoveryQuery = new DiscoverQuery();
discoveryQuery.setMaxResults(PAGE_SIZE);
discoveryQuery.setQuery("search.resourcetype:Collection");
discoveryQuery.setQuery("*:*");
discoveryQuery.addFilterQueries(RESOURCE_TYPE_FIELD + ":Collection");
do {
discoveryQuery.setStart(offset);
DiscoverResult discoverResult = searchService.search(c, discoveryQuery);
@@ -237,7 +241,8 @@ public class GenerateSitemaps {
offset = 0;
discoveryQuery = new DiscoverQuery();
discoveryQuery.setMaxResults(PAGE_SIZE);
discoveryQuery.setQuery("search.resourcetype:Item");
discoveryQuery.setQuery("*:*");
discoveryQuery.addFilterQueries(RESOURCE_TYPE_FIELD + ":Item");
discoveryQuery.addSearchField("search.entitytype");
do {

View File

@@ -98,42 +98,25 @@ public class SolrDatabaseResyncCli extends DSpaceRunnable<SolrDatabaseResyncCliS
private void performStatusUpdate(Context context) throws SearchServiceException, SolrServerException, IOException {
SolrQuery solrQuery = new SolrQuery();
solrQuery.setQuery(STATUS_FIELD + ":" + STATUS_FIELD_PREDB);
solrQuery.setQuery("*:*");
solrQuery.addFilterQuery(STATUS_FIELD + ":" + STATUS_FIELD_PREDB);
solrQuery.addFilterQuery(SearchUtils.RESOURCE_TYPE_FIELD + ":" + IndexableItem.TYPE);
String dateRangeFilter = SearchUtils.LAST_INDEXED_FIELD + ":[* TO " + maxTime + "]";
logDebugAndOut("Date range filter used; " + dateRangeFilter);
solrQuery.addFilterQuery(dateRangeFilter);
solrQuery.addField(SearchUtils.RESOURCE_ID_FIELD);
solrQuery.addField(SearchUtils.RESOURCE_UNIQUE_ID);
solrQuery.setRows(0);
QueryResponse response = solrSearchCore.getSolr().query(solrQuery, solrSearchCore.REQUEST_METHOD);
if (response != null) {
logInfoAndOut(response.getResults().size() + " items found to process");
for (SolrDocument doc : response.getResults()) {
String uuid = (String) doc.getFirstValue(SearchUtils.RESOURCE_ID_FIELD);
String uniqueId = (String) doc.getFirstValue(SearchUtils.RESOURCE_UNIQUE_ID);
logDebugAndOut("Processing item with UUID: " + uuid);
Optional<IndexableObject> indexableObject = Optional.empty();
try {
indexableObject = indexObjectServiceFactory
.getIndexableObjectFactory(uniqueId).findIndexableObject(context, uuid);
} catch (SQLException e) {
log.warn("An exception occurred when attempting to retrieve item with UUID \"" + uuid +
"\" from the database, removing related solr document", e);
}
try {
if (indexableObject.isPresent()) {
logDebugAndOut("Item exists in DB, updating solr document");
updateItem(context, indexableObject.get());
} else {
logDebugAndOut("Item doesn't exist in DB, removing solr document");
removeItem(context, uniqueId);
}
} catch (SQLException | IOException e) {
log.error(e.getMessage(), e);
if (response != null && response.getResults() != null) {
long nrOfPreDBResults = response.getResults().getNumFound();
if (nrOfPreDBResults > 0) {
logInfoAndOut(nrOfPreDBResults + " items found to process");
int batchSize = configurationService.getIntProperty("script.solr-database-resync.batch-size", 100);
for (int start = 0; start < nrOfPreDBResults; start += batchSize) {
solrQuery.setStart(start);
solrQuery.setRows(batchSize);
performStatusUpdateOnNextBatch(context, solrQuery);
}
}
}
@@ -141,6 +124,38 @@ public class SolrDatabaseResyncCli extends DSpaceRunnable<SolrDatabaseResyncCliS
indexingService.commit();
}
private void performStatusUpdateOnNextBatch(Context context, SolrQuery solrQuery)
throws SolrServerException, IOException {
QueryResponse response = solrSearchCore.getSolr().query(solrQuery, solrSearchCore.REQUEST_METHOD);
for (SolrDocument doc : response.getResults()) {
String uuid = (String) doc.getFirstValue(SearchUtils.RESOURCE_ID_FIELD);
String uniqueId = (String) doc.getFirstValue(SearchUtils.RESOURCE_UNIQUE_ID);
logDebugAndOut("Processing item with UUID: " + uuid);
Optional<IndexableObject> indexableObject = Optional.empty();
try {
indexableObject = indexObjectServiceFactory
.getIndexableObjectFactory(uniqueId).findIndexableObject(context, uuid);
} catch (SQLException e) {
log.warn("An exception occurred when attempting to retrieve item with UUID \"" + uuid +
"\" from the database, removing related solr document", e);
}
try {
if (indexableObject.isPresent()) {
logDebugAndOut("Item exists in DB, updating solr document");
updateItem(context, indexableObject.get());
} else {
logDebugAndOut("Item doesn't exist in DB, removing solr document");
removeItem(context, uniqueId);
}
} catch (SQLException | IOException e) {
log.error(e.getMessage(), e);
}
}
}
private void updateItem(Context context, IndexableObject indexableObject) throws SolrServerException, IOException {
Map<String,Object> fieldModifier = new HashMap<>(1);
fieldModifier.put("remove", STATUS_FIELD_PREDB);

View File

@@ -281,10 +281,14 @@ public class LogAnalyser {
*/
private static String fileTemplate = "dspace\\.log.*";
private static final ConfigurationService configurationService =
DSpaceServicesFactory.getInstance().getConfigurationService();
/**
* the configuration file from which to configure the analyser
*/
private static String configFile;
private static String configFile = configurationService.getProperty("dspace.dir")
+ File.separator + "config" + File.separator + "dstat.cfg";
/**
* the output file to which to write aggregation data
@@ -616,8 +620,6 @@ public class LogAnalyser {
}
// now do the host name and url lookup
ConfigurationService configurationService
= DSpaceServicesFactory.getInstance().getConfigurationService();
hostName = Utils.getHostName(configurationService.getProperty("dspace.ui.url"));
name = configurationService.getProperty("dspace.name").trim();
url = configurationService.getProperty("dspace.ui.url").trim();
@@ -658,8 +660,6 @@ public class LogAnalyser {
String myConfigFile, String myOutFile,
Date myStartDate, Date myEndDate,
boolean myLookUp) {
ConfigurationService configurationService
= DSpaceServicesFactory.getInstance().getConfigurationService();
if (myLogDir != null) {
logDir = myLogDir;
@@ -673,9 +673,6 @@ public class LogAnalyser {
if (myConfigFile != null) {
configFile = myConfigFile;
} else {
configFile = configurationService.getProperty("dspace.dir")
+ File.separator + "config" + File.separator + "dstat.cfg";
}
if (myStartDate != null) {

View File

@@ -163,7 +163,7 @@ public class DCInput {
* The scope of the input sets, this restricts hidden metadata fields from
* view by the end user during submission.
*/
public static final String SUBMISSION_SCOPE = "submit";
public static final String SUBMISSION_SCOPE = "submission";
/**
* Class constructor for creating a DCInput object based on the contents of
@@ -262,7 +262,7 @@ public class DCInput {
/**
* Is this DCInput for display in the given scope? The scope should be
* either "workflow" or "submit", as per the input forms definition. If the
* either "workflow" or "submission", as per the input forms definition. If the
* internal visibility is set to "null" then this will always return true.
*
* @param scope String identifying the scope that this input's visibility

View File

@@ -14,9 +14,7 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import org.apache.commons.lang3.StringUtils;
@@ -119,15 +117,17 @@ public class DCInputsReader {
formDefns = new HashMap<String, List<List<Map<String, String>>>>();
valuePairs = new HashMap<String, List<String>>();
String uri = "file:" + new File(fileName).getAbsolutePath();
File inputFile = new File(fileName);
String inputFileDir = inputFile.toPath().normalize().getParent().toString();
String uri = "file:" + inputFile.getAbsolutePath();
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder db = factory.newDocumentBuilder();
// This document builder will *not* disable external
// entities as they can be useful in managing large forms, but
// it will restrict them to be within the directory that the
// current input form XML file exists (or a sub-directory)
DocumentBuilder db = XMLUtils.getTrustedDocumentBuilder(inputFileDir);
Document doc = db.parse(uri);
doNodes(doc);
checkValues();
@@ -150,17 +150,16 @@ public class DCInputsReader {
* Returns the set of DC inputs used for a particular collection, or the
* default set if no inputs defined for the collection
*
* @param collectionHandle collection's unique Handle
* @param collection collection for which search the set of DC inputs
* @return DC input set
* @throws DCInputsReaderException if no default set defined
* @throws ServletException
*/
public List<DCInputSet> getInputsByCollectionHandle(String collectionHandle)
public List<DCInputSet> getInputsByCollection(Collection collection)
throws DCInputsReaderException {
SubmissionConfig config;
try {
config = SubmissionServiceFactory.getInstance().getSubmissionConfigService()
.getSubmissionConfigByCollection(collectionHandle);
.getSubmissionConfigByCollection(collection);
String formName = config.getSubmissionName();
if (formName == null) {
throw new DCInputsReaderException("No form designated as default");
@@ -381,7 +380,7 @@ public class DCInputsReader {
}
// sanity check number of fields
if (fields.size() < 1) {
throw new DCInputsReaderException("Form " + formName + "row " + rowIdx + " has no fields");
throw new DCInputsReaderException("Form " + formName + ", row " + rowIdx + " has no fields");
}
}
@@ -691,7 +690,7 @@ public class DCInputsReader {
public String getInputFormNameByCollectionAndField(Collection collection, String field)
throws DCInputsReaderException {
List<DCInputSet> inputSets = getInputsByCollectionHandle(collection.getHandle());
List<DCInputSet> inputSets = getInputsByCollection(collection);
for (DCInputSet inputSet : inputSets) {
String[] tokenized = Utils.tokenize(field);
String schema = tokenized[0];

View File

@@ -11,7 +11,6 @@ import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.cli.CommandLine;
@@ -64,20 +63,36 @@ public class InitializeEntities {
*/
public static void main(String[] argv) throws SQLException, AuthorizeException, ParseException {
InitializeEntities initializeEntities = new InitializeEntities();
// Set up command-line options and parse arguments
CommandLineParser parser = new DefaultParser();
Options options = createCommandLineOptions();
CommandLine line = parser.parse(options,argv);
String fileLocation = getFileLocationFromCommandLine(line);
// First of all, check if the help option was entered or a required argument is missing
checkHelpEntered(options, line);
// Get the file location from the command line
String fileLocation = getFileLocationFromCommandLine(line);
// Run the script
initializeEntities.run(fileLocation);
}
/**
* Check if the help option was entered or a required argument is missing. If so, print help and exit.
* @param options the defined command-line options
* @param line the parsed command-line arguments
*/
private static void checkHelpEntered(Options options, CommandLine line) {
if (line.hasOption("h")) {
if (line.hasOption("h") || !line.hasOption("f")) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("Intialize Entities", options);
System.exit(0);
}
}
/**
* Get the file path from the command-line argument. Exits with exit code 1 if no file argument was entered.
* @param line the parsed command-line arguments
* @return the file path
*/
private static String getFileLocationFromCommandLine(CommandLine line) {
String query = line.getOptionValue("f");
if (StringUtils.isEmpty(query)) {
@@ -88,13 +103,25 @@ public class InitializeEntities {
return query;
}
/**
* Create the command-line options
* @return the command-line options
*/
protected static Options createCommandLineOptions() {
Options options = new Options();
options.addOption("f", "file", true, "the location for the file containing the xml data");
options.addOption("f", "file", true, "the path to the file containing the " +
"relationship definitions (e.g. ${dspace.dir}/config/entities/relationship-types.xml)");
options.addOption("h", "help", false, "print this message");
return options;
}
/**
* Run the script for the given file location
* @param fileLocation the file location
* @throws SQLException If something goes wrong initializing context or inserting relationship types
* @throws AuthorizeException If the script user fails to authorize while inserting relationship types
*/
private void run(String fileLocation) throws SQLException, AuthorizeException {
Context context = new Context();
context.turnOffAuthorisationSystem();
@@ -102,11 +129,18 @@ public class InitializeEntities {
context.complete();
}
/**
* Parse the XML file at fileLocation to create relationship types in the database
* @param context DSpace context
* @param fileLocation the full or relative file path to the relationship types XML
* @throws AuthorizeException If the script user fails to authorize while inserting relationship types
*/
private void parseXMLToRelations(Context context, String fileLocation) throws AuthorizeException {
try {
File fXmlFile = new File(fileLocation);
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
// This XML builder will allow external entities, so the relationship types XML should
// be considered trusted by administrators
DocumentBuilder dBuilder = XMLUtils.getTrustedDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
doc.getDocumentElement().normalize();
@@ -158,15 +192,15 @@ public class InitializeEntities {
for (int j = 0; j < leftCardinalityList.getLength(); j++) {
Node node = leftCardinalityList.item(j);
leftCardinalityMin = getString(leftCardinalityMin,(Element) node, "min");
leftCardinalityMax = getString(leftCardinalityMax,(Element) node, "max");
leftCardinalityMin = getCardinalityMinString(leftCardinalityMin,(Element) node, "min");
leftCardinalityMax = getCardinalityMinString(leftCardinalityMax,(Element) node, "max");
}
for (int j = 0; j < rightCardinalityList.getLength(); j++) {
Node node = rightCardinalityList.item(j);
rightCardinalityMin = getString(rightCardinalityMin,(Element) node, "min");
rightCardinalityMax = getString(rightCardinalityMax,(Element) node, "max");
rightCardinalityMin = getCardinalityMinString(rightCardinalityMin,(Element) node, "min");
rightCardinalityMax = getCardinalityMinString(rightCardinalityMax,(Element) node, "max");
}
populateRelationshipType(context, leftType, rightType, leftwardType, rightwardType,
@@ -182,13 +216,39 @@ public class InitializeEntities {
}
}
private String getString(String leftCardinalityMin,Element node, String minOrMax) {
/**
* Extract the min or max value for the left or right cardinality from the node text content
* @param leftCardinalityMin current left cardinality min
* @param node node to extract the min or max value from
* @param minOrMax element tag name to parse
* @return final left cardinality min
*/
private String getCardinalityMinString(String leftCardinalityMin, Element node, String minOrMax) {
if (node.getElementsByTagName(minOrMax).getLength() > 0) {
leftCardinalityMin = node.getElementsByTagName(minOrMax).item(0).getTextContent();
}
return leftCardinalityMin;
}
/**
* Populate the relationship type based on values parsed from the XML relationship types configuration
*
* @param context DSpace context
* @param leftType left relationship type (e.g. "Publication").
* @param rightType right relationship type (e.g. "Journal").
* @param leftwardType leftward relationship type (e.g. "isAuthorOfPublication").
* @param rightwardType rightward relationship type (e.g. "isPublicationOfAuthor").
* @param leftCardinalityMin left cardinality min
* @param leftCardinalityMax left cardinality max
* @param rightCardinalityMin right cardinality min
* @param rightCardinalityMax right cardinality max
* @param copyToLeft copy metadata values to left if right side is deleted
* @param copyToRight copy metadata values to right if left side is deleted
* @param tilted set a tilted relationship side (left or right) if there are many relationships going one way
* to help performance (e.g. authors with 1000s of publications)
* @throws SQLException if database error occurs while saving the relationship type
* @throws AuthorizeException if authorization error occurs while saving the relationship type
*/
private void populateRelationshipType(Context context, String leftType, String rightType, String leftwardType,
String rightwardType, String leftCardinalityMin, String leftCardinalityMax,
String rightCardinalityMin, String rightCardinalityMax,

View File

@@ -101,6 +101,14 @@ public class OpenSearchServiceImpl implements OpenSearchService {
configurationService.getProperty("websvc.opensearch.uicontext");
}
/**
* Get base search UI URL (websvc.opensearch.max_num_of_items_per_request)
*/
public int getMaxNumOfItemsPerRequest() {
return configurationService.getIntProperty(
"websvc.opensearch.max_num_of_items_per_request", 100);
}
@Override
public String getContentType(String format) {
return "html".equals(format) ? "text/html" :
@@ -155,7 +163,7 @@ public class OpenSearchServiceImpl implements OpenSearchService {
format = "atom_1.0";
}
SyndicationFeed feed = new SyndicationFeed(labels.get(SyndicationFeed.MSG_UITYPE));
SyndicationFeed feed = new SyndicationFeed();
feed.populate(null, context, scope, results, labels);
feed.setType(format);
feed.addModule(openSearchMarkup(query, totalResults, start, pageSize));

View File

@@ -11,21 +11,21 @@ import java.io.File;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
import org.dspace.core.Context;
import org.dspace.discovery.SearchServiceException;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.services.factory.DSpaceServicesFactory;
import org.w3c.dom.Document;
@@ -96,6 +96,13 @@ public class SubmissionConfigReader {
*/
private Map<String, Map<String, String>> stepDefns = null;
/**
* Hashmap which stores which submission process configuration is used by
* which entityType, computed from the item submission config file
* (specifically, the 'submission-map' tag)
*/
private Map<String, String> entityTypeToSubmissionConfig = null;
/**
* Reference to the item submission definitions defined in the
* "submission-definitions" section
@@ -127,6 +134,7 @@ public class SubmissionConfigReader {
public void reload() throws SubmissionConfigReaderException {
collectionToSubmissionConfig = null;
entityTypeToSubmissionConfig = null;
stepDefns = null;
submitDefns = null;
buildInputs(configDir + SUBMIT_DEF_FILE_PREFIX + SUBMIT_DEF_FILE_SUFFIX);
@@ -145,26 +153,21 @@ public class SubmissionConfigReader {
*/
private void buildInputs(String fileName) throws SubmissionConfigReaderException {
collectionToSubmissionConfig = new HashMap<String, String>();
submitDefns = new HashMap<String, List<Map<String, String>>>();
entityTypeToSubmissionConfig = new HashMap<String, String>();
submitDefns = new LinkedHashMap<String, List<Map<String, String>>>();
String uri = "file:" + new File(fileName).getAbsolutePath();
try {
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder db = factory.newDocumentBuilder();
// This document builder factory will *not* disable external
// entities as they can be useful in managing large forms, but
// it will restrict them to the config dir containing submission definitions
DocumentBuilder db = XMLUtils.getTrustedDocumentBuilder(configDir);
Document doc = db.parse(uri);
doNodes(doc);
} catch (FactoryConfigurationError fe) {
throw new SubmissionConfigReaderException(
"Cannot create Item Submission Configuration parser", fe);
} catch (SearchServiceException se) {
throw new SubmissionConfigReaderException(
"Cannot perform a discovery search for Item Submission Configuration", se);
} catch (Exception e) {
throw new SubmissionConfigReaderException(
"Error creating Item Submission Configuration: " + e);
@@ -210,18 +213,36 @@ public class SubmissionConfigReader {
* Returns the Item Submission process config used for a particular
* collection, or the default if none is defined for the collection
*
* @param collectionHandle collection's unique Handle
* @param col collection for which search Submission process config
* @return the SubmissionConfig representing the item submission config
* @throws SubmissionConfigReaderException if no default submission process configuration defined
* @throws IllegalStateException if no default submission process configuration defined
*/
public SubmissionConfig getSubmissionConfigByCollection(String collectionHandle) {
// get the name of the submission process config for this collection
String submitName = collectionToSubmissionConfig
.get(collectionHandle);
if (submitName == null) {
public SubmissionConfig getSubmissionConfigByCollection(Collection col) {
String submitName;
if (col != null) {
// get the name of the submission process config for this collection
submitName = collectionToSubmissionConfig
.get(DEFAULT_COLLECTION);
.get(col.getHandle());
if (submitName != null) {
return getSubmissionConfigByName(submitName);
}
}
// get the name of the submission process based on the entity type of this collections
if (!entityTypeToSubmissionConfig.isEmpty()) {
String entityType = collectionService.getMetadataFirstValue(col, "dspace", "entity", "type", Item.ANY);
submitName = entityTypeToSubmissionConfig
.get(entityType);
if (submitName != null) {
return getSubmissionConfigByName(submitName);
}
}
submitName = collectionToSubmissionConfig.get(DEFAULT_COLLECTION);
if (submitName == null) {
throw new IllegalStateException(
"No item submission process configuration designated as 'default' in 'submission-map' section of " +
@@ -300,7 +321,7 @@ public class SubmissionConfigReader {
* should correspond to the collection-form maps, the form definitions, and
* the display/storage word pairs.
*/
private void doNodes(Node n) throws SAXException, SearchServiceException, SubmissionConfigReaderException {
private void doNodes(Node n) throws SAXException, SubmissionConfigReaderException {
if (n == null) {
return;
}
@@ -347,9 +368,7 @@ public class SubmissionConfigReader {
* the collection handle and item submission name, put name in hashmap keyed
* by the collection handle.
*/
private void processMap(Node e) throws SAXException, SearchServiceException {
// create a context
Context context = new Context();
private void processMap(Node e) throws SAXException {
NodeList nl = e.getChildNodes();
int len = nl.getLength();
@@ -369,7 +388,7 @@ public class SubmissionConfigReader {
throw new SAXException(
"name-map element is missing submission-name attribute in 'item-submission.xml'");
}
if (content != null && content.length() > 0) {
if (content != null && !content.isEmpty()) {
throw new SAXException(
"name-map element has content in 'item-submission.xml', it should be empty.");
}
@@ -377,12 +396,7 @@ public class SubmissionConfigReader {
collectionToSubmissionConfig.put(id, value);
} else {
// get all collections for this entity-type
List<Collection> collections = collectionService.findAllCollectionsByEntityType( context,
entityType);
for (Collection collection : collections) {
collectionToSubmissionConfig.putIfAbsent(collection.getHandle(), value);
}
entityTypeToSubmissionConfig.put(entityType, value);
}
} // ignore any child node that isn't a "name-map"
}
@@ -663,4 +677,4 @@ public class SubmissionConfigReader {
}
return results;
}
}
}

View File

@@ -84,11 +84,6 @@ public class SyndicationFeed {
public static final String MSG_FEED_TITLE = "feed.title";
public static final String MSG_FEED_DESCRIPTION = "general-feed.description";
public static final String MSG_METADATA = "metadata.";
public static final String MSG_UITYPE = "ui.type";
// UI keywords
public static final String UITYPE_XMLUI = "xmlui";
public static final String UITYPE_JSPUI = "jspui";
// default DC fields for entry
protected String defaultTitleField = "dc.title";
@@ -145,10 +140,6 @@ public class SyndicationFeed {
// the feed object we are building
protected SyndFeed feed = null;
// memory of UI that called us, "xmlui" or "jspui"
// affects Bitstream retrieval URL and I18N keys
protected String uiType = null;
protected HttpServletRequest request = null;
protected CollectionService collectionService;
@@ -157,12 +148,9 @@ public class SyndicationFeed {
/**
* Constructor.
*
* @param ui either "xmlui" or "jspui"
*/
public SyndicationFeed(String ui) {
public SyndicationFeed() {
feed = new SyndFeedImpl();
uiType = ui;
ContentServiceFactory contentServiceFactory = ContentServiceFactory.getInstance();
itemService = contentServiceFactory.getItemService();
collectionService = contentServiceFactory.getCollectionService();
@@ -518,8 +506,7 @@ public class SyndicationFeed {
protected String urlOfBitstream(HttpServletRequest request, Bitstream logo) {
String name = logo.getName();
return resolveURL(request, null) +
(uiType.equalsIgnoreCase(UITYPE_XMLUI) ? "/bitstream/id/" : "/retrieve/") +
logo.getID() + "/" + (name == null ? "" : name);
"/bitstreams/" + logo.getID() + "/download";
}
protected String baseURL = null; // cache the result for null

View File

@@ -405,21 +405,13 @@ public class Util {
DCInput myInputs = null;
boolean myInputsFound = false;
String formFileName = I18nUtil.getInputFormsFileName(locale);
String col_handle = "";
Collection collection = item.getOwningCollection();
if (collection == null) {
// set an empty handle so to get the default input set
col_handle = "";
} else {
col_handle = collection.getHandle();
}
// Read the input form file for the specific collection
DCInputsReader inputsReader = new DCInputsReader(formFileName);
List<DCInputSet> inputSets = inputsReader.getInputsByCollectionHandle(col_handle);
List<DCInputSet> inputSets = inputsReader.getInputsByCollection(collection);
// Replace the values of Metadatum[] with the correct ones in case
// of
@@ -500,8 +492,8 @@ public class Util {
public static List<String> differenceInSubmissionFields(Collection fromCollection, Collection toCollection)
throws DCInputsReaderException {
DCInputsReader reader = new DCInputsReader();
List<DCInputSet> from = reader.getInputsByCollectionHandle(fromCollection.getHandle());
List<DCInputSet> to = reader.getInputsByCollectionHandle(toCollection.getHandle());
List<DCInputSet> from = reader.getInputsByCollection(fromCollection);
List<DCInputSet> to = reader.getInputsByCollection(toCollection);
Set<String> fromFieldName = new HashSet<>();
Set<String> toFieldName = new HashSet<>();

View File

@@ -13,12 +13,12 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.logging.log4j.Logger;
import org.dspace.app.client.DSpaceHttpClientFactory;
import org.dspace.app.util.dao.WebAppDAO;
import org.dspace.app.util.service.WebAppService;
import org.dspace.core.Context;
@@ -77,8 +77,8 @@ public class WebAppServiceImpl implements WebAppService {
for (WebApp app : webApps) {
method = new HttpHead(app.getUrl());
int status;
try (CloseableHttpClient client = HttpClientBuilder.create().build()) {
HttpResponse response = client.execute(method);
try (CloseableHttpClient client = DSpaceHttpClientFactory.getInstance().build()) {
CloseableHttpResponse response = client.execute(method);
status = response.getStatusLine().getStatusCode();
}
if (status != HttpStatus.SC_OK) {

View File

@@ -7,12 +7,26 @@
*/
package org.dspace.app.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLInputFactory;
import org.apache.commons.lang3.StringUtils;
import org.jdom2.input.SAXBuilder;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
* Simple class to read information from small XML using DOM manipulation
@@ -161,4 +175,195 @@ public class XMLUtils {
}
return result;
}
/**
* Initialize and return a javax DocumentBuilderFactory with NO security
* applied. This is intended only for internal, administrative/configuration
* use where external entities and other dangerous features are actually
* purposefully included.
* The method here is tiny, but may be expanded with other features like
* whitespace handling, and calling this method name helps to document
* the fact that the caller knows it is trusting the XML source / factory.
*
* @return document builder factory to generate new builders
* @throws ParserConfigurationException
*/
public static DocumentBuilderFactory getTrustedDocumentBuilderFactory()
throws ParserConfigurationException {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
return factory;
}
/**
* Initialize and return the javax DocumentBuilderFactory with some basic security
* applied to avoid XXE attacks and other unwanted content inclusion
* @return document builder factory to generate new builders
* @throws ParserConfigurationException
*/
public static DocumentBuilderFactory getDocumentBuilderFactory()
throws ParserConfigurationException {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// No DOCTYPE / DTDs
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
// No external general entities
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
// No external parameter entities
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
// No external DTDs
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
// Even if entities somehow get defined, they will not be expanded
factory.setExpandEntityReferences(false);
// Disable "XInclude" markup processing
factory.setXIncludeAware(false);
return factory;
}
/**
* Initialize and return a javax DocumentBuilder with less security
* applied. This is intended only for internal, administrative/configuration
* use where external entities and other dangerous features are actually
* purposefully included, but are only allowed from specified paths, e.g.
* dspace.dir or some other path specified by the java caller.
* The method here is tiny, but may be expanded with other features like
* whitespace handling, and calling this method name helps to document
* the fact that the caller knows it is trusting the XML source / builder
* <p>
* If no allowedPaths are passed, then all external entities are rejected
*
* @return document builder with no security features set
* @throws ParserConfigurationException if the builder can not be configured
*/
public static DocumentBuilder getTrustedDocumentBuilder(String... allowedPaths)
throws ParserConfigurationException {
DocumentBuilderFactory factory = getTrustedDocumentBuilderFactory();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder builder = factory.newDocumentBuilder();
builder.setEntityResolver(new PathRestrictedEntityResolver(allowedPaths));
return factory.newDocumentBuilder();
}
/**
* Initialize and return the javax DocumentBuilder with some basic security applied
* to avoid XXE attacks and other unwanted content inclusion
* @return document builder for use in XML parsing
* @throws ParserConfigurationException if the builder can not be configured
*/
public static DocumentBuilder getDocumentBuilder()
throws ParserConfigurationException {
return getDocumentBuilderFactory().newDocumentBuilder();
}
/**
* Initialize and return the SAX document builder with some basic security applied
* to avoid XXE attacks and other unwanted content inclusion
* @return SAX document builder for use in XML parsing
*/
public static SAXBuilder getSAXBuilder() {
return getSAXBuilder(false);
}
/**
* Initialize and return the SAX document builder with some basic security applied
* to avoid XXE attacks and other unwanted content inclusion
* @param validate whether to use JDOM XSD validation
* @return SAX document builder for use in XML parsing
*/
public static SAXBuilder getSAXBuilder(boolean validate) {
SAXBuilder saxBuilder = new SAXBuilder();
if (validate) {
saxBuilder.setValidation(true);
}
// No DOCTYPE / DTDs
saxBuilder.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
// No external general entities
saxBuilder.setFeature("http://xml.org/sax/features/external-general-entities", false);
// No external parameter entities
saxBuilder.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
// No external DTDs
saxBuilder.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
// Don't expand entities
saxBuilder.setExpandEntities(false);
return saxBuilder;
}
/**
* Initialize and return the Java XML Input Factory with some basic security applied
* to avoid XXE attacks and other unwanted content inclusion
* @return XML input factory for use in XML parsing
*/
public static XMLInputFactory getXMLInputFactory() {
XMLInputFactory xmlInputFactory = XMLInputFactory.newFactory();
xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
return xmlInputFactory;
}
/**
* This entity resolver accepts one or more path strings in its
* constructor and throws a SAXException if the entity systemID
* is not within the allowed path (or a subdirectory).
* If no parameters are passed, then this effectively disallows
* any external entity resolution.
*/
public static class PathRestrictedEntityResolver implements EntityResolver {
private final List<String> allowedBasePaths;
public PathRestrictedEntityResolver(String... allowedBasePaths) {
this.allowedBasePaths = Arrays.asList(allowedBasePaths);
}
@Override
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException, IOException {
if (systemId == null) {
return null;
}
String filePath;
if (systemId.startsWith("file://")) {
filePath = systemId.substring(7);
} else if (systemId.startsWith("file:")) {
filePath = systemId.substring(5);
} else if (!systemId.contains("://")) {
filePath = systemId;
} else {
throw new SAXException("External resources not allowed: " + systemId +
". Only local file paths are permitted.");
}
Path resolvedPath;
try {
resolvedPath = Paths.get(filePath).toAbsolutePath().normalize();
} catch (Exception e) {
throw new SAXException("Invalid path: " + systemId, e);
}
boolean isAllowed = false;
for (String basePath : allowedBasePaths) {
Path allowedPath = Paths.get(basePath).toAbsolutePath().normalize();
if (resolvedPath.startsWith(allowedPath)) {
isAllowed = true;
break;
}
}
if (!isAllowed) {
throw new SAXException("Access denied to path: " + resolvedPath);
}
File file = resolvedPath.toFile();
if (!file.exists() || !file.canRead()) {
throw new SAXException("File not found or not readable: " + resolvedPath);
}
return new InputSource(new FileInputStream(file));
}
}
}

View File

@@ -117,4 +117,10 @@ public interface OpenSearchService {
public DSpaceObject resolveScope(Context context, String scope) throws SQLException;
/**
* Retrieves the maximum number of items that can be included in a single opensearch request.
*
* @return the maximum number of items allowed per request
*/
int getMaxNumOfItemsPerRequest();
}

View File

@@ -17,6 +17,7 @@ import java.util.Collections;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
@@ -68,12 +69,8 @@ import org.dspace.services.factory.DSpaceServicesFactory;
* @author Ivan Masár
* @author Michael Plate
*/
public class LDAPAuthentication
implements AuthenticationMethod {
public class LDAPAuthentication implements AuthenticationMethod {
/**
* log4j category
*/
private static final Logger log
= org.apache.logging.log4j.LogManager.getLogger(LDAPAuthentication.class);
@@ -130,7 +127,7 @@ public class LDAPAuthentication
return false;
}
/*
/**
* This is an explicit method.
*/
@Override
@@ -138,7 +135,7 @@ public class LDAPAuthentication
return false;
}
/*
/**
* Add authenticated users to the group defined in dspace.cfg by
* the login.specialgroup key.
*/
@@ -177,7 +174,7 @@ public class LDAPAuthentication
return Collections.EMPTY_LIST;
}
/*
/**
* Authenticate the given credentials.
* This is the heart of the authentication method: test the
* credentials for authenticity, and if accepted, attempt to match
@@ -187,7 +184,7 @@ public class LDAPAuthentication
* @param context
* DSpace context, will be modified (ePerson set) upon success.
*
* @param username
* @param netid
* Username (or email address) when method is explicit. Use null for
* implicit method.
*
@@ -250,7 +247,7 @@ public class LDAPAuthentication
}
// Check a DN was found
if ((dn == null) || (dn.trim().equals(""))) {
if (StringUtils.isBlank(dn)) {
log.info(LogHelper
.getHeader(context, "failed_login", "no DN found for user " + netid));
return BAD_CREDENTIALS;
@@ -269,6 +266,18 @@ public class LDAPAuthentication
context.setCurrentUser(eperson);
request.setAttribute(LDAP_AUTHENTICATED, true);
// update eperson's attributes
context.turnOffAuthorisationSystem();
setEpersonAttributes(context, eperson, ldap, Optional.empty());
try {
ePersonService.update(context, eperson);
context.dispatchEvents();
} catch (AuthorizeException e) {
log.warn("update of eperson " + eperson.getID() + " failed", e);
} finally {
context.restoreAuthSystemState();
}
// assign user to groups based on ldap dn
assignGroups(dn, ldap.ldapGroup, context);
@@ -313,14 +322,13 @@ public class LDAPAuthentication
log.info(LogHelper.getHeader(context,
"type=ldap-login", "type=ldap_but_already_email"));
context.turnOffAuthorisationSystem();
eperson.setNetid(netid.toLowerCase());
setEpersonAttributes(context, eperson, ldap, Optional.of(netid));
ePersonService.update(context, eperson);
context.dispatchEvents();
context.restoreAuthSystemState();
context.setCurrentUser(eperson);
request.setAttribute(LDAP_AUTHENTICATED, true);
// assign user to groups based on ldap dn
assignGroups(dn, ldap.ldapGroup, context);
@@ -331,20 +339,7 @@ public class LDAPAuthentication
try {
context.turnOffAuthorisationSystem();
eperson = ePersonService.create(context);
if (StringUtils.isNotEmpty(email)) {
eperson.setEmail(email);
}
if (StringUtils.isNotEmpty(ldap.ldapGivenName)) {
eperson.setFirstName(context, ldap.ldapGivenName);
}
if (StringUtils.isNotEmpty(ldap.ldapSurname)) {
eperson.setLastName(context, ldap.ldapSurname);
}
if (StringUtils.isNotEmpty(ldap.ldapPhone)) {
ePersonService.setMetadataSingleValue(context, eperson,
MD_PHONE, ldap.ldapPhone, null);
}
eperson.setNetid(netid.toLowerCase());
setEpersonAttributes(context, eperson, ldap, Optional.of(netid));
eperson.setCanLogIn(true);
authenticationService.initEPerson(context, request, eperson);
ePersonService.update(context, eperson);
@@ -382,6 +377,29 @@ public class LDAPAuthentication
return BAD_ARGS;
}
/**
* Update eperson's attributes
*/
private void setEpersonAttributes(Context context, EPerson eperson, SpeakerToLDAP ldap, Optional<String> netid)
throws SQLException {
if (StringUtils.isNotEmpty(ldap.ldapEmail)) {
eperson.setEmail(ldap.ldapEmail);
}
if (StringUtils.isNotEmpty(ldap.ldapGivenName)) {
eperson.setFirstName(context, ldap.ldapGivenName);
}
if (StringUtils.isNotEmpty(ldap.ldapSurname)) {
eperson.setLastName(context, ldap.ldapSurname);
}
if (StringUtils.isNotEmpty(ldap.ldapPhone)) {
ePersonService.setMetadataSingleValue(context, eperson, MD_PHONE, ldap.ldapPhone, null);
}
if (netid.isPresent()) {
eperson.setNetid(netid.get().toLowerCase());
}
}
/**
* Internal class to manage LDAP query and results, mainly
* because there are multiple values to return.
@@ -503,6 +521,7 @@ public class LDAPAuthentication
} else {
searchName = ldap_provider_url + ldap_search_context;
}
@SuppressWarnings("BanJNDI")
NamingEnumeration<SearchResult> answer = ctx.search(
searchName,
"(&({0}={1}))", new Object[] {ldap_id_field,
@@ -553,7 +572,7 @@ public class LDAPAuthentication
att = atts.get(attlist[4]);
if (att != null) {
// loop through all groups returned by LDAP
ldapGroup = new ArrayList<String>();
ldapGroup = new ArrayList<>();
for (NamingEnumeration val = att.getAll(); val.hasMoreElements(); ) {
ldapGroup.add((String) val.next());
}
@@ -633,7 +652,8 @@ public class LDAPAuthentication
ctx.addToEnvironment(javax.naming.Context.AUTHORITATIVE, "true");
ctx.addToEnvironment(javax.naming.Context.REFERRAL, "follow");
// dummy operation to check if authentication has succeeded
ctx.getAttributes("");
@SuppressWarnings("BanJNDI")
Attributes trash = ctx.getAttributes("");
} else if (!useTLS) {
// Authenticate
env.put(javax.naming.Context.SECURITY_AUTHENTICATION, "Simple");
@@ -671,7 +691,7 @@ public class LDAPAuthentication
}
}
/*
/**
* Returns the URL of an external login page which is not applicable for this authn method.
*
* Note: Prior to DSpace 7, this method return the page of login servlet.
@@ -699,7 +719,7 @@ public class LDAPAuthentication
return "ldap";
}
/*
/**
* Add authenticated users to the group defined in dspace.cfg by
* the authentication-ldap.login.groupmap.* key.
*

View File

@@ -22,12 +22,13 @@ import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.methods.RequestBuilder;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.dspace.app.client.DSpaceHttpClientFactory;
import org.dspace.authenticate.oidc.OidcClient;
import org.dspace.authenticate.oidc.OidcClientException;
import org.dspace.authenticate.oidc.model.OidcTokenResponseDTO;
@@ -83,21 +84,17 @@ public class OidcClientImpl implements OidcClient {
}
private <T> T executeAndParseJson(HttpUriRequest httpUriRequest, Class<T> clazz) {
HttpClient client = HttpClientBuilder.create().build();
return executeAndReturns(() -> {
HttpResponse response = client.execute(httpUriRequest);
if (isNotSuccessfull(response)) {
throw new OidcClientException(getStatusCode(response), formatErrorMessage(response));
}
return objectMapper.readValue(getContent(response), clazz);
});
try (CloseableHttpClient client = DSpaceHttpClientFactory.getInstance().build()) {
return executeAndReturns(() -> {
CloseableHttpResponse response = client.execute(httpUriRequest);
if (isNotSuccessfull(response)) {
throw new OidcClientException(getStatusCode(response), formatErrorMessage(response));
}
return objectMapper.readValue(getContent(response), clazz);
});
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private <T> T executeAndReturns(ThrowingSupplier<T, Exception> supplier) {

View File

@@ -7,27 +7,22 @@
*/
package org.dspace.authority.orcid;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.SolrAuthorityInterface;
import org.dspace.external.OrcidRestConnector;
import org.dspace.external.provider.orcid.xml.XMLtoBio;
import org.json.JSONObject;
import org.dspace.orcid.model.factory.OrcidFactoryUtils;
import org.orcid.jaxb.model.v3.release.common.OrcidIdentifier;
import org.orcid.jaxb.model.v3.release.record.Person;
import org.orcid.jaxb.model.v3.release.search.Result;
@@ -50,6 +45,11 @@ public class Orcidv3SolrAuthorityImpl implements SolrAuthorityInterface {
private String accessToken;
/**
* Maximum retries to allow for the access token retrieval
*/
private int maxClientRetries = 3;
public void setOAUTHUrl(String oAUTHUrl) {
OAUTHUrl = oAUTHUrl;
}
@@ -62,46 +62,32 @@ public class Orcidv3SolrAuthorityImpl implements SolrAuthorityInterface {
this.clientSecret = clientSecret;
}
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
/**
* Initialize the accessToken that is required for all subsequent calls to ORCID
*/
public void init() {
if (StringUtils.isBlank(accessToken)
&& StringUtils.isNotBlank(clientSecret)
&& StringUtils.isNotBlank(clientId)
&& StringUtils.isNotBlank(OAUTHUrl)) {
String authenticationParameters = "?client_id=" + clientId +
"&client_secret=" + clientSecret +
"&scope=/read-public&grant_type=client_credentials";
try {
HttpPost httpPost = new HttpPost(OAUTHUrl + authenticationParameters);
httpPost.addHeader("Accept", "application/json");
httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded");
// Initialize access token at spring instantiation. If it fails, the access token will be null rather
// than causing a fatal Spring startup error
initializeAccessToken();
}
HttpClient httpClient = HttpClientBuilder.create().build();
HttpResponse getResponse = httpClient.execute(httpPost);
JSONObject responseObject = null;
try (InputStream is = getResponse.getEntity().getContent();
BufferedReader streamReader = new BufferedReader(new InputStreamReader(is, "UTF-8"))) {
String inputStr;
while ((inputStr = streamReader.readLine()) != null && responseObject == null) {
if (inputStr.startsWith("{") && inputStr.endsWith("}") && inputStr.contains("access_token")) {
try {
responseObject = new JSONObject(inputStr);
} catch (Exception e) {
//Not as valid as I'd hoped, move along
responseObject = null;
}
}
}
}
if (responseObject != null && responseObject.has("access_token")) {
accessToken = (String) responseObject.get("access_token");
}
} catch (Exception e) {
throw new RuntimeException("Error during initialization of the Orcid connector", e);
}
public void initializeAccessToken() {
// If we have reaches max retries or the access token is already set, return immediately
if (maxClientRetries <= 0 || org.apache.commons.lang3.StringUtils.isNotBlank(accessToken)) {
return;
}
try {
accessToken = OrcidFactoryUtils.retrieveAccessToken(clientId, clientSecret, OAUTHUrl).orElse(null);
} catch (IOException e) {
log.error("Error retrieving ORCID access token, {} retries left", --maxClientRetries);
}
}
@@ -116,7 +102,7 @@ public class Orcidv3SolrAuthorityImpl implements SolrAuthorityInterface {
*/
@Override
public List<AuthorityValue> queryAuthorities(String text, int max) {
init();
initializeAccessToken();
List<Person> bios = queryBio(text, max);
List<AuthorityValue> result = new ArrayList<>();
for (Person person : bios) {
@@ -135,7 +121,7 @@ public class Orcidv3SolrAuthorityImpl implements SolrAuthorityInterface {
*/
@Override
public AuthorityValue queryAuthorityID(String id) {
init();
initializeAccessToken();
Person person = getBio(id);
AuthorityValue valueFromPerson = Orcidv3AuthorityValue.create(person);
return valueFromPerson;
@@ -151,11 +137,14 @@ public class Orcidv3SolrAuthorityImpl implements SolrAuthorityInterface {
if (!isValid(id)) {
return null;
}
init();
if (orcidRestConnector == null) {
log.error("ORCID REST connector is null, returning null Person");
return null;
}
initializeAccessToken();
InputStream bioDocument = orcidRestConnector.get(id + ((id.endsWith("/person")) ? "" : "/person"), accessToken);
XMLtoBio converter = new XMLtoBio();
Person person = converter.convertSinglePerson(bioDocument);
return person;
return converter.convertSinglePerson(bioDocument);
}
@@ -167,10 +156,16 @@ public class Orcidv3SolrAuthorityImpl implements SolrAuthorityInterface {
* @return List<Person>
*/
public List<Person> queryBio(String text, int start, int rows) {
init();
if (rows > 100) {
throw new IllegalArgumentException("The maximum number of results to retrieve cannot exceed 100.");
}
// Check REST connector is initialized
if (orcidRestConnector == null) {
log.error("ORCID REST connector is not initialized, returning empty list");
return Collections.emptyList();
}
// Check / init access token
initializeAccessToken();
String searchPath = "search?q=" + URLEncoder.encode(text) + "&start=" + start + "&rows=" + rows;
log.debug("queryBio searchPath=" + searchPath + " accessToken=" + accessToken);

View File

@@ -9,6 +9,7 @@ package org.dspace.authorize;
import static org.dspace.app.util.AuthorizeUtil.canCollectionAdminManageAccounts;
import static org.dspace.app.util.AuthorizeUtil.canCommunityAdminManageAccounts;
import static org.dspace.discovery.SearchUtils.RESOURCE_TYPE_FIELD;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -550,13 +551,11 @@ public class AuthorizeServiceImpl implements AuthorizeService {
List<ResourcePolicy> newPolicies = new ArrayList<>(policies.size());
for (ResourcePolicy srp : policies) {
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, srp.getEPerson(), srp.getGroup());
// copy over values
rp.setdSpaceObject(dest);
rp.setAction(srp.getAction());
rp.setEPerson(srp.getEPerson());
rp.setGroup(srp.getGroup());
rp.setStartDate(srp.getStartDate());
rp.setEndDate(srp.getEndDate());
rp.setRpName(srp.getRpName());
@@ -670,11 +669,9 @@ public class AuthorizeServiceImpl implements AuthorizeService {
"We need at least an eperson or a group in order to create a resource policy.");
}
ResourcePolicy myPolicy = resourcePolicyService.create(context);
ResourcePolicy myPolicy = resourcePolicyService.create(context, eperson, group);
myPolicy.setdSpaceObject(dso);
myPolicy.setAction(type);
myPolicy.setGroup(group);
myPolicy.setEPerson(eperson);
myPolicy.setRpType(rpType);
myPolicy.setRpName(rpName);
myPolicy.setRpDescription(rpDescription);
@@ -740,7 +737,7 @@ public class AuthorizeServiceImpl implements AuthorizeService {
*/
@Override
public boolean isCommunityAdmin(Context context) throws SQLException {
return performCheck(context, "search.resourcetype:" + IndexableCommunity.TYPE);
return performCheck(context, RESOURCE_TYPE_FIELD + ":" + IndexableCommunity.TYPE);
}
/**
@@ -753,7 +750,7 @@ public class AuthorizeServiceImpl implements AuthorizeService {
*/
@Override
public boolean isCollectionAdmin(Context context) throws SQLException {
return performCheck(context, "search.resourcetype:" + IndexableCollection.TYPE);
return performCheck(context, RESOURCE_TYPE_FIELD + ":" + IndexableCollection.TYPE);
}
/**
@@ -766,7 +763,7 @@ public class AuthorizeServiceImpl implements AuthorizeService {
*/
@Override
public boolean isItemAdmin(Context context) throws SQLException {
return performCheck(context, "search.resourcetype:" + IndexableItem.TYPE);
return performCheck(context, RESOURCE_TYPE_FIELD + ":" + IndexableItem.TYPE);
}
/**
@@ -780,8 +777,8 @@ public class AuthorizeServiceImpl implements AuthorizeService {
@Override
public boolean isComColAdmin(Context context) throws SQLException {
return performCheck(context,
"(search.resourcetype:" + IndexableCommunity.TYPE + " OR search.resourcetype:" +
IndexableCollection.TYPE + ")");
"(" + RESOURCE_TYPE_FIELD + ":" + IndexableCommunity.TYPE + " OR " +
RESOURCE_TYPE_FIELD + ":" + IndexableCollection.TYPE + ")");
}
/**
@@ -799,7 +796,7 @@ public class AuthorizeServiceImpl implements AuthorizeService {
throws SearchServiceException, SQLException {
List<Community> communities = new ArrayList<>();
query = formatCustomQuery(query);
DiscoverResult discoverResult = getDiscoverResult(context, query + "search.resourcetype:" +
DiscoverResult discoverResult = getDiscoverResult(context, query + RESOURCE_TYPE_FIELD + ":" +
IndexableCommunity.TYPE,
offset, limit, null, null);
for (IndexableObject solrCollections : discoverResult.getIndexableObjects()) {
@@ -821,9 +818,9 @@ public class AuthorizeServiceImpl implements AuthorizeService {
public long countAdminAuthorizedCommunity(Context context, String query)
throws SearchServiceException, SQLException {
query = formatCustomQuery(query);
DiscoverResult discoverResult = getDiscoverResult(context, query + "search.resourcetype:" +
DiscoverResult discoverResult = getDiscoverResult(context, query + RESOURCE_TYPE_FIELD + ":" +
IndexableCommunity.TYPE,
null, null, null, null);
null, 0, null, null);
return discoverResult.getTotalSearchResults();
}
@@ -846,7 +843,7 @@ public class AuthorizeServiceImpl implements AuthorizeService {
}
query = formatCustomQuery(query);
DiscoverResult discoverResult = getDiscoverResult(context, query + "search.resourcetype:" +
DiscoverResult discoverResult = getDiscoverResult(context, query + RESOURCE_TYPE_FIELD + ":" +
IndexableCollection.TYPE,
offset, limit, CollectionService.SOLR_SORT_FIELD, SORT_ORDER.asc);
for (IndexableObject solrCollections : discoverResult.getIndexableObjects()) {
@@ -868,9 +865,9 @@ public class AuthorizeServiceImpl implements AuthorizeService {
public long countAdminAuthorizedCollection(Context context, String query)
throws SearchServiceException, SQLException {
query = formatCustomQuery(query);
DiscoverResult discoverResult = getDiscoverResult(context, query + "search.resourcetype:" +
DiscoverResult discoverResult = getDiscoverResult(context, query + RESOURCE_TYPE_FIELD + ":" +
IndexableCollection.TYPE,
null, null, null, null);
null, 0, null, null);
return discoverResult.getTotalSearchResults();
}

View File

@@ -126,10 +126,9 @@ public class FixDefaultPolicies {
// now create the default policies for submitted items
ResourcePolicyService resourcePolicyService = AuthorizeServiceFactory.getInstance().getResourcePolicyService();
ResourcePolicy myPolicy = resourcePolicyService.create(c);
ResourcePolicy myPolicy = resourcePolicyService.create(c, null, anonymousGroup);
myPolicy.setdSpaceObject(t);
myPolicy.setAction(myaction);
myPolicy.setGroup(anonymousGroup);
resourcePolicyService.update(c, myPolicy);
}
}

View File

@@ -229,11 +229,10 @@ public class PolicySet {
// before create a new policy check if an identical policy is already in place
if (!authorizeService.isAnIdenticalPolicyAlreadyInPlace(c, myitem, group, actionID, -1)) {
// now add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, group);
rp.setdSpaceObject(myitem);
rp.setAction(actionID);
rp.setGroup(group);
rp.setRpName(name);
rp.setRpDescription(description);
@@ -262,11 +261,10 @@ public class PolicySet {
// before create a new policy check if an identical policy is already in place
if (!authorizeService.isAnIdenticalPolicyAlreadyInPlace(c, bundle, group, actionID, -1)) {
// now add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, group);
rp.setdSpaceObject(bundle);
rp.setAction(actionID);
rp.setGroup(group);
rp.setRpName(name);
rp.setRpDescription(description);
@@ -305,11 +303,10 @@ public class PolicySet {
if (!authorizeService
.isAnIdenticalPolicyAlreadyInPlace(c, bitstream, group, actionID, -1)) {
// now add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, group);
rp.setdSpaceObject(bitstream);
rp.setAction(actionID);
rp.setGroup(group);
rp.setRpName(name);
rp.setRpDescription(description);

View File

@@ -19,6 +19,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.authorize.dao.ResourcePolicyDAO;
import org.dspace.authorize.service.AuthorizeService;
import org.dspace.authorize.service.ResourcePolicyService;
import org.dspace.content.DSpaceObject;
import org.dspace.content.factory.ContentServiceFactory;
@@ -51,6 +52,9 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService {
@Autowired
private GroupService groupService;
@Autowired
private AuthorizeService authorizeService;
protected ResourcePolicyServiceImpl() {
}
@@ -71,14 +75,22 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService {
* Create a new ResourcePolicy
*
* @param context DSpace context object
* @param ePerson
* @param group
* @return ResourcePolicy
* @throws SQLException if database error
*/
@Override
public ResourcePolicy create(Context context) throws SQLException {
public ResourcePolicy create(Context context, EPerson ePerson, Group group) throws SQLException {
// FIXME: Check authorisation
// Create a table row
ResourcePolicy resourcePolicy = resourcePolicyDAO.create(context, new ResourcePolicy());
ResourcePolicy policyToBeCreated = new ResourcePolicy();
if (ePerson == null && group == null) {
throw new IllegalArgumentException("A resource policy must contain a valid eperson or group");
}
policyToBeCreated.setEPerson(ePerson);
policyToBeCreated.setGroup(group);
ResourcePolicy resourcePolicy = resourcePolicyDAO.create(context, policyToBeCreated);
return resourcePolicy;
}
@@ -205,9 +217,7 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService {
@Override
public ResourcePolicy clone(Context context, ResourcePolicy resourcePolicy)
throws SQLException, AuthorizeException {
ResourcePolicy clone = create(context);
clone.setGroup(resourcePolicy.getGroup());
clone.setEPerson(resourcePolicy.getEPerson());
ResourcePolicy clone = create(context, resourcePolicy.getEPerson(), resourcePolicy.getGroup());
clone.setStartDate((Date) ObjectUtils.clone(resourcePolicy.getStartDate()));
clone.setEndDate((Date) ObjectUtils.clone(resourcePolicy.getEndDate()));
clone.setRpType((String) ObjectUtils.clone(resourcePolicy.getRpType()));
@@ -411,11 +421,11 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService {
ResourcePolicy resourcePolicy = resourcePolicyDAO.findOneById(context, id);
Group group = resourcePolicy.getGroup();
if (resourcePolicy.getEPerson() != null && resourcePolicy.getEPerson().getID() == eperson.getID()) {
if (resourcePolicy.getEPerson() != null && resourcePolicy.getEPerson().getID().equals(eperson.getID())) {
isMy = true;
} else if (group != null && groupService.isMember(context, eperson, group)) {
isMy = true;
}
return isMy;
return isMy || authorizeService.isAdmin(context, eperson, resourcePolicy.getdSpaceObject());
}
}

View File

@@ -17,7 +17,6 @@ import org.dspace.content.DSpaceObject;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.service.DSpaceCRUDService;
/**
* Service interface class for the ResourcePolicy object.
@@ -26,7 +25,34 @@ import org.dspace.service.DSpaceCRUDService;
*
* @author kevinvandevelde at atmire.com
*/
public interface ResourcePolicyService extends DSpaceCRUDService<ResourcePolicy> {
public interface ResourcePolicyService {
public ResourcePolicy create(Context context, EPerson eperson, Group group) throws SQLException, AuthorizeException;
public ResourcePolicy find(Context context, int id) throws SQLException;
/**
* Persist a model object.
*
* @param context
* @param resourcePolicy object to be persisted.
* @throws SQLException passed through.
* @throws AuthorizeException passed through.
*/
public void update(Context context, ResourcePolicy resourcePolicy) throws SQLException, AuthorizeException;
/**
* Persist a collection of model objects.
*
* @param context
* @param resourcePolicies object to be persisted.
* @throws SQLException passed through.
* @throws AuthorizeException passed through.
*/
public void update(Context context, List<ResourcePolicy> resourcePolicies) throws SQLException, AuthorizeException;
public void delete(Context context, ResourcePolicy resourcePolicy) throws SQLException, AuthorizeException;
public List<ResourcePolicy> find(Context c, DSpaceObject o) throws SQLException;

View File

@@ -422,9 +422,6 @@ public class BrowseEngine {
}
}
// this is the total number of results in answer to the query
int total = getTotalResults(true);
// set the ordering field (there is only one option)
dao.setOrderField("sort_value");
@@ -444,6 +441,9 @@ public class BrowseEngine {
dao.setOffset(offset);
dao.setLimit(scope.getResultsPerPage());
// this is the total number of results in answer to the query
int total = getTotalResults(true);
// Holder for the results
List<String[]> results = null;
@@ -680,33 +680,9 @@ public class BrowseEngine {
// tell the browse query whether we are distinct
dao.setDistinct(distinct);
// ensure that the select is set to "*"
String[] select = {"*"};
dao.setCountValues(select);
// FIXME: it would be nice to have a good way of doing this in the DAO
// now reset all of the fields that we don't want to have constraining
// our count, storing them locally to reinstate later
String focusField = dao.getJumpToField();
String focusValue = dao.getJumpToValue();
int limit = dao.getLimit();
int offset = dao.getOffset();
dao.setJumpToField(null);
dao.setJumpToValue(null);
dao.setLimit(-1);
dao.setOffset(-1);
// perform the query and get the result
int count = dao.doCountQuery();
// now put back the values we removed for this method
dao.setJumpToField(focusField);
dao.setJumpToValue(focusValue);
dao.setLimit(limit);
dao.setOffset(offset);
dao.setCountValues(null);
log.debug(LogHelper.getHeader(context, "get_total_results_return", "return=" + count));
return count;

View File

@@ -13,26 +13,17 @@ import org.dspace.core.Context;
/**
* Interface for data access of cached community and collection item count
* information
*
* @author Richard Jones
*/
public interface ItemCountDAO {
/**
* Set the DSpace Context to use during data access
*
* @param context DSpace Context
* @throws ItemCountException if count error
*/
public void setContext(Context context) throws ItemCountException;
/**
* Get the number of items in the given DSpaceObject container. This method will
* only succeed if the DSpaceObject is an instance of either a Community or a
* Collection. Otherwise it will throw an exception.
*
* @param context DSpace context
* @param dso Dspace Object
* @return count
* @throws ItemCountException if count error
*/
public int getCount(DSpaceObject dso) throws ItemCountException;
int getCount(Context context, DSpaceObject dso);
}

View File

@@ -1,67 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.browse;
import java.lang.reflect.InvocationTargetException;
import org.dspace.core.Context;
import org.dspace.services.ConfigurationService;
import org.dspace.services.factory.DSpaceServicesFactory;
/**
* Factory class to allow us to load the correct DAO for registering
* item count information
*
* @author Richard Jones
* @author Ivan Masár
*/
public class ItemCountDAOFactory {
/**
* Default constructor
*/
private ItemCountDAOFactory() { }
/**
* Get an instance of ItemCountDAO which supports the correct storage backend
* for the specific DSpace instance.
*
* @param context DSpace Context
* @return DAO
* @throws ItemCountException if count error
*/
public static ItemCountDAO getInstance(Context context)
throws ItemCountException {
/** Log4j logger */
ItemCountDAO dao = null;
ConfigurationService configurationService
= DSpaceServicesFactory.getInstance().getConfigurationService();
String className = configurationService.getProperty("ItemCountDAO.class");
// SOLR implementation is the default since DSpace 4.0
if (className == null) {
dao = new ItemCountDAOSolr();
} else {
try {
dao = (ItemCountDAO) Class.forName(className.trim())
.getDeclaredConstructor()
.newInstance();
} catch (ClassNotFoundException | IllegalAccessException
| InstantiationException | NoSuchMethodException
| SecurityException | IllegalArgumentException
| InvocationTargetException e) {
throw new ItemCountException("The configuration for ItemCountDAO is invalid: " + className, e);
}
}
dao.setContext(context);
return dao;
}
}

View File

@@ -24,14 +24,12 @@ import org.dspace.discovery.SearchService;
import org.dspace.discovery.SearchServiceException;
import org.dspace.discovery.configuration.DiscoveryConfigurationParameters;
import org.dspace.discovery.indexobject.IndexableItem;
import org.dspace.services.factory.DSpaceServicesFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Discovery (Solr) driver implementing ItemCountDAO interface to look up item
* count information in communities and collections. Caching operations are
* intentionally not implemented because Solr already is our cache.
*
* @author Ivan Masár, Andrea Bollini
*/
public class ItemCountDAOSolr implements ItemCountDAO {
/**
@@ -39,11 +37,6 @@ public class ItemCountDAOSolr implements ItemCountDAO {
*/
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemCountDAOSolr.class);
/**
* DSpace context
*/
private Context context;
/**
* Hold the communities item count obtained from SOLR after the first query. This only works
* well if the ItemCountDAO lifecycle is bound to the request lifecycle as
@@ -61,41 +54,28 @@ public class ItemCountDAOSolr implements ItemCountDAO {
/**
* Solr search service
*/
SearchService searcher = DSpaceServicesFactory.getInstance().getServiceManager()
.getServiceByName(SearchService.class.getName(), SearchService.class);
/**
* Set the dspace context to use
*
* @param context DSpace Context
* @throws ItemCountException if count error
*/
@Override
public void setContext(Context context) throws ItemCountException {
this.context = context;
}
@Autowired
protected SearchService searchService;
/**
* Get the count of the items in the given container.
*
* @param dso Dspace Context
* @param context DSpace context
* @param dso DspaceObject
* @return count
* @throws ItemCountException if count error
*/
@Override
public int getCount(DSpaceObject dso) throws ItemCountException {
loadCount();
Integer val;
public int getCount(Context context, DSpaceObject dso) {
loadCount(context);
Integer val = null;
if (dso instanceof Collection) {
val = collectionsCount.get(String.valueOf(((Collection) dso).getID()));
val = collectionsCount.get(dso.getID().toString());
} else if (dso instanceof Community) {
val = communitiesCount.get(String.valueOf(((Community) dso).getID()));
} else {
throw new ItemCountException("We can only count items in Communities or Collections");
val = communitiesCount.get(dso.getID().toString());
}
if (val != null) {
return val.intValue();
return val;
} else {
return 0;
}
@@ -105,15 +85,15 @@ public class ItemCountDAOSolr implements ItemCountDAO {
* make sure that the counts are actually fetched from Solr (if haven't been
* cached in a Map yet)
*
* @throws ItemCountException if count error
* @param context DSpace Context
*/
private void loadCount() throws ItemCountException {
private void loadCount(Context context) {
if (communitiesCount != null || collectionsCount != null) {
return;
}
communitiesCount = new HashMap<String, Integer>();
collectionsCount = new HashMap<String, Integer>();
communitiesCount = new HashMap<>();
collectionsCount = new HashMap<>();
DiscoverQuery query = new DiscoverQuery();
query.setFacetMinCount(1);
@@ -125,11 +105,13 @@ public class ItemCountDAOSolr implements ItemCountDAO {
DiscoveryConfigurationParameters.SORT.COUNT));
query.addFilterQueries("search.resourcetype:" + IndexableItem.TYPE); // count only items
query.addFilterQueries("NOT(discoverable:false)"); // only discoverable
query.addFilterQueries("withdrawn:false"); // only not withdrawn
query.addFilterQueries("archived:true"); // only archived
query.setMaxResults(0);
DiscoverResult sResponse = null;
DiscoverResult sResponse;
try {
sResponse = searcher.search(context, query);
sResponse = searchService.search(context, query);
List<FacetResult> commCount = sResponse.getFacetResult("location.comm");
List<FacetResult> collCount = sResponse.getFacetResult("location.coll");
for (FacetResult c : commCount) {
@@ -139,8 +121,7 @@ public class ItemCountDAOSolr implements ItemCountDAO {
collectionsCount.put(c.getAsFilterQuery(), (int) c.getCount());
}
} catch (SearchServiceException e) {
log.error("caught exception: ", e);
throw new ItemCountException(e);
log.error("Could not initialize Community/Collection Item Counts from Solr: ", e);
}
}
}

View File

@@ -1,32 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.browse;
/**
* Exception type to handle item count specific problems
*
* @author Richard Jones
*/
public class ItemCountException extends Exception {
public ItemCountException() {
}
public ItemCountException(String message) {
super(message);
}
public ItemCountException(Throwable cause) {
super(cause);
}
public ItemCountException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@@ -13,26 +13,18 @@ import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DSpaceObject;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.core.Context;
import org.dspace.services.ConfigurationService;
import org.dspace.services.factory.DSpaceServicesFactory;
import org.dspace.web.ContextUtil;
import org.springframework.beans.factory.annotation.Autowired;
/**
* This class provides a standard interface to all item counting
* operations for communities and collections. It can be run from the
* command line to prepare the cached data if desired, simply by
* running:
* operations for communities and collections.
*
* java org.dspace.browse.ItemCounter
*
* It can also be invoked via its standard API. In the event that
* the data cache is not being used, this class will return direct
* In the event that the data cache is not being used, this class will return direct
* real time counts of content.
*
* @author Richard Jones
*/
public class ItemCounter {
/**
@@ -40,57 +32,15 @@ public class ItemCounter {
*/
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemCounter.class);
/**
* DAO to use to store and retrieve data
*/
private ItemCountDAO dao;
/**
* DSpace Context
*/
private Context context;
/**
* This field is used to hold singular instance of a class.
* Singleton pattern is used but this class should be
* refactored to modern DSpace approach (injectible service).
*/
private static ItemCounter instance;
@Autowired
protected ItemService itemService;
@Autowired
protected ConfigurationService configurationService;
private boolean showStrengths;
private boolean useCache;
/**
* Construct a new item counter which will use the given DSpace Context
*
* @param context current context
* @throws ItemCountException if count error
* Construct a new item counter
*/
public ItemCounter(Context context) throws ItemCountException {
this.context = context;
this.dao = ItemCountDAOFactory.getInstance(this.context);
this.itemService = ContentServiceFactory.getInstance().getItemService();
this.configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
this.showStrengths = configurationService.getBooleanProperty("webui.strengths.show", false);
this.useCache = configurationService.getBooleanProperty("webui.strengths.cache", true);
}
/**
* Get the singular instance of a class.
* It creates a new instance at the first usage of this method.
*
* @return instance af a class
* @throws ItemCountException when error occurs
*/
public static ItemCounter getInstance() throws ItemCountException {
if (instance == null) {
instance = new ItemCounter(ContextUtil.obtainCurrentRequestContext());
}
return instance;
protected ItemCounter() {
}
/**
@@ -103,17 +53,24 @@ public class ItemCounter {
* If it is equal to 'false' it will count the number of items
* in the container in real time.
*
* @param context DSpace Context
* @param dso DSpaceObject
* @return count
* @throws ItemCountException when error occurs
* @return count (-1 is returned if count could not be determined or is disabled)
*/
public int getCount(DSpaceObject dso) throws ItemCountException {
public int getCount(Context context, DSpaceObject dso) {
boolean showStrengths = configurationService.getBooleanProperty("webui.strengths.show", false);
boolean useCache = configurationService.getBooleanProperty("webui.strengths.cache", true);
if (!showStrengths) {
return -1;
}
if (useCache) {
return dao.getCount(dso);
// NOTE: This bean is NOT Autowired above because it's a "prototype" bean which we want to reload
// occasionally. Each time the bean reloads it will update the cached item counts.
ItemCountDAO dao =
DSpaceServicesFactory.getInstance().getServiceManager().getServiceByName("itemCountDAO",
ItemCountDAO.class);
return dao.getCount(context, dso);
}
// if we make it this far, we need to manually count
@@ -121,8 +78,8 @@ public class ItemCounter {
try {
return itemService.countItems(context, (Collection) dso);
} catch (SQLException e) {
log.error("caught exception: ", e);
throw new ItemCountException(e);
log.error("Error counting number of Items in Collection {} :", dso.getID(), e);
return -1;
}
}
@@ -130,8 +87,8 @@ public class ItemCounter {
try {
return itemService.countItems(context, ((Community) dso));
} catch (SQLException e) {
log.error("caught exception: ", e);
throw new ItemCountException(e);
log.error("Error counting number of Items in Community {} :", dso.getID(), e);
return -1;
}
}

View File

@@ -7,12 +7,17 @@
*/
package org.dspace.browse;
import static org.dspace.discovery.SearchUtils.RESOURCE_ID_FIELD;
import static org.dspace.discovery.SearchUtils.RESOURCE_TYPE_FIELD;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.apache.solr.client.solrj.util.ClientUtils;
@@ -21,7 +26,6 @@ import org.dspace.authorize.service.AuthorizeService;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.core.Context;
import org.dspace.discovery.DiscoverFacetField;
import org.dspace.discovery.DiscoverQuery;
import org.dspace.discovery.DiscoverQuery.SORT_ORDER;
import org.dspace.discovery.DiscoverResult;
@@ -32,7 +36,6 @@ import org.dspace.discovery.SearchService;
import org.dspace.discovery.SearchServiceException;
import org.dspace.discovery.SearchUtils;
import org.dspace.discovery.configuration.DiscoveryConfiguration;
import org.dspace.discovery.configuration.DiscoveryConfigurationParameters;
import org.dspace.discovery.indexobject.IndexableItem;
import org.dspace.services.factory.DSpaceServicesFactory;
@@ -179,19 +182,30 @@ public class SolrBrowseDAO implements BrowseDAO {
addLocationScopeFilter(query);
addDefaultFilterQueries(query);
if (distinct) {
DiscoverFacetField dff;
if (StringUtils.isNotBlank(startsWith)) {
dff = new DiscoverFacetField(facetField,
DiscoveryConfigurationParameters.TYPE_TEXT, -1,
DiscoveryConfigurationParameters.SORT.VALUE, startsWith);
// We use a json.facet query for metadata browsing because it allows us to limit the results
// while obtaining the total number of facet values with numBuckets:true and sort in reverse order
// Example of json.facet query:
// {"<fieldName>": {"type":"terms","field": "<fieldName>_filter", "limit":0, "offset":0,
// "sort":"index desc", "numBuckets":true, "prefix":"<startsWith>"}}
ObjectNode jsonFacet = JsonNodeFactory.instance.objectNode();
ObjectNode entriesFacet = JsonNodeFactory.instance.objectNode();
entriesFacet.put("type", "terms");
entriesFacet.put("field", facetField + "_filter");
entriesFacet.put("limit", limit);
entriesFacet.put("offset", offset);
entriesFacet.put("numBuckets", true);
if (ascending) {
entriesFacet.put("sort", "index");
} else {
dff = new DiscoverFacetField(facetField,
DiscoveryConfigurationParameters.TYPE_TEXT, -1,
DiscoveryConfigurationParameters.SORT.VALUE);
entriesFacet.put("sort", "index desc");
}
query.addFacetField(dff);
query.setFacetMinCount(1);
if (StringUtils.isNotBlank(startsWith)) {
// Add the prefix to the json facet query
entriesFacet.put("prefix", startsWith);
}
jsonFacet.set(facetField, entriesFacet);
query.setMaxResults(0);
query.addProperty("json.facet", jsonFacet.toString());
} else {
query.setMaxResults(limit/* > 0 ? limit : 20*/);
if (offset > 0) {
@@ -248,8 +262,7 @@ public class SolrBrowseDAO implements BrowseDAO {
DiscoverResult resp = getSolrResponse();
int count = 0;
if (distinct) {
List<FacetResult> facetResults = resp.getFacetResult(facetField);
count = facetResults.size();
count = (int) resp.getTotalEntries();
} else {
// we need to cast to int to respect the BrowseDAO contract...
count = (int) resp.getTotalSearchResults();
@@ -266,26 +279,15 @@ public class SolrBrowseDAO implements BrowseDAO {
DiscoverResult resp = getSolrResponse();
List<FacetResult> facet = resp.getFacetResult(facetField);
int count = doCountQuery();
int start = offset > 0 ? offset : 0;
int max = limit > 0 ? limit : count; //if negative, return everything
int max = facet.size();
List<String[]> result = new ArrayList<>();
if (ascending) {
for (int i = start; i < (start + max) && i < count; i++) {
FacetResult c = facet.get(i);
String freq = showFrequencies ? String.valueOf(c.getCount())
: "";
result.add(new String[] {c.getDisplayedValue(),
c.getAuthorityKey(), freq});
}
} else {
for (int i = count - start - 1; i >= count - (start + max)
&& i >= 0; i--) {
FacetResult c = facet.get(i);
String freq = showFrequencies ? String.valueOf(c.getCount())
: "";
result.add(new String[] {c.getDisplayedValue(),
c.getAuthorityKey(), freq});
}
for (int i = 0; i < max && i < count; i++) {
FacetResult c = facet.get(i);
String freq = showFrequencies ? String.valueOf(c.getCount())
: "";
result.add(new String[] {c.getDisplayedValue(),
c.getAuthorityKey(), freq});
}
return result;
@@ -309,8 +311,10 @@ public class SolrBrowseDAO implements BrowseDAO {
public String doMaxQuery(String column, String table, int itemID)
throws BrowseException {
DiscoverQuery query = new DiscoverQuery();
query.setQuery("search.resourceid:" + itemID
+ " AND search.resourcetype:" + IndexableItem.TYPE);
query.setQuery("*:*");
query.addFilterQueries(
RESOURCE_ID_FIELD + ":" + itemID,
RESOURCE_TYPE_FIELD + ":" + IndexableItem.TYPE);
query.setMaxResults(1);
DiscoverResult resp = null;
try {

View File

@@ -131,7 +131,7 @@ public final class CheckerCommand {
collector.collect(context, info);
}
context.uncacheEntity(bitstream);
context.commit();
bitstream = dispatcher.next();
}
}

View File

@@ -56,8 +56,8 @@ public class MostRecentChecksumDAOImpl extends AbstractHibernateDAO<MostRecentCh
criteriaQuery.where(criteriaBuilder.and(
criteriaBuilder.equal(mostRecentChecksumRoot.get(MostRecentChecksum_.toBeProcessed), false),
criteriaBuilder
.lessThanOrEqualTo(mostRecentChecksumRoot.get(MostRecentChecksum_.processStartDate), startDate),
criteriaBuilder.greaterThan(mostRecentChecksumRoot.get(MostRecentChecksum_.processStartDate), endDate)
.lessThanOrEqualTo(mostRecentChecksumRoot.get(MostRecentChecksum_.processStartDate), endDate),
criteriaBuilder.greaterThan(mostRecentChecksumRoot.get(MostRecentChecksum_.processStartDate), startDate)
)
);
List<Order> orderList = new LinkedList<>();

View File

@@ -307,10 +307,18 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
return collection;
}
public void setCollection(Collection collection) {
this.collection = collection;
}
public Community getCommunity() {
return community;
}
public void setCommunity(Community community) {
this.community = community;
}
/**
* Get the asset store number where this bitstream is stored
*

View File

@@ -458,10 +458,15 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
@Override
public Bitstream findByIdOrLegacyId(Context context, String id) throws SQLException {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
try {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
}
} catch (IllegalArgumentException e) {
// Not a valid legacy ID or valid UUID
return null;
}
}

View File

@@ -562,10 +562,15 @@ public class BundleServiceImpl extends DSpaceObjectServiceImpl<Bundle> implement
@Override
public Bundle findByIdOrLegacyId(Context context, String id) throws SQLException {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
try {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
}
} catch (IllegalArgumentException e) {
// Not a valid legacy ID or valid UUID
return null;
}
}

View File

@@ -29,7 +29,6 @@ import javax.persistence.Table;
import javax.persistence.Transient;
import org.dspace.authorize.AuthorizeException;
import org.dspace.browse.ItemCountException;
import org.dspace.content.comparator.NameAscendingComparator;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
@@ -135,6 +134,9 @@ public class Collection extends DSpaceObject implements DSpaceObjectLegacySuppor
protected void setLogo(Bitstream logo) {
this.logo = logo;
if (logo != null) {
logo.setCollection(this);
}
setModified();
}
@@ -231,7 +233,7 @@ public class Collection extends DSpaceObject implements DSpaceObjectLegacySuppor
* @throws SQLException if database error
*/
public void setLicense(Context context, String license) throws SQLException {
getCollectionService().setMetadataSingleValue(context, this, MD_LICENSE, Item.ANY, license);
getCollectionService().setMetadataSingleValue(context, this, MD_LICENSE, null, license);
}
/**
@@ -336,18 +338,4 @@ public class Collection extends DSpaceObject implements DSpaceObjectLegacySuppor
}
return collectionService;
}
/**
* return count of the collection items
*
* @return int
*/
public int countArchivedItems() {
try {
return collectionService.countArchivedItems(this);
} catch (ItemCountException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -31,7 +31,6 @@ import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.ResourcePolicy;
import org.dspace.authorize.service.AuthorizeService;
import org.dspace.authorize.service.ResourcePolicyService;
import org.dspace.browse.ItemCountException;
import org.dspace.browse.ItemCounter;
import org.dspace.content.dao.CollectionDAO;
import org.dspace.content.service.BitstreamService;
@@ -122,6 +121,9 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
@Autowired(required = true)
protected ConfigurationService configurationService;
@Autowired
protected ItemCounter itemCounter;
protected CollectionServiceImpl() {
super();
}
@@ -895,10 +897,15 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
@Override
public Collection findByIdOrLegacyId(Context context, String id) throws SQLException {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
try {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
}
} catch (IllegalArgumentException e) {
// Not a valid legacy ID or valid UUID
return null;
}
}
@@ -1014,7 +1021,8 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
if (StringUtils.isNotBlank(q)) {
StringBuilder buildQuery = new StringBuilder();
String escapedQuery = ClientUtils.escapeQueryChars(q);
buildQuery.append("(").append(escapedQuery).append(" OR ").append(escapedQuery).append("*").append(")");
buildQuery.append("(").append(escapedQuery).append(" OR dc.title_sort:*")
.append(escapedQuery).append("*").append(")");
discoverQuery.setQuery(buildQuery.toString());
}
DiscoverResult resp = searchService.search(context, discoverQuery);
@@ -1049,35 +1057,15 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
return (int) resp.getTotalSearchResults();
}
@Override
@SuppressWarnings("rawtypes")
public List<Collection> findAllCollectionsByEntityType(Context context, String entityType)
throws SearchServiceException {
List<Collection> collectionList = new ArrayList<>();
DiscoverQuery discoverQuery = new DiscoverQuery();
discoverQuery.setDSpaceObjectFilter(IndexableCollection.TYPE);
discoverQuery.addFilterQueries("dspace.entity.type:" + entityType);
DiscoverResult discoverResult = searchService.search(context, discoverQuery);
List<IndexableObject> solrIndexableObjects = discoverResult.getIndexableObjects();
for (IndexableObject solrCollection : solrIndexableObjects) {
Collection c = ((IndexableCollection) solrCollection).getIndexedObject();
collectionList.add(c);
}
return collectionList;
}
/**
* Returns total collection archived items
*
* @param context DSpace Context
* @param collection Collection
* @return total collection archived items
* @throws ItemCountException
*/
@Override
public int countArchivedItems(Collection collection) throws ItemCountException {
return ItemCounter.getInstance().getCount(collection);
public int countArchivedItems(Context context, Collection collection) {
return itemCounter.getCount(context, collection);
}
}

View File

@@ -25,7 +25,6 @@ import javax.persistence.Table;
import javax.persistence.Transient;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.dspace.browse.ItemCountException;
import org.dspace.content.comparator.NameAscendingComparator;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CommunityService;
@@ -123,6 +122,9 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
void setLogo(Bitstream logo) {
this.logo = logo;
if (logo != null) {
logo.setCommunity(this);
}
setModified();
}
@@ -264,17 +266,4 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
}
return communityService;
}
/**
* return count of the community items
*
* @return int
*/
public int countArchivedItems() {
try {
return communityService.countArchivedItems(this);
} catch (ItemCountException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -24,7 +24,6 @@ import org.dspace.authorize.AuthorizeConfiguration;
import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.ResourcePolicy;
import org.dspace.authorize.service.AuthorizeService;
import org.dspace.browse.ItemCountException;
import org.dspace.browse.ItemCounter;
import org.dspace.content.dao.CommunityDAO;
import org.dspace.content.service.BitstreamService;
@@ -78,6 +77,8 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
protected IdentifierService identifierService;
@Autowired(required = true)
protected SubscribeService subscribeService;
@Autowired
protected ItemCounter itemCounter;
protected CommunityServiceImpl() {
super();
@@ -694,10 +695,15 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
@Override
public Community findByIdOrLegacyId(Context context, String id) throws SQLException {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
try {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
}
} catch (IllegalArgumentException e) {
// Not a valid legacy ID or valid UUID
return null;
}
}
@@ -714,12 +720,12 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
/**
* Returns total community archived items
*
* @param context DSpace context
* @param community Community
* @return total community archived items
* @throws ItemCountException
*/
@Override
public int countArchivedItems(Community community) throws ItemCountException {
return ItemCounter.getInstance().getCount(community);
public int countArchivedItems(Context context, Community community) {
return itemCounter.getCount(context, community);
}
}

View File

@@ -187,11 +187,11 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
String authority) {
List<MetadataValue> metadata = getMetadata(dso, schema, element, qualifier, lang);
List<MetadataValue> result = new ArrayList<>(metadata);
if (!authority.equals(Item.ANY)) {
if (!Item.ANY.equals(authority)) {
Iterator<MetadataValue> iterator = result.iterator();
while (iterator.hasNext()) {
MetadataValue metadataValue = iterator.next();
if (!authority.equals(metadataValue.getAuthority())) {
if (!StringUtils.equals(authority, metadataValue.getAuthority())) {
iterator.remove();
}
}
@@ -242,10 +242,31 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
}
/**
* Add metadata value(s) to a MetadataField of a DSpace Object
* @param context current DSpace context
* @param dso DSpaceObject to modify
* @param metadataField MetadataField to add values to
* @param lang Language code to add
* @param values One or more metadata values to add
* @param authorities One or more authorities to add
* @param confidences One or more confidences to add (for authorities)
* @param placeSupplier Supplier of "place" for new metadata values
* @return List of newly added metadata values
* @throws SQLException if database error occurs
* @throws IllegalArgumentException for an empty list of values
*/
public List<MetadataValue> addMetadata(Context context, T dso, MetadataField metadataField, String lang,
List<String> values, List<String> authorities, List<Integer> confidences, Supplier<Integer> placeSupplier)
throws SQLException {
// Throw an error if we are attempting to add empty values
if (values == null || values.isEmpty()) {
throw new IllegalArgumentException("Cannot add empty values to a new metadata field " +
metadataField.toString() + " on object with uuid = " +
dso.getID().toString() + " and type = " + getTypeText(dso));
}
boolean authorityControlled = metadataAuthorityService.isAuthorityControlled(metadataField);
boolean authorityRequired = metadataAuthorityService.isAuthorityRequired(metadataField);
List<MetadataValue> newMetadata = new ArrayList<>();
@@ -314,20 +335,26 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
@Override
public MetadataValue addMetadata(Context context, T dso, MetadataField metadataField, String language,
String value, String authority, int confidence) throws SQLException {
return addMetadata(context, dso, metadataField, language, Arrays.asList(value), Arrays.asList(authority),
Arrays.asList(confidence)).get(0);
List<MetadataValue> metadataValues =
addMetadata(context, dso, metadataField, language, Arrays.asList(value), Arrays.asList(authority),
Arrays.asList(confidence));
return CollectionUtils.isNotEmpty(metadataValues) ? metadataValues.get(0) : null;
}
@Override
public MetadataValue addMetadata(Context context, T dso, String schema, String element, String qualifier,
String lang, String value) throws SQLException {
return addMetadata(context, dso, schema, element, qualifier, lang, Arrays.asList(value)).get(0);
List<MetadataValue> metadataValues =
addMetadata(context, dso, schema, element, qualifier, lang, Arrays.asList(value));
return CollectionUtils.isNotEmpty(metadataValues) ? metadataValues.get(0) : null;
}
@Override
public MetadataValue addMetadata(Context context, T dso, MetadataField metadataField, String language, String value)
throws SQLException {
return addMetadata(context, dso, metadataField, language, Arrays.asList(value)).get(0);
List<MetadataValue> metadataValues =
addMetadata(context, dso, metadataField, language, Arrays.asList(value));
return CollectionUtils.isNotEmpty(metadataValues) ? metadataValues.get(0) : null;
}
@Override
@@ -482,7 +509,7 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
MetadataField metadataField = metadataValue.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
// We will attempt to disprove a match - if we can't we have a match
if (!element.equals(Item.ANY) && !element.equals(metadataField.getElement())) {
if (!Item.ANY.equals(element) && !StringUtils.equals(element, metadataField.getElement())) {
// Elements do not match, no wildcard
return false;
}
@@ -493,9 +520,9 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
// Value is qualified, so no match
return false;
}
} else if (!qualifier.equals(Item.ANY)) {
} else if (!Item.ANY.equals(qualifier)) {
// Not a wildcard, so qualifier must match exactly
if (!qualifier.equals(metadataField.getQualifier())) {
if (!StringUtils.equals(qualifier, metadataField.getQualifier())) {
return false;
}
}
@@ -506,15 +533,15 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
// Value is qualified, so no match
return false;
}
} else if (!language.equals(Item.ANY)) {
} else if (!Item.ANY.equals(language)) {
// Not a wildcard, so language must match exactly
if (!language.equals(metadataValue.getLanguage())) {
if (!StringUtils.equals(language, metadataValue.getLanguage())) {
return false;
}
}
if (!schema.equals(Item.ANY)) {
if (metadataSchema != null && !metadataSchema.getName().equals(schema)) {
if (!Item.ANY.equals(schema)) {
if (!StringUtils.equals(schema, metadataSchema.getName())) {
// The namespace doesn't match
return false;
}

View File

@@ -64,7 +64,7 @@ public class EntityServiceImpl implements EntityService {
List<Relationship> fullList = entity.getRelationships();
List<Relationship> listToReturn = new LinkedList<>();
for (Relationship relationship : fullList) {
if (relationship.getLeftItem().getID() == entity.getItem().getID()) {
if (relationship.getLeftItem().getID().equals(entity.getItem().getID())) {
listToReturn.add(relationship);
}
}
@@ -76,7 +76,7 @@ public class EntityServiceImpl implements EntityService {
List<Relationship> fullList = entity.getRelationships();
List<Relationship> listToReturn = new LinkedList<>();
for (Relationship relationship : fullList) {
if (relationship.getRightItem().getID() == entity.getItem().getID()) {
if (relationship.getRightItem().getID().equals(entity.getItem().getID())) {
listToReturn.add(relationship);
}
}

View File

@@ -30,6 +30,7 @@ import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.discovery.SolrSearchCore;
import org.dspace.discovery.indexobject.IndexableCollection;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.eperson.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -124,31 +125,40 @@ public class EntityTypeServiceImpl implements EntityTypeService {
public List<String> getSubmitAuthorizedTypes(Context context)
throws SQLException, SolrServerException, IOException {
List<String> types = new ArrayList<>();
StringBuilder query = new StringBuilder();
org.dspace.eperson.EPerson currentUser = context.getCurrentUser();
StringBuilder query = null;
EPerson currentUser = context.getCurrentUser();
if (!authorizeService.isAdmin(context)) {
String userId = "";
if (currentUser != null) {
userId = currentUser.getID().toString();
query = new StringBuilder();
query.append("submit:(e").append(userId);
}
query.append("submit:(e").append(userId);
Set<Group> groups = groupService.allMemberGroupsSet(context, currentUser);
for (Group group : groups) {
query.append(" OR g").append(group.getID());
if (query == null) {
query = new StringBuilder();
query.append("submit:(g");
} else {
query.append(" OR g");
}
query.append(group.getID());
}
query.append(")");
} else {
query.append("*:*");
}
SolrQuery sQuery = new SolrQuery(query.toString());
SolrQuery sQuery = new SolrQuery("*:*");
if (query != null) {
sQuery.addFilterQuery(query.toString());
}
sQuery.addFilterQuery("search.resourcetype:" + IndexableCollection.TYPE);
sQuery.setRows(0);
sQuery.addFacetField("search.entitytype");
sQuery.setFacetMinCount(1);
sQuery.setFacetLimit(Integer.MAX_VALUE);
sQuery.setFacetSort(FacetParams.FACET_SORT_INDEX);
QueryResponse qResp = solrSearchCore.getSolr().query(sQuery);
QueryResponse qResp = solrSearchCore.getSolr().query(sQuery, solrSearchCore.REQUEST_METHOD);
FacetField facetField = qResp.getFacetField("search.entitytype");
if (Objects.nonNull(facetField)) {
for (Count c : facetField.getValues()) {

View File

@@ -18,6 +18,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import java.util.function.Supplier;
import java.util.stream.Collectors;
@@ -65,6 +66,7 @@ import org.dspace.event.Event;
import org.dspace.harvest.HarvestedItem;
import org.dspace.harvest.service.HarvestedItemService;
import org.dspace.identifier.DOI;
import org.dspace.identifier.DOIIdentifierProvider;
import org.dspace.identifier.IdentifierException;
import org.dspace.identifier.service.DOIService;
import org.dspace.identifier.service.IdentifierService;
@@ -78,6 +80,9 @@ import org.dspace.orcid.service.OrcidSynchronizationService;
import org.dspace.orcid.service.OrcidTokenService;
import org.dspace.profile.service.ResearcherProfileService;
import org.dspace.services.ConfigurationService;
import org.dspace.versioning.Version;
import org.dspace.versioning.VersionHistory;
import org.dspace.versioning.service.VersionHistoryService;
import org.dspace.versioning.service.VersioningService;
import org.dspace.workflow.WorkflowItemService;
import org.dspace.workflow.factory.WorkflowServiceFactory;
@@ -170,6 +175,9 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
@Autowired(required = true)
protected SubscribeService subscribeService;
@Autowired
private VersionHistoryService versionHistoryService;
protected ItemServiceImpl() {
super();
}
@@ -276,6 +284,55 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
}
}
@Override
public void populateWithTemplateItemMetadata(Context context, Collection collection, boolean template, Item item)
throws SQLException {
Item templateItem = collection.getTemplateItem();
Optional<MetadataValue> colEntityType = getDSpaceEntityType(collection);
Optional<MetadataValue> templateItemEntityType = getDSpaceEntityType(templateItem);
if (template && colEntityType.isPresent() && templateItemEntityType.isPresent() &&
!StringUtils.equals(colEntityType.get().getValue(), templateItemEntityType.get().getValue())) {
throw new IllegalStateException("The template item has entity type : (" +
templateItemEntityType.get().getValue() + ") different than collection entity type : " +
colEntityType.get().getValue());
}
if (template && colEntityType.isPresent() && templateItemEntityType.isEmpty()) {
MetadataValue original = colEntityType.get();
MetadataField metadataField = original.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
// NOTE: dspace.entity.type = <blank> does not make sense
// the collection entity type is by default blank when a collection is first created
if (StringUtils.isNotBlank(original.getValue())) {
addMetadata(context, item, metadataSchema.getName(), metadataField.getElement(),
metadataField.getQualifier(), original.getLanguage(), original.getValue());
}
}
if (template && (templateItem != null)) {
List<MetadataValue> md = getMetadata(templateItem, Item.ANY, Item.ANY, Item.ANY, Item.ANY);
for (MetadataValue aMd : md) {
MetadataField metadataField = aMd.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
addMetadata(context, item, metadataSchema.getName(), metadataField.getElement(),
metadataField.getQualifier(), aMd.getLanguage(), aMd.getValue());
}
}
}
private Optional<MetadataValue> getDSpaceEntityType(DSpaceObject dSpaceObject) {
return Objects.nonNull(dSpaceObject) ? dSpaceObject.getMetadata()
.stream()
.filter(x -> x.getMetadataField().toString('.')
.equalsIgnoreCase("dspace.entity.type"))
.findFirst()
: Optional.empty();
}
@Override
public Iterator<Item> findAll(Context context) throws SQLException {
return itemDAO.findAll(context, true);
@@ -798,6 +855,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
DOI doi = doiService.findDOIByDSpaceObject(context, item);
if (doi != null) {
doi.setDSpaceObject(null);
doi.setStatus(DOIIdentifierProvider.TO_BE_DELETED);
}
// remove version attached to the item
@@ -1571,13 +1629,13 @@ prevent the generation of resource policy entry values with null dspace_object a
@Override
public int countItems(Context context, Collection collection) throws SQLException {
return itemDAO.countItems(context, collection, true, false);
return itemDAO.countItems(context, collection, true, false, true);
}
@Override
public int countAllItems(Context context, Collection collection) throws SQLException {
return itemDAO.countItems(context, collection, true, false) + itemDAO.countItems(context, collection,
false, true);
return itemDAO.countItems(context, collection, true, false, true) + itemDAO.countItems(context, collection,
false, true, true);
}
@Override
@@ -1586,7 +1644,7 @@ prevent the generation of resource policy entry values with null dspace_object a
List<Collection> collections = communityService.getAllCollections(context, community);
// Now, lets count unique items across that list of collections
return itemDAO.countItems(context, collections, true, false);
return itemDAO.countItems(context, collections, true, false, true);
}
@Override
@@ -1595,8 +1653,8 @@ prevent the generation of resource policy entry values with null dspace_object a
List<Collection> collections = communityService.getAllCollections(context, community);
// Now, lets count unique items across that list of collections
return itemDAO.countItems(context, collections, true, false) + itemDAO.countItems(context, collections,
false, true);
return itemDAO.countItems(context, collections, true, false, true) + itemDAO.countItems(context, collections,
false, false, true);
}
@Override
@@ -1609,10 +1667,15 @@ prevent the generation of resource policy entry values with null dspace_object a
@Override
public Item findByIdOrLegacyId(Context context, String id) throws SQLException {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
try {
if (StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUID.fromString(id));
}
} catch (IllegalArgumentException e) {
// Not a valid legacy ID or valid UUID
return null;
}
}
@@ -1635,19 +1698,19 @@ prevent the generation of resource policy entry values with null dspace_object a
@Override
public int countNotArchivedItems(Context context) throws SQLException {
// return count of items not in archive and also not withdrawn
return itemDAO.countItems(context, false, false);
return itemDAO.countItems(context, false, false, true);
}
@Override
public int countArchivedItems(Context context) throws SQLException {
// return count of items in archive and also not withdrawn
return itemDAO.countItems(context, true, false);
return itemDAO.countItems(context, true, false, true);
}
@Override
public int countWithdrawnItems(Context context) throws SQLException {
// return count of items that are not in archive and withdrawn
return itemDAO.countItems(context, false, true);
return itemDAO.countItems(context, false, true, true );
}
@Override
@@ -1733,7 +1796,7 @@ prevent the generation of resource policy entry values with null dspace_object a
//Retrieve the applicable relationship
Relationship rs = relationshipService.find(context,
((RelationshipMetadataValue) rr).getRelationshipId());
if (rs.getLeftItem() == dso) {
if (rs.getLeftItem().equals(dso)) {
rs.setLeftPlace(place);
} else {
rs.setRightPlace(place);
@@ -1865,4 +1928,40 @@ prevent the generation of resource policy entry values with null dspace_object a
}
}
@Override
public boolean isLatestVersion(Context context, Item item) throws SQLException {
VersionHistory history = versionHistoryService.findByItem(context, item);
if (history == null) {
// not all items have a version history
// if an item does not have a version history, it is by definition the latest
// version
return true;
}
// start with the very latest version of the given item (may still be in
// workspace)
Version latestVersion = versionHistoryService.getLatestVersion(context, history);
// find the latest version of the given item that is archived
while (latestVersion != null && !latestVersion.getItem().isArchived()) {
latestVersion = versionHistoryService.getPrevious(context, history, latestVersion);
}
// could not find an archived version of the given item
if (latestVersion == null) {
// this scenario should never happen, but let's err on the side of showing too
// many items vs. to little
// (see discovery.xml, a lot of discovery configs filter out all items that are
// not the latest version)
return true;
}
// sanity check
assert latestVersion.getItem().isArchived();
return item.equals(latestVersion.getItem());
}
}

View File

@@ -23,6 +23,7 @@ import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.scripts.handler.DSpaceRunnableHandler;
import org.dspace.services.ConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
/**
@@ -36,6 +37,11 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
@Autowired
private DSpaceObjectUtils dSpaceObjectUtils;
@Autowired
private ConfigurationService configurationService;
private int csxExportLimit = -1;
@Override
public DSpaceCSV handleExport(Context context, boolean exportAllItems, boolean exportAllMetadata, String identifier,
DSpaceRunnableHandler handler) throws Exception {
@@ -43,7 +49,7 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
if (exportAllItems) {
handler.logInfo("Exporting whole repository WARNING: May take some time!");
toExport = itemService.findAll(context);
toExport = itemService.findAll(context, getCsvExportLimit(), 0);
} else {
DSpaceObject dso = HandleServiceFactory.getInstance().getHandleService()
.resolveToObject(context, identifier);
@@ -63,7 +69,7 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
} else if (dso.getType() == Constants.COLLECTION) {
handler.logInfo("Exporting collection '" + dso.getName() + "' (" + identifier + ")");
Collection collection = (Collection) dso;
toExport = itemService.findByCollection(context, collection);
toExport = itemService.findByCollection(context, collection, getCsvExportLimit(), 0);
} else if (dso.getType() == Constants.COMMUNITY) {
handler.logInfo("Exporting community '" + dso.getName() + "' (" + identifier + ")");
toExport = buildFromCommunity(context, (Community) dso);
@@ -74,18 +80,21 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
}
}
DSpaceCSV csv = this.export(context, toExport, exportAllMetadata);
DSpaceCSV csv = this.export(context, toExport, exportAllMetadata, handler);
return csv;
}
@Override
public DSpaceCSV export(Context context, Iterator<Item> toExport, boolean exportAll) throws Exception {
public DSpaceCSV export(Context context, Iterator<Item> toExport,
boolean exportAll, DSpaceRunnableHandler handler) throws Exception {
Context.Mode originalMode = context.getCurrentMode();
context.setMode(Context.Mode.READ_ONLY);
// Process each item
// Process each item until we reach the limit
int itemExportLimit = getCsvExportLimit();
DSpaceCSV csv = new DSpaceCSV(exportAll);
while (toExport.hasNext()) {
for (int itemsAdded = 0; toExport.hasNext() && itemsAdded < itemExportLimit; itemsAdded++) {
Item item = toExport.next();
csv.addItem(item);
context.uncacheEntity(item);
@@ -97,8 +106,9 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
}
@Override
public DSpaceCSV export(Context context, Community community, boolean exportAll) throws Exception {
return export(context, buildFromCommunity(context, community), exportAll);
public DSpaceCSV export(Context context, Community community,
boolean exportAll, DSpaceRunnableHandler handler) throws Exception {
return export(context, buildFromCommunity(context, community), exportAll, handler);
}
/**
@@ -117,21 +127,30 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
// Add all the collections
List<Collection> collections = community.getCollections();
for (Collection collection : collections) {
Iterator<Item> items = itemService.findByCollection(context, collection);
while (items.hasNext()) {
// Never obtain more items than the configured limit
Iterator<Item> items = itemService.findByCollection(context, collection, getCsvExportLimit(), 0);
while (result.size() < getCsvExportLimit() && items.hasNext()) {
result.add(items.next());
}
}
// Add all the sub-communities
// Add all the sub-communities
List<Community> communities = community.getSubcommunities();
for (Community subCommunity : communities) {
Iterator<Item> items = buildFromCommunity(context, subCommunity);
while (items.hasNext()) {
while (result.size() < getCsvExportLimit() && items.hasNext()) {
result.add(items.next());
}
}
return result.iterator();
}
@Override
public int getCsvExportLimit() {
if (csxExportLimit == -1) {
csxExportLimit = configurationService.getIntProperty("bulkedit.export.max.items", 500);
}
return csxExportLimit;
}
}

View File

@@ -21,6 +21,7 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.apache.commons.lang3.StringUtils;
import org.dspace.core.Context;
import org.dspace.core.ReloadableEntity;
import org.hibernate.annotations.Type;
@@ -143,6 +144,9 @@ public class MetadataValue implements ReloadableEntity<Integer> {
* @param language new language
*/
public void setLanguage(String language) {
if (StringUtils.equals(language, Item.ANY)) {
language = null;
}
this.language = language;
}

View File

@@ -12,11 +12,8 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.DCInputsReaderException;
import org.dspace.app.util.Util;
@@ -96,11 +93,18 @@ public class WorkspaceItemServiceImpl implements WorkspaceItemService {
@Override
public WorkspaceItem create(Context context, Collection collection, boolean template)
throws AuthorizeException, SQLException {
return create(context, collection, null, template);
return create(context, collection, null, template, false);
}
@Override
public WorkspaceItem create(Context context, Collection collection, UUID uuid, boolean template)
public WorkspaceItem create(Context context, Collection collection, boolean template, boolean isNewVersion)
throws AuthorizeException, SQLException {
return create(context, collection, null, template, isNewVersion);
}
@Override
public WorkspaceItem create(Context context, Collection collection, UUID uuid, boolean template,
boolean isNewVersion)
throws AuthorizeException, SQLException {
// Check the user has permission to ADD to the collection
authorizeService.authorizeAction(context, collection, Constants.ADD);
@@ -134,48 +138,16 @@ public class WorkspaceItemServiceImpl implements WorkspaceItemService {
.addPolicy(context, item, Constants.DELETE, item.getSubmitter(), ResourcePolicy.TYPE_SUBMISSION);
// Copy template if appropriate
Item templateItem = collection.getTemplateItem();
Optional<MetadataValue> colEntityType = getDSpaceEntityType(collection);
Optional<MetadataValue> templateItemEntityType = getDSpaceEntityType(templateItem);
if (template && colEntityType.isPresent() && templateItemEntityType.isPresent() &&
!StringUtils.equals(colEntityType.get().getValue(), templateItemEntityType.get().getValue())) {
throw new IllegalStateException("The template item has entity type : (" +
templateItemEntityType.get().getValue() + ") different than collection entity type : " +
colEntityType.get().getValue());
}
if (template && colEntityType.isPresent() && templateItemEntityType.isEmpty()) {
MetadataValue original = colEntityType.get();
MetadataField metadataField = original.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
// NOTE: dspace.entity.type = <blank> does not make sense
// the collection entity type is by default blank when a collection is first created
if (StringUtils.isNotBlank(original.getValue())) {
itemService.addMetadata(context, item, metadataSchema.getName(), metadataField.getElement(),
metadataField.getQualifier(), original.getLanguage(), original.getValue());
}
}
if (template && (templateItem != null)) {
List<MetadataValue> md = itemService.getMetadata(templateItem, Item.ANY, Item.ANY, Item.ANY, Item.ANY);
for (MetadataValue aMd : md) {
MetadataField metadataField = aMd.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
itemService.addMetadata(context, item, metadataSchema.getName(), metadataField.getElement(),
metadataField.getQualifier(), aMd.getLanguage(),
aMd.getValue());
}
}
itemService.populateWithTemplateItemMetadata(context, collection, template, item);
itemService.update(context, item);
// If configured, register identifiers (eg handle, DOI) now. This is typically used with the Show Identifiers
// submission step which previews minted handles and DOIs during the submission process. Default: false
// Additional check needed: if we are creating a new version of an existing item we skip the identifier
// generation here, as this will be performed when the new version is created in VersioningServiceImpl
if (DSpaceServicesFactory.getInstance().getConfigurationService()
.getBooleanProperty("identifiers.submission.register", false)) {
.getBooleanProperty("identifiers.submission.register", false) && !isNewVersion) {
try {
// Get map of filters to use for identifier types, while the item is in progress
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters(true);
@@ -204,17 +176,16 @@ public class WorkspaceItemServiceImpl implements WorkspaceItemService {
return workspaceItem;
}
private Optional<MetadataValue> getDSpaceEntityType(DSpaceObject dSpaceObject) {
return Objects.nonNull(dSpaceObject) ? dSpaceObject.getMetadata()
.stream()
.filter(x -> x.getMetadataField().toString('.')
.equalsIgnoreCase("dspace.entity.type"))
.findFirst()
: Optional.empty();
}
@Override
public WorkspaceItem create(Context c, WorkflowItem workflowItem) throws SQLException, AuthorizeException {
WorkspaceItem potentialDuplicate = findByItem(c, workflowItem.getItem());
if (potentialDuplicate != null) {
throw new IllegalArgumentException(String.format(
"A workspace item referring to item %s already exists (%d)",
workflowItem.getItem().getID(),
potentialDuplicate.getID()
));
}
WorkspaceItem workspaceItem = workspaceItemDAO.create(c, new WorkspaceItem());
workspaceItem.setItem(workflowItem.getItem());
workspaceItem.setCollection(workflowItem.getCollection());

View File

@@ -242,7 +242,7 @@ public final class ChoiceAuthorityServiceImpl implements ChoiceAuthorityService
// check if it is the requested collection
Map<String, ChoiceAuthority> controllerFormDef = controllerFormDefinitions.get(fieldKey);
SubmissionConfig submissionConfig = submissionConfigService
.getSubmissionConfigByCollection(collection.getHandle());
.getSubmissionConfigByCollection(collection);
String submissionName = submissionConfig.getSubmissionName();
// check if the requested collection has a submission definition that use an authority for the metadata
if (controllerFormDef.containsKey(submissionName)) {
@@ -495,7 +495,7 @@ public final class ChoiceAuthorityServiceImpl implements ChoiceAuthorityService
try {
configReaderService = SubmissionServiceFactory.getInstance().getSubmissionConfigService();
SubmissionConfig submissionName = configReaderService
.getSubmissionConfigByCollection(collection.getHandle());
.getSubmissionConfigByCollection(collection);
ma = controllerFormDefinitions.get(fieldKey).get(submissionName.getSubmissionName());
} catch (SubmissionConfigReaderException e) {
// the system is in an illegal state as the submission definition is not valid
@@ -577,7 +577,7 @@ public final class ChoiceAuthorityServiceImpl implements ChoiceAuthorityService
.collect(Collectors.toList()));
}
DiscoverySearchFilterFacet matchingFacet = null;
for (DiscoverySearchFilterFacet facetConfig : searchConfigurationService.getAllFacetsConfig()) {
for (DiscoverySearchFilterFacet facetConfig : searchConfigurationService.getAllUniqueFacetsConfig()) {
boolean coversAllFieldsFromVocab = true;
for (String fieldFromVocab: metadataFields) {
boolean coversFieldFromVocab = false;

View File

@@ -156,7 +156,8 @@ public class DCInputAuthority extends SelfNamedPlugin implements ChoiceAuthority
int found = 0;
List<Choice> v = new ArrayList<Choice>();
for (int i = 0; i < valuesLocale.length; ++i) {
if (query == null || StringUtils.containsIgnoreCase(valuesLocale[i], query)) {
// In a DCInputAuthority context, a user will want to query the labels, not the values
if (query == null || StringUtils.containsIgnoreCase(labelsLocale[i], query)) {
if (found >= start && v.size() < limit) {
v.add(new Choice(null, valuesLocale[i], labelsLocale[i]));
if (valuesLocale[i].equalsIgnoreCase(query)) {

View File

@@ -34,35 +34,37 @@ import org.xml.sax.InputSource;
* from {@code ${dspace.dir}/config/controlled-vocabularies/*.xml} and turns
* them into autocompleting authorities.
*
* Configuration: This MUST be configured as a self-named plugin, e.g.: {@code
* plugin.selfnamed.org.dspace.content.authority.ChoiceAuthority = \
* <p>Configuration: This MUST be configured as a self-named plugin, e.g.: {@code
* plugin.selfnamed.org.dspace.content.authority.ChoiceAuthority =
* org.dspace.content.authority.DSpaceControlledVocabulary
* }
*
* It AUTOMATICALLY configures a plugin instance for each XML file in the
* <p>It AUTOMATICALLY configures a plugin instance for each XML file in the
* controlled vocabularies directory. The name of the plugin is the basename of
* the file; e.g., {@code ${dspace.dir}/config/controlled-vocabularies/nsi.xml}
* would generate a plugin called "nsi".
*
* Each configured plugin comes with three configuration options: {@code
* vocabulary.plugin._plugin_.hierarchy.store = <true|false>
* # Store entire hierarchy along with selected value. Default: TRUE
* vocabulary.plugin._plugin_.hierarchy.suggest =
* <true|false> # Display entire hierarchy in the suggestion list. Default: TRUE
* vocabulary.plugin._plugin_.delimiter = "<string>"
* # Delimiter to use when building hierarchy strings. Default: "::"
* }
* <p>Each configured plugin comes with three configuration options:
* <ul>
* <li>{@code vocabulary.plugin._plugin_.hierarchy.store = <true|false>}
* # Store entire hierarchy along with selected value. Default: TRUE</li>
* <li>{@code vocabulary.plugin._plugin_.hierarchy.suggest =
* <true|false> # Display entire hierarchy in the suggestion list. Default: TRUE}</li>
* <li>{@code vocabulary.plugin._plugin_.delimiter = "<string>"
* # Delimiter to use when building hierarchy strings. Default: "::"}</li>
* </ul>
*
* @author Michael B. Klein
*/
public class DSpaceControlledVocabulary extends SelfNamedPlugin implements HierarchicalAuthority {
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(DSpaceControlledVocabulary.class);
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger();
protected static String xpathTemplate = "//node[contains(translate(@label,'ABCDEFGHIJKLMNOPQRSTUVWXYZ'," +
"'abcdefghijklmnopqrstuvwxyz'),'%s')]";
protected static String idTemplate = "//node[@id = '%s']";
protected static String labelTemplate = "//node[@label = '%s']";
"'abcdefghijklmnopqrstuvwxyz'),%s)]";
protected static String idTemplate = "//node[@id = %s]";
protected static String idTemplateQuoted = "//node[@id = '%s']";
protected static String labelTemplate = "//node[@label = %s]";
protected static String idParentTemplate = "//node[@id = '%s']/parent::isComposedBy/parent::node";
protected static String rootTemplate = "/node";
protected static String pluginNames[] = null;
@@ -102,10 +104,11 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
}
}
String vocabulariesPath = DSpaceServicesFactory.getInstance().getConfigurationService()
.getProperty(
"dspace.dir") + "/config/controlled-vocabularies/";
.getProperty("dspace.dir") +
File.separator + "config" +
File.separator + "controlled-vocabularies";
String[] xmlFiles = (new File(vocabulariesPath)).list(new xmlFilter());
List<String> names = new ArrayList<String>();
List<String> names = new ArrayList<>();
for (String filename : xmlFiles) {
names.add((new File(filename)).getName().replace(".xml", ""));
}
@@ -120,7 +123,8 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
log.info("Initializing " + this.getClass().getName());
vocabularyName = this.getPluginInstanceName();
String vocabulariesPath = config.getProperty("dspace.dir") + "/config/controlled-vocabularies/";
String vocabulariesPath = config.getProperty("dspace.dir") + File.separator + "config" +
File.separator + "controlled-vocabularies" + File.separator;
String configurationPrefix = "vocabulary.plugin." + vocabularyName;
storeHierarchy = config.getBooleanProperty(configurationPrefix + ".hierarchy.store", storeHierarchy);
suggestHierarchy = config.getBooleanProperty(configurationPrefix + ".hierarchy.suggest", suggestHierarchy);
@@ -160,14 +164,23 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
public Choices getMatches(String text, int start, int limit, String locale) {
init();
log.debug("Getting matches for '" + text + "'");
String xpathExpression = "";
String[] textHierarchy = text.split(hierarchyDelimiter, -1);
StringBuilder xpathExpressionBuilder = new StringBuilder();
for (int i = 0; i < textHierarchy.length; i++) {
xpathExpression += String.format(xpathTemplate, textHierarchy[i].replaceAll("'", "&apos;").toLowerCase());
xpathExpressionBuilder.append(String.format(xpathTemplate, "$var" + i));
}
String xpathExpression = xpathExpressionBuilder.toString();
XPath xpath = XPathFactory.newInstance().newXPath();
int total = 0;
List<Choice> choices = new ArrayList<Choice>();
xpath.setXPathVariableResolver(variableName -> {
String varName = variableName.getLocalPart();
if (varName.startsWith("var")) {
int index = Integer.parseInt(varName.substring(3));
return textHierarchy[index].toLowerCase();
}
throw new IllegalArgumentException("Unexpected variable: " + varName);
});
int total;
List<Choice> choices;
try {
NodeList results = (NodeList) xpath.evaluate(xpathExpression, vocabulary, XPathConstants.NODESET);
total = results.getLength();
@@ -183,14 +196,23 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
@Override
public Choices getBestMatch(String text, String locale) {
init();
log.debug("Getting best matches for '" + text + "'");
String xpathExpression = "";
log.debug("Getting best matches for {}'", text);
String[] textHierarchy = text.split(hierarchyDelimiter, -1);
StringBuilder xpathExpressionBuilder = new StringBuilder();
for (int i = 0; i < textHierarchy.length; i++) {
xpathExpression += String.format(labelTemplate, textHierarchy[i].replaceAll("'", "&apos;"));
xpathExpressionBuilder.append(String.format(labelTemplate, "$var" + i));
}
String xpathExpression = xpathExpressionBuilder.toString();
XPath xpath = XPathFactory.newInstance().newXPath();
List<Choice> choices = new ArrayList<Choice>();
xpath.setXPathVariableResolver(variableName -> {
String varName = variableName.getLocalPart();
if (varName.startsWith("var")) {
int index = Integer.parseInt(varName.substring(3));
return textHierarchy[index];
}
throw new IllegalArgumentException("Unexpected variable: " + varName);
});
List<Choice> choices;
try {
NodeList results = (NodeList) xpath.evaluate(xpathExpression, vocabulary, XPathConstants.NODESET);
choices = getChoicesFromNodeList(results, 0, 1);
@@ -224,6 +246,7 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
@Override
public boolean isHierarchical() {
init();
return true;
}
@@ -237,7 +260,7 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
@Override
public Choices getChoicesByParent(String authorityName, String parentId, int start, int limit, String locale) {
init();
String xpathExpression = String.format(idTemplate, parentId);
String xpathExpression = String.format(idTemplateQuoted, parentId);
return getChoicesByXpath(xpathExpression, start, limit);
}
@@ -256,19 +279,17 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
@Override
public Integer getPreloadLevel() {
init();
return preloadLevel;
}
private boolean isRootElement(Node node) {
if (node != null && node.getOwnerDocument().getDocumentElement().equals(node)) {
return true;
}
return false;
return node != null && node.getOwnerDocument().getDocumentElement().equals(node);
}
private Node getNode(String key) throws XPathExpressionException {
init();
String xpathExpression = String.format(idTemplate, key);
String xpathExpression = String.format(idTemplateQuoted, key);
Node node = getNodeFromXPath(xpathExpression);
return node;
}
@@ -280,7 +301,7 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
}
private List<Choice> getChoicesFromNodeList(NodeList results, int start, int limit) {
List<Choice> choices = new ArrayList<Choice>();
List<Choice> choices = new ArrayList<>();
for (int i = 0; i < results.getLength(); i++) {
if (i < start) {
continue;
@@ -299,14 +320,14 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
private Map<String, String> addOtherInformation(String parentCurr, String noteCurr,
List<String> childrenCurr, String authorityCurr) {
Map<String, String> extras = new HashMap<String, String>();
Map<String, String> extras = new HashMap<>();
if (StringUtils.isNotBlank(parentCurr)) {
extras.put("parent", parentCurr);
}
if (StringUtils.isNotBlank(noteCurr)) {
extras.put("note", noteCurr);
}
if (childrenCurr.size() > 0) {
if (!childrenCurr.isEmpty()) {
extras.put("hasChildren", "true");
} else {
extras.put("hasChildren", "false");
@@ -364,7 +385,7 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
}
private List<String> getChildren(Node node) {
List<String> children = new ArrayList<String>();
List<String> children = new ArrayList<>();
NodeList childNodes = node.getChildNodes();
for (int ci = 0; ci < childNodes.getLength(); ci++) {
Node firstChild = childNodes.item(ci);
@@ -387,7 +408,7 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
private boolean isSelectable(Node node) {
Node selectableAttr = node.getAttributes().getNamedItem("selectable");
if (null != selectableAttr) {
return Boolean.valueOf(selectableAttr.getNodeValue());
return Boolean.parseBoolean(selectableAttr.getNodeValue());
} else { // Default is true
return true;
}
@@ -414,7 +435,7 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
}
private Choices getChoicesByXpath(String xpathExpression, int start, int limit) {
List<Choice> choices = new ArrayList<Choice>();
List<Choice> choices = new ArrayList<>();
XPath xpath = XPathFactory.newInstance().newXPath();
try {
Node parentNode = (Node) xpath.evaluate(xpathExpression, vocabulary, XPathConstants.NODE);

View File

@@ -59,7 +59,6 @@ public class CreativeCommonsRDFStreamDisseminationCrosswalk
Bitstream cc = creativeCommonsService.getLicenseRdfBitstream((Item) dso);
if (cc != null) {
Utils.copy(bitstreamService.retrieve(context, cc), out);
out.close();
}
}
}

View File

@@ -65,7 +65,6 @@ public class CreativeCommonsTextStreamDisseminationCrosswalk
Bitstream cc = creativeCommonsService.getLicenseTextBitstream((Item) dso);
if (cc != null) {
Utils.copy(bitstreamService.retrieve(context, cc), out);
out.close();
}
}
}

View File

@@ -57,7 +57,6 @@ public class LicenseStreamDisseminationCrosswalk
if (licenseBs != null) {
Utils.copy(bitstreamService.retrieve(context, licenseBs), out);
out.close();
}
}
}

View File

@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.packager.PackageDisseminator;
@@ -129,7 +130,7 @@ public class METSDisseminationCrosswalk
try {
//Return just the root Element of the METS file
SAXBuilder builder = new SAXBuilder();
SAXBuilder builder = XMLUtils.getSAXBuilder();
Document metsDocument = builder.build(tempFile);
return metsDocument.getRootElement();
} catch (JDOMException je) {

View File

@@ -432,31 +432,7 @@ public class METSRightsCrosswalk
//get what class of context this is
String contextClass = element.getAttributeValue("CONTEXTCLASS");
ResourcePolicy rp = resourcePolicyService.create(context);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// get reference to the <Permissions> element
// Note: we are assuming here that there will only ever be ONE <Permissions>
// element. Currently there are no known use cases for multiple.
Element permsElement = element.getChild("Permissions", METSRights_NS);
if (permsElement == null) {
log.error("No <Permissions> element was found. Skipping this <Context> element.");
continue;
}
if (element.getAttributeValue("rpName") != null) {
rp.setRpName(element.getAttributeValue("rpName"));
}
try {
if (element.getAttributeValue("start-date") != null) {
rp.setStartDate(sdf.parse(element.getAttributeValue("start-date")));
}
if (element.getAttributeValue("end-date") != null) {
rp.setEndDate(sdf.parse(element.getAttributeValue("end-date")));
}
} catch (ParseException ex) {
log.error("Failed to parse embargo date. The date needs to be in the format 'yyyy-MM-dd'.", ex);
}
ResourcePolicy rp = null;
//Check if this permission pertains to Anonymous users
if (ANONYMOUS_CONTEXTCLASS.equals(contextClass)) {
@@ -464,22 +440,23 @@ public class METSRightsCrosswalk
Group anonGroup = groupService.findByName(context, Group.ANONYMOUS);
if (anonGroup == null) {
throw new CrosswalkInternalException(
"The DSpace database has not been properly initialized. The Anonymous Group is " +
"missing from the database.");
"The DSpace database has not been properly initialized. The Anonymous Group is " +
"missing from the database.");
}
rp.setGroup(anonGroup);
rp = resourcePolicyService.create(context, null, anonGroup);
} else if (ADMIN_CONTEXTCLASS.equals(contextClass)) {
// else if this permission declaration pertains to Administrators
// get DSpace Administrator group
Group adminGroup = groupService.findByName(context, Group.ADMIN);
if (adminGroup == null) {
throw new CrosswalkInternalException(
"The DSpace database has not been properly initialized. The Administrator Group is " +
"missing from the database.");
"The DSpace database has not been properly initialized. " +
"The Administrator Group is " +
"missing from the database.");
}
rp.setGroup(adminGroup);
rp = resourcePolicyService.create(context, null, adminGroup);
} else if (GROUP_CONTEXTCLASS.equals(contextClass)) {
// else if this permission pertains to another DSpace group
try {
@@ -498,18 +475,17 @@ public class METSRightsCrosswalk
//if not found, throw an error -- user should restore group from the SITE AIP
if (group == null) {
throw new CrosswalkInternalException("Cannot restore Group permissions on object ("
+ "type=" + Constants.typeText[dso
.getType()] + ", "
+ "handle=" + dso.getHandle() + ", "
+ "ID=" + dso.getID()
+ "). The Group named '" + groupName + "' is" +
" missing from DSpace. "
+ "Please restore this group using the SITE " +
"AIP, or recreate it.");
+ "type=" + Constants.typeText[dso.getType()] + ", "
+ "handle=" + dso.getHandle() + ", "
+ "ID=" + dso.getID()
+ "). The Group named '" + groupName + "' is" +
" missing from DSpace. "
+ "Please restore this group using the SITE " +
"AIP, or recreate it.");
}
//assign group to policy
rp.setGroup(group);
rp = resourcePolicyService.create(context, null, group);
} catch (PackageException pe) {
//A PackageException will only be thrown if translateDefaultGroupName() fails
//We'll just wrap it as a CrosswalkException and throw it upwards
@@ -535,25 +511,52 @@ public class METSRightsCrosswalk
//if not found, throw an error -- user should restore person from the SITE AIP
if (person == null) {
throw new CrosswalkInternalException("Cannot restore Person permissions on object ("
+ "type=" + Constants.typeText[dso
.getType()] + ", "
+ "handle=" + dso.getHandle() + ", "
+ "ID=" + dso.getID()
+ "). The Person with email/netid '" +
personEmail + "' is missing from DSpace. "
+ "Please restore this Person object using the " +
"SITE AIP, or recreate it.");
+ "type=" + Constants.typeText[dso.getType()] + ", "
+ "handle=" + dso.getHandle() + ", "
+ "ID=" + dso.getID()
+ "). The Person with email/netid '" +
personEmail + "' is missing from DSpace. "
+ "Please restore this Person object using the " +
"SITE AIP, or recreate it.");
}
//assign person to the policy
rp.setEPerson(person);
//create rp with the person
rp = resourcePolicyService.create(context, person, null);
} else {
log.error("Unrecognized CONTEXTCLASS: " + contextClass);
}
if (rp != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//set permissions on policy add to list of policies
rp.setAction(parsePermissions(permsElement));
policies.add(rp);
// get reference to the <Permissions> element
// Note: we are assuming here that there will only ever be ONE <Permissions>
// element. Currently there are no known use cases for multiple.
Element permsElement = element.getChild("Permissions", METSRights_NS);
if (permsElement == null) {
log.error("No <Permissions> element was found. Skipping this <Context> element.");
continue;
}
if (element.getAttributeValue("rpName") != null) {
rp.setRpName(element.getAttributeValue("rpName"));
}
try {
if (element.getAttributeValue("start-date") != null) {
rp.setStartDate(sdf.parse(element.getAttributeValue("start-date")));
}
if (element.getAttributeValue("end-date") != null) {
rp.setEndDate(sdf.parse(element.getAttributeValue("end-date")));
}
} catch (ParseException ex) {
log.error("Failed to parse embargo date. The date needs to be in the format 'yyyy-MM-dd'.",
ex);
}
//set permissions and type on policy and add to list of policies
rp.setAction(parsePermissions(permsElement));
rp.setRpType(ResourcePolicy.TYPE_CUSTOM);
policies.add(rp);
}
} //end if "Context" element
} //end for loop

View File

@@ -22,6 +22,7 @@ import java.util.Properties;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
@@ -144,7 +145,7 @@ public class MODSDisseminationCrosswalk extends SelfNamedPlugin
MODS_NS.getURI() + " " + MODS_XSD;
private static final XMLOutputter outputUgly = new XMLOutputter();
private static final SAXBuilder builder = new SAXBuilder();
private static final SAXBuilder builder = XMLUtils.getSAXBuilder();
private Map<String, modsTriple> modsMap = null;

View File

@@ -20,9 +20,7 @@ import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.BitstreamFormatService;
import org.dspace.content.service.BitstreamService;
@@ -224,29 +222,17 @@ public class PREMISCrosswalk
// c. made-up name based on sequence ID and extension.
String sid = String.valueOf(bitstream.getSequenceID());
String baseUrl = configurationService.getProperty("dspace.ui.url");
String handle = null;
// get handle of parent Item of this bitstream, if there is one:
List<Bundle> bn = bitstream.getBundles();
if (bn.size() > 0) {
List<Item> bi = bn.get(0).getItems();
if (bi.size() > 0) {
handle = bi.get(0).getHandle();
}
}
// get or make up name for bitstream:
String bsName = bitstream.getName();
if (bsName == null) {
List<String> ext = bitstream.getFormat(context).getExtensions();
bsName = "bitstream_" + sid + (ext.size() > 0 ? ext.get(0) : "");
}
if (handle != null && baseUrl != null) {
if (baseUrl != null) {
oiv.setText(baseUrl
+ "/bitstream/"
+ URLEncoder.encode(handle, "UTF-8")
+ "/"
+ sid
+ "/"
+ URLEncoder.encode(bsName, "UTF-8"));
+ "/bitstreams/"
+ bitstream.getID()
+ "/download");
} else {
oiv.setText(URLEncoder.encode(bsName, "UTF-8"));
}

View File

@@ -22,6 +22,7 @@ import java.util.Properties;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
@@ -125,7 +126,7 @@ public class QDCCrosswalk extends SelfNamedPlugin
// XML schemaLocation fragment for this crosswalk, from config.
private String schemaLocation = null;
private static final SAXBuilder builder = new SAXBuilder();
private static final SAXBuilder builder = XMLUtils.getSAXBuilder();
protected ItemService itemService = ContentServiceFactory.getInstance().getItemService();

View File

@@ -13,6 +13,7 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.packager.PackageDisseminator;
@@ -208,7 +209,7 @@ public class RoleCrosswalk
try {
//Try to parse our XML results (which were disseminated by the Packager)
SAXBuilder builder = new SAXBuilder();
SAXBuilder builder = XMLUtils.getSAXBuilder();
Document xmlDocument = builder.build(tempFile);
//If XML parsed successfully, return root element of doc
if (xmlDocument != null && xmlDocument.hasRootElement()) {

View File

@@ -49,7 +49,7 @@ public class SubscriptionDsoMetadataForEmailCompose implements StreamDisseminati
for (String actualMetadata : metadata) {
String[] splitted = actualMetadata.split("\\.");
String qualifier = null;
if (splitted.length == 1) {
if (splitted.length == 3) {
qualifier = splitted[2];
}
var metadataValue = itemService.getMetadataFirstValue(item, splitted[0], splitted[1], qualifier, ANY);

View File

@@ -18,6 +18,7 @@ import javax.xml.transform.TransformerException;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.XMLUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
@@ -297,7 +298,7 @@ public class XSLTIngestionCrosswalk
"Failed to initialize transformer, probably error loading stylesheet.");
}
SAXBuilder builder = new SAXBuilder();
SAXBuilder builder = XMLUtils.getSAXBuilder();
Document inDoc = builder.build(new FileInputStream(argv[i + 1]));
XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
List dimList;

View File

@@ -128,7 +128,8 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO<Item> {
* @return item count
* @throws SQLException if database error
*/
public int countItems(Context context, Collection collection, boolean includeArchived, boolean includeWithdrawn)
int countItems(Context context, Collection collection, boolean includeArchived, boolean includeWithdrawn,
boolean discoverable)
throws SQLException;
/**
@@ -144,8 +145,8 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO<Item> {
* @return item count
* @throws SQLException if database error
*/
public int countItems(Context context, List<Collection> collections, boolean includeArchived,
boolean includeWithdrawn) throws SQLException;
int countItems(Context context, List<Collection> collections, boolean includeArchived,
boolean includeWithdrawn, boolean discoverable) throws SQLException;
/**
* Get all Items installed or withdrawn, discoverable, and modified since a Date.
@@ -180,7 +181,8 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO<Item> {
* @return count of items
* @throws SQLException if database error
*/
int countItems(Context context, boolean includeArchived, boolean includeWithdrawn) throws SQLException;
int countItems(Context context, boolean includeArchived, boolean includeWithdrawn,
boolean discoverable) throws SQLException;
/**
* Count number of items from the specified submitter based on specific status flags
@@ -192,7 +194,8 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO<Item> {
* @return count of items
* @throws SQLException if database error
*/
public int countItems(Context context, EPerson submitter, boolean includeArchived, boolean includeWithdrawn)
int countItems(Context context, EPerson submitter, boolean includeArchived, boolean includeWithdrawn,
boolean discoverable)
throws SQLException;
}

View File

@@ -12,6 +12,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.persistence.Query;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
@@ -26,6 +27,7 @@ import org.dspace.content.dao.BitstreamDAO;
import org.dspace.core.AbstractHibernateDSODAO;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.core.UUIDIterator;
/**
* Hibernate implementation of the Database Access Object interface class for the Bitstream object.
@@ -76,7 +78,7 @@ public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> impleme
@Override
public Iterator<Bitstream> findByCommunity(Context context, Community community) throws SQLException {
Query query = createQuery(context, "select b from Bitstream b " +
Query query = createQuery(context, "select b.id from Bitstream b " +
"join b.bundles bitBundles " +
"join bitBundles.items item " +
"join item.collections itemColl " +
@@ -84,40 +86,45 @@ public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> impleme
"WHERE :community IN community");
query.setParameter("community", community);
return iterate(query);
@SuppressWarnings("unchecked")
List<UUID> uuids = query.getResultList();
return new UUIDIterator<Bitstream>(context, uuids, Bitstream.class, this);
}
@Override
public Iterator<Bitstream> findByCollection(Context context, Collection collection) throws SQLException {
Query query = createQuery(context, "select b from Bitstream b " +
Query query = createQuery(context, "select b.id from Bitstream b " +
"join b.bundles bitBundles " +
"join bitBundles.items item " +
"join item.collections c " +
"WHERE :collection IN c");
query.setParameter("collection", collection);
return iterate(query);
@SuppressWarnings("unchecked")
List<UUID> uuids = query.getResultList();
return new UUIDIterator<Bitstream>(context, uuids, Bitstream.class, this);
}
@Override
public Iterator<Bitstream> findByItem(Context context, Item item) throws SQLException {
Query query = createQuery(context, "select b from Bitstream b " +
Query query = createQuery(context, "select b.id from Bitstream b " +
"join b.bundles bitBundles " +
"join bitBundles.items item " +
"WHERE :item IN item");
query.setParameter("item", item);
return iterate(query);
@SuppressWarnings("unchecked")
List<UUID> uuids = query.getResultList();
return new UUIDIterator<Bitstream>(context, uuids, Bitstream.class, this);
}
@Override
public Iterator<Bitstream> findByStoreNumber(Context context, Integer storeNumber) throws SQLException {
Query query = createQuery(context, "select b from Bitstream b where b.storeNumber = :storeNumber");
Query query = createQuery(context, "select b.id from Bitstream b where b.storeNumber = :storeNumber");
query.setParameter("storeNumber", storeNumber);
return iterate(query);
@SuppressWarnings("unchecked")
List<UUID> uuids = query.getResultList();
return new UUIDIterator<Bitstream>(context, uuids, Bitstream.class, this);
}
@Override
@@ -145,7 +152,7 @@ public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> impleme
@Override
public int countWithNoPolicy(Context context) throws SQLException {
Query query = createQuery(context,
"SELECT count(bit.id) from Bitstream bit where bit.deleted<>true and bit.id not in" +
"SELECT count(bit.id) from Bitstream bit where bit.deleted<>true and bit not in" +
" (select res.dSpaceObject from ResourcePolicy res where res.resourceTypeId = " +
":typeId )");
query.setParameter("typeId", Constants.BITSTREAM);

Some files were not shown because too many files have changed in this diff Show More