NuxeoDotNetClient  1.0.0 beta
.NET Client for Nuxeo Automation and REST API
Classes | Public Member Functions | Properties | List of all members
NuxeoClient.Client Class Reference

A client that provides all the methods required to perform Automation operations and REST CRUD operations on an instance of the Nuxeo Server. More...

Classes

class  ContentType
 Type of content of a requests. More...
 

Public Member Functions

 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)
 Initializes a new instance of the Nuxeo Client. More...
 
Client SetServerURL (string url)
 Sets the URL of the Nuxeo server. More...
 
Client SetAuthomationPath (string path)
 Sets the path to the Automation endpoint. More...
 
Client SetRestPath (string path)
 Sets the path to the REST API endpoint. More...
 
Client SetAuthorization (Authorization auth)
 Sets the authorization information to be sent in all requests. More...
 
Client SetDefaultSchemas (string[] schemas)
 Sets the default document schemas to be sent in all requests. More...
 
Client AddDefaultSchema (string schema)
 Adds a default document schema to be sent in all requests. More...
 
Client RemoveDefaultSchema (string schema)
 Removes a default schema to be sent in all requests. More...
 
Client ClearDefaultSchemas ()
 Removes all default schemas to be sent in all requests. More...
 
Client SetMarshaller (IMarshaller marshaller)
 Sets the object marshaller for this client. More...
 
Operation Operation (string id)
 Creates a new instance of an Automation Operation. More...
 
Document DocumentFromPath (string path)
 Creates a new instance of a Nuxeo Document. More...
 
Document DocumentFromUid (string uid)
 Creates a new instance of a Nuxeo Document. More...
 
Uploader Uploader ()
 Returns a new instance of Uploader. More...
 
async Task< BatchBatch ()
 Requests a new Batch from the server. More...
 
void Dispose ()
 Releases the unmanaged resources used by the Client and optionally disposes of the managed resources. More...
 

Properties

string ServerURL [get]
 Gets the URL to the Nuxeo Server. More...
 
string AutomationPath [get]
 Gets the path to the Automation API endpoint. More...
 
string RestPath [get]
 Gets the path to the REST API endpoint. More...
 
Authorization Authorization [get]
 Gets the Authorization information to be sent in all requests. More...
 
List< string > DefaultSchemas [get]
 Gets the default document schemas to be sent in all request. More...
 
IMarshaller Marshaller [get]
 Gets or sets the object marshaller for the client. More...
 

Detailed Description

A client that provides all the methods required to perform Automation operations and REST CRUD operations on an instance of the Nuxeo Server.

Definition at line 34 of file Client.cs.

Inheritance diagram for NuxeoClient.Client:

Constructor & Destructor Documentation

NuxeoClient.Client.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 
)

Initializes a new instance of the Nuxeo Client.

Parameters
serverURLThe URL of the Nuxeo server.
authorization
automationPath
restPath
schemas
timeout

Definition at line 88 of file Client.cs.

Member Function Documentation

Client NuxeoClient.Client.AddDefaultSchema ( string  schema)

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

For more details about schemas, check Nuxeo Documentation Center.

Parameters
schemaA string containing the schema's name.
Returns
The current Client instace.

Definition at line 201 of file Client.cs.

async Task<Batch> NuxeoClient.Client.Batch ( )

Requests a new Batch from the server.

Returns
A new Task that will return the Batch object representing the remote batch.

Definition at line 304 of file Client.cs.

Client NuxeoClient.Client.ClearDefaultSchemas ( )

Removes all default schemas to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Returns
The current Client instance.

Definition at line 239 of file Client.cs.

void NuxeoClient.Client.Dispose ( )

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

Definition at line 312 of file Client.cs.

Document NuxeoClient.Client.DocumentFromPath ( string  path)

Creates a new instance of a Nuxeo Document.

Parameters
pathThe remote path to the document.
Returns
A Document object representing the remote document.

Definition at line 271 of file Client.cs.

Document NuxeoClient.Client.DocumentFromUid ( string  uid)

Creates a new instance of a Nuxeo Document.

Parameters
uidThe remote document's UID.
Returns
A Document object representing the remote document.

Definition at line 283 of file Client.cs.

Operation NuxeoClient.Client.Operation ( string  id)

Creates a new instance of an Automation Operation.

Parameters
idThe operation's id.
Returns
A new Operation instance.

Definition at line 261 of file Client.cs.

Client NuxeoClient.Client.RemoveDefaultSchema ( string  schema)

Removes a default schema to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Parameters
schemaA string containing the schema's name.
Returns
The current Client instance.

Definition at line 221 of file Client.cs.

Client NuxeoClient.Client.SetAuthomationPath ( string  path)

Sets the path to the Automation endpoint.

Parameters
pathThe path to the Automation endpoint.
Returns
The current Client instace.

Definition at line 135 of file Client.cs.

Client NuxeoClient.Client.SetAuthorization ( Authorization  auth)

Sets the authorization information to be sent in all requests.

Parameters
authThe authorization data.
Returns
The current Client instace.

Definition at line 157 of file Client.cs.

Client NuxeoClient.Client.SetDefaultSchemas ( string[]  schemas)

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

Parameters
schemasOne or more strings representing schema names.

For more details about schemas, check Nuxeo Documentation Center.

Returns
The current Client instace.

Definition at line 177 of file Client.cs.

Client NuxeoClient.Client.SetMarshaller ( IMarshaller  marshaller)

Sets the object marshaller for this client.

Parameters
marshallerThe object marshaller implementing the IMarshaller interface.
Returns
The current Client instance.

Definition at line 250 of file Client.cs.

Client NuxeoClient.Client.SetRestPath ( string  path)

Sets the path to the REST API endpoint.

Parameters
pathThe path to the REST API endpoint.
Returns
The current Client instace.

Definition at line 146 of file Client.cs.

Client NuxeoClient.Client.SetServerURL ( string  url)

Sets the URL of the Nuxeo server.

Parameters
urlThe Nuxeo server's URL.
Returns
The current Client instace.

Definition at line 116 of file Client.cs.

Uploader NuxeoClient.Client.Uploader ( )

Returns a new instance of Uploader.

Returns
A new Uploader instance.

Definition at line 294 of file Client.cs.

Property Documentation

Authorization NuxeoClient.Client.Authorization
get

Gets the Authorization information to be sent in all requests.

Definition at line 67 of file Client.cs.

string NuxeoClient.Client.AutomationPath
get

Gets the path to the Automation API endpoint.

Definition at line 57 of file Client.cs.

List<string> NuxeoClient.Client.DefaultSchemas
get

Gets the default document schemas to be sent in all request.

Definition at line 72 of file Client.cs.

IMarshaller NuxeoClient.Client.Marshaller
get

Gets or sets the object marshaller for the client.

Definition at line 77 of file Client.cs.

string NuxeoClient.Client.RestPath
get

Gets the path to the REST API endpoint.

Definition at line 62 of file Client.cs.

string NuxeoClient.Client.ServerURL
get

Gets the URL to the Nuxeo Server.

Definition at line 52 of file Client.cs.