Interface DataSourceService

All Superinterfaces:
Service

public interface DataSourceService
extends Service
Used to generate bindings for a tree of DataSources.
  • Method Details

    • generateValidationRuleBindings

      void generateValidationRuleBindings​(DataSource rootDS)
      Traverse the DataSource tree, and generate bindings such that each node has one primary binding (which exposes field from the current node as well as the fields of parent nodes qualified with the parents name), and a binding for each descendant. This method assumes that the "ownBindings" property of each node is already set with the bindings for the node's fields.
      Parameters:
      rootDS - the root node of a DataSource tree
    • generateValidationContext

      void generateValidationContext​(DataSourceDef rootDSD)
      Traverse the DataSourceDef tree, and generate ValidationContexts such that each node has: A) One primary ValidationSubContext (named after the current node) which contains all fields of the current node and all fields of the current node's ancestors (qualified by the ancestor's name). B) One ValidationSubContext per descendant (named after the descendant itself) which contains only the descendant's fields. The generated ValidationContexts are set on their respective DataSourceDef nodes.
      Parameters:
      rootDSD - the root node of a DataSourceDef tree
    • addFieldsFromModelToDSD

      void addFieldsFromModelToDSD​(Model model, DataSourceDef node)
      Convenience method for adding fields from a model to a DataSourceDef node.
      Parameters:
      model -
      node -
    • registerDSD

      void registerDSD​(DataSourceDef dataSourceDef)
      Register DataSourceDef instance.
      Parameters:
      dataSourceDef -
    • registerDSD

      void registerDSD​(DataSourceDef dataSourceDef, java.lang.Boolean expose)
      Register DataSourceDef instance. If expose is true, this DataSourceDef will be exposed in the UI so that it can be consumed by outbound fixed-length interfaces.
      Parameters:
      dataSourceDef -
      expose -
    • getDSD

      DataSourceDef getDSD​(java.lang.String dataSourceDefName)
      Returns the DataSourceDef instance registered under the provided name.
      Parameters:
      dataSourceDefName -
    • getAllRegisteredDSDs

      java.util.List<DataSourceDef> getAllRegisteredDSDs()
      Return a list of all registered DataSourceDefs ordered by ascending name.
    • getExposedDSDs

      java.util.List<DataSourceDef> getExposedDSDs()
      Return a list of registered DataSourceDefs that should be exposed in the UI.