Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uni cash 1.4/finalize developer guide #13

Merged
merged 35 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e405ae7
Update DG
sp4ce-cowboy Nov 12, 2023
e1ad15c
Add documentation for UserInputBuilder
sp4ce-cowboy Nov 13, 2023
e0963c3
Fix style in DG
sp4ce-cowboy Nov 13, 2023
fc6c0a2
Add UI Information to DG
sp4ce-cowboy Nov 13, 2023
a8ac82d
Merge branch 'master' into UniCash-1.4/finalizeDeveloperGuide
sp4ce-cowboy Nov 13, 2023
6eadcc6
Add Use cases
sp4ce-cowboy Nov 13, 2023
295dd40
Add Clear Transaction Diagrams
sp4ce-cowboy Nov 13, 2023
5008e7b
Update Delete Command details and add Get and Clear
sp4ce-cowboy Nov 13, 2023
9fbf326
Add Reset UniCash diagrams
sp4ce-cowboy Nov 13, 2023
47b60cf
Remove overlooked paragraph in UG
sp4ce-cowboy Nov 13, 2023
2737275
Add disclaimer about budgets
sp4ce-cowboy Nov 13, 2023
c1eb5f9
Add details and diagrams for Find Command
sp4ce-cowboy Nov 13, 2023
8a86b18
Moved UI Layout below UI Component
sp4ce-cowboy Nov 13, 2023
425d3ae
Merge branch 'master' into UniCash-1.4/finalizeDeveloperGuide
sp4ce-cowboy Nov 13, 2023
b65e505
Update DG with FindTransaction predicate code
sp4ce-cowboy Nov 13, 2023
df9161c
Update DG with stylesheet stuff
sp4ce-cowboy Nov 13, 2023
77ec918
Removed UI Efforts section
sp4ce-cowboy Nov 13, 2023
15088c2
Fix style
sp4ce-cowboy Nov 13, 2023
f4063c2
Fix Style
sp4ce-cowboy Nov 13, 2023
0b0d610
Fix style
sp4ce-cowboy Nov 13, 2023
a41bc8c
Fix style
sp4ce-cowboy Nov 13, 2023
4abf19d
Fix style
sp4ce-cowboy Nov 13, 2023
8bbb2e0
Fix Find Transaction diagrams and style
sp4ce-cowboy Nov 13, 2023
afa09c7
Update all uses cases with correct format
sp4ce-cowboy Nov 13, 2023
128ada3
Fix DG comments
sp4ce-cowboy Nov 13, 2023
6c36b80
Update PPP
sp4ce-cowboy Nov 13, 2023
9b8eb13
Update PPP
sp4ce-cowboy Nov 13, 2023
e7fc539
Update PPP
sp4ce-cowboy Nov 13, 2023
7759509
Fix style
sp4ce-cowboy Nov 13, 2023
a07d7dc
Update PPP
sp4ce-cowboy Nov 13, 2023
e2e360e
Update PPP
sp4ce-cowboy Nov 13, 2023
9a2c085
Update UI image
sp4ce-cowboy Nov 13, 2023
e140fa1
Update DG
sp4ce-cowboy Nov 13, 2023
53bd429
Update DG to fix typo
sp4ce-cowboy Nov 13, 2023
8d54f11
Merge branch 'master' into UniCash-1.4/finalizeDeveloperGuide
sp4ce-cowboy Nov 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
695 changes: 567 additions & 128 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,8 @@ of the transaction to be retrieved, as shown in the currently displayed `Transac
<div class="callout callout-info" markdown="span" style="margin-bottom: 20px;">
There are some important `INDEX` constraints for which you can refer to the
[command breakdown's Argument Types section](#argument-types). You can also refer to the
[UI Layout's Transaction Card section](#transaction-card) to learn about the transaction index values that
can change based on the current `Transactions List` configuration.
[UI Layout's Transaction Card section](DeveloperGuide.md#transaction-card) in the Developer Guide
to learn about the transaction index values that can change based on the current `Transactions List` configuration.
</div>

##### Successful Execution
Expand Down Expand Up @@ -1542,12 +1542,6 @@ It also cannot be followed with any arguments, options, or non-whitespace text.
</div>


<div class="callout callout-important" markdown="span" style="margin-bottom: 20px;">
This command is subject to the filter applied by `find` or `get_total_expenditure`
commands, which you can read about under the `find` command section [here](#find-transaction)
or under the `get_total_expenditure` command section [here](#get-total-expenditure).
</div>

<div class="callout callout-important" markdown="span" style="margin-bottom: 20px;">
While this command will restore the default UniCa$h transactions, the current `Transactions List`
configuration is still subject to any filters applied by `find` or `get_total_expenditure`,
Expand Down
9 changes: 8 additions & 1 deletion docs/diagrams/unicash/ClearTransactionsActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ start

: User enters clear_transactions command;

: All transactions have been cleared;
if () then ([command followed with trailing characters])
:Parse exception thrown;
stop

else ([else])
:All transactions cleared successfully;

endif

stop

Expand Down
34 changes: 29 additions & 5 deletions docs/diagrams/unicash/ClearTransactionsSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":ClearTransactionsCommand" as ClearTransactionsCommand LOGIC_COLOR
participant ":UniCashParser" as UniCashParser LOGIC_COLOR
participant ":ClearTransactionsCommandParser" as ClearTransactionsCommandParser LOGIC_COLOR
participant "d:ClearTransactionsCommand" as ClearTransactionsCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

Expand All @@ -15,14 +17,36 @@ end box
[-> LogicManager : execute("clear_transactions")
activate LogicManager

LogicManager -> UniCashParser : parseCommand("clear_transactions")
activate UniCashParser

create ClearTransactionsCommandParser
UniCashParser -> ClearTransactionsCommandParser
activate ClearTransactionsCommandParser

ClearTransactionsCommandParser --> UniCashParser
deactivate ClearTransactionsCommandParser

UniCashParser -> ClearTransactionsCommandParser : parse("")
activate ClearTransactionsCommandParser

create ClearTransactionsCommand
LogicManager -> ClearTransactionsCommand
ClearTransactionsCommandParser -> ClearTransactionsCommand
activate ClearTransactionsCommand

ClearTransactionsCommand --> LogicManager
ClearTransactionsCommand --> ClearTransactionsCommandParser :
deactivate ClearTransactionsCommand

LogicManager -> ClearTransactionsCommand : execute()
ClearTransactionsCommandParser --> UniCashParser :
deactivate ClearTransactionsCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
ClearTransactionsCommandParser -[hidden]-> UniCashParser
destroy ClearTransactionsCommandParser

UniCashParser --> LogicManager :
deactivate UniCashParser

LogicManager -> ClearTransactionsCommand : execute(model)
activate ClearTransactionsCommand

ClearTransactionsCommand -> Model : setUniCash(new UniCash())
Expand All @@ -38,7 +62,7 @@ activate CommandResult
CommandResult --> ClearTransactionsCommand
deactivate CommandResult

ClearTransactionsCommand --> LogicManager
ClearTransactionsCommand --> LogicManager : command result
deactivate ClearTransactionsCommand

[<--LogicManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ start
if () then ([else])
:Parse exception thrown;
stop
else ([Input is a valid number])
else ([command argument is a valid number])
:Transaction successfully deleted ;
endif

Expand Down
4 changes: 2 additions & 2 deletions docs/diagrams/unicash/DeleteTransactionSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ destroy DeleteTransactionCommandParser
UniCashParser --> LogicManager : d
deactivate UniCashParser

LogicManager -> DeleteTransactionCommand : execute()
LogicManager -> DeleteTransactionCommand : execute(model)
activate DeleteTransactionCommand

DeleteTransactionCommand -> Model : deleteTransaction (1)
DeleteTransactionCommand -> Model : deleteTransaction(transactionToDelete)
activate Model

Model --> DeleteTransactionCommand
Expand Down
47 changes: 47 additions & 0 deletions docs/diagrams/unicash/FindTransactionsActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@startuml
!pragma useVerticalIf on
skin rose
skinparam ActivityFontSize 15
skinparam ArrowFontSize 12
start

: User enters find command;

if () then (

[command not followed by any parameters])
:Error: Invalid command format;
stop


elseif () then (



[command followed by multiple
instances of the same parameter])

:Error: Multiple values specified for single-valued field ;
stop

elseif () then (


[command followed by
invalid parameters])

:Error: Invalid command format;
stop


else (

[else]
)
:Transaction retrieved successfully;

endif

stop

@enduml
73 changes: 73 additions & 0 deletions docs/diagrams/unicash/FindTransactionsSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

@startuml
!include ../style.puml

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":UniCashParser" as UniCashParser LOGIC_COLOR
participant ":FindCommandParser" as FindCommandParser LOGIC_COLOR
participant "command:FindCommand" as FindCommand LOGIC_COLOR
participant "commandResult:CommandResult" as CommandResult LOGIC_COLOR

end box

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

[-> LogicManager : execute("find c/food")
activate LogicManager

LogicManager -> UniCashParser : parseCommand("find c/food")
activate UniCashParser

create FindCommandParser
UniCashParser -> FindCommandParser
activate FindCommandParser

FindCommandParser --> UniCashParser
deactivate FindCommandParser

UniCashParser -> FindCommandParser : parse("c/food")
activate FindCommandParser


create FindCommand
FindCommandParser -> FindCommand
activate FindCommand

FindCommand --> FindCommandParser
deactivate FindCommand

FindCommandParser --> UniCashParser : command
deactivate FindCommandParser

FindCommandParser -[hidden]-> UniCashParser
destroy FindCommandParser

UniCashParser --> LogicManager : command
deactivate UniCashParser

LogicManager -> FindCommand : command.execute(model)
activate FindCommand


FindCommand -> Model : updateFilteredTransactionList(transactionPredicate)
activate Model

Model --> FindCommand
deactivate Model

create CommandResult
FindCommand -> CommandResult
activate CommandResult

CommandResult --> FindCommand
deactivate CommandResult

FindCommand --> LogicManager : commandResult
deactivate FindCommand

[<--LogicManager : commandResult
deactivate LogicManager
@enduml
20 changes: 20 additions & 0 deletions docs/diagrams/unicash/GetTransactionActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml

skin rose
skinparam ActivityFontSize 15
skinparam ArrowFontSize 12
start

: User enters get command;

if () then ([else])
:Parse exception thrown;
stop
else ([command argument is a valid number])
:Transaction successfully retrieved ;
endif


stop

@enduml
70 changes: 70 additions & 0 deletions docs/diagrams/unicash/GetTransactionSequenceDiagram.puml
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 ":LogicManager" as LogicManager LOGIC_COLOR
participant ":UniCashParser" as UniCashParser LOGIC_COLOR
participant ":GetCommandParser" as GetCommandParser LOGIC_COLOR
participant "d:GetCommand" as GetCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

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

[-> LogicManager : execute("get 1")
activate LogicManager

LogicManager -> UniCashParser : parseCommand("get 1")
activate UniCashParser

create GetCommandParser
UniCashParser -> GetCommandParser
activate GetCommandParser

GetCommandParser --> UniCashParser
deactivate GetCommandParser

UniCashParser -> GetCommandParser : parse("1")
activate GetCommandParser

create GetCommand
GetCommandParser -> GetCommand
activate GetCommand

GetCommand --> GetCommandParser :
deactivate GetCommand

GetCommandParser --> UniCashParser :
deactivate GetCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
GetCommandParser -[hidden]-> UniCashParser
destroy GetCommandParser

UniCashParser --> LogicManager :
deactivate UniCashParser

LogicManager -> GetCommand : execute(model)
activate GetCommand

GetCommand -> Model : get(1)
activate Model

Model --> GetCommand
deactivate Model

create CommandResult
GetCommand -> CommandResult
activate CommandResult

CommandResult --> GetCommand
deactivate CommandResult

GetCommand --> LogicManager : result
deactivate GetCommand

[<--LogicManager
deactivate LogicManager
@enduml
21 changes: 21 additions & 0 deletions docs/diagrams/unicash/ResetUniCashActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@startuml

skin rose
skinparam ActivityFontSize 15
skinparam ArrowFontSize 12
start

: User enters reset_unicash command;

if () then ([command followed with trailing characters])
:Parse exception thrown;
stop

else ([else])
:UniCa$h successfully reset;

endif

stop

@enduml
Loading
Loading