Browse Source

Inserting JavaDoc to delete credential

feature-serializer
fdai5728 3 years ago
parent
commit
66b7b880af
  1. 21
      src/main/java/CredentialRepository.java

21
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 @Override
public void updatePassword(int index, String newPassword) { 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){ public void updateUsername(int index, String newUsername){
try{ 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 @Override
public void delete(int index) { public void delete(int index) {

Loading…
Cancel
Save