Skip to content

Commit

Permalink
Fix format issues, add implementation of find and cluster commands
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-setyawan committed Apr 15, 2024
1 parent 5624ef3 commit 2e06125
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 87 deletions.
142 changes: 98 additions & 44 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/diagrams/ArchitectureSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Participant ":Storage" as storage STORAGE_COLOR
user -[USER_COLOR]> ui : "delete S1234567X"
activate ui UI_COLOR

ui -[UI_COLOR]> logic : execute("delete X1234567X")
ui -[UI_COLOR]> logic : execute("delete S1234567X")
activate logic LOGIC_COLOR

logic -[LOGIC_COLOR]> model : deletePerson(p)
Expand Down
48 changes: 15 additions & 33 deletions docs/diagrams/DeleteInfoModelDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ participant ":ImmuniMate" as ImmuniMate MODEL_COLOR
participant ":UniquePersonList" as UniquePersonList MODEL_COLOR
participant "internalList: ObservableList<Person>" as internalList MODEL_COLOR
participant "p1:Person" as p1 MODEL_COLOR
participant "p1:Person" as p MODEL_COLOR
end box

[-> CreateCommand : execute()
activate CreateCommand

CreateCommand -> ModelManager : getFilteredPersonsList()
activate ModelManager

ModelManager --> CreateCommand : persons
deactivate ModelManager

CreateCommand -> ModelManager : hasPerson(...)
activate ModelManager

Expand All @@ -32,49 +37,26 @@ activate internalList
internalList -> p1 : isSamePerson(p1)
activate p1

p1 --> internalList
p1 --> internalList : true
deactivate p1

internalList --> UniquePersonList
internalList --> UniquePersonList : true
deactivate internalList

UniquePersonList --> ImmuniMate
UniquePersonList --> ImmuniMate : true
deactivate UniquePersonList

ImmuniMate --> ModelManager
ImmuniMate --> ModelManager : true
deactivate ImmuniMate

ModelManager --> CreateCommand
ModelManager --> CreateCommand : true
deactivate ModelManager

CreateCommand -> ModelManager : setEmail(...)
activate ModelManager

ModelManager -> ImmuniMate: getPerson(...)
activate ImmuniMate

ImmuniMate -> UniquePersonList : get(...)
activate UniquePersonList

UniquePersonList -> internalList : get(...)
activate internalList

internalList --> UniquePersonList : p
deactivate internalList

UniquePersonList --> ImmuniMate : p
deactivate UniquePersonList

ImmuniMate -> p : setEmail(null)
activate p
p --> ImmuniMate : set email to null
deactivate p

ImmuniMate --> ModelManager
deactivate ImmuniMate
CreateCommand -> p1 : setEmail(null)
activate p1

ModelManager --> CreateCommand
deactivate ModelManager
p1 --> CreateCommand
deactivate p1

[<--CreateCommand
deactivate CreateCommand
Expand Down
9 changes: 8 additions & 1 deletion docs/diagrams/DeleteInfoSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ deactivate ImmuniMateParser
LogicManager -> DeleteInfoCommand : execute(m)
activate DeleteInfoCommand

DeleteInfoCommand -> Model : getFilteredPersonsList()
activate Model

Model --> DeleteInfoCommand : persons
deactivate Model

DeleteInfoCommand -> Model : hasPerson(...)
activate Model
Model --> DeleteInfoCommand : false

Model --> DeleteInfoCommand : true
deactivate Model

DeleteInfoCommand -> Model : setEmail(...)
Expand Down
7 changes: 3 additions & 4 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR

Package Model as ModelPackage <<Rectangle>>{
Class "<<interface>>\nReadOnlyAddressBook" as ReadOnlyAddressBook
Class "<<interface>>\nReadOnlyImmuniMate" as ReadOnlyImmuniMate
Class "<<interface>>\nReadOnlyUserPrefs" as ReadOnlyUserPrefs
Class "<<interface>>\nModel" as Model
Class ImmuniMate
Class ModelManager
Class UserPrefs

Class UniquePersonList
Class Person
Class Address
Expand All @@ -37,11 +36,11 @@ Class I #FFFFFF
Class HiddenOutside #FFFFFF
HiddenOutside ..> Model

ImmuniMate .up.|> ReadOnlyAddressBook
ImmuniMate .up.|> ReadOnlyImmuniMate

ModelManager .up.|> Model
Model .right.> ReadOnlyUserPrefs
Model .left.> ReadOnlyAddressBook
Model .left.> ReadOnlyImmuniMate
ModelManager -left-> "1" ImmuniMate
ModelManager -right-> "1" UserPrefs
UserPrefs .up.|> ReadOnlyUserPrefs
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/ParserClasses.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class XYZCommand

package "Parser classes"{
Class "<<interface>>\nParser" as Parser
Class AddressBookParser
Class ImmuniMateParser
Class XYZCommandParser
Class CliSyntax
Class ParserUtil
Expand All @@ -19,12 +19,12 @@ Class Prefix
}

Class HiddenOutside #FFFFFF
HiddenOutside ..> AddressBookParser
HiddenOutside ..> ImmuniMateParser

AddressBookParser .down.> XYZCommandParser: <<create>>
ImmuniMateParser .down.> XYZCommandParser: <<create>>

XYZCommandParser ..> XYZCommand : <<create>>
AddressBookParser ..> Command : <<use>>
ImmuniMateParser ..> Command : <<use>>
XYZCommandParser .up.|> Parser
XYZCommandParser ..> ArgumentMultimap
XYZCommandParser ..> ArgumentTokenizer
Expand Down
Binary file modified docs/images/ArchitectureSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ModelClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ParserClasses.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2e06125

Please sign in to comment.