From 5da382ebd38000329cbc9a2fc16467c1dd0ab19b Mon Sep 17 00:00:00 2001 From: "Gantner, Florian Klaus" Date: Thu, 8 Dec 2022 18:53:06 +0100 Subject: [PATCH 1/3] normalize value for search label translation --- .../search-labels/search-label/search-label.component.html | 4 ++-- .../search-label/search-label.component.spec.ts | 5 +++++ .../search-labels/search-label/search-label.component.ts | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.html b/src/app/shared/search/search-labels/search-label/search-label.component.html index 0b043e34a08..6a1508920ad 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.html +++ b/src/app/shared/search/search-labels/search-label/search-label.component.html @@ -1,6 +1,6 @@ - {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: + {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + normalizeFilterValue(value) | translate: {default: normalizeFilterValue(getStrippedValue(value))} }} × - \ No newline at end of file + diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts b/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts index 50bcbc69381..34d6992080b 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts +++ b/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts @@ -31,7 +31,9 @@ describe('SearchLabelComponent', () => { const normValue1 = 'Test, Author'; const value2 = 'TestSubject'; const value3 = 'Test, Authority,authority'; + const value4 = 'book,equals'; const normValue3 = 'Test, Authority'; + const normValue4 = 'book'; const filter1 = [key1, value1]; const filter2 = [key2, value2]; const mockFilters = [ @@ -94,6 +96,9 @@ describe('SearchLabelComponent', () => { result = comp.normalizeFilterValue(value3); expect(result).toBe(normValue3); + + result = comp.normalizeFilterValue(value4); + expect(result).toBe(normValue4); }); }); }); diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.ts b/src/app/shared/search/search-labels/search-label/search-label.component.ts index ada25eaf431..0a06d734aaa 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.ts +++ b/src/app/shared/search/search-labels/search-label/search-label.component.ts @@ -83,7 +83,7 @@ export class SearchLabelComponent implements OnInit { */ normalizeFilterValue(value: string) { // const pattern = /,[^,]*$/g; - const pattern = /,authority*$/g; + const pattern = /(,authority*)|(,equals*)$/g; return value.replace(pattern, ''); } From 75d165c22f7690fa1326d510b9f0799f947b3c81 Mon Sep 17 00:00:00 2001 From: "Gantner, Florian Klaus" Date: Fri, 9 Dec 2022 10:30:29 +0100 Subject: [PATCH 2/3] fix checkstyle issues --- src/app/shared/entity-icon/entity-icon.directive.spec.ts | 4 ++-- src/app/shared/entity-icon/entity-icon.directive.ts | 4 ++-- src/app/shared/form/builder/parsers/field-parser.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/shared/entity-icon/entity-icon.directive.spec.ts b/src/app/shared/entity-icon/entity-icon.directive.spec.ts index 85030f90eb5..f0bb9e75b76 100644 --- a/src/app/shared/entity-icon/entity-icon.directive.spec.ts +++ b/src/app/shared/entity-icon/entity-icon.directive.spec.ts @@ -69,7 +69,7 @@ describe('EntityIconDirective', () => { beforeEach(() => { fixture = TestBed.createComponent(TestComponent); component = fixture.componentInstance; - component.fallbackOnDefault = false + component.fallbackOnDefault = false; component.metadata.entityType = 'TESTFAKE'; component.metadata.entityStyle = 'personFallback'; component.iconPosition = 'before'; @@ -86,7 +86,7 @@ describe('EntityIconDirective', () => { beforeEach(() => { fixture = TestBed.createComponent(TestComponent); component = fixture.componentInstance; - component.fallbackOnDefault = false + component.fallbackOnDefault = false; component.metadata.entityType = 'person'; component.metadata.entityStyle = 'personFallback'; component.iconPosition = 'before'; diff --git a/src/app/shared/entity-icon/entity-icon.directive.ts b/src/app/shared/entity-icon/entity-icon.directive.ts index 53b3b7e8575..2205ae8cfae 100644 --- a/src/app/shared/entity-icon/entity-icon.directive.ts +++ b/src/app/shared/entity-icon/entity-icon.directive.ts @@ -85,9 +85,9 @@ export class EntityIconDirective implements OnInit { if (Array.isArray(styles)) { styles.forEach((style) => { if (Object.keys(crisConfig.entityStyle).includes(style)) { - filteredConf = crisConfig.entityStyle[style] + filteredConf = crisConfig.entityStyle[style]; } - }) + }); } else { filteredConf = crisConfig.entityStyle[styles]; } diff --git a/src/app/shared/form/builder/parsers/field-parser.ts b/src/app/shared/form/builder/parsers/field-parser.ts index c53acecf173..138a4f3fcd5 100644 --- a/src/app/shared/form/builder/parsers/field-parser.ts +++ b/src/app/shared/form/builder/parsers/field-parser.ts @@ -25,7 +25,7 @@ export const CONFIG_DATA: InjectionToken = new InjectionToken = new InjectionToken('initFormValues'); export const PARSER_OPTIONS: InjectionToken = new InjectionToken('parserOptions'); export const SECURITY_CONFIG: InjectionToken = new InjectionToken('securityConfig'); -export const REGEX_FIELD_VALIDATOR: RegExp = new RegExp('(\\/?)(.+)\\1([gimsuy]*)', 'i'); +export const REGEX_FIELD_VALIDATOR = new RegExp('(\\/?)(.+)\\1([gimsuy]*)', 'i'); export abstract class FieldParser { From 004644cb16e2546965c038195b9f6fb799890343 Mon Sep 17 00:00:00 2001 From: "Gantner, Florian Klaus" Date: Wed, 5 Jul 2023 15:18:26 +0200 Subject: [PATCH 3/3] remove merge conflict file --- .../form/builder/parsers/field-parser.ts.orig | 478 ------------------ 1 file changed, 478 deletions(-) delete mode 100644 src/app/shared/form/builder/parsers/field-parser.ts.orig diff --git a/src/app/shared/form/builder/parsers/field-parser.ts.orig b/src/app/shared/form/builder/parsers/field-parser.ts.orig deleted file mode 100644 index eca80a86696..00000000000 --- a/src/app/shared/form/builder/parsers/field-parser.ts.orig +++ /dev/null @@ -1,478 +0,0 @@ -import { Inject, InjectionToken } from '@angular/core'; - -import uniqueId from 'lodash/uniqueId'; -import { - DynamicFormControlLayout, - DynamicFormControlRelation, - MATCH_VISIBLE, - OR_OPERATOR -} from '@ng-dynamic-forms/core'; - -import { hasValue, isEmpty, isNotEmpty, isNotNull, isNotUndefined } from '../../../empty.util'; -import { FormFieldModel } from '../models/form-field.model'; -import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model'; -import { - DynamicRowArrayModel, - DynamicRowArrayModelConfig -} from '../ds-dynamic-form-ui/models/ds-dynamic-row-array-model'; -import { DsDynamicInputModel, DsDynamicInputModelConfig } from '../ds-dynamic-form-ui/models/ds-dynamic-input.model'; -import { setLayout } from './parser.utils'; -import { ParserOptions } from './parser-options'; -import { RelationshipOptions } from '../models/relationship-options.model'; -import { VocabularyOptions } from '../../../../core/submission/vocabularies/models/vocabulary-options.model'; -import { ParserType } from './parser-type'; -import { isNgbDateStruct } from '../../../date.util'; -import { SubmissionVisibility } from '../../../../submission/utils/visibility.util'; -import { SubmissionVisibilityType } from '../../../../core/config/models/config-submission-section.model'; - -export const SUBMISSION_ID: InjectionToken = new InjectionToken('submissionId'); -export const CONFIG_DATA: InjectionToken = new InjectionToken('configData'); -export const INIT_FORM_VALUES: InjectionToken = new InjectionToken('initFormValues'); -export const PARSER_OPTIONS: InjectionToken = new InjectionToken('parserOptions'); -/** - * This pattern checks that a regex field uses the common ECMAScript format: `/{pattern}/{flags}`, in which the flags - * are part of the regex, or a simpler one with only pattern `/{pattern}/` or `{pattern}`. - * The regex itself is encapsulated inside a `RegExp` object, that will validate the pattern syntax. - */ -export const REGEX_FIELD_VALIDATOR = new RegExp('(\\/?)(.+)\\1([gimsuy]*)', 'i'); -export const SECURITY_CONFIG: InjectionToken = new InjectionToken('securityConfig'); -<<<<<<< HEAD -export const REGEX_FIELD_VALIDATOR = new RegExp('(\\/?)(.+)\\1([gimsuy]*)', 'i'); -======= ->>>>>>> dspace-cris-7 - -export abstract class FieldParser { - - protected fieldId: string; - /** - * This is the field to use for type binding - * @protected - */ - protected typeField: string; - - constructor( - @Inject(SUBMISSION_ID) protected submissionId: string, - @Inject(CONFIG_DATA) protected configData: FormFieldModel, - @Inject(INIT_FORM_VALUES) protected initFormValues: any, - @Inject(PARSER_OPTIONS) protected parserOptions: ParserOptions, - @Inject(SECURITY_CONFIG) protected securityConfig: any = null - ) { - } - - public abstract modelFactory(fieldValue?: FormFieldMetadataValueObject, label?: boolean): any; - - public parse() { - if (((this.getInitValueCount() > 1 && !this.configData.repeatable) || (this.configData.repeatable)) - && (this.configData.input.type !== ParserType.List) - && (this.configData.input.type !== ParserType.Tag) - && (this.configData.input.type !== ParserType.RelationGroup) - && (this.configData.input.type !== ParserType.InlineGroup) - ) { - let arrayCounter = 0; - let fieldArrayCounter = 0; - - let metadataKey; - - if (Array.isArray(this.configData.selectableMetadata) && this.configData.selectableMetadata.length === 1) { - metadataKey = this.configData.selectableMetadata[0].metadata; - } - - let isDraggable = true; - if (this.configData.input.type === ParserType.Onebox && this.configData?.selectableMetadata?.length > 1) { - isDraggable = false; - } - const config = { - id: uniqueId() + '_array', - label: this.configData.label, - initialCount: this.getInitArrayIndex(), - notRepeatable: !this.configData.repeatable, - relationshipConfig: this.configData.selectableRelationship, - required: JSON.parse(this.configData.mandatory), - submissionId: this.submissionId, - metadataKey, - metadataFields: this.getAllFieldIds(), - hasSelectableMetadata: isNotEmpty(this.configData.selectableMetadata), - isDraggable, - typeBindRelations: isNotEmpty(this.configData.typeBind) ? this.getTypeBindRelations(this.configData.typeBind, - this.parserOptions.typeField) : null, - groupFactory: () => { - let model; - if ((arrayCounter === 0)) { - model = this.modelFactory(); - arrayCounter++; - } else { - const fieldArrayOfValueLength = this.getInitValueCount(arrayCounter - 1); - let fieldValue = null; - if (fieldArrayOfValueLength > 0) { - fieldValue = this.getInitFieldValue(arrayCounter - 1, fieldArrayCounter++); - if (fieldArrayCounter === fieldArrayOfValueLength) { - fieldArrayCounter = 0; - arrayCounter++; - } - } - model = this.modelFactory(fieldValue, false); - if (!this.configData.repeatable) { - this.markAsNotRepeatable(model); - } - } - setLayout(model, 'element', 'host', 'col'); - if (model.hasLanguages || isNotEmpty(model.relationship) || model.hasSecurityToggle) { - setLayout(model, 'grid', 'control', 'col'); - } - return [model]; - } - } as DynamicRowArrayModelConfig; - - const layout: DynamicFormControlLayout = { - grid: { - group: 'form-row' - } - }; - - return new DynamicRowArrayModel(config, layout); - - } else { - const model = this.modelFactory(this.getInitFieldValue()); - model.submissionId = this.submissionId; - if (model.hasLanguages || isNotEmpty(model.relationship) || model.hasSecurityToggle) { - setLayout(model, 'grid', 'control', 'col'); - } - return model; - } - } - - public setVocabularyOptions(controlModel, scope) { - if (isNotEmpty(this.configData.selectableMetadata) && isNotEmpty(this.configData.selectableMetadata[0].controlledVocabulary)) { - controlModel.vocabularyOptions = new VocabularyOptions( - this.configData.selectableMetadata[0].controlledVocabulary, - this.configData.selectableMetadata[0].metadata, - scope, - this.configData.selectableMetadata[0].closed - ); - } - } - - public setValues(modelConfig: DsDynamicInputModelConfig, fieldValue: any, forceValueAsObj: boolean = false, groupModel?: boolean) { - if (isNotEmpty(fieldValue)) { - if (groupModel) { - // Array, values is an array - modelConfig.value = this.getInitGroupValues(); - if (Array.isArray(modelConfig.value) && modelConfig.value.length > 0 && modelConfig.value[0].language) { - // Array Item has language, ex. AuthorityModel - modelConfig.language = modelConfig.value[0].language; - } - return; - } - - if (isNgbDateStruct(fieldValue)) { - modelConfig.value = fieldValue; - } else if (typeof fieldValue === 'object') { - modelConfig.metadataValue = fieldValue; - - // set security level if exists - if (isNotUndefined(fieldValue.securityLevel)) { - modelConfig.securityLevel = fieldValue.securityLevel; - } - - modelConfig.language = fieldValue.language; - modelConfig.place = fieldValue.place; - if (forceValueAsObj) { - modelConfig.value = fieldValue; - } else { - modelConfig.value = fieldValue.value; - } - } else { - if (forceValueAsObj) { - // If value isn't an instance of FormFieldMetadataValueObject instantiate it - modelConfig.value = new FormFieldMetadataValueObject(fieldValue); - } else { - if (typeof fieldValue === 'string') { - // Case only string - modelConfig.value = fieldValue; - } - } - } - } - this.initSecurityValue(modelConfig); - - return modelConfig; - } - - public initSecurityValue(modelConfig: any) { - // preselect most restricted security level if is not yet selected - // or if the current security level is not available in the current configuration - if ((isEmpty(modelConfig.securityLevel) && isNotEmpty(modelConfig.securityConfigLevel)) || - (isNotEmpty(modelConfig.securityLevel) && isNotEmpty(modelConfig.securityConfigLevel) && !modelConfig.securityConfigLevel.includes(modelConfig.securityLevel) )) { - modelConfig.securityLevel = modelConfig.securityConfigLevel[modelConfig.securityConfigLevel.length - 1]; - } - } - - protected getInitValueCount(index = 0, fieldId?): number { - const fieldIds = fieldId || this.getAllFieldIds(); - if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length === 1 && this.initFormValues.hasOwnProperty(fieldIds[0])) { - return this.initFormValues[fieldIds[0]].length; - } else if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length > 1) { - const values = []; - fieldIds.forEach((id) => { - if (this.initFormValues.hasOwnProperty(id)) { - values.push(this.initFormValues[id].length); - } - }); - return values[index]; - } else { - return 0; - } - } - - protected getInitGroupValues(): FormFieldMetadataValueObject[] { - const fieldIds = this.getAllFieldIds(); - if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length === 1 && this.initFormValues.hasOwnProperty(fieldIds[0])) { - return this.initFormValues[fieldIds[0]]; - } - } - - protected getInitFieldValues(fieldId): FormFieldMetadataValueObject[] { - if (isNotEmpty(this.initFormValues) && isNotNull(fieldId) && this.initFormValues.hasOwnProperty(fieldId)) { - return this.initFormValues[fieldId]; - } - } - - protected getInitFieldValue(outerIndex = 0, innerIndex = 0, fieldId?): FormFieldMetadataValueObject { - const fieldIds = fieldId || this.getAllFieldIds(); - if (isNotEmpty(this.initFormValues) - && isNotNull(fieldIds) - && fieldIds.length === 1 - && this.initFormValues.hasOwnProperty(fieldIds[outerIndex]) - && this.initFormValues[fieldIds[outerIndex]].length > innerIndex) { - return this.initFormValues[fieldIds[outerIndex]][innerIndex]; - } else if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length > 1) { - const values: FormFieldMetadataValueObject[] = []; - fieldIds.forEach((id) => { - if (this.initFormValues.hasOwnProperty(id)) { - const valueObj: FormFieldMetadataValueObject = Object.assign(new FormFieldMetadataValueObject(), this.initFormValues[id][innerIndex]); - // Set metadata name, used for Qualdrop fields - valueObj.metadata = id; - values.push(valueObj); - } - }); - return values[outerIndex]; - } else { - return null; - } - } - - protected getInitArrayIndex() { - const fieldIds: any = this.getAllFieldIds(); - if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length === 1 && this.initFormValues.hasOwnProperty(fieldIds)) { - return this.initFormValues[fieldIds].length; - } else if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length > 1) { - let counter = 0; - fieldIds.forEach((id) => { - if (this.initFormValues.hasOwnProperty(id)) { - counter = counter + this.initFormValues[id].length; - } - }); - return (counter === 0) ? 1 : counter; - } else { - return 1; - } - } - - protected getFieldId(): string { - const ids = this.getAllFieldIds(); - return isNotNull(ids) ? ids[0] : null; - } - - protected getAllFieldIds(): string[] { - if (Array.isArray(this.configData.selectableMetadata)) { - if (this.configData.selectableMetadata.length === 1) { - return [this.configData.selectableMetadata[0].metadata]; - } else { - const ids = []; - this.configData.selectableMetadata.forEach((entry) => ids.push(entry.metadata)); - return ids; - } - } else { - return ['relation.' + this.configData.selectableRelationship.relationshipType]; - } - } - - protected initModel(id?: string, label = true, labelEmpty = false, setErrors = true, hint = true) { - - const controlModel = Object.create(null); - - // Sets input ID - this.fieldId = id ? id : this.getFieldId(); - - // Sets input name (with the original field's id value) - controlModel.name = this.fieldId; - - // input ID doesn't allow dots, so replace them - controlModel.id = (this.fieldId).replace(/\./g, '_'); - - // Set read only option - controlModel.readOnly = this.parserOptions.readOnly - || this.isFieldReadOnly(this.configData.visibility, this.parserOptions.submissionScope); - controlModel.disabled = this.parserOptions.readOnly; - controlModel.isModelOfInnerForm = this.parserOptions.isInnerForm; - if (hasValue(this.configData.selectableRelationship)) { - controlModel.relationship = Object.assign(new RelationshipOptions(), this.configData.selectableRelationship); - } - controlModel.repeatable = this.configData.repeatable; - controlModel.metadataFields = this.getAllFieldIds() || []; - controlModel.hasSelectableMetadata = isNotEmpty(this.configData.selectableMetadata); - controlModel.submissionId = this.submissionId; - - // Set label - this.setLabel(controlModel, label); - if (hint) { - controlModel.hint = this.configData.hints || ' '; - } - controlModel.placeholder = this.configData.label; - - if (this.configData.mandatory && setErrors) { - this.markAsRequired(controlModel); - } - - if (this.hasRegex()) { - this.addPatternValidator(controlModel); - } - - // Available Languages - if (this.configData.languageCodes && this.configData.languageCodes.length > 0) { - (controlModel as DsDynamicInputModel).languageCodes = this.configData.languageCodes; - } - - // If typeBind is configured - if (isNotEmpty(this.configData.typeBind)) { - (controlModel as DsDynamicInputModel).typeBindRelations = this.getTypeBindRelations(this.configData.typeBind, - this.parserOptions.typeField); - } - controlModel.securityConfigLevel = this.mapBetweenMetadataRowAndSecurityMetadataLevels(this.fieldId); - - return controlModel; - } - - /** - * Check if a field is read-only with the given scope - * @param visibility - * @param submissionScope - */ - private isFieldReadOnly(visibility: SubmissionVisibilityType, submissionScope) { - return isNotEmpty(submissionScope) && SubmissionVisibility.isReadOnly(visibility, submissionScope); - } - - /** - * Get the type bind values from the REST data for a specific field - * The return value is any[] in the method signature but in reality it's - * returning the 'relation' that'll be used for a dynamic matcher when filtering - * fields in type bind, made up of a 'match' outcome (make this field visible), an 'operator' - * (OR) and a 'when' condition (the bindValues array). - * @param configuredTypeBindValues array of types from the submission definition (CONFIG_DATA) - * @param typeField - * @private - * @return DynamicFormControlRelation[] array with one relation in it, for type bind matching to show a field - */ - private getTypeBindRelations(configuredTypeBindValues: string[], typeField: string): DynamicFormControlRelation[] { - const bindValues = []; - configuredTypeBindValues.forEach((value) => { - bindValues.push({ - id: typeField, - value: value - }); - }); - // match: MATCH_VISIBLE means that if true, the field / component will be visible - // operator: OR means that all the values in the 'when' condition will be compared with OR, not AND - // when: the list of values to match against, in this case the list of strings from ... - // Example: Field [x] will be VISIBLE if item type = book OR item type = book_part - // - // The opposing match value will be the dc.type for the workspace item - return [{ - match: MATCH_VISIBLE, - operator: OR_OPERATOR, - when: bindValues - }]; - } - - protected hasRegex() { - return hasValue(this.configData.input.regex); - } - - /** - * Adds pattern validation to `controlModel`, it uses the encapsulated `configData` to test the regex, - * contained in the input config, against the common `ECMAScript` standard validator {@link REGEX_FIELD_VALIDATOR}, - * and creates an equivalent `RegExp` object that will be used during form-validation against the user-input. - * @param controlModel - * @protected - */ - protected addPatternValidator(controlModel) { - const validatorMatcher = this.configData.input.regex.match(REGEX_FIELD_VALIDATOR); - let regex; - if (validatorMatcher != null && validatorMatcher.length > 3) { - regex = new RegExp(validatorMatcher[2], validatorMatcher[3]); - } else { - regex = new RegExp(this.configData.input.regex); - } - controlModel.validators = Object.assign({}, controlModel.validators, { pattern: regex }); - controlModel.errorMessages = Object.assign( - {}, - controlModel.errorMessages, - { pattern: 'error.validation.pattern' }); - } - - protected markAsRequired(controlModel) { - controlModel.required = true; - controlModel.validators = Object.assign({}, controlModel.validators, { required: null }); - controlModel.errorMessages = Object.assign( - {}, - controlModel.errorMessages, - { required: this.configData.mandatoryMessage }); - } - - protected markAsNotRepeatable(controlModel) { - controlModel.isModelOfNotRepeatableGroup = true; - - controlModel.errorMessages = Object.assign( - {}, - controlModel.errorMessages, - { notRepeatable: 'error.validation.notRepeatable' }); - } - - protected setLabel(controlModel, label = true, labelEmpty = false) { - if (label) { - controlModel.label = (labelEmpty) ? ' ' : this.configData.label; - } - } - - protected setOptions(controlModel) { - // Checks if field has multiple values and sets options available - if (isNotUndefined(this.configData.selectableMetadata) && this.configData.selectableMetadata.length > 1) { - controlModel.options = []; - this.configData.selectableMetadata.forEach((option, key) => { - if (key === 0) { - controlModel.value = option.metadata; - } - controlModel.options.push({ label: option.label, value: option.metadata }); - }); - } - } - mapBetweenMetadataRowAndSecurityMetadataLevels( metadata: string): any { - // look to find security for metadata - if (this.securityConfig && metadata) { - if (this.securityConfig.metadataCustomSecurity) { - const metadataConfig = (this.securityConfig.metadataCustomSecurity as any)[metadata]; - if (metadataConfig) { - return metadataConfig; - } else { - // if not found look at fallback level config - if (this.securityConfig.metadataSecurityDefault !== undefined) { - return this.securityConfig.metadataSecurityDefault; - } else { - // else undefined in order to manage differently from null value - return undefined; - } - } - } - } - } -}