@ThreadSafe public static final class CoreRevision.U extends Object
Modifier and Type | Field and Description |
---|---|
static String |
read_QUERY
The encoded form of the minimal query parameters required for the read and
readPartial
constructors.
|
Modifier and Type | Method and Description |
---|---|
static List<Throwable> |
partialFromPageNames(List<? extends CharSequence> pageNameList,
List<CoreRevision> toCores,
Class<? extends ComponentPipeRevision> componentPipeClass,
PollwikiVS wiki,
List<Throwable> userXList,
boolean toContinue)
Partially constructs the lastest revision of each specified core page and
appends it to the provided list.
|
static List<Throwable> |
partialFromRevs(List<Integer> revList,
List<CoreRevision> toCores,
Class<? extends ComponentPipeRevision> componentPipeClass,
PollwikiVS wiki,
List<Throwable> userXList,
boolean toContinue)
Partially constructs the specified core revisions and appends them to the
provided list.
|
static CoreRevision |
read(XMLStreamReader xml,
PollwikiVS wiki,
Class<? extends ComponentPipeRevision> componentPipeClass,
String contextPersonName,
CountSource countSource)
Attempts to fully construct the context view
of a CoreRevision from a page query.
|
static CoreRevision |
readPartial(XMLStreamReader xml,
PollwikiVS wiki,
Class<? extends ComponentPipeRevision> componentPipeClass)
Attempts to partially construct a CoreRevision from a page query.
|
public static final String read_QUERY
public static List<Throwable> partialFromPageNames(List<? extends CharSequence> pageNameList, List<CoreRevision> toCores, Class<? extends ComponentPipeRevision> componentPipeClass, PollwikiVS wiki, List<Throwable> userXList, boolean toContinue) throws IOException
toCores
- the list to which the partially constructed cores are to be
appended.componentPipeClass
- the class of component pipe revisions to
construct: ComponentPipeRevision1,
ComponentPipeRevisionL, or null for
neither.userXList
- a pre-constructed list to which any user actionable
exceptions are to be appended, or null if none was pre-constructed.
Provide ENLIST_NONE to instead force
the immediate throwing of such exceptions.toContinue
- whether to continue in the event of a missing page
(true), or instead to throw a NoSuchPage exception (false).MediaWiki.NoSuchPage
- if toContinue is false and a page is missing.IOException
public static List<Throwable> partialFromRevs(List<Integer> revList, List<CoreRevision> toCores, Class<? extends ComponentPipeRevision> componentPipeClass, PollwikiVS wiki, List<Throwable> userXList, boolean toContinue) throws IOException
toCores
- the list to which the partially constructed cores are to be
appended.componentPipeClass
- the class of component pipe revisions to
construct: ComponentPipeRevision1,
ComponentPipeRevisionL, or null for
neither.userXList
- a pre-constructed list to which any user actionable
exceptions are to be appended, or null if none was pre-constructed.
Provide ENLIST_NONE to instead force
the immediate throwing of such exceptions.toContinue
- whether to continue in the event of a non-existent
revision (true), or instead to throw a NoSuchRev exception (false).MediaWiki.NoSuchRev
- if toContinue is false and a revision does not
exist.IOException
public static CoreRevision read(XMLStreamReader xml, PollwikiVS wiki, Class<? extends ComponentPipeRevision> componentPipeClass, String contextPersonName, CountSource countSource) throws IOException, XMLStreamException
xml
- a reader for the response to a page query in which at least one
'page' element might remain to be read. The query must cover prop
'info|revisions' (in order) and rvprop 'content', where the content is
for section 0 only. See for example read_QUERY.componentPipeClass
- the class of component pipe revisions to
construct: ComponentPipeRevision1,
ComponentPipeRevisionL, or null for
neither.contextPersonName
- the name of the person from whose viewpoint the
revision will be viewed (context person), or null if there is no context
person.countSource
- for possible use during this call. It is never used if
there is no context person.MediaWiki.NoSuchItem
- if the page or revision (whichever is
requested) does not exist.IOException
XMLStreamException
public static CoreRevision readPartial(XMLStreamReader xml, PollwikiVS wiki, Class<? extends ComponentPipeRevision> componentPipeClass) throws IOException, XMLStreamException
xml
- a reader for the response to a page query in which at least one
'page' element might remain to be read. The query must cover prop
'info|revisions' (in order) and rvprop 'content', where the content is
for section 0 only. See for example read_QUERY.componentPipeClass
- the class of component pipe revisions to
construct: ComponentPipeRevision1,
ComponentPipeRevisionL, or null for
neither.MediaWiki.NoSuchItem
- if the page or revision (whichever is
requested) does not exist.IOException
XMLStreamException