Interface ScreenData

All Known Implementing Classes:
ScreenDataImpl

public interface ScreenData
Interface defining methods for interacting with data API elements of a screen.
  • Method Details

    • getDataContext

      DataContext getDataContext()
      Returns screen's DataContext.
      Throws:
      IllegalStateException - if the DataContext is not defined
    • getDataContextOrNull

      @Nullable DataContext getDataContextOrNull()
      Returns screen's DataContext or null if it is not defined.
    • setDataContext

      void setDataContext(DataContext dataContext)
      Sets DataContext instance for the screen.
    • loadAll

      void loadAll()
      Performs DataLoader.load() for all loaders registered in the screen.
    • getContainer

      <T extends InstanceContainer<?>> T getContainer(String id)
      Returns a container by its id.
      Throws:
      IllegalArgumentException - if there is no such container in the screen
    • getLoader

      <T extends DataLoader> T getLoader(String id)
      Returns a loader by its id.
      Throws:
      IllegalArgumentException - if there is no such loader in the screen
    • getContainerIds

      Set<String> getContainerIds()
      Returns ids of all registered containers.
    • getLoaderIds

      Set<String> getLoaderIds()
      Returns ids of all registered loaders.
    • registerContainer

      void registerContainer(String id, InstanceContainer<?> container)
      Registers the given container in the screen.
    • registerLoader

      void registerLoader(String id, DataLoader loader)
      Registers the given loader in the screen.