models/remote-page~ RemotePage

Models a page on Confluence

Constructor

new RemotePage(id, version, title, meta, parentId)

Constructor

Parameters:
NameTypeDefaultDescription
idnumber
versionnumber
titlestring
metaMeta
parentIdnumbernull

Extends

  • Page

Members

localPage :LocalPage

The related LocalPage

Type:
  • LocalPage

Methods

repoConflict() → {boolean}

Returns:

True if the meta.repo of this page is other than the meta.repo of the related localPage

Type: 
boolean

shouldUpdate() → {boolean}

Returns:

True if related to a local page and should be updated

Type: 
boolean

(async) sync(renderer, confluence) → {Promise.<RemotePage>}

Re-sync this page with Confluence.

  • If the page in not related to a localPage, it should be deleted.
  • If the page is related to a localPage and shouldUpdate then update the page using the content from the localPage
Parameters:
NameTypeDescription
rendererAssetRenderer

an AssetRenderer instance

confluenceConfluenceSdk

ConfluenceSdk instance to use for syncing

Returns:

The updated RemotePage

Type: 
Promise.<RemotePage>