Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Responsible: Kostis Pristouris

Background

As part of the deck model we define a model for storing the changes applied to the deck after each save or other action on the UI that results to a deck change, with or without creating a new revision. See also 

Jira Legacy
serverJIRA (slidewiki.atlassian.net)
serverId497b9b88-e2b8-32ee-be05-4d265f33883f
keySWIK-946
.

The change log is defined as an array of change log records that include at least the timestamp and the user performing the deck change. This array is stored in the changeLog attribute inside a deck revision subdocument in mongo db.

...

We extend the deck revision model to additionally hold a changeLog attribute which is an array of Deck Change elements.

Deck Change=

propertytyperequiredformatdescription
operationstringyesone of 'update', 'remove', 'insert'
timestampdate stringyesiso date string
userintegeryes

indexintegerif operation is 'remove' or 'insert'

beforePropertiesPatchif operation is 'update' and index is not set
provides the patch to be performed to the deck properties to undo the change
afterPropertiesPatchif operation is 'update' and index is not set
provides the patch to be performed to the deck properties to apply the change
insertContentItemif operation is 'insert'
provides the deck/slide reference of the item inserted
removeContentItemif operation is 'remove'
provides the deck/slide reference of the item removed
updateContentItemUpdateif operation is 'update' and index is set
provides the undo/redo patches for the update to the contentItem


The following object includes a subset of deck properties definitions, which includes all the deck properties that are user-defined and editable. Any of the properties are optional in this model but at least one should be defined.

PropertiesPatch=

propertytyperequiredformatdescription
title
no
same definition as "title" on the deck revision model
language
no
same definition as "language" on the deck revision model
theme
no
same definition as "theme" on the deck revision model
license
no
same definition as "license" on the deck model
description
no
same definition as "description" on the deck model


ContentItemUpdate=

propertytyperequireddescription
beforeContentItemPatchyesprovides the patch to undo the content item change in parent deck change object
afterContentItemPatchyesprovides the patch to apply the content item change in parent deck change object


ContentItemPatch=

propertytyperequiredformatdescription
kind


same definition as "kind" on the ContentItemmodel
ref


same definition as "ref" on the ContentItemmodel, but only "revision" can be set (no "id")