Interface StudioAssistSchemaFieldPicker


public interface StudioAssistSchemaFieldPicker
Advanced Java Operator Studio integration - allows a Java Operator to display a schema field picker for String[] properties.

To use, your Java Operator class itself must implement this interface. See additional details at getSchemasForFieldPicker(String, Schema[]).

The selected fields are set, as an array of Strings, to the Java Operator's associated bean property using the following syntax:

  • fieldname, for a top-level field named fieldname
  • toplevelfield.atuplefield.fieldname, selecting fieldname from the tuple-type field atuplefield that is contained in the tuple-type field toplevelfield
  • alistoffields[].foo, selecting the field foo, from the list of tuple-type fields alistoffields
  • a list of lists is indicated by repeating brackets (alistfield[][].atuplefield.foo)
Since:
7.7.3
  • Method Details

    • getSchemasForFieldPicker

      Schema[] getSchemasForFieldPicker(String propertyName, Schema[] inputSchemas)
      Assists Studio in presenting a schema field picker to the user, for String[] property types with UIHints that have set UIHints.setAssociateFieldPicker(boolean) to true.

      The name of the String[] property being configured, propertyName, is provided as a parameter, in case the returned Schemas depends on the particular property being configured.

      Studio will call this when the user selects the UI affordance for "select fields from schemas" associated with a SBPropertyDescriptor property of type String[] (identified via propertyName). Studio will set the results from the user's selection (if any) directly into the UI widget reflecting the property value being edited, then call the property setter. See this class doc for details on the representation for selected fields.

      The receiver may not assume much about the state of typecheck; in particular, input schemas are not available via Operator.getTypecheckInputSchema(int) and instead Studio will provide the current input schemas known to the UI editor via this call.

      Parameters:
      propertyName - the property associated with this call, never null
      inputSchemas - the input schemas as known to Studio. While never null, caller should cautiously examine each entry as some may be null to indicate they are unknown at the time of the call.
      Returns:
      the schemas Studio should display. As a convenice, a null return will display the input schemas (if any). Null entries returned are skipped.