File

src/lib/model/dms-object-history.model.ts

Description

Representation of a history entry for a dms object

Index

Properties

Constructor

constructor(json: any)

Creates a new instance

Parameters :
Name Type Optional Description
json any no

The JSON object received from the backend. This will be used to construct the new history entry instance

Properties

comment
comment: string
Type : string

Custom comment applied to the entry

description
description: string
Type : string

Entry's description

group
group: "PROCESS" | "MODIFICATION" | "INFORMATIONAL"
Type : "PROCESS" | "MODIFICATION" | "INFORMATIONAL"

Group of the entry

Optional intent
intent: string
Type : string

Entry's intent

Optional parameter
parameter: literal type
Type : literal type

Additional parameters for special (BPM related) types of entries

time
time: Date
Type : Date

The time the history entry was created

title
title: string
Type : string

Entry's title

type
type: string
Type : string

History entry's type

user
user: OrgUser
Type : OrgUser

If the history entry was created from a users activity (e.g. indexdata changes), this property holds the user that caused the entry

version
version: number
Type : number

Version of the dms object at the time the history entry was created

import {OrgUser} from './org.model';

/**
 * Representation of a history entry for a dms object
 */
export class DmsObjectHistoryEntry {

  /**
   * Version of the dms object at the time the history entry was created
   */
  version: number;
  /**
   * The time the history entry was created
   */
  time: Date;
  /**
   * Entry's title
   */
  title: string;
  /**
   * Entry's description
   */
  description: string;
  /**
   * Entry's intent
   */
  intent?: string;
  /**
   * Custom comment applied to the entry
   */
  comment: string;
  /**
   * Group of the entry
   */
  group: 'PROCESS' | 'MODIFICATION' | 'INFORMATIONAL';
  /**
   * History entry's type
   */
  type: string;
  /**
   * Additional parameters for special (BPM related) types of entries
   */
  parameter?: {
    processId: string,
    processName: string,
    activityId?: string,
    activityName?: string,
    type: string
  };
  /**
   * If the history entry was created from a users activity (e.g. indexdata changes), this property
   * holds the user that caused the entry
   */
  user: OrgUser;

  /**
   * Creates a new instance
   * @param json The JSON object received from the backend. This will be used to construct the new history entry instance
   */
  constructor(json: any) {
    this.version = json.version;
    this.time = json.time;
    this.title = json.title;
    this.description = json.description;
    this.intent = json.intent;
    this.comment = json.comment;
    this.group = json.group;
    this.type = json.type;
    this.user = json.user;

    if (json.parameter) {
      this.parameter = {
        ...json.parameter,
        processId: json.parameter.procId,
        processName: json.parameter.procName,
        activityId: json.parameter.actId,
        activityName: json.parameter.actName
      };
    }
  }
}

results matching ""

    No results matching ""