Skip to content

Commit

Permalink
Merge branch 'Branch-Documentation' of https://github.com/Mahidharah/tp
Browse files Browse the repository at this point in the history
… into Branch-Documentation

* 'Branch-Documentation' of https://github.com/Mahidharah/tp: (36 commits)
  fix checkstyles
  fix test cases
  Undo Redo Command test cases
  Fix failing test
  Fix import checkstyle issues
  Fix checkstyle issues
  VersionedAddressBook test cases
  Update DeveloperRoles.txt
  Update ClientRoles.txt
  Add tests for edit project command and mark/unmark commands
  delete client and developer roles test cases
  add-client role and add developer role tests
  Write tests for edit commands
  fix CI
  fix checkstyles
  fix CI
  Add use cases and planned enhancements
  fix checkstyles
  Add and delete role's developer guide and user stories
  Undo/Redo feature DG
  ...

# Conflicts:
#	DeveloperRoles.txt
#	docs/UserGuide.md
  • Loading branch information
Mahidharah committed Nov 13, 2023
2 parents 29a1871 + c28d051 commit a585d8e
Show file tree
Hide file tree
Showing 83 changed files with 3,567 additions and 549 deletions.
1 change: 1 addition & 0 deletions ClientRoles.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

5 changes: 1 addition & 4 deletions DeveloperRoles.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
Frontend Developer
Backend Developer
Developer
r/

667 changes: 484 additions & 183 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ title: Documentation guide

