Back to project page PasswordDroid.
The source code is released under:
GNU General Public License
If you think the Android project PasswordDroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.wuthoehle.passworddroid.service.model; /*from w ww. ja va 2s . c o m*/ /* Copyright (c) 2015 Marco Huenseler <marcoh.huenseler+git@gmail.com> * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import java.util.List; import de.wuthoehle.passworddroid.service.PasswordDroidService; import de.wuthoehle.passworddroid.service.model.entries.Entry; public abstract class Database<T> implements Container { PasswordDroidService parent; private List<Category> categories; private String masterPassword; private boolean passwordSet; public Database(PasswordDroidService parent) { this.passwordSet = false; this.parent = parent; } public List<Category> getCategories() { return this.categories; } public boolean isMasterPasswordSet() { return passwordSet; } public void setMasterPassword(String masterPassword) { this.masterPassword = masterPassword; this.passwordSet = true; } @Override public void calcAll() { for (Category i : this.getCategories()) { i.calcAll(); } } public abstract void calcPassword(Entry entry); public abstract T getRepresentation(); public abstract void recover(T a) throws Exception; }