Skip to content

Commit

Permalink
feat: isLifecycleEnvolved flag added and remove redundant flags
Browse files Browse the repository at this point in the history
  • Loading branch information
assafchamoy committed Oct 2, 2022
1 parent f4dc0ec commit 8b42b5f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export interface IFieldConfigInfo {
category: FieldCategory; // field category
complexType?: IDescribeTsType; // complex type subfields
subFields?: IFieldConfigClassInfo; // complex type subfields
isManuallyEditable?: boolean; // is field might be edited after creation
isManuallyEditable?: boolean; // is field can be modified via form after ingestion.
isFilterable?: boolean; // is field might participate in filter/search params
isSortable?: boolean; // is field might participate in sorting
isRequired?: boolean; // is field mandatory, deprecated should be implemeted by validation type='required'
isAutoGenerated?: boolean; // is field auto-generated
isCreationEssential?: boolean; // is field should participate in entity creation
isAutoGenerated?: boolean; // is field non relevant as input field for ingestion, but should be presented as a part of the model.
isLifecycleEnvolved?: boolean; // is field might be changed during external processes, outside of the app's form.
autocomplete?: {
type: 'domain' | 'service';
value: string;
Expand Down
10 changes: 10 additions & 0 deletions src/models/layerMetadata/bestMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
required: true,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public classification: string | undefined = undefined;
Expand Down Expand Up @@ -226,6 +227,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.GENERAL,
isAutoGenerated: true,
isLifecycleEnvolved: true,
})
//#endregion
public creationDate: Date | undefined = undefined;
Expand Down Expand Up @@ -279,6 +281,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.MAIN,
isAutoGenerated: true,
isLifecycleEnvolved: true,
})
//#endregion
public updateDate: Date | undefined = undefined;
Expand Down Expand Up @@ -311,6 +314,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.GENERAL,
isAutoGenerated: true,
isLifecycleEnvolved: true,
})
//#endregion
public sourceDateStart: Date | undefined = undefined;
Expand Down Expand Up @@ -343,6 +347,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.GENERAL,
isAutoGenerated: true,
isLifecycleEnvolved: true,
})
//#endregion
public sourceDateEnd: Date | undefined = undefined;
Expand Down Expand Up @@ -373,6 +378,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.GEO_INFO,
isAutoGenerated: true,
isLifecycleEnvolved: true,
})
//#endregion
public minHorizontalAccuracyCE90: number | undefined = undefined;
Expand Down Expand Up @@ -409,6 +415,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
isManuallyEditable: true,
isAutoGenerated: true,
infoMsgCode: ['info-field-tooltip.sensors.tooltip'],
isLifecycleEnvolved: true,
})
//#endregion
public sensors: string[] | undefined = undefined;
Expand Down Expand Up @@ -437,6 +444,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
})
@fieldConfig({
category: FieldCategory.GENERAL,
isLifecycleEnvolved: true,
})
//#endregion
public region: string[] | undefined = undefined;
Expand Down Expand Up @@ -504,6 +512,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.MAIN,
isAutoGenerated: true,
isLifecycleEnvolved: true,
})
//#endregion
public productVersion: string | undefined = undefined;
Expand Down Expand Up @@ -592,6 +601,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.MAIN,
isAutoGenerated: true,
isLifecycleEnvolved: true,
})
//#endregion
public maxResolutionDeg: number | undefined = undefined;
Expand Down
2 changes: 2 additions & 0 deletions src/models/layerMetadata/layer3DMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ export class Layer3DMetadata implements ILayer3DMetadata, IMetadataCommonModel {
category: FieldCategory.MAIN,
isAutoGenerated: true,
infoMsgCode: ['info-field-tooltip.updateDate.tooltip'],
isLifecycleEnvolved: true,
})
//#endregion
public updateDate: Date | undefined = undefined;
Expand Down Expand Up @@ -1156,6 +1157,7 @@ export class Layer3DMetadata implements ILayer3DMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.MAIN,
default: RecordStatus.UNPUBLISHED,
isLifecycleEnvolved: true,
})
//#endregion
public productStatus: RecordStatus | undefined = RecordStatus.UNPUBLISHED;
Expand Down
16 changes: 13 additions & 3 deletions src/models/layerMetadata/layerMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
required: true,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public classification: string | undefined = undefined;
Expand Down Expand Up @@ -275,6 +276,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
category: FieldCategory.GENERAL,
isAutoGenerated: true,
infoMsgCode: ['info-field-tooltip.creationDate.tooltip'],
isLifecycleEnvolved: true,
})
//#endregion
public creationDate: Date | undefined = undefined;
Expand Down Expand Up @@ -330,6 +332,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
category: FieldCategory.MAIN,
isAutoGenerated: true,
infoMsgCode: ['info-field-tooltip.updateDate.tooltip'],
isLifecycleEnvolved: true,
})
//#endregion
public updateDate: Date | undefined = undefined;
Expand Down Expand Up @@ -373,6 +376,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
max: 'sourceDateEnd',
},
],
isLifecycleEnvolved: true,
})
//#endregion
public sourceDateStart: Date | undefined = undefined;
Expand Down Expand Up @@ -411,6 +415,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
required: true,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public sourceDateEnd: Date | undefined = undefined;
Expand Down Expand Up @@ -457,6 +462,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
max: 4000,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public minHorizontalAccuracyCE90: number | undefined = undefined;
Expand Down Expand Up @@ -490,8 +496,8 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
})
@fieldConfig({
category: FieldCategory.GENERAL,
isCreationEssential: true,
infoMsgCode: ['info-field-tooltip.sensors.tooltip'],
isLifecycleEnvolved: true,
})
//#endregion
public sensors: string[] | undefined = undefined;
Expand Down Expand Up @@ -532,6 +538,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
required: true,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public region: string[] | undefined = undefined;
Expand Down Expand Up @@ -767,6 +774,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
max: 0.072,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public maxResolutionDeg: number | undefined = undefined;
Expand Down Expand Up @@ -813,6 +821,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
max: 8000,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public maxResolutionMeter: number | undefined = undefined;
Expand Down Expand Up @@ -883,6 +892,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
max: 100000000,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public scale: number | undefined = undefined;
Expand Down Expand Up @@ -913,7 +923,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
})
@fieldConfig({
category: FieldCategory.GEO_INFO,
isCreationEssential: true,
infoMsgCode: ['info-general-tooltip.required'],
validation: [
{
Expand All @@ -925,6 +934,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
json: true,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public footprint: GeoJSON | undefined = undefined;
Expand Down Expand Up @@ -956,13 +966,13 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
})
@fieldConfig({
category: FieldCategory.GEO_INFO,
isCreationEssential: true,
validation: [
{
errorMsgCode: 'validation-field.layerPolygonParts.json',
json: true,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public layerPolygonParts: GeoJSON | undefined = undefined;
Expand Down

0 comments on commit 8b42b5f

Please sign in to comment.