Interface LookupValuesExtension

All Superinterfaces:
HostExtensionPoint

public interface LookupValuesExtension extends HostExtensionPoint
Implemented by a plugin bundle to drive one lookup dropdown - or the JSON-schema panel - on a bundle-declared configuration type, from Java, with no host change to how the UI dispatches a lookup request.

An implementation is an ordinary Spring bean in the bundle's plugin context (see the X-Plugin-Context manifest header), discovered through PluginExtensionRegistry exactly as TaskExecutorExtension is - nothing here is OSGi-specific. The bundle pairs a bean with a declaration in its own type-definitions.xml: <method name="toolLookup" delegate="pluginLookup"/> for a property's own dropdown, matched by getCiType()/getMethodName(); the platform's POST /lookup/schema endpoint hardcodes the method name "schemaLookup", so a type offering a JSON-schema panel declares a method by that exact name and needs no other change.

Execution model

lookup(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem, java.lang.String) runs on a UI request thread, not a task worker - a release author's form is waiting on it. Return promptly; a single lookup should take milliseconds, not seconds.

Never let an exception escape. Unlike TaskExecutorExtension#execute, where a thrown exception is at least turned into a readable task failure, an exception here breaks the configuration form the release author is looking at. Catch anything you cannot avoid and return an empty list - exactly the convention the host's own script-based lookup delegates already follow.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    The configuration type this lookup applies to, in prefix.Name form - for example "releaseLlm.McpCallTool".
    The method name from the type's own <method name="..." delegate="pluginLookup"/> declaration - for example "toolLookup" - or the platform's hardcoded "schemaLookup" for the JSON-schema panel.
    lookup(ConfigurationItem ci, String propertyName)
     
  • Method Details

    • getCiType

      String getCiType()
      The configuration type this lookup applies to, in prefix.Name form - for example "releaseLlm.McpCallTool". Matched against the CI's declared type; the pair (getCiType(), getMethodName()) must be unique across all installed plugins, exactly as a TaskExecutorExtension's task type must be.
    • getMethodName

      String getMethodName()
      The method name from the type's own <method name="..." delegate="pluginLookup"/> declaration - for example "toolLookup" - or the platform's hardcoded "schemaLookup" for the JSON-schema panel.
    • lookup

      List<LookupValue> lookup(ConfigurationItem ci, String propertyName)
      Parameters:
      ci - the variable-resolved configuration being edited, as the item itself. Follow its kind="ci" references through the platform's reflection API to any depth (so, e.g., an McpCallTool lookup can read its server reference's URL and credentials), or bind it to a record with ConfigurationBinder.bind. Password properties may be ciphertext; decrypt at the point of use. Do not retain it, pass it to another thread, or use it after this call returns - a reference resolves lazily and needs this call's scope.
      propertyName - the property the UI is populating
      Returns:
      the dropdown's values, in display order; an empty list if there is nothing to offer or anything failed - never null