-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added filter construct type for preview
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
ui/src/app/metadata/domain/entity/filter/nameid-format-filter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
}; | ||
} | ||
} |