added new method 'get_representations' to get representations from placeholder

This commit is contained in:
Jakub Trllo 2022-07-29 17:15:13 +02:00
parent 2d601d051a
commit c65dd9747f

View file

@ -456,8 +456,25 @@ class AbstractPlaceholder:
@abstractmethod
def clean(self):
"""Clean placeholder from hierarchy after loading assets.
"""Clean placeholder from hierarchy after loading assets."""
pass
@abstractmethod
def get_representations(self, current_asset, linked_assets):
"""Query representations based on placeholder data.
Args:
current_asset (str): Name of current
context asset.
linked_assets (List[str]): Names of assets
linked to current context asset.
Returns:
Iterable[Dict[str, Any]]: Representations that are matching
placeholder filters.
"""
pass
@abstractmethod