Package net.sourceforge.jwbf.core.actions.util

Examples of net.sourceforge.jwbf.core.actions.util.ProcessException


      log.error(e.getClass().getName() + e.getLocalizedMessage());
    } catch (IOException e) {
      log.error(e.getClass().getName() + e.getLocalizedMessage());
    } catch (NullPointerException e) {
      log.error(e.getClass().getName() + e.getLocalizedMessage());
      throw new ProcessException("No regular content was found, check your api\n::" + s);
    } catch (Exception e) {
      log.error(e.getClass().getName() + e.getLocalizedMessage());
      throw new ProcessException(e.getLocalizedMessage());
    }


    return s;
  }
View Full Code Here


    } else if (result.equalsIgnoreCase(needToken) && reTryLimit ) {
      msg = getLoginMsg(username, pw, domain, loginEl.getAttributeValue("token"));
      reTry = true;
      reTryLimit = false;
    } else if (result.equalsIgnoreCase(wrongPass)) {
      throw new ProcessException("Wrong Password");
    } else if (result.equalsIgnoreCase(notExists)) {
      throw new ProcessException("No such User");
    }

  }
View Full Code Here

    if (title == null || title.length() == 0) {
      throw new IllegalArgumentException("The argument 'title' must not be null or empty");
    }

    if (!bot.getUserinfo().getRights().contains("delete")) {
      throw new ProcessException(
          "The given user doesn't have the rights to delete. "
          + "Add '$wgGroupPermissions['bot']['delete'] = true;' "
          + "to your MediaWiki's LocalSettings.php might solve this problem.");
    }
View Full Code Here

   * @param articlename a
   * @throws ProcessException if arcticlename is empty
   */
  public GetRevision(final String articlename) throws ProcessException {
    if (articlename.length() <= 0) {
      throw new ProcessException("articlename is empty");
    }
    sa = new SimpleArticle();
    sa.setTitle(articlename);

   
View Full Code Here

      while (m.find()) {
        lastP = MediaWiki.decode(m.group(1));
        LOG.error("Upload failed: " + lastP);
      }

      throw new ProcessException("Upload failed - " + lastP);
    }
    return "";
  }
View Full Code Here

   * @param articlename a
   * @throws ProcessException if arcticlename is empty
   */
  public GetRevision(final String articlename) throws ProcessException {
    if (articlename.length() <= 0) {
      throw new ProcessException("articlename is empty");
    }
    sa = new SimpleArticle();
    sa.setTitle(articlename);

   
View Full Code Here

        if (oldtitle == null || oldtitle.length() == 0 || newtitle == null || newtitle.length() == 0) {
            throw new IllegalArgumentException("The arguments 'oldtitle' and 'newtitle' must not be null or empty");
        }

        if (!bot.getUserinfo().getRights().contains("move")) {
            throw new ProcessException(
                    "The given user doesn't have the rights to move. "
                    + "Add '$wgGroupPermissions['bot']['move'] = true;' "
                    + "to your MediaWiki's LocalSettings.php might solve this problem.");
        }

        if (withsubpages && !bot.getUserinfo().getRights().contains("move-subpages")) {
            throw new ProcessException(
                    "The given user doesn't have the rights to move subpages. "
                    + "Add '$wgGroupPermissions['bot']['move-subpages'] = true;' "
                    + "to your MediaWiki's LocalSettings.php might solve this problem.");
        }
    }
View Full Code Here

  throws ProcessException {
    if (s.contains("error")) {
      if (s.length() > 700) {
        s = s.substring(0, 700);
      }
      throw new ProcessException(s);
    }
    if (initOldGet != null && hm.getRequest().equals(initOldGet.getRequest())) {
      getWpValues(s, tab);
      if (log.isDebugEnabled()) {
        log.debug(tab);
View Full Code Here

      root = doc.getRootElement();
      findContent(root);
    } catch (JDOMException e) {
      log.error(e.getClass().getName() + e.getLocalizedMessage());
      log.error(xml);
      throw new ProcessException(e.getLocalizedMessage());
    } catch (IOException e) {
      log.error(e.getClass().getName() + e.getLocalizedMessage());
      throw new ProcessException(e.getLocalizedMessage());
    }
  }
View Full Code Here

    }
    try {
      new URL(urlOfImage);
    } catch (MalformedURLException e) {
      if (bot.getHostUrl().length() <= 0) {
        throw new ProcessException("please use the constructor with hostUrl; "
            + urlOfImage);
      }
      urlOfImage = bot.getHostUrl() + urlOfImage;
    }
    return urlOfImage;
View Full Code Here

TOP

Related Classes of net.sourceforge.jwbf.core.actions.util.ProcessException

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.