-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prior notification card in prior notification list
- Loading branch information
1 parent
96e1f2e
commit f2f4e2b
Showing
55 changed files
with
1,861 additions
and
363 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...ain/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/logbook/ConsolidatedLogbookMessage.kt
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,18 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.entities.logbook | ||
|
||
import fr.gouv.cnsp.monitorfish.domain.entities.logbook.messages.LogbookMessageValue | ||
import fr.gouv.cnsp.monitorfish.domain.exceptions.EntityConversionException | ||
|
||
class ConsolidatedLogbookMessage<T : LogbookMessageValue>( | ||
val reportId: String, | ||
/** Logbook report DAT operation, or last COR one if any, consolidated with RET & DEL information if any. */ | ||
val logbookMessage: LogbookMessage, | ||
private val clazz: Class<T>, | ||
) { | ||
val typedMessage: T | ||
get() = if (clazz.isInstance(logbookMessage.message)) { | ||
clazz.cast(logbookMessage.message) | ||
} else { | ||
throw EntityConversionException("Logbook message is not of type $clazz (reportId: $reportId).") | ||
} | ||
} |
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
8 changes: 5 additions & 3 deletions
8
...n/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/prior_notification/PriorNotification.kt
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
4 changes: 4 additions & 0 deletions
4
...in/kotlin/fr/gouv/cnsp/monitorfish/domain/exceptions/LogbookReportNotEnrichedException.kt
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,4 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.exceptions | ||
|
||
/** Thrown when a logbook report is not enriched. */ | ||
class LogbookReportNotEnrichedException(message: String) : RuntimeException(message) |
4 changes: 4 additions & 0 deletions
4
backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/exceptions/WrongTypeException.kt
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,4 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.exceptions | ||
|
||
/** Thrown when a database row data is not of the expected category or type. */ | ||
class WrongTypeException(message: String) : RuntimeException(message) |
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.