-
Notifications
You must be signed in to change notification settings - Fork 4
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 #63 from CSC207-2022F-UofT/xgao28_userjoin_javadoc
[+] Added javadoc for userjoin use case.
- Loading branch information
Showing
9 changed files
with
119 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
9 changes: 9 additions & 0 deletions
9
src/main/java/billgates/use_cases/user_join/UserJoinController.java
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
20 changes: 20 additions & 0 deletions
20
src/main/java/billgates/use_cases/user_join/UserJoinInputPort.java
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 |
---|---|---|
@@ -1,5 +1,25 @@ | ||
package billgates.use_cases.user_join; | ||
|
||
/** | ||
* Clean Architecture Layer: Application Business Rules | ||
* An input port for the User Join use case. | ||
* | ||
* @author Xinxiang | ||
* @see UserJoinUseCase | ||
*/ | ||
public interface UserJoinInputPort { | ||
|
||
/** | ||
* This method will detect 3 different scenarios from the | ||
* <code>UserJoinRequestModel</code> model and take following actions: | ||
* Case 1: If the username is not in the database, | ||
* a new user is created and recorded in the database. i.e, register a new user. | ||
* Case 2: If the username is in the database and the password matches, | ||
* the corresponding user is logged in. | ||
* Case 3: If the username is in the database and the password doesn't match, | ||
* either the username is not valid for a register or the password is incorrect, | ||
* and the corresponding user is not logged in. | ||
* @param model the model that needs certain actions above. | ||
*/ | ||
void join(UserJoinRequestModel model); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/billgates/use_cases/user_join/UserJoinOutputPort.java
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 |
---|---|---|
@@ -1,5 +1,21 @@ | ||
package billgates.use_cases.user_join; | ||
|
||
/** | ||
* Clean Architecture Layer: Application Business Rules | ||
* An output port for the User Join use case. | ||
* The purpose of this interface is dependency inversion. | ||
* | ||
* @author Xinxiang | ||
* @see UserJoinUseCase | ||
* @see UserJoinPresenter | ||
*/ | ||
public interface UserJoinOutputPort { | ||
|
||
/** | ||
* Converts the data in model to a GUI-friendly format and | ||
* updates the GUI correspondingly. | ||
* | ||
* @param model the model to convert. | ||
*/ | ||
void display(UserJoinResponseModel model); | ||
} |
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
11 changes: 11 additions & 0 deletions
11
src/main/java/billgates/use_cases/user_join/UserJoinRequestModel.java
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
10 changes: 10 additions & 0 deletions
10
src/main/java/billgates/use_cases/user_join/UserJoinResponseModel.java
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
14 changes: 14 additions & 0 deletions
14
src/main/java/billgates/use_cases/user_join/UserJoinViewModel.java
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