66 lines
1.5 KiB
Plaintext
66 lines
1.5 KiB
Plaintext
@startuml domain-layer
|
|
skinparam classAttributeIconSize 0
|
|
skinparam nodesep 20
|
|
skinparam ranksep 30
|
|
skinparam defaultFontSize 9
|
|
skinparam wrapWidth 150
|
|
|
|
scale 2000 width
|
|
package "domain" #DDFFDD {
|
|
|
|
class Task <<Aggregate Root>> {
|
|
-id: TaskId
|
|
-name: TaskName
|
|
-description: Description
|
|
-scripts: Map<ScriptType, Script>
|
|
+create(): Task
|
|
+setScript(script)
|
|
+canVerify(): boolean
|
|
}
|
|
|
|
class TaskId <<VO>>
|
|
class TaskName <<VO>>
|
|
class Description <<VO>>
|
|
class Script <<VO>> {
|
|
+isExecutable(): boolean
|
|
}
|
|
enum ScriptType {
|
|
INITIALIZATION
|
|
VERIFICATION
|
|
DELETION
|
|
}
|
|
|
|
interface TaskRepository <<Port>> {
|
|
+findByContextId(uuid): Optional<Task>
|
|
+save(task): Task
|
|
}
|
|
|
|
interface ScriptExecutor <<Port>> {
|
|
+runVerificationScript(id, script): boolean
|
|
}
|
|
|
|
interface LMSGateway <<Port>> {
|
|
+exchangeForAccessToken(clientId): String
|
|
}
|
|
|
|
interface HistoryRepository <<Port>> {
|
|
+logAction(deployId, contextId, type, msg)
|
|
}
|
|
}
|
|
|
|
Task *-- TaskId
|
|
Task *-- TaskName
|
|
Task *-- Description
|
|
Task *-- Script
|
|
Script -- ScriptType
|
|
|
|
TaskRepository ..> Task
|
|
|
|
Task <.down... "TaskServiceImpl\n(application)" : uses
|
|
TaskRepository <|.down.... "TaskRepositoryAdapter\n(infrastructure)" : implements
|
|
ScriptExecutor <|.down.... "BashScriptAdapter\n(infrastructure)" : implements
|
|
LMSGateway <|.down.... "LMSRestAdapter\n(infrastructure)" : implements
|
|
HistoryRepository <|.down.... "HistoryJpaAdapter\n(infrastructure)" : implements
|
|
|
|
@enduml
|