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

Represents a remote Document in a Nuxeo server. More...

Public Member Functions

 Document ()
 Initializes a new instance of Document. More...
 
Document AddHeader (string name, string value)
 Adds a custom header to be used in the next request. More...
 
Document RemoveHeader (string name)
 Removes a custom header, which will no longer be sent in the next request. More...
 
Document SetSchemas (string[] schemas)
 Sets a list document schemas to be sent in the next request. More...
 
Document AddSchema (string schema)
 Adds a document schema to be sent in the next request. More...
 
Document RemoveSchema (string schema)
 Removes a document schema, which will no longer be sent in the next request. More...
 
Document SetContentEnrichers (string[] enrichers)
 Sets the list of content enrichers to be used in the next request. More...
 
Document AddContentEnricher (string enricher)
 Adds a content enricher to be used in the next request. More...
 
Document RemoveContentEnricher (string enricher)
 Removes a content enricher, which will no longer be used in the next request. More...
 
Document SetClient (Client client)
 Sets the Nuxeo Client through which operations to this document can be performed. More...
 
Document SetRepository (string repository)
 Sets the document's repository. More...
 
Document SetUid (string uid)
 Sets the document's uid. More...
 
Document SetPath (string path)
 Sets the document's path. More...
 
Document SetName (string name)
 Sets the document's name. More...
 
Document SetType (string type)
 Sets the document's type. More...
 
Document SetTitle (string title)
 Sets the document's title. More...
 
Document SetProperties (Properties properties)
 Sets the document's properties. More...
 
Document SetContextParameters (Properties contextParameters)
 Sets the document's context parameters. More...
 
async Task< EntityFetch ()
 Fetches the document from the server. A BusinessObject is returned instead if a BusinessAdapter is set via SetAdapter(Adapter). More...
 
async Task< EntityCreate (Entity entity)
 Creates a child of this document. More...
 
async Task< EntityUpdate (Entity entity)
 Updates a child of this document. More...
 
async Task< EntityDelete ()
 Deletes this document on the remote server. More...
 
Document Set (string name, JToken value)
 Sets a (dirty) property of the document. No changes will be made to the remote object. More...
 
async Task< DocumentSave ()
 Saves the changes made by Set(string, JToken) to this document. More...
 
Document SetAdapter (Adapter adapter)
 Sets a Web Adapter for the current document. More...
 
- Public Member Functions inherited from NuxeoClient.Wrappers.Entity
 Entity ()
 Initializes a new instance of Entity. More...
 

Protected Types

enum  EndpointType { UID, PATH }
 

Protected Member Functions

Dictionary< string, string > GenerateHeaders ()
 Returns a dictionary with the name and value of the custom headers to be used on the next request for this document. More...
 

Properties

Client client [get]
 
string Repository [get, set]
 Gets the document's repository. More...
 
string Uid = string.Empty [get, set]
 Gets the document's UID. More...
 
string Path = string.Empty [get, set]
 Gets the document's remote path. More...
 
string Name = string.Empty [get, set]
 Gets the document's name. More...
 
string ParentRef = string.Empty [get, set]
 Gets the reference to the document's parent document. More...
 
string Type = string.Empty [get, set]
 Gets the document's type. More...
 
string State = string.Empty [get, set]
 Gets the document's state. More...
 
string VerisonLabel = string.Empty [get, set]
 Gets the document's version label. More...
 
bool IsCheckedOut = string.Empty [get, set]
 Gets whether the document is checked out or not. More...
 
string Title = false [get, set]
 Gets the document's title. More...
 
DateTime LastModified = string.Empty [get, set]
 Gets the date of when the document was last modified. More...
 
List< string > Facets = null [get, set]
 Gets the list of facets exhibited by the document. More...
 
Properties Properties = null [get, set]
 Gets the document's properties. More...
 
Properties ContextParameters = null [get, set]
 Gets the context parameters to be used on the next request. More...
 
Adapter Adapter = null [get, protected set]
 Gets the current document adapter. More...
 
Properties DirtyProperties = null [get, protected set]
 Gets the document's dirty properties. More...
 
List< string > Schemas = null [get, protected set]
 Gets the document's schemas, to be used on the next request. More...
 
List< string > ContentEnrichers [get, protected set]
 Gets the current content enrichers, to be used on the next request. More...
 
Dictionary< string, string > AdditionalHeaders [get, protected set]
 Gets the additional custom headers to be used on the next request. More...
 
string Endpoint [get]
 Gets the document's endpoint. More...
 
- Properties inherited from NuxeoClient.Wrappers.Entity
string EntityType [get, set]
 Gets the entity type. More...
 

Detailed Description

Represents a remote Document in a Nuxeo server.

For more information about documents, check Nuxeo Documentation Center.

Definition at line 34 of file Document.cs.

