Skip to content

Commit

Permalink
Merge pull request #74 from CSC207-2022F-UofT/ellen_javadoc
Browse files Browse the repository at this point in the history
[+] Added javadoc for DeleteEntryUseCase
  • Loading branch information
ScottCTD authored Dec 2, 2022
2 parents 76d7b1b + a8bc838 commit f83ecdb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

/**
* Clean Architecture Layer: Interface Adapters
* This class serves as the controller of the Delete Entry Use Case.
* It is only responsible for accepting the input (<code> entryID </code>) from the user and
* invoke the corresponding use case.
*
* @author Ellen, Scott
* @see DeleteEntryInputPort
*/

public class DeleteEntryController {

private final DeleteEntryInputPort useCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

/**
* Clean Architecture Layer: Application Business Rules
* An input port for the Delete Entry use case.
*
* @author Ellen, Scott
*
* @see DeleteEntryUseCase
*/
public interface DeleteEntryInputPort {
/**
* This method will delete the entry with corresponding entryID in the database.
*
* @param entryId the entryId that need to be deleted.
*/
void deleteEntry(int entryId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
/**
* Clean Architecture Layer: Application Business Rules
*
* A concrete implementation of the <code>DeleteEntryUseCase</code>.
*
* @author Ellen, Scott
*
* @see DeleteEntryInputPort
*/
public class DeleteEntryUseCase implements DeleteEntryInputPort {

public class DeleteEntryUseCase implements DeleteEntryInputPort {
/**
* The database gateway for input/output with the database.
*/
private final DatabaseGateway gateway;

public DeleteEntryUseCase(DatabaseGateway gateway) {
Expand Down

0 comments on commit f83ecdb

Please sign in to comment.