Package net.sourceforge.jwbf.mediawiki.actions.util

Examples of net.sourceforge.jwbf.mediawiki.actions.util.VersionException


  public HttpAction getNextMessage() {

    if (first) {
      try {
        if (!bot.isEditApi())
          throw new VersionException("write api off - user triggerd");
        switch (bot.getVersion()) {
          case MW1_09:
          case MW1_10:
          case MW1_11:
          case MW1_12:
            throw new VersionException("write api not available");
          default:
            break;
        }
        first = false;
        if (!(bot.getUserinfo().getRights().contains("edit")
            && bot.getUserinfo().getRights().contains("writeapi"))) {
          throw new VersionException("write api not avalibal");
        }
        apiReq = new GetApiToken(GetApiToken.Intoken.EDIT,
            a.getTitle(), bot.getVersion(), bot.getUserinfo());
        apiGet = apiReq.getNextMessage();
        apiEdit = true;
View Full Code Here


  throws VersionException {
    super(bot);
    assert bot != null;
    assert articleName != null && redirectFilter != null;
    if (bot.getVersion() == Version.MW1_09 && redirectFilter != RedirectFilter.all) {
      throw new VersionException("redirect filtering is not available in this MediaWiki version");
    }
    this.redirectFilter = redirectFilter;
    this.namespaces = namespaces;

    this.articleName = articleName;
View Full Code Here

TOP

Related Classes of net.sourceforge.jwbf.mediawiki.actions.util.VersionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.