C# Класс XWiki.Clients.XWikiHTTPClient

Adaptor over System.Net.WebClient Uses plain HTTP calls to send and retrieve data from the XWiki server Service pages on the server are in the MSOffice space
Наследование: IXWikiClient
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddAttachment ( string docName, string filePath ) : bool

Adds an attachment to the wiki.

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

Attaches a file to the wiki.

AddAttachmentAsync ( string docName, string filePath ) : void

Attaches a file to the wiki by using an async call.

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

Attaches a file to the wiki by using an async call.

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

Adds an object to a wiki page.

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

Gets the content of an attachment.

GetAttachmentURL ( string docFullName, string attachmentName ) : string

Gets the url of an attachment.

GetConfiguredSyntaxes ( ) : List

Gets the availbale syntaxes for the server's rendered.

GetDefaultServerSyntax ( ) : String

Gets the default wiki syntax of the server.

GetDocumentAttachmentList ( string docFullName ) : List

Gets a list with the attachmets' names of the specified 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[]
GetPagesNames ( string spaceName ) : List

Gets the pages names for the specified space.

GetRenderedPageContent ( string pageFullName ) : string

Gets the rendered content of a page.

GetRenderedPageContent ( string space, string page ) : string

Gets the rendered page 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.

OpenRead ( String address ) : Stream

Starts reading from an address.

OpenRead ( Uri address ) : Stream

Starts reading from an address.

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

Removes an object from a page.

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

Saves the content of the page in the specified syntax.

UpdateObject ( string pageFullName, string className, int objectIndex, System fieldsValues ) : String
UpdateObject ( string pageFullName, string className, System fieldsValues ) : void
UploadData ( Uri address, byte data ) : byte[]

Uploads data to the server.

UploadData ( Uri address, string method, byte data ) : byte[]

Uploads data to the server.

UploadData ( string address, byte data ) : byte[]

Uploads data to the server.

UploadData ( string address, string method, byte data ) : byte[]

Uploads data to the server.

UploadValues ( string address, System values ) : byte[]

Uploads(POSTs) the values to the server.

UploadValues ( string address, string method, System values ) : byte[]

Uploads the values to the server.

Приватные методы

Метод Описание
ConvertEncoding ( string content ) : String

Converts a string to a specified encoding.

DownloadData ( String address ) : byte[]

Downloads data from the server.

DownloadData ( Uri address ) : byte[]

Downloads data from the server.

Encoding ( ) : Encoding

Gets the encoding of the wiki instance.

GetAttachmentContent ( string URL ) : byte[]

Get the content of an attachment.

GetCookie ( String searchedCookie, String cookiesString ) : String

Parses the cookies for the server response and returns the requested value. Returns "" if the searched value is not found.

InsertCookies ( ) : void

Inserts the authetication cookies into the request headers.

Login ( ) : bool

Authenticates the user to the server.

ParseList ( String input ) : List

Parses a velocity response into a list.

XWikiHTTPClient ( String serverURL, String username, String password ) : System

Описание методов

AddAttachment() публичный Метод

Adds an attachment to the wiki.
public AddAttachment ( string docName, string filePath ) : bool
docName string The full name of the wiki page.
filePath string The path to the file to be attached.
Результат bool

AddAttachment() публичный Метод

Attaches a file to the wiki.
public AddAttachment ( string space, string page, string filePath ) : bool
space string The space name.
page string The short page name.
filePath string The path to the file to be attached.
Результат bool

AddAttachmentAsync() публичный Метод

Attaches a file to the wiki by using an async call.
public AddAttachmentAsync ( string docName, string filePath ) : void
docName string The full name of the wiki page.
filePath string The path to the file to be attached.
Результат void

AddAttachmentAsync() публичный Метод

Attaches a file to the wiki by using an async call.
public AddAttachmentAsync ( string space, string page, string filePath ) : void
space string The space name.
page string The short page name.
filePath string The path to the file to be attached.
Результат void

AddObject() публичный Метод

Adds an object to a wiki page.
Thrown every time. Method is not implemented for XWikiHTTPClient.
public AddObject ( string docName, string ClassName, System fieldsValues ) : int
docName string The fullname of the wiki page.
ClassName string The xwiki class name of the object.
fieldsValues System The values of the object's fields.
Результат int

GetAttachmentContent() публичный Метод

Gets the content of an attachment.
public GetAttachmentContent ( string pageName, string fileName ) : byte[]
pageName string The full name of the wiki page.
fileName string The name of the attachment.
Результат byte[]

GetAttachmentURL() публичный Метод

Gets the url of an attachment.
public GetAttachmentURL ( string docFullName, string attachmentName ) : string
docFullName string The full name of the wiki page.
attachmentName string The name of the attachment.
Результат string

