Interface DynamicKeywordEvents

All Superinterfaces:
byps.Remote, de.elo.utils.net.Remote, Remote

public interface DynamicKeywordEvents extends byps.Remote
Defines functions to provide a dynamic keyword list. This interface can be implemented by Indexserver plugins. Objects of this interface are created by DynamicKeywordEventsFactory.create(IXServerEventsContext, String) for each Indexserver request.
Since:
10.99.999.010
  • Field Details

    • DEFAULT_KEYWORDING_REFERENCE_PLUGIN_ID

      static final String DEFAULT_KEYWORDING_REFERENCE_PLUGIN_ID
      Plugin with default implementation of dynamic keyword events.
      See Also:
    • DEFAULT_KEYWORDING_REFERENCE_PLUGIN_PATH

      static final String DEFAULT_KEYWORDING_REFERENCE_PLUGIN_PATH
      Specifier for dynamic keyword events of referencing index fields (DocMaskLineC.TYPE_REFERENCE).
      See Also:
  • Method Details

    • open

      void open(IXServerEventsContext ec, Sord sord, String groupName) throws byps.RemoteException
      Opens the data provider. Overwrite this method with initialization code.
      Parameters:
      ec - Script context with clientInfo and userInfo.
      sord - The Sord currently in process. May not be present in the database yet. This value contains the data to be completed. The indexing values of this sord are used to filter the data provider.
      groupName - String - The name of the group that currently has the focus. Implementations of this class should respect this value if it serves as data provider for more than a single mask line.
      Throws:
      byps.RemoteException
    • openMap

      void openMap(IXServerEventsContext ec, Map<String,String> data, String groupName) throws byps.RemoteException
      Opens the data provider. Overwrite this method with initialization code.
      Parameters:
      ec - Script context with clientInfo and userInfo.
      data - The data currently in process. The values in this object are used to filter the data provider.
      groupName - String - The name of the group that currently has the focus. Implementations of this class should respect this value if it serves as data provider for more than a single form line.
      Throws:
      byps.RemoteException
    • close

      void close() throws byps.RemoteException
      Closes the data provider. This function is called last. Implementations may put shutdown or cleanup code in here.
      Throws:
      byps.RemoteException
    • hasMoreRows

      boolean hasMoreRows() throws byps.RemoteException
      The IX only fetches rows up to the hard limit of 1000. If the Sord ( given in the function open(...) ) does not provide enough informations to limit amount of resulting rows below 1000, this function returns true.
      Returns:
      true if there are more than 1000 resulting rows, false otherwise.
      Throws:
      byps.RemoteException
    • getNextRow

      List<String> getNextRow() throws byps.RemoteException
      Returns the next row of the resulting set of data as an array of Strings. The row returned should be different to the result of every previous call of this function. The IX stops calling this function as soon as the limit of rows is reached or null is returned.
      Returns:
      The next row as an array of Strings or null/undefined.
      Throws:
      byps.RemoteException
    • getHeader

      List<String> getHeader() throws byps.RemoteException
      Returns the header of the resulting set as an array of Strings. The order and number of elements must match the order and number of elements in each row. The Header contains human-readable and short descriptions of the corresponding column.
      Returns:
      An array of Strings containing descriptions of the columns.
      Throws:
      byps.RemoteException
    • getKeyNames

      List<String> getKeyNames() throws byps.RemoteException
      Returns the key names of columns. The order and number of elements must match the order and number of elements in each row. Columns not representing any key name must be filled with empty string. The key names are used at the client to complete the indexing values of the Sord.
      Returns:
      An array of Strings containing the key names of the columns.
      Throws:
      byps.RemoteException
    • getMessage

      String getMessage() throws byps.RemoteException
      The script may provide informations about its current state or needs. Example messages are:
      • Please fill in 'XYZ' first
      • Error connecting to data source: connection to host cannot be established.
      • ...
      If set, this message is directly presented to the user instead of any other data.
      Returns:
      String - a message to display at a client.
      Throws:
      byps.RemoteException
    • getTitle

      String getTitle() throws byps.RemoteException
      Returns a brief and succinctly description about the represented data. The title is used as the name of the tab at client side.
      Returns:
      the title of this script.
      Throws:
      byps.RemoteException
    • getColumnProperties

      List<Map<String,String>> getColumnProperties() throws byps.RemoteException
      Returns the properties of columns. The order and number of elements must match the order and number of elements in each row. Columns that must not have a defined property must be filled with null.

      Example: having a dynamic keyword list with three columns you can set the width of the second column to 100 pixels by using the following code snippet:
       
       function getColumnProperties() {
         return [
            null,
            { "width-px": "100" },
            null
         ]
       }
       
       
      Returns:
      A map of properties for a column.
      Throws:
      byps.RemoteException