/* XOWA: the XOWA Offline Wiki Application Copyright (C) 2012 gnosygnu@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.users; import gplx.*; import gplx.xowa.*; import gplx.dbs.*; import gplx.xowa.users.data.*; import gplx.xowa.users.history.*; import gplx.xowa.files.*; import gplx.xowa.files.caches.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.langs.genders.*; public class Xouv_user implements Xou_user { private Xoa_wiki_mgr wiki_mgr; public Xouv_user(Xoa_app app, String key, Io_url user_dir) { this.key = key; this.fsys_mgr = new Xou_fsys_mgr(user_dir); this.history_mgr = new Xou_history_mgr(fsys_mgr.App_data_history_fil()); } public String Key() {return key;} private String key; public Xou_fsys_mgr Fsys_mgr() {return fsys_mgr;} private final Xou_fsys_mgr fsys_mgr; public Xou_history_mgr History_mgr() {return history_mgr;} private final Xou_history_mgr history_mgr; public Xou_db_mgr User_db_mgr() {return user_db_mgr;} private Xou_db_mgr user_db_mgr; public int Gender() {return Xol_gender_.Tid_unknown;} public Xow_wiki Wikii() {if (wiki == null) wiki = wiki_mgr.Get_by_or_make_init_y(Xow_domain_itm_.Bry__home); return wiki;} private Xow_wiki wiki; public void Init_db(Xoa_app app, Xoa_wiki_mgr wiki_mgr, Io_url db_url) { this.wiki_mgr = wiki_mgr; this.user_db_mgr = new Xou_db_mgr(app); user_db_mgr.Init_by_app(Bool_.Y, db_url); } }