public final class PollwikiG extends Object implements Pollwiki
App.pollwiki()| Constructor and Description |
|---|
PollwikiG() |
| Modifier and Type | Method and Description |
|---|---|
StringBuilder |
appendPageSpecifier(String encodedPageName)
Appends an already encoded page name to the wiki base URL.
|
StringBuilder |
encodePageSpecifier(String pageName)
Encodes a page name and appends it to the wiki base
URL.
|
(package private) static void |
forceInitClass()
Does nothing itself but the call forces static initialization of this class.
|
static String |
getLocation()
The base URL for requesting pages from the pollwiki, without a trailing slash (/).
|
static String |
getScriptLocation()
The base URL for script execution in the pollwiki, without a trailing slash (/).
|
PositionID |
identifyAsPosition(Document page)
Returns the position identifier of the loaded page, or null if the page is not a
position page.
|
PositionID |
identifyAsPosition(String pageName)
Returns the position identifier of the loaded page, or null if the page is not a
position page.
|
boolean |
maybeUgly()
Answers whether the wiki URL might be based on the standard access URL ending in
"index.php" for example, or is definitely based on a pretty alias per
$wgUsePathInfo. |
PipeRecognizer |
pipeRecognizer()
A recognizer of pipes in the pollwiki.
|
String |
positionPageName(String personName,
String pollName)
Returns the page name of the specified position.
|
static void |
setLocation(String s)
Sets the base URL for requesting pages from the pollwiki.
|
static void |
setPipeRecognizer(String pipePrefix,
String pipeSuffix)
Configures the pipe recognizer.
|
static void |
setScriptLocation(String s)
Sets base URL for for script execution in the pollwiki.
|
public PollwikiG()
static void forceInitClass()
public StringBuilder encodePageSpecifier(String pageName)
String href = voteServer.pollwiki().encodePageSpecifier(
"Main page" ).build().toASCIIString();appendPageSpecifier(String)@GWTConfigCallback public static String getLocation()
$wgUsePathInfo.@GWTConfigCallback public static void setLocation(String s)
a_web_gwt_PollwikiG_setLocation( 'http://YOUR.DOM/wiki' );
// defaults to http://SCRIPT-LOCATION/index.phpIllegalArgumentException - if the location ends with a slash '/'
character.getLocation(),
setScriptLocation(String)@GWTConfigCallback public static String getScriptLocation()
http://reluk.ca/mediawiki. Script requests may be
constructed by appending the script path and parameters:getScriptLocation() + "/index.php?oldid=1138"
setScriptLocation(String)@GWTConfigCallback public static void setScriptLocation(String s)
a_web_gwt_PollwikiG_setScriptLocation( 'http://YOUR.DOM/mediawiki' );
// defaults to the standard location http://SERVER.DOM/mediawiki
// where SERVER.DOM is a calculated guess at the web server nameIllegalArgumentException - if the location ends with a slash '/'
character.getScriptLocation()public PositionID identifyAsPosition(Document page)
public PositionID identifyAsPosition(String pageName)
public StringBuilder appendPageSpecifier(String encodedPageName)
Pollwiki
String href = pollwiki.appendPageSpecifier( "Main_page" ).toString();appendPageSpecifier in interface PollwikigetLocation(),
encodePageSpecifier(String)public boolean maybeUgly()
Pollwiki$wgUsePathInfo.maybeUgly in interface PollwikigetLocation()public PipeRecognizer pipeRecognizer()
PollwikipipeRecognizer in interface PollwikisetPipeRecognizer(String,String)@GWTConfigCallback public static void setPipeRecognizer(String pipePrefix, String pipeSuffix)
a_web_gwt_PollwikiG_setPipeRecognizer( 'PREFIX', 'SUFFIX' );
// there are no dependable defaults, you should set values if pipes are enabledpublic String positionPageName(String personName, String pollName)
PollwikipositionPageName in interface PollwikipollName - this parameter is ignored if the named person is actually a
pipe.PositionID.pageName(String,String,PipeRecognizer),
Category:Position