Details
-
Story
-
Status: Closed
-
Medium
-
Resolution: Done
-
None
Description
For blueprint scripts that require access to elements stored in the TEMPLATE_RESOLUTION table of the CDS DB, the blueprint processor offers the function
AbstractComponentFunction.storedContentFromResolvedArtifactNB(resolutionKey, artifactName),
which returns exactly one result if the specified resolutionKey and artifactName are available.
In some scenarios, it is necessary to find all elements matching certain criteria. We would like to add two functions
a) AbstractComponentFunction.storedArtifactNamesAndResolutionKeysNB()
which returns a Map<String, List<String>>, where the keys are the artifactNames stored for the current blueprint and blueprint version, with the list of their resolutionKeys as values.
b) AbstractComponentFunction.storedResolutionKeysForArtifactNameNB(artifactName)
which returns a list of String of all resolutionKeys stored for the current blueprint, blueprint version and the specified artifactName.
If no element is found, empty lists are returned (no error thrown).
In a second step, the retrieved list can be used to fetch the result for selected or all of the contained qualifiers iteratively, using
AbstractComponentFunction.storedContentFromResolvedArtifactNB.
Even though this approach requires two steps, we think it is preferable to avoid excessive data transfer.