Parcourir la source

2ndJan25 afternoon

yung il y a 1 semaine
Parent
commit
59f8c693cf
1 fichiers modifiés avec 25 ajouts et 15 suppressions
  1. 25 15
      src/actorBase.ts

+ 25 - 15
src/actorBase.ts

@@ -25,6 +25,10 @@ interface messageSchemaType {
     composite:  "COMPOSITE" // has other schema
 }
 
+export interface MessageSchemaService extends CRUD {
+    /*  collection of method signatures*/
+}
+
 export interface MessageSchemaDataModel {
     schemaId:       string // identifier 
     schemaName:     string // unique legible name
@@ -33,6 +37,7 @@ export interface MessageSchemaDataModel {
     isConcrete:     boolean // whether is consumable message
 }
 
+
 export interface MessageSchema {
 /*  Descsription steriotype for all Fis messages.
     Has reference to message schema described as interfaces.
@@ -43,13 +48,14 @@ export interface MessageSchema {
     On handling version of message schema, refer to version model
 */
     messageSchemaDataModel: MessageSchemaDataModel
+    messageSchemaService: MessageSchemaService
 }
 
 export interface MessageSchemaCompositeAssociation {
 /*  Associated nodes of a composite schema.
     Note association is one directional */
     compositeMessageSchema: MessageSchema
-    compositeEntries:     Array <MessageSchema>[] 
+    compositeEntries: Array <MessageSchema>[] 
     /*  associated to schema */
 }
     
@@ -68,14 +74,14 @@ export class MessageSchemaImpl implements MessageSchema {
     */
 }
 
-export class MessageSchemaNode extends MessageSchemaAbstractImpl {
+export class MessageSchemaElement extends MessageSchemaImpl {
 /*  fundamental unit of a schema by which composite schema is constructed */
         
-    messageSchemaNodeDataModel: MessageSchemaDataModel
+    messageSchemaElementDataModel: MessageSchemaDataModel
 
-    constructor (messageSchemaNodeDataModel: MessageSchemaDataModel) {
-        super (messageSchemaNodeDataModel)
-        this.messageSchemaNodeDataModel = messageSchemaNodeDataModel
+    constructor (messageSchemaElementDataModel: MessageSchemaDataModel) {
+        super (messageSchemaElementDataModel)
+        this.messageSchemaElementDataModel = messageSchemaElementDataModel
     }
 
        /*  validation:
@@ -83,18 +89,22 @@ export class MessageSchemaNode extends MessageSchemaAbstractImpl {
             - 
     */
 }
-    
-export interface MessageSchemaComposite {
-/*  Schema that has child schema(s) 
-    Extended from MessageSchema*/
-    schemaId:       string 
-    /*  reference to Schema Message which has
-        composite node(s) */
-}
-        
 
 
 
+/*  this section of the code to be saved in file 
+    src/common/services/ */
+
+export interface CRUD {
+    /*  standard method signature for common entity behaviour*/
+        create<T>(dataModel: T): null
+        read<T>(): T
+        update<T>(dataModel: T): null
+        delete<T>(): null
+}
+    
+    
+
 export interface ActorCommands { 
 /*  base actor commands*/
     Subscribe: "SUBSCRIBE", // subsribe to incoming bus