C# Класс NuxeoClient.Client

A client that provides all the methods required to perform Automation operations and REST CRUD operations on an instance of the Nuxeo Server.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddDefaultSchema ( string schema ) : Client

Adds a default document schema to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Batch ( ) : Task

Requests a new Batch from the server.

ClearDefaultSchemas ( ) : Client

Removes all default schemas to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Client ( string serverURL = "http://localhost:8080/nuxeo/", Authorization authorization = null, string automationPath = "api/v1/automation/", string restPath = "api/v1/", string schemas = null, int timeout = 30 ) : Newtonsoft.Json

Initializes a new instance of the Nuxeo Client.

Dispose ( ) : void

Releases the unmanaged resources used by the Client and optionally disposes of the managed resources.

DocumentFromPath ( string path ) : Document

Creates a new instance of a Nuxeo Document.

DocumentFromUid ( string uid ) : Document

Creates a new instance of a Nuxeo Document.

Operation ( string id ) : Operation

Creates a new instance of an Automation Operation.

RemoveDefaultSchema ( string schema ) : Client

Removes a default schema to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Request ( RequestType type, string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task

Performs a RESTful request to the Nuxeo Server.

SetAuthomationPath ( string path ) : Client

Sets the path to the Automation endpoint.

SetAuthorization ( Authorization auth ) : Client

Sets the authorization information to be sent in all requests.

SetDefaultSchemas ( string schemas ) : Client

Sets the default document schemas to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

SetMarshaller ( IMarshaller marshaller ) : Client

Sets the object marshaller for this client.

SetRestPath ( string path ) : Client

Sets the path to the REST API endpoint.

SetServerURL ( string url ) : Client

Sets the URL of the Nuxeo server.

SetTimemout ( int timeout ) : Client

Sets the default reques timeout.

Uploader ( ) : Uploader

Returns a new instance of Uploader.

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

Метод Описание
AddBlobToMultipartContent ( MultipartContent content, Blob blob ) : void
BuildMultipartContent ( JToken data ) : MultipartContent
Delete ( string endpoint, QueryParams parameters = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
Get ( string endpoint, QueryParams parameters = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
Post ( string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
PostBin ( string endpoint, QueryParams parameters = null, byte data = null, string>.Dictionary additionalHeaders = null ) : Task
ProcessRequest ( HttpRequestMessage request, string>.Dictionary additionalHeaders = null ) : Task
ProcessResponse ( HttpResponseMessage response ) : Task
Put ( string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
RequestBin ( string endpoint, QueryParams parameters = null, byte data = null, HttpMethod httpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.OCTETSTREAM ) : Task
RequestJson ( string endpoint, QueryParams parameters = null, JToken data = null, HttpMethod httpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
RequestMultipart ( string endpoint, JToken data, Blob input, HttpMethod htttpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.NXREQUEST ) : Task
RequestMultipart ( string endpoint, JToken data, BlobList input, HttpMethod htttpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.NXREQUEST ) : Task

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

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

Adds a default document schema to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public AddDefaultSchema ( string schema ) : Client
schema string A string containing the schema's name.
Результат Client

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

Requests a new Batch from the server.
public Batch ( ) : Task
Результат Task

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

Removes all default schemas to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public ClearDefaultSchemas ( ) : Client
Результат Client

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

Initializes a new instance of the Nuxeo Client.
public Client ( string serverURL = "http://localhost:8080/nuxeo/", Authorization authorization = null, string automationPath = "api/v1/automation/", string restPath = "api/v1/", string schemas = null, int timeout = 30 ) : Newtonsoft.Json
serverURL string The URL of the Nuxeo server.
authorization Authorization The authorization credentials.
automationPath string The Automation API path.
restPath string The REST API path.
schemas string The default schemas to be used in the requests.
timeout int The default request timeout.
Результат Newtonsoft.Json

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

Releases the unmanaged resources used by the Client and optionally disposes of the managed resources.
public Dispose ( ) : void
Результат void

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

Creates a new instance of a Nuxeo Document.
public DocumentFromPath ( string path ) : Document
path string The remote path to the document.
Результат Document

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

Creates a new instance of a Nuxeo Document.
public DocumentFromUid ( string uid ) : Document
uid string The remote document's UID.
Результат Document

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

Creates a new instance of an Automation Operation.
public Operation ( string id ) : Operation
id string The operation's id.
Результат Operation

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

Removes a default schema to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public RemoveDefaultSchema ( string schema ) : Client
schema string A string containing the schema's name.
Результат Client

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

Performs a RESTful request to the Nuxeo Server.
public Request ( RequestType type, string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
type RequestType The type of the request.
endpoint string The end point, following "api/v1/".
parameters QueryParams The query parameters to follow the url.
data JToken The JSON data to be send.
additionalHeaders string>.Dictionary The additional request headers, besides those already specified in the client.
contentType string The type of the content to be sent.
Результат Task

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

Sets the path to the Automation endpoint.
public SetAuthomationPath ( string path ) : Client
path string The path to the Automation endpoint.
Результат Client

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

Sets the authorization information to be sent in all requests.
public SetAuthorization ( Authorization auth ) : Client
auth Authorization The authorization data.
Результат Client

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

Sets the default document schemas to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public SetDefaultSchemas ( string schemas ) : Client
schemas string One or more strings representing schema names.
Результат Client

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

Sets the object marshaller for this client.
public SetMarshaller ( IMarshaller marshaller ) : Client
marshaller IMarshaller The object marshaller implementing the interface.
Результат Client

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

Sets the path to the REST API endpoint.
public SetRestPath ( string path ) : Client
path string The path to the REST API endpoint.
Результат Client

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

Sets the URL of the Nuxeo server.
public SetServerURL ( string url ) : Client
url string The Nuxeo server's URL.
Результат Client

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

Sets the default reques timeout.
public SetTimemout ( int timeout ) : Client
timeout int The timeout.
Результат Client

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

Returns a new instance of Uploader.
public Uploader ( ) : Uploader
Результат Uploader