-
Notifications
You must be signed in to change notification settings - Fork 520
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 #252 from laney0808/dg-addvisit
Dg addvisit
- Loading branch information
Showing
8 changed files
with
253 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":ImmuniMateParser" as ImmuniMateParser LOGIC_COLOR | ||
participant ":AddVisitCommandParser" as AddVisitCommandParser LOGIC_COLOR | ||
participant "c:AddVisitCommand" as AddVisitCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant "m:Model" as Model MODEL_COLOR | ||
participant "v:Visit" as Visit MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("addvisit ...") | ||
activate LogicManager | ||
LogicManager -> ImmuniMateParser : parseCommand("addvisit ...") | ||
activate ImmuniMateParser | ||
|
||
create AddVisitCommandParser | ||
ImmuniMateParser -> AddVisitCommandParser | ||
activate AddVisitCommandParser | ||
AddVisitCommandParser --> ImmuniMateParser | ||
deactivate AddVisitCommandParser | ||
ImmuniMateParser -> AddVisitCommandParser : parse("...") | ||
activate AddVisitCommandParser | ||
|
||
create Visit | ||
AddVisitCommandParser -> Visit | ||
activate Visit | ||
Visit --> AddVisitCommandParser | ||
deactivate Visit | ||
|
||
create AddVisitCommand | ||
AddVisitCommandParser -> AddVisitCommand | ||
activate AddVisitCommand | ||
AddVisitCommand --> AddVisitCommandParser | ||
deactivate AddVisitCommand | ||
|
||
AddVisitCommandParser --> ImmuniMateParser : c | ||
deactivate AddVisitCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
AddVisitCommandParser -[hidden]-> ImmuniMateParser | ||
destroy AddVisitCommandParser | ||
ImmuniMateParser --> LogicManager : c | ||
deactivate ImmuniMateParser | ||
|
||
LogicManager -> AddVisitCommand : execute() | ||
activate AddVisitCommand | ||
AddVisitCommand -> Visit : getNric() | ||
activate Visit | ||
Visit --> AddVisitCommand : nric | ||
deactivate Visit | ||
AddVisitCommand -> Model : hasPerson(...) | ||
activate Model | ||
Model --> AddVisitCommand : false | ||
deactivate Model | ||
AddVisitCommand -> Model : hasVisit(...) | ||
activate Model | ||
Model --> AddVisitCommand : false | ||
deactivate Model | ||
AddVisitCommand -> Model : addVisit(v) | ||
activate Model | ||
Model --> AddVisitCommand : add visit in the model | ||
deactivate Model | ||
|
||
create CommandResult | ||
AddVisitCommand -> CommandResult | ||
activate CommandResult | ||
CommandResult --> AddVisitCommand | ||
deactivate | ||
AddVisitCommand --> LogicManager : r | ||
deactivate AddVisitCommand | ||
|
||
[<--LogicManager : r | ||
deactivate LogicManager | ||
@enduml |
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,119 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
box Logic LOGIC_COLOR_T1 | ||
participant "l:Logic" as Logic LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as ModelManager MODEL_COLOR | ||
participant ":ImmuniMate" as ImmuniMate MODEL_COLOR | ||
participant ":UniqueVisitList" as UniqueVisitList MODEL_COLOR | ||
participant "internalList: ObservableList<Visit>" as internalList MODEL_COLOR | ||
participant "p:Person" as p MODEL_COLOR | ||
participant "v:Visit" as Visit MODEL_COLOR | ||
end box | ||
|
||
[-> Logic : execute() | ||
activate Logic | ||
|
||
create p | ||
Logic -> p | ||
activate p | ||
p --> Logic | ||
deactivate p | ||
|
||
create Visit | ||
Logic -> Visit | ||
activate Visit | ||
Visit --> Logic | ||
deactivate Visit | ||
|
||
Logic -> ModelManager : hasPerson(p) | ||
activate ModelManager | ||
|
||
ModelManager -> ImmuniMate: hasPerson(p) | ||
activate ImmuniMate | ||
|
||
ImmuniMate -> UniqueVisitList : contains(p) | ||
activate UniqueVisitList | ||
|
||
UniqueVisitList -> internalList : stream().anyMatch(p::isSamePerson) | ||
activate internalList | ||
|
||
internalList -> p : isSamePerson() | ||
activate p | ||
|
||
p --> internalList | ||
deactivate p | ||
|
||
internalList --> UniqueVisitList | ||
deactivate internalList | ||
|
||
UniqueVisitList --> ImmuniMate | ||
deactivate UniqueVisitList | ||
|
||
ImmuniMate --> ModelManager | ||
deactivate ImmuniMate | ||
|
||
ModelManager --> Logic | ||
deactivate ModelManager | ||
|
||
Logic -> ModelManager : hasVisit(v) | ||
activate ModelManager | ||
|
||
ModelManager -> ImmuniMate: hasVisit(v) | ||
activate ImmuniMate | ||
|
||
ImmuniMate -> UniqueVisitList : contains(v) | ||
activate UniqueVisitList | ||
|
||
UniqueVisitList -> internalList : stream().anyMatch(v::isSameVisit) | ||
activate internalList | ||
|
||
internalList -> Visit : isSameVisit() | ||
activate Visit | ||
|
||
Visit --> internalList | ||
deactivate Visit | ||
|
||
internalList --> UniqueVisitList | ||
deactivate internalList | ||
|
||
UniqueVisitList --> ImmuniMate | ||
deactivate UniqueVisitList | ||
|
||
ImmuniMate --> ModelManager | ||
deactivate ImmuniMate | ||
|
||
ModelManager --> Logic | ||
deactivate ModelManager | ||
|
||
Logic -> ModelManager : addVisit(v) | ||
activate ModelManager | ||
|
||
ModelManager -> ImmuniMate: addVisit(v) | ||
activate ImmuniMate | ||
|
||
ImmuniMate -> UniqueVisitList : add(v) | ||
activate UniqueVisitList | ||
|
||
UniqueVisitList -> internalList : add(v) | ||
activate internalList | ||
|
||
internalList --> UniqueVisitList | ||
deactivate internalList | ||
|
||
UniqueVisitList --> ImmuniMate | ||
deactivate UniqueVisitList | ||
|
||
ImmuniMate --> ModelManager | ||
deactivate ImmuniMate | ||
|
||
ModelManager --> Logic | ||
deactivate ModelManager | ||
|
||
[<--Logic | ||
deactivate Logic | ||
|
||
@enduml |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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