C# Class XWiki.Clients.XWikiXMLRPCClient

Interacts with a XWiki server via XML-RPC
The client side xml-rpc is done using a XMlRPC.net(CookComputing)generated proxy.
Inheritance: IXWikiClient
Mostra file Open project: xwiki-contrib/xwiki-office

Public Methods

Method Description
AddAttachment ( string docName, string filePath ) : bool

Adds a file as an attachment to a wiki page.

AddAttachment ( string space, string page, string filePath ) : bool

Adds a file as an attachment to a wiki page.

AddAttachmentAsync ( string docName, string filePath ) : void

Adds a file to a wiki page as an attachment. The data transfer is asynchronuous.

AddAttachmentAsync ( string space, string page, string filePath ) : void

Adds a file to a wiki page as an attachment. The data transfer is asynchronuous.

AddObject ( string docName, string className, System fieldsValues ) : int

Adds and XWiki opbject to a XWiki document.

GetAttachmentContent ( string pageName, string fileName ) : byte[]

Gets the binary data of the attached file.

GetAttachmentURL ( string docFullName, string attachmentName ) : string

Gets the download url of an attachment.

GetConfiguredSyntaxes ( ) : List

Gets the availbale syntaxes for the server's renderer.

GetDefaultServerSyntax ( ) : String

Gets the default wiki syntax of the server.

GetDocumentAttachmentList ( string docFullName ) : List

Gets the names of the attached files of a wiki page.

GetObject ( String pageId, String className, int id ) : XWikiObject

Gets an object from a page.

GetObjects ( String pageId ) : XWiki.XmlRpc.XWikiObjectSummary[]

Gets the objects from a page.

GetPageHistory ( String pageId ) : XWiki.XmlRpc.PageHistorySummary[]

Retrieves the history of a wiki page.

GetPagesNames ( string spaceName ) : List

Gets the pages names of a wiki space.

GetRenderedPageContent ( string pageFullName ) : string

Gets the rendered content of the specified page.

GetRenderedPageContent ( string space, string page ) : string

Gets the rendered content of a page.

GetSpacesNames ( ) : List

Gets the spaces of a wiki.

GetURL ( string documentFullName ) : string

Gets the url of a wiki page for the view action.

Login ( string username, string password ) : bool

Authenticates the user to the server.

RemoveObject ( String pageId, String className, int id ) : void

Removes an object from a page.

SavePageHTML ( string docName, string content, string syntax ) : bool

Sets the html content of a page and then saves the page.

UpdateObject ( string pageFullName, string className, int objectIndex, System fieldsValues ) : String
UpdateObject ( string pageFullName, string className, System fieldsValues ) : void

Updates a xwiki object.

Private Methods

Method Description
AttachFile ( object attachmentInfo ) : void

Attaches a file to a page on the server.

GetAppContext ( ) : String

Gets the app context from the server URL

Login ( ) : void
XWikiXMLRPCClient ( String serverUrl, String username, String password ) : System

XML-RPC implementation of IXWikiCLient. Provides access to the main features of XWiki using the XML-RPC API.

Method Details

AddAttachment() public method

Adds a file as an attachment to a wiki page.
public AddAttachment ( string docName, string filePath ) : bool
docName string Wiki page name - SpaceName.PageName
filePath string The path to the uploaded file.
return bool

AddAttachment() public method

Adds a file as an attachment to a wiki page.
public AddAttachment ( string space, string page, string filePath ) : bool
space string The name of the space.
page string the name of the page.
filePath string The path to the uploaded file.
return bool

AddAttachmentAsync() public method

Adds a file to a wiki page as an attachment. The data transfer is asynchronuous.
public AddAttachmentAsync ( string docName, string filePath ) : void
docName string Wiki page name - SpaceName.PageName
filePath string The path to the uploaded file.
return void

AddAttachmentAsync() public method

Adds a file to a wiki page as an attachment. The data transfer is asynchronuous.
public AddAttachmentAsync ( string space, string page, string filePath ) : void
space string The name of the space.
page string The name of the space.
filePath string The path to the uploaded file.
return void