Inheritance diagram for NuxeoClient.Wrappers.Document:
NuxeoClient.Wrappers.Entity

Constructor & Destructor Documentation

NuxeoClient.Wrappers.Document.Document ( )

Initializes a new instance of Document.

Definition at line 187 of file Document.cs.

Member Function Documentation

Document NuxeoClient.Wrappers.Document.AddContentEnricher ( string  enricher)

Adds a content enricher to be used in the next request.

For more details about document enrichers, check Nuxeo Documentation Center.

Parameters
enricherThe content enricher's name.
Returns
The current Document instance.

Definition at line 291 of file Document.cs.

Document NuxeoClient.Wrappers.Document.AddHeader ( string  name,
string  value 
)

Adds a custom header to be used in the next request.

Parameters
nameThe header's name.
valueThe header's value.
Returns
The current Document instance.

Definition at line 198 of file Document.cs.

Document NuxeoClient.Wrappers.Document.AddSchema ( string  schema)

Adds a document schema to be sent in the next request.

For more details about schemas, check Nuxeo Documentation Center.

Parameters
schemaThe schema's name.
Returns
The current Document instance.

Definition at line 243 of file Document.cs.

async Task<Entity> NuxeoClient.Wrappers.Document.Create ( Entity  entity)

Creates a child of this document.

For more details about RESTful Document CRUD, check Nuxeo Documentation Center.

Parameters
dataThe child document.
Returns
A Task that will return a new Entity, representing the child Document or BusinessObject.

Definition at line 434 of file Document.cs.

async Task<Entity> NuxeoClient.Wrappers.Document.Delete ( )

Deletes this document on the remote server.

For more details about RESTful Document CRUD, check Nuxeo Documentation Center.

Returns
A Task that will return null if the deletion of the remote document was successful.

Definition at line 464 of file Document.cs.

async Task<Entity> NuxeoClient.Wrappers.Document.Fetch ( )

Fetches the document from the server. A BusinessObject is returned instead if a BusinessAdapter is set via SetAdapter(Adapter).

For more details about RESTful Document CRUD, check Nuxeo Documentation Center.

Returns
A Task that will return a new Entity, representing this Document or a BusinessObject.

Definition at line 421 of file Document.cs.

Dictionary<string, string> NuxeoClient.Wrappers.Document.GenerateHeaders ( )
protected

Returns a dictionary with the name and value of the custom headers to be used on the next request for this document.

Returns

Definition at line 510 of file Document.cs.

Document NuxeoClient.Wrappers.Document.RemoveContentEnricher ( string  enricher)

Removes a content enricher, which will no longer be used in the next request.

For more details about document enrichers, check Nuxeo Documentation Center.

Parameters
enricher
Returns
The current Document instance.

Definition at line 306 of file Document.cs.

Document NuxeoClient.Wrappers.Document.RemoveHeader ( string  name)

Removes a custom header, which will no longer be sent in the next request.

Parameters
nameThe header's name.
Returns
The current Document instance.

Definition at line 210 of file Document.cs.

Document NuxeoClient.Wrappers.Document.RemoveSchema ( string  schema)

Removes a document schema, which will no longer be sent in the next request.

For more details about schemas, check Nuxeo Documentation Center.

Parameters
schemaThe schema's name
Returns
The current Document instance.

Definition at line 258 of file Document.cs.

async Task<Document> NuxeoClient.Wrappers.Document.Save ( )

Saves the changes made by Set(string, JToken) to this document.

Returns
A Task that will return a new and updated instance of this Document.

Definition at line 486 of file Document.cs.

Document NuxeoClient.Wrappers.Document.Set ( string  name,
JToken  value 
)

Sets a (dirty) property of the document. No changes will be made to the remote object.

Parameters
nameThe property's name.
valueThe new property's value.
Returns
The current Document instance.

Definition at line 475 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetAdapter ( Adapter  adapter)

Sets a Web Adapter for the current document.

For more details about adapters, check Nuxeo Documentation Center.

Parameters
adapterThe Adapter to be set.
Returns
The current Document instance.

Definition at line 499 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetClient ( Client  client)

Sets the Nuxeo Client through which operations to this document can be performed.

The client is used for operations like Fetch, Create(Entity), Update(Entity) and Save.

Parameters
clientThe Nuxeo Client through which operations to this document can be performed.
Returns
The current Document instance.

Definition at line 319 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetContentEnrichers ( string[]  enrichers)

Sets the list of content enrichers to be used in the next request.

For more details about document enrichers, check Nuxeo Documentation Center.

Parameters
enrichersThe list of content enricher names.
Returns
The current Document instance.

Definition at line 272 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetContextParameters ( Properties  contextParameters)

Sets the document's context parameters.

Parameters
repositoryThe document's context parameters.
Returns
The current Document instance.

Definition at line 407 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetName ( string  name)

