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

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


      loginChangeUserInfo = true;
      if (getVersion() == Version.UNKNOWN) {
        loginChangeVersion = true;
      }
    } catch (ProcessException e) {
      throw new ActionException(e.getLocalizedMessage());
    } catch (RuntimeException e) {
      throw new ActionException(e);
    }

  }
View Full Code Here


   *
   */
  public synchronized void writeContent(final SimpleArticle simpleArticle)
  throws ActionException, ProcessException {
    if (!isLoggedIn()) {
      throw new ActionException("Please login first");
    }

    for (char invChar : INVALID_LABEL_CHARS) { // FIXME Replace with a REGEX
      if (simpleArticle.getTitle().contains(invChar + "")) {
        throw new ActionException("Invalid character in label\""
            + simpleArticle.getTitle() + "\" : \"" + invChar + "\"");
      }
    }


View Full Code Here

   */
  @Override
  public synchronized String performAction(ContentProcessable a)
  throws ActionException, ProcessException {
    if (a.isSelfExecuter()) {
      throw new ActionException("this is a selfexcecuting action, "
          + "please do not perform this action manually");
    }
    return super.performAction(a);
  }
View Full Code Here

   * @throws VersionException on wrong MediaWiki version
   */
  public FileUpload(final SimpleFile a, MediaWikiBot bot) throws ActionException, VersionException {
    super(bot.getVersion());
    if (!a.getFile().isFile() || !a.getFile().canRead()) {
      throw new ActionException("no such file " + a.getFile());
    }

    if (!bot.isLoggedIn()) {
      throw new ActionException("Please login first");
    }


    this.a = a;
    String uS = "/index.php?title="
View Full Code Here

          res.getEntity().consumeContent();
        }


      } catch (IOException e1) {
        throw new ActionException(e1);
      } catch (IllegalArgumentException e2) {
        e2.printStackTrace();
        throw new ActionException(e2);
      }

    }
    return out;
View Full Code Here

  public ZimWikiBot(File rootFolder) {
    // specify the path to all zim files
    this.rootFolder = rootFolder;
  }
  public void login(String user, String passwd) throws ActionException {
    throw new ActionException(
        "login is not supported because this is a desktopwiki");

  }
View Full Code Here

    return readContent(name, 0 );

  }

  public void login(String user, String passwd) throws ActionException {
    throw new ActionException("Login is not supported");

  }
View Full Code Here

  }


  public void writeContent(SimpleArticle sa) throws ActionException,
      ProcessException {
    throw new ActionException("Writing is not supported");

  }
View Full Code Here

  }


  public void postDelete(String title) throws ActionException,
      ProcessException {
    throw new ActionException("Deleting is not supported");

  }
View Full Code Here

   * @throws ActionException a
   */
  public PostModifyContent(MediaWikiBot bot, final SimpleArticle a) throws ActionException, ProcessException {
    super(bot.getVersion());
    if (a.getTitle().length() < 1) {
      throw new ActionException("imposible request, no title");
    }
    this.a = a;
    this.bot = bot;
  }
View Full Code Here

TOP

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

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.