2018-01-25 20:57:42 +01:00
|
|
|
import { View } from './view';
|
|
|
|
|
2018-02-19 19:07:19 +01:00
|
|
|
import { Collection } from '../domain/collection';
|
2018-10-25 18:09:22 +02:00
|
|
|
import { ITreeNodeObject } from '../domain/treeNode';
|
2018-01-25 20:57:42 +01:00
|
|
|
|
2019-09-25 23:12:13 +02:00
|
|
|
import { CollectionGroupDetailsResponse } from '../response/collectionResponse';
|
|
|
|
|
2018-10-25 18:09:22 +02:00
|
|
|
export class CollectionView implements View, ITreeNodeObject {
|
2019-01-25 15:30:21 +01:00
|
|
|
id: string = null;
|
|
|
|
organizationId: string = null;
|
|
|
|
name: string = null;
|
2019-03-07 21:17:58 +01:00
|
|
|
externalId: string = null;
|
2019-01-25 15:30:21 +01:00
|
|
|
readOnly: boolean = null;
|
2020-05-21 15:49:56 +02:00
|
|
|
hidePasswords: boolean = null;
|
2018-01-25 20:57:42 +01:00
|
|
|
|
2019-09-25 23:12:13 +02:00
|
|
|
constructor(c?: Collection | CollectionGroupDetailsResponse) {
|
2018-01-25 20:57:42 +01:00
|
|
|
if (!c) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.id = c.id;
|
|
|
|
this.organizationId = c.organizationId;
|
2019-03-07 21:17:58 +01:00
|
|
|
this.externalId = c.externalId;
|
2019-09-25 23:12:13 +02:00
|
|
|
if (c instanceof Collection) {
|
|
|
|
this.readOnly = c.readOnly;
|
2020-05-21 15:49:56 +02:00
|
|
|
this.hidePasswords = c.hidePasswords;
|
2019-09-25 23:12:13 +02:00
|
|
|
}
|
2018-01-25 20:57:42 +01:00
|
|
|
}
|
|
|
|
}
|