Sets the document's name.

Parameters
repositoryThe document's name.
Returns
The current Document instance.

Definition at line 363 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetPath ( string  path)

Sets the document's path.

Parameters
repositoryThe document's path.
Returns
The current Document instance.

Definition at line 352 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetProperties ( Properties  properties)

Sets the document's properties.

Parameters
repositoryThe document's properties.
Returns
The current Document instance.

Definition at line 396 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetRepository ( string  repository)

Sets the document's repository.

Parameters
repositoryThe path to the document's repository.
Returns
The current Document instance.

Definition at line 330 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetSchemas ( string[]  schemas)

Sets a list document schemas to be sent in the next request.

For more details about schemas, check Nuxeo Documentation Center.

Parameters
schemasA list of document schema names.
Returns
The current Document instance.

Definition at line 224 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetTitle ( string  title)

Sets the document's title.

Parameters
repositoryThe document's title.
Returns
The current Document instance.

Definition at line 385 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetType ( string  type)

Sets the document's type.

Parameters
repositoryThe document's type.
Returns
The current Document instance.

Definition at line 374 of file Document.cs.

Document NuxeoClient.Wrappers.Document.SetUid ( string  uid)

Sets the document's uid.

Parameters
repositoryThe document's uid.
Returns
The current Document instance.

Definition at line 341 of file Document.cs.

async Task<Entity> NuxeoClient.Wrappers.Document.Update ( Entity  entity)

Updates a child of this document.

For more details about RESTful Document CRUD, check Nuxeo Documentation Center.

Parameters
dataThe child document.
Returns
A Task that will return a new Entity, representing the child Document or BusinessObject.

Definition at line 449 of file Document.cs.

Property Documentation

Adapter NuxeoClient.Wrappers.Document.Adapter = null
getprotected set

Gets the current document adapter.

Definition at line 146 of file Document.cs.

Dictionary<string, string> NuxeoClient.Wrappers.Document.AdditionalHeaders
getprotected set

Gets the additional custom headers to be used on the next request.

Definition at line 170 of file Document.cs.

List<string> NuxeoClient.Wrappers.Document.ContentEnrichers
getprotected set

Gets the current content enrichers, to be used on the next request.

Definition at line 164 of file Document.cs.

Properties NuxeoClient.Wrappers.Document.ContextParameters = null
getset

Gets the context parameters to be used on the next request.

Definition at line 140 of file Document.cs.

Properties NuxeoClient.Wrappers.Document.DirtyProperties = null
getprotected set

Gets the document's dirty properties.

Definition at line 152 of file Document.cs.

string NuxeoClient.Wrappers.Document.Endpoint
get

Gets the document's endpoint.

Definition at line 177 of file Document.cs.

List<string> NuxeoClient.Wrappers.Document.Facets = null
getset

Gets the list of facets exhibited by the document.

Definition at line 126 of file Document.cs.

bool NuxeoClient.Wrappers.Document.IsCheckedOut = string.Empty
getset

Gets whether the document is checked out or not.

Definition at line 105 of file Document.cs.

DateTime NuxeoClient.Wrappers.Document.LastModified = string.Empty
getset

Gets the date of when the document was last modified.

Definition at line 119 of file Document.cs.

string NuxeoClient.Wrappers.Document.Name = string.Empty
getset

Gets the document's name.

Definition at line 70 of file Document.cs.

string NuxeoClient.Wrappers.Document.ParentRef = string.Empty
getset

Gets the reference to the document's parent document.

Definition at line 77 of file Document.cs.

string NuxeoClient.Wrappers.Document.Path = string.Empty
getset

Gets the document's remote path.

Definition at line 63 of file Document.cs.

Properties NuxeoClient.Wrappers.Document.Properties = null
getset

Gets the document's properties.

Definition at line 133 of file Document.cs.

string NuxeoClient.Wrappers.Document.Repository
getset

Gets the document's repository.

Definition at line 49 of file Document.cs.

List<string> NuxeoClient.Wrappers.Document.Schemas = null
getprotected set

Gets the document's schemas, to be used on the next request.

Definition at line 158 of file Document.cs.

string NuxeoClient.Wrappers.Document.State = string.Empty
getset

Gets the document's state.

Definition at line 91 of file Document.cs.

string NuxeoClient.Wrappers.Document.Title = false
getset

Gets the document's title.

Definition at line 112 of file Document.cs.

string NuxeoClient.Wrappers.Document.Type = string.Empty
getset

Gets the document's type.

Definition at line 84 of file Document.cs.

string NuxeoClient.Wrappers.Document.Uid = string.Empty
getset

Gets the document's UID.

Definition at line 56 of file Document.cs.

string NuxeoClient.Wrappers.Document.VerisonLabel = string.Empty
getset

Gets the document's version label.

Definition at line 98 of file Document.cs.