AddObject() public method

Adds and XWiki opbject to a XWiki document.
public AddObject ( string docName, string className, System fieldsValues ) : int
docName string The name of the XWiki Document.
className string
fieldsValues System The values of the object's properties.
return int

GetAttachmentContent() public method

Gets the binary data of the attached file.
public GetAttachmentContent ( string pageName, string fileName ) : byte[]
pageName string Wiki page name - SpaceName.PageName
fileName string Attached file name
return byte[]

GetAttachmentURL() public method

Gets the download url of an attachment.
public GetAttachmentURL ( string docFullName, string attachmentName ) : string
docFullName string Wiki page name - SpaceName.PageName
attachmentName string
return string

GetConfiguredSyntaxes() public method

Gets the availbale syntaxes for the server's renderer.
public GetConfiguredSyntaxes ( ) : List
return List

GetDefaultServerSyntax() public method

Gets the default wiki syntax of the server.
public GetDefaultServerSyntax ( ) : String
return String

GetDocumentAttachmentList() public method

Gets the names of the attached files of a wiki page.
public GetDocumentAttachmentList ( string docFullName ) : List
docFullName string The full name of the wiki page.
return List

GetObject() public method

Gets an object from a page.
public GetObject ( String pageId, String className, int id ) : XWikiObject
pageId String Page name - SpaceName.PageName.
className String XWiki class name.
id int Index number of the object.
return XWiki.XmlRpc.XWikiObject

GetObjects() public method

Gets the objects from a page.
public GetObjects ( String pageId ) : XWiki.XmlRpc.XWikiObjectSummary[]
pageId String Full page name - SpanceName.PageName
return XWiki.XmlRpc.XWikiObjectSummary[]

GetPageHistory() public method

Retrieves the history of a wiki page.
public GetPageHistory ( String pageId ) : XWiki.XmlRpc.PageHistorySummary[]
pageId String The fullname of the page.
return XWiki.XmlRpc.PageHistorySummary[]

GetPagesNames() public method

Gets the pages names of a wiki space.
public GetPagesNames ( string spaceName ) : List
spaceName string The name of the wiki space.
return List

GetRenderedPageContent() public method

Gets the rendered content of the specified page.
public GetRenderedPageContent ( string pageFullName ) : string
pageFullName string Wiki page name - SpaceName.PageName
return string

GetRenderedPageContent() public method

Gets the rendered content of a page.
public GetRenderedPageContent ( string space, string page ) : string
space string The name of the wiki space.
page string The short name of the page.
return string

GetSpacesNames() public method

Gets the spaces of a wiki.
public GetSpacesNames ( ) : List
return List

GetURL() public method

Gets the url of a wiki page for the view action.
public GetURL ( string documentFullName ) : string
documentFullName string The full name of the wiki page.
return string

Login() public method

Authenticates the user to the server.
public Login ( string username, string password ) : bool
username string
password string
return bool

RemoveObject() public method

Removes an object from a page.
public RemoveObject ( String pageId, String className, int id ) : void
pageId String Full page name - SpaceName.PageName.
className String XWiki class name.
id int Index number of the object.
return void

SavePageHTML() public method

Sets the html content of a page and then saves the page.
public SavePageHTML ( string docName, string content, string syntax ) : bool
docName string Wiki page name - SpaceName.PageName
content string The html source to be saved.
syntax string The syntax to which the source will be converted.
return bool

UpdateObject() public method

public UpdateObject ( string pageFullName, string className, int objectIndex, System fieldsValues ) : String
pageFullName string
className string
objectIndex int
fieldsValues System
return String

UpdateObject() public method

Updates a xwiki object.
public UpdateObject ( string pageFullName, string className, System fieldsValues ) : void
pageFullName string The full name of the page containing the object.
className string The class name of the object.
fieldsValues System Name-value pairs containig corespongin to the field names and values ov the object.
return void