mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.3.1'
This commit is contained in:
@@ -19,13 +19,13 @@ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xo
|
||||
import gplx.core.btries.*; import gplx.core.consoles.*;
|
||||
import gplx.xowa.apps.fsys.*; import gplx.xowa.files.exts.*;
|
||||
import gplx.xowa.wikis.domains.*;
|
||||
public class Xof_repo_itm implements GfoInvkAble {
|
||||
private final Xoa_fsys_mgr app_fsys; private final Xof_rule_mgr ext_rule_mgr; private final Bry_bfr tmp_bfr = Bry_bfr.reset_(300);
|
||||
public class Xof_repo_itm implements Gfo_invk {
|
||||
private final Xoa_fsys_mgr app_fsys; private final Xof_rule_mgr ext_rule_mgr; private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(300);
|
||||
public Xof_repo_itm(byte[] key, Xoa_fsys_mgr app_fsys, Xof_rule_mgr ext_rule_mgr, byte[] wiki_domain) {
|
||||
this.key = key; this.app_fsys = app_fsys; this.ext_rule_mgr = ext_rule_mgr;
|
||||
Wiki_domain_(wiki_domain);
|
||||
}
|
||||
public byte[] Key() {return key;} private final byte[] key;
|
||||
public byte[] Key() {return key;} private final byte[] key;
|
||||
public byte[] Wiki_domain() {return wiki_domain;} private byte[] wiki_domain;
|
||||
public byte[] Wiki_abrv_xo() {return wiki_abrv_xo;} private byte[] wiki_abrv_xo;
|
||||
public byte[] Root_bry() {return root_bry;} private byte[] root_bry;
|
||||
@@ -80,7 +80,7 @@ public class Xof_repo_itm implements GfoInvkAble {
|
||||
else if (ctx.Match(k, Invk_ext_rules_)) Ext_rules_(m.ReadBry("v"));
|
||||
else if (ctx.Match(k, Invk_wmf_api_)) wmf_api = m.ReadYn("v");
|
||||
else if (ctx.Match(k, Invk_tarball_)) tarball = m.ReadYn("v");
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
}
|
||||
private static final String Invk_owner = "owner", Invk_fsys_ = "fsys_", Invk_ext_rules_ = "ext_rules_", Invk_primary_ = "primary_", Invk_wmf_api_ = "wmf_api_", Invk_tarball_ = "tarball_";
|
||||
|
||||
@@ -16,17 +16,17 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*;
|
||||
public class Xof_repo_pair implements GfoInvkAble {
|
||||
public class Xof_repo_pair implements Gfo_invk {
|
||||
public Xof_repo_pair(byte repo_idx, byte[] wiki_domain, Xof_repo_itm src, Xof_repo_itm trg) {
|
||||
this.repo_idx = repo_idx; this.wiki_domain = wiki_domain; this.src = src; this.trg = trg;
|
||||
}
|
||||
public byte Repo_idx() {return repo_idx;} private byte repo_idx;
|
||||
public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain;
|
||||
public Xof_repo_itm Src() {return src;} private final Xof_repo_itm src;
|
||||
public Xof_repo_itm Trg() {return trg;} private final Xof_repo_itm trg;
|
||||
public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain;
|
||||
public Xof_repo_itm Src() {return src;} private final Xof_repo_itm src;
|
||||
public Xof_repo_itm Trg() {return trg;} private final Xof_repo_itm trg;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_repo_id_)) repo_idx = m.ReadByte("v");
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_repo_id_ = "repo_id_";
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class Xofw_wiki_wkr_base implements Xofw_wiki_finder {
|
||||
}
|
||||
private byte[] Get_redirect(Xowe_wiki wiki, Xow_ns file_ns, Xowd_page_itm db_page) {
|
||||
if (db_page.Redirected()) {
|
||||
wiki.Db_mgr().Load_mgr().Load_page(db_page, file_ns, false);
|
||||
wiki.Db_mgr().Load_mgr().Load_page(db_page, file_ns);
|
||||
byte[] src = db_page.Text();
|
||||
Xoa_ttl redirect_ttl = wiki.Redirect_mgr().Extract_redirect(src);
|
||||
return redirect_ttl == Xop_redirect_mgr.Redirect_null_ttl ? Xop_redirect_mgr.Redirect_null_bry : redirect_ttl.Page_db();
|
||||
@@ -68,5 +68,5 @@ public class Xofw_wiki_wkr_base implements Xofw_wiki_finder {
|
||||
else
|
||||
return Xop_redirect_mgr.Redirect_null_bry;
|
||||
}
|
||||
private static final Xowd_page_itm tmp_db_page = Xowd_page_itm.new_tmp();
|
||||
private static final Xowd_page_itm tmp_db_page = Xowd_page_itm.new_tmp();
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ import gplx.xowa.files.xfers.*;
|
||||
import gplx.xowa.wikis.domains.*;
|
||||
import gplx.xowa.parsers.utils.*;
|
||||
import gplx.xowa.wikis.tdbs.metas.*;
|
||||
public class Xowe_repo_mgr implements Xow_repo_mgr, GfoInvkAble {
|
||||
private Xowe_wiki wiki; private final List_adp repos = List_adp_.new_();
|
||||
public class Xowe_repo_mgr implements Xow_repo_mgr, Gfo_invk {
|
||||
private Xowe_wiki wiki; private final List_adp repos = List_adp_.New();
|
||||
public Xowe_repo_mgr(Xowe_wiki wiki) {
|
||||
this.wiki = wiki;
|
||||
Xoae_app app = wiki.Appe();
|
||||
@@ -187,7 +187,7 @@ public class Xowe_repo_mgr implements Xow_repo_mgr, GfoInvkAble {
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_add)) return Add_repo(m.ReadBry("src"), m.ReadBry("trg"));
|
||||
else if (ctx.Match(k, Invk_clear)) {repos.Clear(); repos_ary = null;} // reset repos_ary variable
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_add = "add", Invk_clear = "clear";
|
||||
public Xof_repo_pair Add_repo(byte[] src_repo_key, byte[] trg_repo_key) {
|
||||
|
||||
Reference in New Issue
Block a user