public abstract class MWAction extends Object implements ContentProcessable
| Modifier | Constructor and Description |
|---|---|
protected |
MWAction() |
protected |
MWAction(MediaWiki.Version v)
Deprecated.
do not uses this
|
| Modifier and Type | Method and Description |
|---|---|
static String |
createNsString(int... namespaces)
helper method generating a namespace string as required by the MW-api.
|
protected String |
evaluateXpath(String s,
String xpath) |
protected org.jdom.Element |
getErrorElement(org.jdom.Element rootElement)
Determines if the given XML
Document contains an error message which then would printed
by the logger. |
protected org.jdom.Element |
getRootElement(String xml) |
protected org.jdom.Element |
getRootElementWithError(String xml) |
boolean |
hasMoreMessages() |
boolean |
isSelfExecuter()
Deprecated.
see interface
|
String |
processAllReturningText(String s) |
String |
processReturningText(String s,
HttpAction hm)
Deals with the MediaWiki API's response by parsing the provided text.
|
static void |
setExceptionHandler(ExceptionHandler exceptionHandler)
Deprecated.
no alternative method is given, because it is not recommended to change the
exception handling
|
void |
setHasMoreMessages(boolean b) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNextMessageprotected MWAction()
@Deprecated protected MWAction(MediaWiki.Version v)
v - of the botpublic boolean hasMoreMessages()
hasMoreMessages in interface ContentProcessablepublic void setHasMoreMessages(boolean b)
b - if sopublic String processReturningText(String s, HttpAction hm)
processReturningText in interface ReturningTexts - the answer to the most recently generated MediaWiki API requesthm - the requestor messagepublic String processAllReturningText(String s)
s - the returning textpublic static String createNsString(int... namespaces)
namespaces - namespace as@Deprecated public boolean isSelfExecuter()
isSelfExecuter in interface ContentProcessable@CheckForNull protected org.jdom.Element getErrorElement(org.jdom.Element rootElement)
Document contains an error message which then would printed
by the logger.rootElement - XML Documentorg.jdom.JDOMException - thrown if the document could not be parsed@Deprecated public static void setExceptionHandler(ExceptionHandler exceptionHandler)
Copyright © 2013. All Rights Reserved.