Home Manual Reference Source
public class | source

JobRevision

Extends:

ResourceBaseCrudBase → JobRevision

Static Member Summary

Static Public Members
public static get
public static get
public static get

Member Summary

Public Members
public get
public get

Get layers

public get

Get a result proxy

Method Summary

Public Methods
public

async build(callback: String, deleted: String)

Build the revision

public

async cancel(deleted: String)

Cancels a running job

public

async clone(deleted: String): Promise<JobRevision>

Clones a job revision to the user requesting it

public

async object(deleted: String): Promise<Object>

Get job object

public

async result(deleted: String): Promise<JobResult>

Get the job result

public

async save(object: Object, layers: null, deleted: String): Promise<JobRevision>

Save updated job revision

public

async share(visibility: String, deleted: String): Promise<String>

Share the job revision

Inherited Summary

From class ResourceBase
public static get

Returns if the resource is readonly

public static get abstract

Resource name

public static get

Resource path template

public static get

Returns the url key of the resource

protected static get

Protected read-only fields

public get

Get api instance

public set

api(value: Maps4News)

Set the api instance

public get

Auto generated Resource base url

public get

List fields that contain object data

public get

If the resource can be owned by an organisation

public get

url: string: *

Auto generated resource url

public

Clone the object

public

async refresh(updateSelf: Boolean): Promise<ResourceBase>

Refresh the resource by requesting it from the server again

public

reset(fields: Array<string> | string | null)

Resets model instance to it's original state

public

Clean up instance and commit all changes locally.

public

static(Target: string | function, Constructor: function, seedData: Object<string, *>): SimpleResourceProxy

Static proxy generation

public

toObject(camelCaseKeys: boolean): {}

Transform instance to object

public

String representation of the resource, similar to Python's repr

protected

Macro for resource listing

protected

Moves new fields to this._properties and turns them into a getter/setter

From class CrudBase
public

async delete(updateSelf: Boolean): Promise<CrudBase>

Delete item

public

async restore(updateSelf: Boolean): Promise<CrudBase>

Restore item

public

Save item.

protected

Build data for create operation

Static Public Members

public static get resourceName: string source

Resource name

Override:

ResourceBase#resourceName

public static get resourcePath: string source

Resource path template

Override:

ResourceBase#resourcePath

public static get resourceUrlKey: string source

Returns the url key of the resource

Override:

ResourceBase#resourceUrlKey

Public Members

public get baseUrl: string source

Auto generated Resource base url

Override:

ResourceBase#baseUrl

public get layers: SimpleResourceProxy: * source

Get layers

Return:

SimpleResourceProxy

A proxy for accessing the resource

public get resultProxy: JobResult: * source

Get a result proxy

Return:

JobResult

Empty job result used for

Public Methods

public async build(callback: String, deleted: String) source

Build the revision

Params:

NameTypeAttributeDescription
callback String

Optional callback url for when the job completes

deleted String
  • optional
  • default: RequestParameters.deleted

Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all

Throw:

ApiError

public async cancel(deleted: String) source

Cancels a running job

Params:

NameTypeAttributeDescription
deleted String
  • optional
  • default: RequestParameters.deleted

Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all

public async clone(deleted: String): Promise<JobRevision> source

Clones a job revision to the user requesting it

Override:

ResourceBase#clone

Params:

NameTypeAttributeDescription
deleted String
  • optional
  • default: RequestParameters.deleted

Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all

Return:

Promise<JobRevision>

The new job revision, which will be linked to a new job

Throw:

ApiError

public async object(deleted: String): Promise<Object> source

Get job object

Params:

NameTypeAttributeDescription
deleted String
  • optional
  • default: RequestParameters.deleted

Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all

Return:

Promise<Object>

The map object

Throw:

ApiError

TODO:

  • document object format

public async result(deleted: String): Promise<JobResult> source

Get the job result

Params:

NameTypeAttributeDescription
deleted String
  • optional
  • default: RequestParameters.deleted

Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all

Return:

Promise<JobResult>

The associated job result

Throw:

ApiError

public async save(object: Object, layers: null, deleted: String): Promise<JobRevision> source

Save updated job revision

Override:

CrudBase#save

Params:

NameTypeAttributeDescription
object Object

Map object

layers null

Array containing all layers for this revision. If set to null the same layers will be used

deleted String
  • optional
  • default: RequestParameters.deleted

Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all

Return:

Promise<JobRevision>

New job revision

Throw:

TypeError

ApiError

public async share(visibility: String, deleted: String): Promise<String> source

Share the job revision

Params:

NameTypeAttributeDescription
visibility String

See JobShareVisibility, either private or organisation

deleted String
  • optional
  • default: RequestParameters.deleted

Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all

Return:

Promise<String>

the share link

Throw:

ApiError