Service - Variant Manager

From Izara Wiki
Jump to navigation Jump to search

Overview

Each product is handled by a Service - Variant (handlers) service.

The Variant Manager service handles shared orchestration of Variant Handler services.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-variant-manager/src/master/

Schemas

ObjectSchemas

variant

{
  "objectType": "variant",
  "canDelete": true,
  "belongTo": {
    "serviceTag": "UserAccount",
    "objectType": "user"
  },
  "addOnDataStructure": [],
  "storageResources": {
    "dynamoDB": {
      "storageType": "dynamoDB",
      "tableName": "VariantRecord",
      "serviceTag": "VariantManager"
    },
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "variantId": {
      "type": "string",
      "randomOnCreate": true,
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "dynamoDB",
        "graph"
      ]
    },
    "variantHandlerServiceNameTag": {
      "type": "string",
      "randomOnCreate": false,
      "requiredOnCreate": false,
      "optionalOnCreate": true,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "dynamoDB",
        "graph"
      ]
    }
  },
  "compositeKeyDeliminator": "_",
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "variantId"
    }
  ],
  "generatedBy": "userGenerated"
}

variantAttributeLabel

{
  "objectType": "variantAttributeLabel",
  "addOnDataStructure": [],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "variantAttributeLabelId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "variantAttributeLabelId"
    }
  ],
  "generatedBy": "userGenerated",
  "compositeKeyDeliminator": "_"
}

variantAttributeLink

{
  "objectType": "variantAttributeLink",
  "addOnDataStructure": [],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "variantAttributeLinkId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "variantAttributeLinkId"
    }
  ],
  "generatedBy": "userGenerated",
  "compositeKeyDeliminator": "_"
}

variantAttributeValue

{
  "objectType": "variantAttributeValue",
  "addOnDataStructure": [],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "variantAttributeValueId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "variantAttributeValueId"
    }
  ],
  "generatedBy": "userGenerated",
  "compositeKeyDeliminator": "_"
}

RelationshipSchemas

isVariantAttribute

{
  "relationshipServiceTag": "VariantManager",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "variantAttributeLink",
          "serviceTag": "VariantManager"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "variantAttributeValue",
          "serviceTag": "VariantManager"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}

isVariantAttributeLabel

{
  "relationshipServiceTag": "VariantManager",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "variantAttributeValue",
          "serviceTag": "VariantManager"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "variantAttributeLabel",
          "serviceTag": "VariantManager"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}

hasVariantAttributeLink

{
  "relationshipServiceTag": "VariantManager",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "variant",
          "serviceTag": "VariantManager"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "variantAttributeLink",
          "serviceTag": "VariantManager"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": true,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}

disabledVariantAttributeLink

{
  "relationshipServiceTag": "VariantManager",
  "fieldNames": {
  
  },
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "variant",
          "serviceTag": "VariantManager"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "variantAttributeLink",
          "serviceTag": "VariantManager"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}

TranslateIdsCache

Stores a record for any unique translateId process

{
	cacheId // fromType + "_" + fromDataId + "_" + toType
	toDataId
	expireTime
}
  • partition key: cacheId
  • sort key: toDataId
  • expireTime is set as an automatic DynamoDB TTL attibute

Working documents

Variant Manager