From 66b7b880afe34a851dad4748b8deeb588fb0b42b Mon Sep 17 00:00:00 2001 From: fdai5728 Date: Thu, 17 Feb 2022 19:46:21 +0100 Subject: [PATCH] Inserting JavaDoc to delete credential --- src/main/java/CredentialRepository.java | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/java/CredentialRepository.java b/src/main/java/CredentialRepository.java index 6922ae8..b51eb12 100644 --- a/src/main/java/CredentialRepository.java +++ b/src/main/java/CredentialRepository.java @@ -81,13 +81,11 @@ public class CredentialRepository implements CredentialRepositoryInterface{ } - /* - The next 3 functions assume you already have successfully - pulled a credential from the repository and now want to edit it. - Thus, these functions require you to pass the desired credential's index + /** + * Function to update userpassword, assuming we already know the userid + * @param index + * @param newPassword */ - - @Override public void updatePassword(int index, String newPassword) { @@ -101,6 +99,12 @@ public class CredentialRepository implements CredentialRepositoryInterface{ } + + /** + * Function to update username analoge to updatePassword + * @param index + * @param newUsername + */ public void updateUsername(int index, String newUsername){ try{ @@ -112,6 +116,11 @@ public class CredentialRepository implements CredentialRepositoryInterface{ } } + /** + * Deletion function for credentials + * Will immediately delete - double check for user permission + * @param index + */ @Override public void delete(int index) {