-
Notifications
You must be signed in to change notification settings - Fork 580
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 #86 from Blizzeracz/update/DG-AddAnimalCommand
AddAnimalCommand implementation added to DG
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 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,70 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":AnimalLogicManager" as AnimalLogicManager LOGIC_COLOR | ||
participant ":AnimalCatalogParser" as AnimalCatalogParser LOGIC_COLOR | ||
participant ":AddAnimalCommandParser" as AddAnimalCommandParser LOGIC_COLOR | ||
participant ":AddAnimalCommand" as AddAnimalCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box AnimalModel MODEL_COLOR_T1 | ||
participant ":AnimalModel" as AnimalModel MODEL_COLOR | ||
end box | ||
|
||
[-> AnimalLogicManager : execute("add /n ...") | ||
activate AnimalLogicManager | ||
|
||
AnimalLogicManager -> AnimalCatalogParser : parseCommand("add /n ...")") | ||
activate AnimalCatalogParser | ||
|
||
create AddAnimalCommandParser | ||
AnimalCatalogParser -> AddAnimalCommandParser | ||
activate AddAnimalCommandParser | ||
|
||
AddAnimalCommandParser --> AnimalCatalogParser | ||
deactivate AddAnimalCommandParser | ||
|
||
AnimalCatalogParser -> AddAnimalCommandParser : parse("/n ...")") | ||
activate AddAnimalCommandParser | ||
|
||
create AddAnimalCommand | ||
AddAnimalCommandParser -> AddAnimalCommand | ||
activate AddAnimalCommand | ||
|
||
AddAnimalCommand --> AddAnimalCommandParser : animal | ||
deactivate AddAnimalCommand | ||
|
||
AddAnimalCommandParser --> AnimalCatalogParser : animal | ||
deactivate AddAnimalCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
AddAnimalCommandParser -[hidden]-> AnimalCatalogParser | ||
destroy AddAnimalCommandParser | ||
|
||
AnimalCatalogParser --> AnimalLogicManager : animal | ||
deactivate AnimalCatalogParser | ||
|
||
AnimalLogicManager -> AddAnimalCommand : execute(model) | ||
activate AddAnimalCommand | ||
|
||
AddAnimalCommand -> AnimalModel : addAnimal(animal) | ||
activate AnimalModel | ||
|
||
AnimalModel --> AddAnimalCommand | ||
deactivate AnimalModel | ||
|
||
create CommandResult | ||
AddAnimalCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> AddAnimalCommand | ||
deactivate CommandResult | ||
|
||
AddAnimalCommand --> AnimalLogicManager : result | ||
deactivate AddAnimalCommand | ||
|
||
[<--AnimalLogicManager | ||
deactivate AnimalLogicManager | ||
@enduml |