Skip to content

Prepare for release #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Comprehensive unit tests added for the RelatedIdentifierSpec class to ensure robust functionality.
* Improved error messaging for missing publisher during updates in the DataResourceService.

### Fixed

### Security

### Deprecated

### Removed

## [1.2.3] - 2024-11-08

### Added
* Enhanced searching capabilities for related identifiers with new methods in the RelatedIdentifierSpec class.
* Comprehensive unit tests added for the RelatedIdentifierSpec class to ensure robust functionality.

### Fixed
* Fixed potential issue with unprivileged find
* Improved error messaging for missing publisher during updates in the DataResourceService.

### Security
* Update actions/setup-java action to v4.5.0
* Update dependency com.fasterxml.jackson.datatype:jackson-datatype-joda to v2.18.1.
* Update dependency com.fasterxml.jackson.datatype:jackson-datatype-jsr310 to v2.18.1
* Update dependency com.fasterxml.jackson.module:jackson-module-afterburner to v2.18.1
* Update dependency com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider to v2.18.1
* Update dependency com.google.code.gson:gson to v2.11.0
* Bump commons-io:commons-io from 2.16.1 to 2.17.0.
* Update dependency de.codecentric:spring-boot-admin-starter-client to v3.3.5
* Update dependency edu.kit.datamanager:service-base to v1.3.2
* Update plugin io.freefair.lombok to v8.10.2
* Update plugin io.freefair.maven-publish-java to v8.10.2
* Update dependency gradle to v8.10.2
* Update dependency jacoco to v0.8.12
* Bump org.apache.tika:tika-core from 2.9.2 to 3.0.0
* Update dependency org.javers:javers-spring-boot-starter-sql to v7.6.3
* Bump org.javers:javers-spring-boot-starter-sql from 7.6.2 to 7.6.3
* Update plugin org.owasp.dependencycheck to v11
* Bump org.postgresql:postgresql from 42.7.3 to 42.7.4.
* Update dependency org.springframework.boot:spring-boot-dependencies to v3.3.5
* Update dependency org.springframework.data:spring-data-elasticsearch to v5.3.5
* Update dependency org.springframework.restdocs:spring-restdocs-mockmvc to v3.0.2
* Update dependency org.springframework:spring-messaging to v6.1.14

### Deprecated

### Removed
* Fixed issue with privileged find for state 'REVOKED'

### Security
* Updated various dependencies and plugins to their latest versions for improved performance and security.
* Updated Gradle wrapper to version 8.10.2 for better build management.
* Removed outdated configuration for GitHub Actions in the project setup.

## [1.2.2] - 2024-04-02
Expand Down Expand Up @@ -280,7 +321,8 @@ Extracted from the 'base-repo' project.
### Removed
- none

[Unreleased]: https://github.com/kit-data-manager/repo-core/compare/v1.2.2...HEAD
[Unreleased]: https://github.com/kit-data-manager/repo-core/compare/v1.2.3...HEAD
[1.2.3]: https://github.com/kit-data-manager/repo-core/compare/v1.2.2...v1.2.3
[1.2.2]: https://github.com/kit-data-manager/repo-core/compare/v1.2.1...v1.2.2
[1.2.1]: https://github.com/kit-data-manager/repo-core/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/kit-data-manager/repo-core/compare/v1.1.2...v1.2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Karlsruhe Institute of Technology.
* Copyright 2024 Karlsruhe Institute of Technology.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,14 +63,6 @@ public class RelatedIdentifierSpecificationTest {
@Autowired
private IDataResourceDao dataResourceDao;

private DataResource hasMetadataResource1;
private DataResource hasMetadataResource2;
private DataResource hasMetadataResource3;
private DataResource isMetadataOfResource1;
private DataResource isMetadataOfResource2;
private DataResource isMetadataOfResource3;
private DataResource resourceWithNoType;

private static final String UNKNOWN_RELATED_RESOURCE = "something else";
private static final String RELATED_RESOURCE_1 = "documentLocation";
private static final String RELATED_RESOURCE_2 = "documentLocation_2";
Expand All @@ -84,20 +76,21 @@ public class RelatedIdentifierSpecificationTest {
public void setUp() throws JsonProcessingException {
dataResourceDao.deleteAll();

hasMetadataResource1 = createTestResource("hasMetadataResource1", RELATION_TYPE_1, RELATED_RESOURCE_1);
hasMetadataResource2 = createTestResource("hasMetadataResource2", RELATION_TYPE_1, RELATED_RESOURCE_2);
hasMetadataResource3 = createTestResource("hasMetadataResource3", RELATION_TYPE_1, RELATED_RESOURCE_3);
createTestResource("hasMetadataResource1", RELATION_TYPE_1, RELATED_RESOURCE_1);
createTestResource("hasMetadataResource2", RELATION_TYPE_1, RELATED_RESOURCE_2);
createTestResource("hasMetadataResource3", RELATION_TYPE_1, RELATED_RESOURCE_3);

isMetadataOfResource1 = createTestResource("isMetadataOfResource1", RELATION_TYPE_2, RELATED_RESOURCE_1);
isMetadataOfResource2 = createTestResource("isMetadataOfResource2", RELATION_TYPE_2, RELATED_RESOURCE_2);
isMetadataOfResource3 = createTestResource("isMetadataOfResource3", RELATION_TYPE_2, RELATED_RESOURCE_3);
createTestResource("isMetadataOfResource1", RELATION_TYPE_2, RELATED_RESOURCE_1);
createTestResource("isMetadataOfResource2", RELATION_TYPE_2, RELATED_RESOURCE_2);
createTestResource("isMetadataOfResource3", RELATION_TYPE_2, RELATED_RESOURCE_3);

resourceWithNoType = createTestResource("noTypeForResource", null, RELATED_RESOURCE_3);
createTestResource("noTypeForResource", null, RELATED_RESOURCE_3);
}

/**
* FIND TESTS*
*/
* Test specification for related identifier only.
* @throws Exception Any error.
*/
@Test
public void testGetDataResourcesByRelatedResourceAndValue() throws Exception {
testSingleValue(RELATED_RESOURCE_1, 2);
Expand All @@ -123,6 +116,10 @@ public void testGetDataResourcesByRelatedResourceAndValue() throws Exception {
Assert.assertEquals("Find all related to " + RELATED_RESOURCE_1 + " and " + RELATED_RESOURCE_2 + " and " + RELATED_RESOURCE_3, 7, findAll.size());
}

/**
* Test specification for no related identifier provided.
* @throws Exception Any error.
*/
@Test
public void testGetDataResourcesByRelatedResourceAndNoValue() throws Exception {
Specification<DataResource> toSpecification = RelatedIdentifierSpec.toSpecification(new String[0]);
Expand All @@ -134,6 +131,10 @@ public void testGetDataResourcesByRelatedResourceAndNoValue() throws Exception {
Assert.assertEquals("Find all related to (String[])null", 7, findAll.size());
}

/**
* Test specification for no relation type only.
* @throws Exception Any error.
*/
@Test
public void testGetDataResourcesByRelatedResourceAndRelatedType() throws Exception {
testForRelatedType(RELATION_TYPE_1, 3);
Expand All @@ -142,6 +143,10 @@ public void testGetDataResourcesByRelatedResourceAndRelatedType() throws Excepti
testForRelatedType(null, 7);
}

/**
* Test specification for relation type AND related identifier provided.
* @throws Exception Any error.
*/
@Test
public void testGetDataResourcesByRelatedResourceFilteredByValueAndType() throws Exception {
testForSingleValueAndType(RELATED_RESOURCE_1, RELATION_TYPE_1, 1);
Expand Down