GetConfiguredSyntaxes() публичный Метод

Gets the availbale syntaxes for the server's rendered.
public GetConfiguredSyntaxes ( ) : List
Результат List

GetDefaultServerSyntax() публичный Метод

Gets the default wiki syntax of the server.
public GetDefaultServerSyntax ( ) : String
Результат String

GetDocumentAttachmentList() публичный Метод

Gets a list with the attachmets' names of the specified page.
public GetDocumentAttachmentList ( string docFullName ) : List
docFullName string THe full name of the wiki page.
Результат List

GetObject() публичный Метод

Gets an object from a page.
Thrown every time. Method is not implemented for XWikiHTTPClient.
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.
Результат XWiki.XmlRpc.XWikiObject

GetObjects() публичный Метод

Gets the objects from a page.
Thrown every time. Method is not implemented for XWikiHTTPClient.
public GetObjects ( String pageId ) : XWiki.XmlRpc.XWikiObjectSummary[]
pageId String Full page name - SpanceName.PageName
Результат XWiki.XmlRpc.XWikiObjectSummary[]

GetPageHistory() публичный Метод

public GetPageHistory ( String pageId ) : XWiki.XmlRpc.PageHistorySummary[]
pageId String
Результат XWiki.XmlRpc.PageHistorySummary[]

GetPagesNames() публичный Метод

Gets the pages names for the specified space.
public GetPagesNames ( string spaceName ) : List
spaceName string The name of the space.
Результат List

GetRenderedPageContent() публичный Метод

Gets the rendered content of a page.
public GetRenderedPageContent ( string pageFullName ) : string
pageFullName string The full name of the wiki page.
Результат string

GetRenderedPageContent() публичный Метод

Gets the rendered page content of a page.
public GetRenderedPageContent ( string space, string page ) : string
space string The space name.
page string The page name.
Результат string

GetSpacesNames() публичный Метод

Gets the spaces of a wiki.
public GetSpacesNames ( ) : List
Результат List

GetURL() публичный Метод

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.
Результат string

Login() публичный Метод

Authenticates the user to the server.
public Login ( string username, string password ) : bool
username string The username.
password string The password.
Результат bool

OpenRead() публичный Метод

Starts reading from an address.
public OpenRead ( String address ) : Stream
address String The adress.
Результат Stream

OpenRead() публичный Метод

Starts reading from an address.
public OpenRead ( Uri address ) : Stream
address System.Uri The adress.
Результат Stream

RemoveObject() публичный Метод

Removes an object from a page.
Thrown every time. Method is not implemented for XWikiHTTPClient.
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.
Результат void

SavePageHTML() публичный Метод

Saves the content of the page in the specified syntax.
public SavePageHTML ( string docName, string content, string syntax ) : bool
docName string The full name of the page.
content string The html content to be converted.
syntax string The syntax in wich the html code will be converted.
Результат bool

UpdateObject() публичный Метод

public UpdateObject ( string pageFullName, string className, int objectIndex, System fieldsValues ) : String
pageFullName string
className string
objectIndex int
fieldsValues System
Результат String

UpdateObject() публичный Метод

public UpdateObject ( string pageFullName, string className, System fieldsValues ) : void
pageFullName string
className string
fieldsValues System
Результат void

UploadData() публичный Метод

Uploads data to the server.
public UploadData ( Uri address, byte data ) : byte[]
address System.Uri The adress where the data will be uploaded.
data byte The data that will be uploaded.
Результат byte[]

UploadData() публичный Метод

Uploads data to the server.
public UploadData ( Uri address, string method, byte data ) : byte[]
address System.Uri The adress where the data will be uploaded.
method string The web method used to upload the data.
data byte The data that will be uploaded.
Результат byte[]

UploadData() публичный Метод

Uploads data to the server.
public UploadData ( string address, byte data ) : byte[]
address string The adress where the data will be uploaded.
data byte The data that will be uploaded.
Результат byte[]

UploadData() публичный Метод

Uploads data to the server.
public UploadData ( string address, string method, byte data ) : byte[]
address string The adress where the data will be uploaded.
method string The web method used to upload the data.
data byte The data that will be uploaded.
Результат byte[]

UploadValues() публичный Метод

Uploads(POSTs) the values to the server.
public UploadValues ( string address, System values ) : byte[]
address string The adress where the values are uploaded.
values System Name value collection with the upload data.
Результат byte[]

UploadValues() публичный Метод

Uploads the values to the server.
public UploadValues ( string address, string method, System values ) : byte[]
address string The adress where the values are uploaded.
method string The mothod used to send data to the server.
values System Name value collection with the upload data.
Результат byte[]