summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/services')
-rw-r--r--catalog-ui/src/app/ng2/services/data-type.service.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/services/data-type.service.ts b/catalog-ui/src/app/ng2/services/data-type.service.ts
index 85c8b898aa..5b08e9323f 100644
--- a/catalog-ui/src/app/ng2/services/data-type.service.ts
+++ b/catalog-ui/src/app/ng2/services/data-type.service.ts
@@ -39,6 +39,15 @@ export class DataTypeService {
this.dataTypes = dataTypeService.getAllDataTypes(); //This should eventually be replaced by an NG2 call to the backend instead of utilizing Angular1 downgraded component.
}
+ public getDataTypeByModelAndTypeName(modelName: string, typeName: string): DataTypeModel {
+ this.dataTypes = this.dataTypeService.getAllDataTypesFromModel(modelName);
+ let dataTypeFound = this.dataTypes[typeName];
+ if (!dataTypeFound) {
+ console.log("MISSING Datatype for model " + modelName + " and type: " + typeName);
+ }
+ return dataTypeFound;
+ }
+
public getDataTypeByTypeName(typeName: string): DataTypeModel {
if(!this.dataTypes){
this.dataTypes = this.dataTypeService.getAllDataTypes();