Skip to content

Commit

Permalink
Added filter construct type for preview
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Dec 7, 2018
1 parent 0430312 commit af4dd18
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions ui/src/app/metadata/domain/entity/filter/nameid-format-filter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { MetadataFilter, MetadataEntity } from '../../model';
import { MetadataTypes } from '../../domain.type';
import { FilterTarget } from '../../model';

export class NameIDFormatFilterEntity implements MetadataFilter, MetadataEntity {
createdDate?: string;
modifiedDate?: string;
version: string;
resourceId: string;

name = '';
filterEnabled = false;
audId: string;
type: string;

nameIdFormatFilterTarget: FilterTarget = {
type: 'ENTITY',
value: ['']
};

constructor(obj?: Partial<NameIDFormatFilterEntity>) {
Object.assign(this, { ...obj });
}

getId(): string {
return this.resourceId;
}

getDisplayId(): string {
return this.resourceId;
}

isDraft(): boolean {
return false;
}

getCreationDate(): Date {
return new Date(this.createdDate);
}

get id(): string {
return this.resourceId;
}

set id(id: string) {
this.resourceId = id;
}

get enabled(): boolean {
return this.filterEnabled;
}

get kind(): string {
return MetadataTypes.FILTER;
}

serialize(): any {
return {
nameIdFormatFilterTarget: this.nameIdFormatFilterTarget,
filterEnabled: this.filterEnabled,
name: this.name,
'@type': 'EntityAttributes'
};
}
}

0 comments on commit af4dd18

Please sign in to comment.