Skip to content

Commit

Permalink
Merge pull request #159 from AY2324S2-CS2103T-W12-3/update-dg-assets
Browse files Browse the repository at this point in the history
Update DG for v1.4 release
  • Loading branch information
aureliony committed Apr 15, 2024
2 parents 9239205 + ee9e9a8 commit f4307db
Show file tree
Hide file tree
Showing 22 changed files with 565 additions and 295 deletions.
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

# Configuration guide

Certain properties of the application can be controlled (e.g user preferences file location, logging level) through the configuration file (default: `config.json`).
Certain properties of the application can be controlled (e.g. user preferences file location, logging level) through the configuration file (default: `config.json`).
345 changes: 200 additions & 145 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions docs/_markbind/layouts/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
* [Introduction]({{ baseUrl }}/UserGuide.html#introduction)
* [Quick Start]({{ baseUrl }}/UserGuide.html#quick-start)
* [Features]({{ baseUrl }}/UserGuide.html#features)
* [FAQ]({{ baseUrl }}/UserGuide.html#faq)
* [Command Summary]({{ baseUrl }}/UserGuide.html#faq)
* [FAQ]({{ baseUrl }}/UserGuide.html#frequently-asked-questions)
* [Command Summary]({{ baseUrl }}/UserGuide.html#command-summary)
* [Glossary]({{ baseUrl }}/UserGuide.html#glossary)
* [Developer Guide]({{ baseUrl }}/DeveloperGuide.html) :expanded:
* [Acknowledgements]({{ baseUrl }}/DeveloperGuide.html#acknowledgements)
* [Setting Up]({{ baseUrl }}/DeveloperGuide.html#setting-up-getting-started)
* [Design]({{ baseUrl }}/DeveloperGuide.html#design)
* [Implementation]({{ baseUrl }}/DeveloperGuide.html#implementation)
Expand Down
62 changes: 62 additions & 0 deletions docs/diagrams/AddSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain
skinparam SequenceReferenceBackgroundColor white

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant "command:AddCommand" as AddCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "person:Person" as Person MODEL_COLOR
participant "assets:Assets" as Assets MODEL_COLOR
participant "model:Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("add ... A\\pen")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("add ... A\\pen")
activate AddressBookParser

' Abstracted factory method call
AddressBookParser -> AddressBookParser : createCommandUsingFactory("add ... A\\pen")
note right : createCommandUsingFactory() is the same \n fictitious command as explained in Logic
activate AddressBookParser


create AddCommand
AddressBookParser -> AddCommand
activate AddCommand

ref over AddCommand, Person, Assets: create person with assets

AddCommand --> AddressBookParser : command
deactivate AddCommand

AddressBookParser --> AddressBookParser : command
deactivate AddressBookParser

AddressBookParser --> LogicManager : command
deactivate AddressBookParser

LogicManager -> AddCommand : execute(model)
activate AddCommand

AddCommand -> Model : addPerson(person)
activate Model

Model --> AddCommand
deactivate Model

AddCommand --> LogicManager : result
deactivate AddCommand

AddCommand -[hidden]-> LogicManager
destroy AddCommand

[<--LogicManager : result
deactivate LogicManager
@enduml
4 changes: 2 additions & 2 deletions docs/diagrams/ArchitectureDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Class "<$documents>" as File UI_COLOR_T1


UI -[#green]> Logic
UI -right[#green]-> Model
UI -[#green]> Model
Logic -[#blue]-> Storage
Logic -down[#blue]-> Model
Main -[#grey]-> UI
Main -[#grey]-> Logic
Main .[#grey].> Logic
Main -[#grey]-> Storage
Main -up[#grey]-> Model
Main -down[hidden]-> Commons
Expand Down
34 changes: 9 additions & 25 deletions docs/diagrams/AssetClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,26 @@ skinparam classAttributeIconSize 0

show members

package model {

package asset {

package Model {
class Asset {
-assetSerial: String
==
-assetName: String
--
+{static} of(String): Asset
}

}

package person {

class Person {
-assets: Assets
==
}

package Fields {
hide empty attributes
hide empty methods
class Person

class Assets {
-assets: Set<Asset>
==
--
+{static} of(String[]): Assets
+{static} edit(Asset, Asset): Assets
}

}

}

}

Assets "1..*" *-left- "*" Asset : > contain
Assets "1" -down-> "*" Asset

Person o-right- Assets : > has
Person -right->"1" Assets

@enduml
15 changes: 9 additions & 6 deletions docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ skinparam arrowThickness 1.1
skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR

AddressBook *-right-> "1" UniquePersonList
AddressBook *-right-> "1" UniqueTagList
UniqueTagList -[hidden]down- UniquePersonList
UniqueTagList -[hidden]down- UniquePersonList
AddressBook *-right-> "1" UniquePersonList : ""
AddressBook -right-> "~*" UniquePersonList : ""
AddressBook -right-> "~*" UniquePersonList : ""
AddressBook *-down-> "1" UniqueTagList
AddressBook *-down-> "1" UniqueAssetList

UniqueTagList -right-> "*" Tag
UniquePersonList -right-> Person
UniqueTagList -down-> "*" Tag
UniqueAssetList -down-> "*" Asset
UniquePersonList -down-> Person

Person -up-> "*" Tag
Person -up-> "*" Asset

Person *--> Name
Person *--> Phone
Expand Down
51 changes: 51 additions & 0 deletions docs/diagrams/CommandFactorySequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant "<<class>>\nCommandType" as CommandTypeClass LOGIC_COLOR
participant "type:CommandType" as CommandType LOGIC_COLOR
participant "<<class>>\nDeleteCommand" as DeleteCommandClass LOGIC_COLOR
participant "command:DeleteCommand" as DeleteCommand LOGIC_COLOR
end box

[-> AddressBookParser : parseCommand("delete 1")
activate AddressBookParser

AddressBookParser -> CommandTypeClass : valueOf("DELETE")
activate CommandTypeClass

create CommandType
CommandTypeClass -> CommandType
activate CommandType

CommandType -> CommandTypeClass : type
deactivate CommandType

CommandTypeClass -> AddressBookParser : type
deactivate CommandTypeClass

AddressBookParser -> CommandType : createCommand(" 1")
activate CommandType

CommandType -> DeleteCommandClass : of(" 1")
activate DeleteCommandClass

create DeleteCommand
DeleteCommandClass -> DeleteCommand
activate DeleteCommand

DeleteCommand --> DeleteCommandClass : command
deactivate DeleteCommand

DeleteCommandClass --> CommandType : command
deactivate DeleteCommandClass

CommandType --> AddressBookParser : command
deactivate CommandType

[<-- AddressBookParser : command
deactivate AddressBookParser

@enduml
22 changes: 22 additions & 0 deletions docs/diagrams/CommandHistoryAddSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":CommandHistory" as CommandHistory LOGIC_COLOR
end box

-> LogicManager : execute(commandText)
activate LogicManager

LogicManager -> CommandHistory : add(commandText)
activate CommandHistory

CommandHistory --> LogicManager
deactivate CommandHistory

<-- LogicManager : commandResult
deactivate LogicManager

@enduml
41 changes: 41 additions & 0 deletions docs/diagrams/CommandHistoryUpSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box UI UI_COLOR_T1
participant ":CommandBox" as CommandBox UI_COLOR
participant ":RecordedCommandExecutor" as RecordedCommandExecutor UI_COLOR
end box

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":CommandHistory" as CommandHistory LOGIC_COLOR
end box

-> CommandBox : handleKeyPressed(event)
activate CommandBox

CommandBox -> RecordedCommandExecutor : getPreviousCommandText()
activate RecordedCommandExecutor

RecordedCommandExecutor -> LogicManager : getPreviousCommandText()
activate LogicManager

LogicManager -> CommandHistory : getPrevious()
activate CommandHistory

CommandHistory --> LogicManager : commandText
deactivate CommandHistory

LogicManager --> RecordedCommandExecutor : commandText
deactivate LogicManager

RecordedCommandExecutor --> CommandBox : commandText
deactivate RecordedCommandExecutor

CommandBox -> CommandBox : setText(commandText)
note right : CommandBox#setText() is a\nfictitious command to improve brevity
<-- CommandBox
deactivate CommandBox

@enduml
26 changes: 14 additions & 12 deletions docs/diagrams/DeleteSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ skinparam ArrowFontStyle plain
box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant "<<class>>\nDeleteCommand" as DeleteCommandClass LOGIC_COLOR
participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR
participant "command:DeleteCommand" as DeleteCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
participant "model:Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("delete 1")
Expand All @@ -21,23 +20,23 @@ activate AddressBookParser

' Abstracted factory method call
AddressBookParser -> AddressBookParser : createCommandUsingFactory("delete 1")
activate AddressBookParser #FFBBBB
note right: createCommandUsingFactory() is a simplified representation of the command creation process.
note right: createCommandUsingFactory() is a fictitious command \n representing the command creation process for brevity
activate AddressBookParser

create DeleteCommand
AddressBookParser -> DeleteCommand : new("1")
AddressBookParser -> DeleteCommand
activate DeleteCommand

DeleteCommand --> AddressBookParser
DeleteCommand --> AddressBookParser : command
deactivate DeleteCommand

AddressBookParser --> AddressBookParser
deactivate AddressBookParser #FFBBBB
AddressBookParser --> AddressBookParser : command
deactivate AddressBookParser

AddressBookParser --> LogicManager : d
AddressBookParser --> LogicManager : command
deactivate AddressBookParser

LogicManager -> DeleteCommand : execute(m)
LogicManager -> DeleteCommand : execute(model)
activate DeleteCommand

DeleteCommand -> Model : deletePerson(1)
Expand All @@ -49,6 +48,9 @@ deactivate Model
DeleteCommand --> LogicManager : result
deactivate DeleteCommand

[<--LogicManager
DeleteCommand -[hidden]-> LogicManager
destroy DeleteCommand

[<--LogicManager : result
deactivate LogicManager
@enduml
Loading

0 comments on commit f4307db

Please sign in to comment.