|
|
@ -1,8 +1,5 @@ |
|
|
|
import java.io.FileNotFoundException; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.ObjectOutputStream; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
/** |
|
|
|
* Credential Repository for handling user credentials |
|
|
@ -12,7 +9,7 @@ import java.util.ArrayList; |
|
|
|
public class CredentialRepository implements CredentialRepositoryInterface{ |
|
|
|
|
|
|
|
private int idCounter = 0; |
|
|
|
private ArrayList<Credential> credentials; |
|
|
|
private CredentialList credentials; |
|
|
|
|
|
|
|
/** |
|
|
|
* Konstruktor |
|
|
@ -21,7 +18,7 @@ public class CredentialRepository implements CredentialRepositoryInterface{ |
|
|
|
*/ |
|
|
|
public CredentialRepository() |
|
|
|
{ |
|
|
|
this.credentials = new ArrayList<Credential>(); |
|
|
|
this.credentials = new CredentialList(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -147,6 +144,7 @@ public class CredentialRepository implements CredentialRepositoryInterface{ |
|
|
|
out.writeObject(this.credentials); |
|
|
|
} catch (Exception fail) { |
|
|
|
System.err.println("Serialization failed!"); |
|
|
|
fail.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|