|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xwiki.xmlrpc.XWikiXmlRpcClient
public class XWikiXmlRpcClient
This class implements the entry point for using the XWiki XMLRPC API. Methods compatible with Confluence are tagged with the category 'ConfluenceAPI'
| Constructor Summary | |
|---|---|
XWikiXmlRpcClient(String endpoint)
Constructor. |
|
XWikiXmlRpcClient(String endpoint,
String rpcHandler)
Constructor. |
|
| Method Summary | |
|---|---|
org.codehaus.swizzle.confluence.Attachment |
addAttachment(Integer contentId,
org.codehaus.swizzle.confluence.Attachment attachment,
byte[] attachmentData)
Add a new attachment. |
org.codehaus.swizzle.confluence.Comment |
addComment(org.codehaus.swizzle.confluence.Comment comment)
Add a new comment. |
org.codehaus.swizzle.confluence.Space |
addSpace(org.codehaus.swizzle.confluence.Space space)
Add a new space. |
String |
convert(String source,
String initialSyntaxId,
String targetSyntaxId)
Converts a wiki source from a syntax to another syntax. |
byte[] |
getAttachmentData(org.codehaus.swizzle.confluence.Attachment attachment)
Convenience method. |
byte[] |
getAttachmentData(String pageId,
String fileName,
String versionNumber)
Get the binary data associated to the attachment. |
List<org.codehaus.swizzle.confluence.Attachment> |
getAttachments(org.codehaus.swizzle.confluence.PageSummary pageSummary)
Convenience method. |
List<org.codehaus.swizzle.confluence.Attachment> |
getAttachments(String pageId)
Get attachments. |
XWikiClass |
getClass(String className)
Get extended information about a class. |
XWikiClass |
getClass(XWikiClassSummary classSummary)
Convenience method. |
List<XWikiClassSummary> |
getClasses()
Get classes. |
org.codehaus.swizzle.confluence.Comment |
getComment(String commentId)
|
List<org.codehaus.swizzle.confluence.Comment> |
getComments(org.codehaus.swizzle.confluence.PageSummary pageSummary)
Convenience method. |
List<org.codehaus.swizzle.confluence.Comment> |
getComments(String pageId)
Get page comments. |
List<String> |
getInputSyntaxes()
Gets all syntaxes supported by the rendering parsers as an input for a syntax conversion. |
List<XWikiPageHistorySummary> |
getModifiedPagesHistory(Date date,
Integer numberOfResults,
Integer start,
Boolean fromLatest)
Returns a list of XWikiPageHistorySummary containing all the pages that have been modified since a given date in all their versions. |
List<XWikiPageHistorySummary> |
getModifiedPagesHistory(Integer numberOfResults,
Integer start)
Equivalent to getModifiedPagesHistory(new Date(0), numberOfResults, start, true). |
List<XWikiPageHistorySummary> |
getModifiedPagesHistory(Integer numberOfResults,
Integer start,
Boolean fromLatest)
Equivalent to getModifiedPagesHistory(new Date(0), numberOfResults, start, fromLatest). |
XWikiObject |
getObject(String pageId,
String guid)
Get an XWiki object identified by its GUID. |
XWikiObject |
getObject(String pageId,
String className,
Integer id)
Get XWiki object. |
XWikiObject |
getObject(String pageId,
String className,
Integer id,
Integer version)
Get the XWiki object associated with a page at a given version. |
XWikiObject |
getObject(String pageId,
String className,
Integer id,
Integer version,
Integer minorVersion)
Get XWiki objects associated with a page at a given version. |
XWikiObject |
getObject(XWikiObjectSummary xwikiObjectSummary)
Convenience method. |
List<XWikiObjectSummary> |
getObjects(org.codehaus.swizzle.confluence.PageSummary pageSummary)
Convenience method. |
List<XWikiObjectSummary> |
getObjects(String pageId)
Get XWiki objects associated with a page. |
List<XWikiObjectSummary> |
getObjects(String pageId,
Integer version)
Get XWiki objects associated with a page at a given version. |
List<XWikiObjectSummary> |
getObjects(String pageId,
Integer version,
Integer minorVersion)
Get XWiki objects associated with a page at a given version. |
List<String> |
getOutputSyntaxes()
Gets all syntaxes supported by the rendering as an output for a syntax conversion. |
XWikiPage |
getPage(String pageId)
Get full page information and content. |
XWikiPage |
getPage(String pageId,
Integer version)
Get full page information and content at a given version. |
XWikiPage |
getPage(String pageId,
Integer version,
Integer minorVersion)
Get full page information and content at a given version. |
XWikiPage |
getPage(String pageId,
String language)
Get full page information and content in a given language. |
XWikiPage |
getPage(XWikiPageHistorySummary pageHistorySummary)
Convenience method. |
org.codehaus.swizzle.confluence.Page |
getPage(XWikiPageSummary pageSummary)
Convenience method. |
org.codehaus.swizzle.confluence.Page |
getPage(XWikiPageSummary pageSummary,
Integer version)
Convenience method. |
org.codehaus.swizzle.confluence.Page |
getPage(XWikiPageSummary pageSummary,
String language)
Convenience method. |
List<XWikiPageHistorySummary> |
getPageHistory(String pageId)
Get the history of a page. |
List<XWikiPageHistorySummary> |
getPageHistory(XWikiPageSummary pageSummary)
Convenience method. |
List<XWikiPageSummary> |
getPages(org.codehaus.swizzle.confluence.SpaceSummary space)
Convenience method. |
List<XWikiPageSummary> |
getPages(String spaceName)
Get pages in space. |
String |
getRenderedContent(String pageId,
String syntaxId)
Gets the rendered content of an existing document. |
org.codehaus.swizzle.confluence.ServerInfo |
getServerInfo()
Get server info. |
org.codehaus.swizzle.confluence.Space |
getSpace(org.codehaus.swizzle.confluence.SpaceSummary spaceSummary)
Convenience method. |
org.codehaus.swizzle.confluence.Space |
getSpace(String spaceName)
Get information about a given space. |
List<org.codehaus.swizzle.confluence.SpaceSummary> |
getSpaces()
Get spaces. |
void |
login(String username,
String password)
Login with the provided user. |
boolean |
logout()
Logout. |
Boolean |
removeAttachment(org.codehaus.swizzle.confluence.Attachment attachment)
Convenience method. |
Boolean |
removeAttachment(String pageId,
String fileName)
Remove attachment. |
Boolean |
removeComment(String commentId)
Remove a comment. |
Boolean |
removeObject(String pageId,
String className,
Integer id)
Remove an XWiki Object. |
Boolean |
removeObject(XWikiObjectSummary objectSummary)
Convenience method. |
Boolean |
removePage(String pageId)
Remove a page. |
Boolean |
removePage(XWikiPageSummary page)
Convenience method. |
Boolean |
removeSpace(org.codehaus.swizzle.confluence.SpaceSummary spaceSummary)
Convenience method. |
Boolean |
removeSpace(String spaceKey)
Remove space and all of its pages. |
String |
renderContent(String space,
String pageId,
String content)
Render a page or content in HTML. |
String |
renderPageContent(String pageId,
String content,
String sourceSyntaxId,
String targetSyntaxId)
Renders a text in the context of a wiki page. |
List<org.codehaus.swizzle.confluence.SearchResult> |
search(String query,
Integer maxResults)
|
List<org.codehaus.swizzle.confluence.SearchResult> |
searchAllPagesIds()
|
XWikiObject |
storeObject(XWikiObject xwikiObject)
Add an XWiki object. |
XWikiObject |
storeObject(XWikiObject xwikiObject,
Boolean checkVersion)
Store an object and check if the current object's page version matches with the one of the object to be stored. |
XWikiPage |
storePage(org.codehaus.swizzle.confluence.Page page)
Store a page. |
XWikiPage |
storePage(org.codehaus.swizzle.confluence.Page page,
Boolean checkVersion)
Store a page and check if the current page's version matches with the one of the page to be stored. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XWikiXmlRpcClient(String endpoint)
throws MalformedURLException
endpoint - The endpoint for the XMLRPC servlet.
MalformedURLException
public XWikiXmlRpcClient(String endpoint,
String rpcHandler)
throws MalformedURLException
endpoint - The endpoint for the XMLRPC servlet.rpcHandler - The id of the XMLRPC handler.
MalformedURLException| Method Detail |
|---|
public void login(String username,
String password)
throws org.apache.xmlrpc.XmlRpcException
username - the user idpassword - the user password
org.apache.xmlrpc.XmlRpcException - If an invalid username/password was specified or communication problem.
public boolean logout()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public org.codehaus.swizzle.confluence.ServerInfo getServerInfo()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public List<org.codehaus.swizzle.confluence.SpaceSummary> getSpaces()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public org.codehaus.swizzle.confluence.Space getSpace(String spaceName)
throws org.apache.xmlrpc.XmlRpcException
spaceName -
org.apache.xmlrpc.XmlRpcException
public org.codehaus.swizzle.confluence.Space getSpace(org.codehaus.swizzle.confluence.SpaceSummary spaceSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetSpace(String)
public org.codehaus.swizzle.confluence.Space addSpace(org.codehaus.swizzle.confluence.Space space)
throws org.apache.xmlrpc.XmlRpcException
space - The Space object containing information about the new space.
org.apache.xmlrpc.XmlRpcException
public Boolean removeSpace(String spaceKey)
throws org.apache.xmlrpc.XmlRpcException
spaceKey -
org.apache.xmlrpc.XmlRpcException
public Boolean removeSpace(org.codehaus.swizzle.confluence.SpaceSummary spaceSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionremoveSpace(String)
public List<XWikiPageSummary> getPages(String spaceName)
throws org.apache.xmlrpc.XmlRpcException
spaceName -
org.apache.xmlrpc.XmlRpcException
public List<XWikiPageSummary> getPages(org.codehaus.swizzle.confluence.SpaceSummary space)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetPages(String)
public XWikiPage getPage(String pageId)
throws org.apache.xmlrpc.XmlRpcException
pageId -
org.apache.xmlrpc.XmlRpcException
public org.codehaus.swizzle.confluence.Page getPage(XWikiPageSummary pageSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetPage(String)
public XWikiPage getPage(String pageId,
String language)
throws org.apache.xmlrpc.XmlRpcException
pageId - language -
org.apache.xmlrpc.XmlRpcException
public org.codehaus.swizzle.confluence.Page getPage(XWikiPageSummary pageSummary,
String language)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetPage(String, String)
public XWikiPage getPage(String pageId,
Integer version)
throws org.apache.xmlrpc.XmlRpcException
pageId - version -
org.apache.xmlrpc.XmlRpcException
public org.codehaus.swizzle.confluence.Page getPage(XWikiPageSummary pageSummary,
Integer version)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetPage(String, Integer)
public XWikiPage getPage(String pageId,
Integer version,
Integer minorVersion)
throws org.apache.xmlrpc.XmlRpcException
pageId - version -
org.apache.xmlrpc.XmlRpcException
public XWikiPage getPage(XWikiPageHistorySummary pageHistorySummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetPage(String, Integer, Integer)
public List<XWikiPageHistorySummary> getPageHistory(String pageId)
throws org.apache.xmlrpc.XmlRpcException
pageId -
org.apache.xmlrpc.XmlRpcException
public List<XWikiPageHistorySummary> getPageHistory(XWikiPageSummary pageSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetPageHistory(String)
public XWikiPage storePage(org.codehaus.swizzle.confluence.Page page)
throws org.apache.xmlrpc.XmlRpcException
page -
org.apache.xmlrpc.XmlRpcException
public Boolean removePage(String pageId)
throws org.apache.xmlrpc.XmlRpcException
pageId -
org.apache.xmlrpc.XmlRpcException
public Boolean removePage(XWikiPageSummary page)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionremovePage(String)
public String renderContent(String space,
String pageId,
String content)
throws org.apache.xmlrpc.XmlRpcException
space - IgnoredpageId - The page id in the form of Space.Pagecontent - The content to be rendered. If content == "" then the page content is rendered.
org.apache.xmlrpc.XmlRpcException - XmlRpcException If the page does not exist or the user has not the right to access it.
public List<org.codehaus.swizzle.confluence.Comment> getComments(String pageId)
throws org.apache.xmlrpc.XmlRpcException
pageId -
org.apache.xmlrpc.XmlRpcException
public List<org.codehaus.swizzle.confluence.Comment> getComments(org.codehaus.swizzle.confluence.PageSummary pageSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetComments(String)
public org.codehaus.swizzle.confluence.Comment getComment(String commentId)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public org.codehaus.swizzle.confluence.Comment addComment(org.codehaus.swizzle.confluence.Comment comment)
throws org.apache.xmlrpc.XmlRpcException
comment - A Comment object containing the comment to be added.
org.apache.xmlrpc.XmlRpcException
public Boolean removeComment(String commentId)
throws org.apache.xmlrpc.XmlRpcException
commentId -
org.apache.xmlrpc.XmlRpcException
public List<org.codehaus.swizzle.confluence.Attachment> getAttachments(String pageId)
throws org.apache.xmlrpc.XmlRpcException
pageId -
org.apache.xmlrpc.XmlRpcException
public List<org.codehaus.swizzle.confluence.Attachment> getAttachments(org.codehaus.swizzle.confluence.PageSummary pageSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetAttachments(String)
public byte[] getAttachmentData(String pageId,
String fileName,
String versionNumber)
throws org.apache.xmlrpc.XmlRpcException
pageId - fileName - versionNumber - Ignored.
org.apache.xmlrpc.XmlRpcException
public byte[] getAttachmentData(org.codehaus.swizzle.confluence.Attachment attachment)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetAttachmentData(String, String, String)
public org.codehaus.swizzle.confluence.Attachment addAttachment(Integer contentId,
org.codehaus.swizzle.confluence.Attachment attachment,
byte[] attachmentData)
throws org.apache.xmlrpc.XmlRpcException
contentId - Ignored. (It is here because the Confluence API signature declares it)attachment - The Attachment object describing the attachment.attachmentData - The actual attachment data.
org.apache.xmlrpc.XmlRpcException
public Boolean removeAttachment(String pageId,
String fileName)
throws org.apache.xmlrpc.XmlRpcException
pageId - fileName -
org.apache.xmlrpc.XmlRpcException
public Boolean removeAttachment(org.codehaus.swizzle.confluence.Attachment attachment)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionremoveAttachment(String, String)
public List<XWikiClassSummary> getClasses()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public XWikiClass getClass(String className)
throws org.apache.xmlrpc.XmlRpcException
className -
org.apache.xmlrpc.XmlRpcException
public XWikiClass getClass(XWikiClassSummary classSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetClass(String)
public List<XWikiObjectSummary> getObjects(String pageId)
throws org.apache.xmlrpc.XmlRpcException
pageId -
org.apache.xmlrpc.XmlRpcException
public List<XWikiObjectSummary> getObjects(String pageId,
Integer version)
throws org.apache.xmlrpc.XmlRpcException
pageId - version -
org.apache.xmlrpc.XmlRpcException
public List<XWikiObjectSummary> getObjects(String pageId,
Integer version,
Integer minorVersion)
throws org.apache.xmlrpc.XmlRpcException
pageId - version - minorVersion -
org.apache.xmlrpc.XmlRpcException
public List<XWikiObjectSummary> getObjects(org.codehaus.swizzle.confluence.PageSummary pageSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetObjects(PageSummary)
public XWikiObject getObject(String pageId,
String className,
Integer id)
throws org.apache.xmlrpc.XmlRpcException
pageId - className - id - The XWiki object id.
org.apache.xmlrpc.XmlRpcException
public XWikiObject getObject(String pageId,
String guid)
throws org.apache.xmlrpc.XmlRpcException
pageId - the document holding the object.guid - the object's GUID.
org.apache.xmlrpc.XmlRpcException
public XWikiObject getObject(String pageId,
String className,
Integer id,
Integer version)
throws org.apache.xmlrpc.XmlRpcException
pageId - className - id - version -
org.apache.xmlrpc.XmlRpcException
public XWikiObject getObject(String pageId,
String className,
Integer id,
Integer version,
Integer minorVersion)
throws org.apache.xmlrpc.XmlRpcException
pageId - className - id - version - minorVersion -
org.apache.xmlrpc.XmlRpcException
public XWikiObject getObject(XWikiObjectSummary xwikiObjectSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptiongetObject(String, String, Integer)
public XWikiObject storeObject(XWikiObject xwikiObject)
throws org.apache.xmlrpc.XmlRpcException
xwikiObject -
org.apache.xmlrpc.XmlRpcException
public Boolean removeObject(String pageId,
String className,
Integer id)
throws org.apache.xmlrpc.XmlRpcException
pageId - className - id -
org.apache.xmlrpc.XmlRpcException
public Boolean removeObject(XWikiObjectSummary objectSummary)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionremoveObject(String, String, Integer)
public List<org.codehaus.swizzle.confluence.SearchResult> search(String query,
Integer maxResults)
throws org.apache.xmlrpc.XmlRpcException
query - The string to be looked for.maxResults - (0 for all)
org.apache.xmlrpc.XmlRpcException
public List<org.codehaus.swizzle.confluence.SearchResult> searchAllPagesIds()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public List<XWikiPageHistorySummary> getModifiedPagesHistory(Date date,
Integer numberOfResults,
Integer start,
Boolean fromLatest)
throws org.apache.xmlrpc.XmlRpcException
date - The starting datenumberOfResults - The number of results to be returnedstart - The start offset in the result setfromLatest - True if the result set will list recent changed pages before.
org.apache.xmlrpc.XmlRpcException
QueryException
public List<XWikiPageHistorySummary> getModifiedPagesHistory(Integer numberOfResults,
Integer start,
Boolean fromLatest)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public List<XWikiPageHistorySummary> getModifiedPagesHistory(Integer numberOfResults,
Integer start)
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException
public XWikiPage storePage(org.codehaus.swizzle.confluence.Page page,
Boolean checkVersion)
throws org.apache.xmlrpc.XmlRpcException
page - The page to be stored.checkVersion - True if the version has to be checked.
org.apache.xmlrpc.XmlRpcException
public XWikiObject storeObject(XWikiObject xwikiObject,
Boolean checkVersion)
throws org.apache.xmlrpc.XmlRpcException
xwikiObject - The object to be stored.checkVersion - True if the version has to be checked.
org.apache.xmlrpc.XmlRpcException
public String convert(String source,
String initialSyntaxId,
String targetSyntaxId)
throws org.apache.xmlrpc.XmlRpcException
source - The content to be converted.initialSyntaxId - The initial syntax of the source.targetSyntaxId - The final syntax of the returned content.
org.apache.xmlrpc.XmlRpcException - An invalid token is provided, the syntaxId is not supported, the source is invalid or the
conversion fails.
public List<String> getInputSyntaxes()
throws org.apache.xmlrpc.XmlRpcException
Exception - An invalid token is provided or the syntax lookup fails.
org.apache.xmlrpc.XmlRpcException
public List<String> getOutputSyntaxes()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcException - An invalid token is provided or the syntax lookup fails.
public String renderPageContent(String pageId,
String content,
String sourceSyntaxId,
String targetSyntaxId)
throws org.apache.xmlrpc.XmlRpcException
pageId - The id of the page.content - The contenxt to be rendered.sourceSyntaxId - The syntax of the content.targetSyntaxId - The target syntax of the rendered content
org.apache.xmlrpc.XmlRpcException - If a invalid token is provided, an unsuported syntax id is given or the rendering fails.
public String getRenderedContent(String pageId,
String syntaxId)
throws org.apache.xmlrpc.XmlRpcException
pageId - The id of the page.syntaxId - The target syntax of the rendered content
Exception - If a invalid token is provided, an unsuported syntax id is given or the rendering fails.
org.apache.xmlrpc.XmlRpcException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||