ContributeService

This class performs the requests on the server to update and create documents.

Constructor

new ContributeService(requestService, provider, configServer)

Creates a contribute service.

Parameters:
NameTypeDescription
requestServiceRequestService

The request service.

providerDocumentProvider

The document provider.

configServerobject

The server configuration.

Properties
NameTypeDescription
urlstring

The server url.

documentstring

The base route for documents.

Classes

ContributeService

Members

configServer :Object

The UD-Viz configuration.

Type:
  • Object

documentUrl :string

The base URL for documents.

Type:
  • string

provider :DocumentProvider

The document provider.

requestService :RequestService

The request service.

Type:
  • RequestService

Methods

(async) createDocument(creationData) → {Document}

Sends the request to create the document.

Parameters:
NameTypeDescription
creationDataFormData

The document data.

Returns:

The created document.

Type: 
Document

(async) deleteDocument()

Sends the request to delete the current document.

(async) updateDocument(updatedData) → {Document}

Sends the request to update the document.

Parameters:
NameTypeDescription
updatedDataFormData

The updated document data.

Returns:

The updated document.

Type: 
Document