Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
extend ctor for collection view
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Sep 25, 2019
1 parent 971e193 commit 53d0806
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/models/view/collectionView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ import { View } from './view';
import { Collection } from '../domain/collection';
import { ITreeNodeObject } from '../domain/treeNode';

import { CollectionGroupDetailsResponse } from '../response/collectionResponse';

export class CollectionView implements View, ITreeNodeObject {
id: string = null;
organizationId: string = null;
name: string = null;
externalId: string = null;
readOnly: boolean = null;

constructor(c?: Collection) {
constructor(c?: Collection | CollectionGroupDetailsResponse) {
if (!c) {
return;
}

this.id = c.id;
this.organizationId = c.organizationId;
this.readOnly = c.readOnly;
this.externalId = c.externalId;
if (c instanceof Collection) {
this.readOnly = c.readOnly;
}
}
}

0 comments on commit 53d0806

Please sign in to comment.