* Follow the [**_Google developer documentation style guide_**](https://developers.google.com/style).

* Also relevant is the [_[se-edu/guides] **Markdown coding standard**_](https://se-education.org/guides/conventions/markdown.html)
* Also, relevant is the [_[se-edu/guides] **Markdown coding standard**_](https://se-education.org/guides/conventions/markdown.html)

**Diagrams:**

Expand Down
217 changes: 140 additions & 77 deletions docs/UserGuide.md

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions docs/diagrams/AddDeveloperRoleSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@startuml
'https://plantuml.com/sequence-diagram

!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant "d :AddDeveloperRoleCommandParser" as AddDeveloperRoleCommandParser LOGIC_COLOR
participant "d :AddDeveloperRoleCommand" as AddDeveloperRoleCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

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

[-> LogicManager : execute("add-developer-role Tester")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("add-developer-role Tester")
activate AddressBookParser

create AddDeveloperRoleCommandParser
AddressBookParser -> AddDeveloperRoleCommandParser
activate AddDeveloperRoleCommandParser

AddDeveloperRoleCommandParser --> AddressBookParser
deactivate AddDeveloperRoleCommandParser

AddressBookParser -> AddDeveloperRoleCommandParser : parse("Tester")
activate AddDeveloperRoleCommandParser

create AddDeveloperRoleCommand
AddDeveloperRoleCommandParser -> AddDeveloperRoleCommand
activate AddDeveloperRoleCommand

AddDeveloperRoleCommand --> AddDeveloperRoleCommandParser
deactivate AddDeveloperRoleCommand

AddDeveloperRoleCommandParser --> AddressBookParser
deactivate AddDeveloperRoleCommandParser

AddressBookParser --> LogicManager
deactivate AddressBookParser

LogicManager -> AddDeveloperRoleCommand : execute()
activate AddDeveloperRoleCommand

AddDeveloperRoleCommand -> DeveloperRoles : isValidRole("Tester")
activate DeveloperRoles

DeveloperRoles --> AddDeveloperRoleCommand : boolean true
deactivate DeveloperRoles

AddDeveloperRoleCommand -> DeveloperRoles : addDeveloperRole(new DeveloperRoles("Tester))
activate DeveloperRoles

DeveloperRoles -> DeveloperRoles : saveDeveloperRoles()
DeveloperRoles --> AddDeveloperRoleCommand

AddDeveloperRoleCommand -> Model : commitAddressBook(model, successMessage, TabIndex)
activate Model

Model -> VersionedAddressBook : commit()
activate VersionedAddressBook

VersionedAddressBook --> Model
deactivate VersionedAddressBook

Model --> AddDeveloperRoleCommand
deactivate Model

create CommandResult
AddDeveloperRoleCommand -> CommandResult
activate CommandResult

CommandResult --> AddDeveloperRoleCommand
deactivate CommandResult

AddDeveloperRoleCommand --> LogicManager : result
deactivate AddDeveloperRoleCommand

@enduml
87 changes: 87 additions & 0 deletions docs/diagrams/DeleteDeveloperRoleSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@startuml
'https://plantuml.com/sequence-diagram

!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant "d :DeleteDeveloperRoleCommandParser" as DeleteDeveloperRoleCommandParser LOGIC_COLOR
participant "d :DeleteDeveloperRoleCommand" as DeleteDeveloperRoleCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

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

[-> LogicManager : execute("delete-developer-role Tester")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("delete-developer-role Tester")
activate AddressBookParser

create DeleteDeveloperRoleCommandParser
AddressBookParser -> DeleteDeveloperRoleCommandParser
activate DeleteDeveloperRoleCommandParser

DeleteDeveloperRoleCommandParser --> AddressBookParser
deactivate DeleteDeveloperRoleCommandParser

AddressBookParser -> DeleteDeveloperRoleCommandParser : parse("Tester")
activate DeleteDeveloperRoleCommandParser

create DeleteDeveloperRoleCommand
DeleteDeveloperRoleCommandParser -> DeleteDeveloperRoleCommand
activate DeleteDeveloperRoleCommand

DeleteDeveloperRoleCommand --> DeleteDeveloperRoleCommandParser
deactivate DeleteDeveloperRoleCommand

DeleteDeveloperRoleCommandParser --> AddressBookParser
deactivate DeleteDeveloperRoleCommandParser

AddressBookParser --> LogicManager
deactivate AddressBookParser

LogicManager -> DeleteDeveloperRoleCommand : execute()
activate DeleteDeveloperRoleCommand

DeleteDeveloperRoleCommand -> DeveloperRoles : isRemovableRole("Tester")
activate DeveloperRoles

DeveloperRoles --> DeleteDeveloperRoleCommand : boolean true
deactivate DeveloperRoles

DeleteDeveloperRoleCommand -> DeveloperRoles : deleteDeveloperRole(new DeveloperRoles("Tester))
activate DeveloperRoles

DeveloperRoles -> DeveloperRoles : saveDeveloperRoles()
DeveloperRoles --> DeleteDeveloperRoleCommand

DeleteDeveloperRoleCommand -> Model : commitAddressBook(model, successMessage, TabIndex)
activate Model

Model -> VersionedAddressBook : commit()
activate VersionedAddressBook

VersionedAddressBook --> Model
deactivate VersionedAddressBook

Model --> DeleteDeveloperRoleCommand
deactivate Model

create CommandResult
DeleteDeveloperRoleCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteDeveloperRoleCommand
deactivate CommandResult

DeleteDeveloperRoleCommand --> LogicManager : result
deactivate DeleteDeveloperRoleCommand

@enduml
70 changes: 70 additions & 0 deletions docs/diagrams/FindDeveloperSequenceDiagram.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 ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":FindCommandParser" as FindCommandParser LOGIC_COLOR
participant "d:FindCommand" as FindCommand 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("find-developer n/Alice")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("find-developer n/Alice")
activate AddressBookParser

create FindCommandParser
AddressBookParser -> FindCommandParser
activate FindCommandParser

FindCommandParser --> AddressBookParser
deactivate FindCommandParser

AddressBookParser -> FindCommandParser : parse("Alice")
activate FindCommandParser

create FindCommand
FindCommandParser -> FindCommand
activate FindCommand

FindCommand --> FindCommandParser : d
deactivate FindCommand

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

AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> FindCommand : execute()
activate FindCommand

FindCommand -> Model : FindDeveloper(1)
activate Model

Model --> FindCommand
deactivate Model

create CommandResult
FindCommand -> CommandResult
activate CommandResult

CommandResult --> FindCommand
deactivate CommandResult

FindCommand --> LogicManager : result
deactivate FindCommand

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

@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant "d :ListDeveloperCommand" as ListDeveloperCommand 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("list-developer")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("list-developer")
activate AddressBookParser

create ListDeveloperCommand
AddressBookParser -> ListDeveloperCommand
activate ListDeveloperCommand

ListDeveloperCommand --> AddressBookParser : d
deactivate ListDeveloperCommand

AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> ListDeveloperCommand : execute()
activate ListDeveloperCommand

ListDeveloperCommand -> Model : updateFilteredDeveloperList(PREDICATE_SHOW_ALL_DEVELOPERS)
activate Model

Model --> ListDeveloperCommand
deactivate Model

create CommandResult
ListDeveloperCommand -> CommandResult
activate CommandResult

CommandResult --> ListDeveloperCommand
deactivate CommandResult

ListDeveloperCommand --> LogicManager : result
deactivate ListDeveloperCommand

[<--LogicManager
deactivate LogicManager

@enduml

37 changes: 37 additions & 0 deletions docs/diagrams/UndoRedoActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@startuml
'https://plantuml.com/activity-diagram-beta

start
:undo
:new page;
if (Page.onSecurityCheck) then (true)
:Page.onInit();
if (isForward?) then (no)
:Process controls;
if (continue processing?) then (no)
stop
endif

if (isPost?) then (yes)
:Page.onPost();
else (no)
:Page.onGet();
endif
:Page.onRender();
endif
else (false)
endif

if (do redirect?) then (yes)
:redirect process;
else
if (do forward?) then (yes)
:Forward request;
else (no)
:Render page template;
endif
endif

stop

@enduml
2 changes: 1 addition & 1 deletion docs/diagrams/UndoSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ activate Model
Model -> VersionedAddressBook : undo()
activate VersionedAddressBook

VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook)
VersionedAddressBook -> VersionedAddressBook :changeAddressBook(model)
VersionedAddressBook --> Model :
deactivate VersionedAddressBook

Expand Down
23 changes: 23 additions & 0 deletions docs/diagrams/isRemovableRole.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@startuml
'https://plantuml.com/activity-diagram-beta

start
:get the full developer list;

if (check is any developer using this role) then (there are developers using this role)
:throw developer still using error;
stop
endif
if (check is this role one of the pre-defined roles) then (is pre-defined role)
:throw cannot be deleted error;
stop
endif
if (check is this role in the list of existing roles) then (role does not exist)
:throw role does not exist error;
stop
endif
:delete role from existing list;
stop


@enduml
Binary file added docs/images/AddDeveloperRoleSequenceDiagram.png
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.
Binary file added docs/images/FindDeveloperSequenceDiagram.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 added docs/images/ListDeveloperSequenceDiagram.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/UndoSequenceDiagram.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 added docs/images/isRemovableRole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a585d8e

Please sign in to comment.