Interface TablePresentations

All Known Implementing Classes:
TablePresentationsImpl

public interface TablePresentations
Provide the workflow with presentations (visual settings of a component).

A component must implement HasTablePresentations interface.
See Also:
  • Method Details

    • getCurrent

      @Nullable TablePresentation getCurrent()
      Returns the current active presentation or null if a current presentation didn't set
    • setCurrent

      void setCurrent(@Nullable TablePresentation p)
      Sets current active presentation for a component
    • getSettingsString

      @Nullable String getSettingsString(TablePresentation p)
      Parameters:
      p - presentation
      Returns:
      user settings for the selected presentation or null if the presentation doesn't exist or if the presentation doesn't contain any settings
    • setSettings

      void setSettings(TablePresentation p, @Nullable String settings)
      Sets user settings for the selected presentation
      Parameters:
      p - presentation
      settings - user settings
    • getPresentation

      @Nullable TablePresentation getPresentation(Object id)
      Returns presentation by its id or null if a presentation doesn't exist
    • getCaption

      @Nullable String getCaption(Object id)
      Returns presentation caption by its id
    • getPresentationIds

      Collection<Object> getPresentationIds()
      Returns a collection of the component presentations
    • getDefault

      @Nullable TablePresentation getDefault()
      Returns a default presentation or null if it didn't set
    • setDefault

      void setDefault(@Nullable TablePresentation p)
      Sets a default presentation
    • add

      void add(TablePresentation p)
      Adds a new presentation
    • remove

      void remove(TablePresentation p)
      Removes a presentation from the list of available presentations
    • modify

      void modify(TablePresentation p)
      Modifies the selected presentation
    • isAutoSave

      boolean isAutoSave(TablePresentation p)
      Returns true if the selected presentation has an autoSave settings else returns false
    • isGlobal

      boolean isGlobal(TablePresentation p)
      Returns true if the selected presentation is marked as global else returns false
    • commit

      void commit()
      Commits all changes into the database
    • getPresentationByName

      @Nullable TablePresentation getPresentationByName(String name)
      Returns a presentation by its name with ignored case. It returns null if a presentation with such name doesn't exist
    • addListener

      void addListener(PresentationsChangeListener listener)
      Adds listener
    • removeListener

      void removeListener(PresentationsChangeListener listener)
      Removes listener
    • create

      Returns:
      presentation instance or stub if corresponding add-on is not added to the project