-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from DiSSCo/feature/add-rollback
Add rollback functionality and remove duplication
- Loading branch information
Showing
22 changed files
with
948 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/eu/dissco/core/digitalspecimenprocessor/domain/HandleAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,36 @@ | ||
package eu.dissco.core.digitalspecimenprocessor.domain; | ||
|
||
import java.util.Arrays; | ||
import java.util.Objects; | ||
|
||
public record HandleAttribute(int index, String type, byte[] data) { | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
HandleAttribute that = (HandleAttribute) o; | ||
return index == that.index && Objects.equals(type, that.type) | ||
&& Arrays.equals(data, that.data); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = Objects.hash(index, type); | ||
result = 31 * result + Arrays.hashCode(data); | ||
return result; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "HandleAttribute{" + | ||
"index=" + index + | ||
", type='" + type + '\'' + | ||
", data=" + Arrays.toString(data) + | ||
'}'; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ain/java/eu/dissco/core/digitalspecimenprocessor/domain/UpdatedDigitalSpecimenRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package eu.dissco.core.digitalspecimenprocessor.domain; | ||
|
||
import java.util.List; | ||
|
||
public record UpdatedDigitalSpecimenRecord(DigitalSpecimenRecord digitalSpecimenRecord, | ||
List<String> enrichment, | ||
DigitalSpecimenRecord currentDigitalSpecimen) { | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...main/java/eu/dissco/core/digitalspecimenprocessor/domain/UpdatedDigitalSpecimenTuple.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package eu.dissco.core.digitalspecimenprocessor.domain; | ||
|
||
public record UpdatedDigitalSpecimenTuple(DigitalSpecimenRecord currentSpecimen, | ||
DigitalSpecimen digitalSpecimen) { | ||
DigitalSpecimenEvent digitalSpecimenEvent) { | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
...n/java/eu/dissco/core/digitalspecimenprocessor/exception/DisscoJsonBMappingException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package eu.dissco.core.digitalspecimenprocessor.exception; | ||
|
||
import org.springframework.dao.DataAccessException; | ||
|
||
public class DisscoJsonBMappingException extends DataAccessException { | ||
|
||
public DisscoJsonBMappingException(String msg, Throwable cause) { | ||
super(msg, cause); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...ain/java/eu/dissco/core/digitalspecimenprocessor/exception/DisscoRepositoryException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package eu.dissco.core.digitalspecimenprocessor.exception; | ||
|
||
public class DisscoRepositoryException extends Exception{ | ||
|
||
public DisscoRepositoryException(String message) { | ||
super(message); | ||
} | ||
|
||
public DisscoRepositoryException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.