Service - Media Link
Overview
Manages Media Links, links might attach to many subject node types, eg Product, Sell Offer, Product Attribute, Sell Offer Term,..
Repository
https://bitbucket.org/izara-core-media/izara-core-media-media-link/src/master/
DynamoDB tables
Standard Config Table Per Service
Configuration tags
{
configKey: "MediaGraphServiceName"
configTag: "MediaGraphServiceName"
configValue: xxx // eg: "MediaGraph"
}
{
configKey: "TranslationGraphServiceName"
configTag: "TranslationGraphServiceName"
configValue: xxx // eg: "TranslationGraph"
}
LogicalResults
Stores results for any requests to perform logical searches on media links
{
resultId: xxx // eg: filterMainId for a single logical element
dataId: xxx // one mediaLinkId
}
- partition key: resultId
- sort key: dataId
Graph database
Service - Media Graph
Nodes
{
nodeLabel: "mediaLink",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
mediaLinkId: {
identifier: true, // create unique id from request details
},
mediaId: {
immutable: true,
},
mediaHandlerServiceNameTag: {
immutable: true,
},
},
}
}
{
nodeLabel: "mediaLinkPropertyLabel",
}
{
nodeLabel: "mediaLinkProperty",
}
- see DataSchemaLib
Relationships
{
relationshipType: "has_mediaLinkProperty",
}
{
relationshipType: "disabled_mediaLinkProperty",
}
{
relationshipType: "is_mediaLinkPropertyLabel",
}
{
relationshipType: "is_media",
}
- see DataSchemaLib
Basic node schemas
Schema comes from BasicNodeSchemaLib
- mediaLinkPropertyLabel
- mediaLinkProperty
Complex Filter requests
{
filterType: "mediaLink"
type: "group",
elements:
[
{
type: "complexFilter",
complexFilter: {
filterType: "mediaLinkProperty",
type: "group",
elements:
[
{
type: "logical",
logicalTag: "propertyLabelId",
comparison: "equals",
value: "lksdflkfldfgldfkgjldfg"
},
]
}
},
]
}
- filterType: "mediaLinkProperty" sends to MediaLink service and returns resultType = "mediaLinkProperty" - by splitting into a lower level filter_type we can cache results at that level then use translateIds system to change to mediaLinkIds, this could be useful in the future when we want propertyIds to translate to other filterTypes
{
filterType: "mediaLink"
type: "group",
elements:
[
{
type: "complexFilter",
complexFilter: {
filterType: "mediaLinkPropertyTranslation"
type: "group",
elements:
[
{
type: "logical",
logicalTag: "textTag_languageId_text",
resultType: "mediaLinkProperty",
textTag: "mediaLinkPropertyValue",
languageId: "en",
text: "Blue",
subjectIdentifierPropertyName: "propertyId",
caseSensitive: true
},
]
}
},
...
]
}
- mediaLinkPropertyTranslation filterType sends logical element directly to Translation service, which recognises logicalTag: "textTag_languageId_text" and caches the subjectIdentifierPropertyName value in its LogicalResults table