fix diagrams for inputValidation

rearranged input line
This commit is contained in:
Im_Alpha 2021-12-10 18:28:59 -08:00
parent d682c463a4
commit 8825a94301
10 changed files with 31 additions and 40 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 KiB

After

Width:  |  Height:  |  Size: 474 KiB

View File

@ -23,7 +23,7 @@ Controller.cs->SqlDAO:++IDataSource factory.GetDataSource(string DbName, string
activate SqlDAO #D3D3D3
SqlDAO->SqlDAO:++Constructor(string connInfo)++
group #red Data Store Timed Out #white
SqlDAO->SqlDAO:++Catch Exception++
SqlDAO->SqlDAO: ++Catch SqlException++
Controller.cs<--SqlDAO:++return "Data Source Timed Out"++
end
group #blue Data Store Online #white
@ -49,7 +49,8 @@ activate UserAccount #CBC3E3
UserAccount->UserAccount:++Constructor(string username,\n string password,\n DateTime TimeStamp)++
Controller.cs<--UserAccount:++New UserAccount++
deactivate UserAccount
//
Controller.cs->SystemAccountManager:++manager.CreateUserRecord(user:UserAccount)++
activate SystemAccountManager #ffffe0
SystemAccountManager->SystemAccountManager:++isInputValid(user: UserAccount)++
@ -57,13 +58,9 @@ group #red Invalid Information #white
Controller.cs<--SystemAccountManager:++return "Invalid input"++
User<--Controller.cs:++ return "Invalid input"++
end
Controller.cs<--SystemAccountManager:++return true++
deactivate SystemAccountManager
//
Controller.cs->SystemAccountManager:++manager.CreateUserRecord(user:UserAccount)++
group #green Information Valid #white
//check if there is an admin user
activate SystemAccountManager #ffffe0
SystemAccountManager->SqlDAO:++bool isAdmin(user:UserAccount)++
activate SqlDAO #D3D3D3
SqlDAO->SqlServer(MariaDB):++SqlRead confirmAdmin()++
@ -114,9 +111,9 @@ SystemAccountManager->SystemAccountManager:++string NewRole()++
// Enter Role
User->SystemAccountManager:++string NewRole++
// Create NewUser object
UserAccount<-SystemAccountManager:++new NewUser(\nstring NewUserName,\nstring NewPassword,\nstring New Email,\nstring NewRole,\nDateTime TimeStamp)++
UserAccount<-SystemAccountManager:++new NewUser(\nstring NewUserName,\nstring NewPassword,\nstring New Email,\nDateTime TimeStamp)++
activate UserAccount #CBC3E3
UserAccount->UserAccount:++Constructor(\nstring NewUserName,\nstring NewPassword,\nstring New Email,\nstring NewRole,\nDateTime TimeStamp)++
UserAccount->UserAccount:++Constructor(string NewUserName,\nstring NewPassword,\nstring New Email,\nDateTime TimeStamp)++
UserAccount-->SystemAccountManager:++return NewUser++
deactivate UserAccount
//Create User Record
@ -171,3 +168,5 @@ end
end
end
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 KiB

After

Width:  |  Height:  |  Size: 477 KiB

View File

@ -49,21 +49,17 @@ activate UserAccount #CBC3E3
UserAccount->UserAccount: ++Constructor(string username,\n string password,\n DateTime RegistrationTimeStamp)++
Controller.cs<--UserAccount:++New UserAccount++
deactivate UserAccount
Controller.cs->SystemAccountManager: ++manager.DeleteUserRecord(user:UserAccount)++
activate SystemAccountManager #ffffe0
SystemAccountManager->SystemAccountManager:++isInputValid(user: UserAccount)++
group #red Invalid Information #white
Controller.cs<--SystemAccountManager:++return "Invalid input"++
User<--Controller.cs:++ return "Invalid input"++
end
Controller.cs<--SystemAccountManager:++return true++
deactivate SystemAccountManager
//
Controller.cs->SystemAccountManager: ++manager.DeleteUserRecord(user:UserAccount)++
group #green Information Valid #white
//check if there is an admin user
activate SystemAccountManager #ffffe0
SystemAccountManager->SqlDAO:++isAdmin(user:UserAccount)++
activate SqlDAO #D3D3D3
SqlDAO->SqlServer(MariaDB):++SqlRead confirmAdmin()++
@ -119,7 +115,7 @@ AccountService->SqlDAO:++SqlDAO\n.DeleteUserRecord(user:NewUser,\nUpdateType: us
activate SqlDAO #D3D3D3
SqlDAO->SqlServer(MariaDB):++isUser(user:NewUser)++
activate SqlServer(MariaDB) #00FFFF
SqlServer(MariaDB)->SqlServer(MariaDB):++Select *\nFrom Users\nwhere Username\n= @UserName and\nRole = @UserRole
SqlServer(MariaDB)->SqlServer(MariaDB):++ Select *\nFrom Users\nwhere Username\n= @UserName OR\nemail = @Email++
group #red data store timed out #white
SqlDAO<--SqlServer(MariaDB):++SqlException++
deactivate SqlServer(MariaDB)
@ -161,4 +157,5 @@ end
end
end
end
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 KiB

After

Width:  |  Height:  |  Size: 462 KiB

View File

@ -49,21 +49,19 @@ activate UserAccount #CBC3E3
UserAccount->UserAccount: ++Constructor(string username,\n string password,\n DateTime RegistrationTimeStamp)++
Controller.cs<--UserAccount:++New UserAccount++
deactivate UserAccount
Controller.cs->SystemAccountManager: ++manager.DisableUserRecord(user:UserAccount)++
activate SystemAccountManager #ffffe0
SystemAccountManager->SystemAccountManager:++isInputValid(user: UserAccount)++
group #red Invalid Information #white
Controller.cs<--SystemAccountManager:++return "Invalid input"++
User<--Controller.cs:++ return "Invalid input"++
end
Controller.cs<--SystemAccountManager:++return true++
deactivate SystemAccountManager
group #green Information Valid #white
//
Controller.cs->SystemAccountManager: ++manager.DisableUserRecord(user:UserAccount)++
//check if there is an admin user
activate SystemAccountManager #ffffe0
SystemAccountManager->SqlDAO:++isAdmin(user:UserAccount)++
activate SqlDAO #D3D3D3
SqlDAO->SqlServer(MariaDB):++SqlRead confirmAdmin()++
@ -158,4 +156,5 @@ end
end
end
end
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 KiB

After

Width:  |  Height:  |  Size: 441 KiB

View File

@ -50,20 +50,18 @@ activate UserAccount #CBC3E3
UserAccount->UserAccount: ++string username,\n string password,\n DateTime RegistrationTimeStamp++
Controller.cs<--UserAccount:++New UserAccount++
deactivate UserAccount
Controller.cs->SystemAccountManager:++manager.UpdateUserRecord(user:UserAccount)++
activate SystemAccountManager #ffffe0
SystemAccountManager->SystemAccountManager:++isInputValid(user: UserAccount)++
group #red Invalid Information #white
Controller.cs<--SystemAccountManager:++return "Invalid input"++
User<--Controller.cs:++ return "Invalid input"++
end
Controller.cs<--SystemAccountManager:++return true++
deactivate SystemAccountManager
group #green Information Valid #white
//look over
Controller.cs->SystemAccountManager:++manager.UpdateUserRecord(user:UserAccount)++
//check if there is an admin user
activate SystemAccountManager #ffffe0
SystemAccountManager->SqlDAO:++bool isAdmin(user:UserAccount)++
activate SqlDAO #D3D3D3
SqlDAO->SqlServer(MariaDB):++SqlRead confirmAdmin()++
@ -113,9 +111,9 @@ SystemAccountManager->SystemAccountManager:++string NewRole()++
// Enter Role
User->SystemAccountManager:++string NewRole++
// Create NewUser object
UserAccount<-SystemAccountManager:++new NewUser(\nstring NewUserName,\nstring NewPassword,\nstring New Email,\nstring NewRole,\nDateTime TimeStamp)++
UserAccount<-SystemAccountManager:++new NewUser(\nstring NewUserName,\nstring NewPassword,\nstring New Email,\nstring NewRole\nDateTime TimeStamp)++
activate UserAccount #CBC3E3
UserAccount->UserAccount:++Constructor(\nstring NewUserName,\nstring NewPassword,\nstring New Email,\nstring NewRole,\nDateTime TimeStamp)++
UserAccount->UserAccount:++Constructor(\nstring NewUserName,\nstring NewPassword,\nstring New Email,\nstring NewRole\nDateTime TimeStamp)++
UserAccount-->SystemAccountManager:++return NewUser++
deactivate UserAccount
SystemAccountManager->AccountService:++AccountService\n.UpdateUserRecord(user:NewUser,\nUpdateType: userUpdate)++
@ -124,7 +122,7 @@ AccountService->SqlDAO:++SqlDAO\n.UpdateUserRecord(user:NewUser,\nUpdateType: us
activate SqlDAO #D3D3D3
SqlDAO->SqlServer(MariaDB):++isUser(user:NewUser)++
activate SqlServer(MariaDB) #00FFFF
SqlServer(MariaDB)->SqlServer(MariaDB):++Update *\nFrom Users\nwhere Username\n= @UserName and\nRole = @UserRole
SqlServer(MariaDB)->SqlServer(MariaDB):++Update *\nFrom Users\nwhere Username\n= @UserName OR\nemail = @Email++
group #red data store timed out #white
SqlDAO<--SqlServer(MariaDB):++SqlException++
deactivate SqlServer(MariaDB)
@ -142,11 +140,11 @@ activate SqlServer(MariaDB) #00FFFF
SqlDAO<--SqlServer(MariaDB):++ return True++
SqlDAO->SqlServer(MariaDB):++ SQL insert\nupdate credentials++
SqlDAO<--SqlServer(MariaDB):++ return 1++
deactivate SqlServer(MariaDB)
AccountService<--SqlDAO:++return "User information updated successfully"++
SystemAccountManager<--AccountService:++return "User information updated successfully"++
Controller.cs<--SystemAccountManager:++return "User information updated successfully"++
User<--Controller.cs:++ return "User information\n updated successfully"++
deactivate SqlServer(MariaDB)
end
// User doesn't exist
group #green User does not exist #white
@ -154,18 +152,19 @@ activate SqlServer(MariaDB) #00FFFF
SqlDAO<--SqlServer(MariaDB):++ return False++
SqlDAO->SqlServer(MariaDB):++ SQL insert\nuser credentials++
SqlDAO<--SqlServer(MariaDB):++ return 1++
deactivate SqlServer(MariaDB)
AccountService<--SqlDAO:++return "User is now registered"++
deactivate SqlDAO
SystemAccountManager<--AccountService:++return "User is now registered"++
deactivate AccountService
Controller.cs<--SystemAccountManager:++return "User is now registered"++
deactivate SystemAccountManager
User<--Controller.cs:++ return \n"User is now registered"++
deactivate AccountService
deactivate SqlDAO
deactivate SqlServer(MariaDB)
deactivate SystemAccountManager
deactivate Controller.cs
end
//deactivate User
end
end
end
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 KiB

After

Width:  |  Height:  |  Size: 464 KiB

View File

@ -1,4 +1,4 @@
title Enable Specfied User
title Disable Specfied User
actor User
participant Controller.cs #90EE90
participant RDSFactory #26abff
@ -29,7 +29,6 @@ end
group #blue Data Store Online #white
Controller.cs<--SqlDAO: ++return SqlDAO++
deactivate SqlDAO
// Create new Admin
Controller.cs->SystemAccountManager:++ manager = new SystemAccountManager(IDataSource conn)++
activate SystemAccountManager #ffffe0
@ -49,21 +48,18 @@ activate UserAccount #CBC3E3
UserAccount->UserAccount: ++Constructor(string username,\n string password,\n DateTime RegistrationTimeStamp)++
Controller.cs<--UserAccount:++New UserAccount++
deactivate UserAccount
Controller.cs->SystemAccountManager:++manager.EnableUserRecord(user:UserAccount)++
activate SystemAccountManager #ffffe0
SystemAccountManager->SystemAccountManager:++isInputValid(user: UserAccount)++
group #red Invalid Information #white
Controller.cs<--SystemAccountManager:++return "Invalid input"++
User<--Controller.cs:++ return "Invalid input"++
end
Controller.cs<--SystemAccountManager:++return true++
deactivate SystemAccountManager
//
Controller.cs->SystemAccountManager:++manager.EnableUserRecord(user:UserAccount)++
group #green Information Valid #white
//check if there is an admin user
activate SystemAccountManager #ffffe0
SystemAccountManager->SqlDAO:++isAdmin(user:UserAccount)++
activate SqlDAO #D3D3D3
SqlDAO->SqlServer(MariaDB):++SqlRead confirmAdmin()++
@ -158,4 +154,5 @@ end
end
end
end
end
end