Class ViewSettings.AssociatedView

Object
AssociatedView
Enclosing class:
ViewSettings

public static class ViewSettings.AssociatedView extends Object

AssociatedView is a record of a view association within ViewSettings. A record contains a view ID and "menu" and "default" per-page markers that tell if the specified view is offered to the user in the menu on a page and if the view is the default on a page.

The markers are represented as two sets of StructurePage - menuPages set contains pages on which the view is offered in drop-down, and defaultPages set contains pages on which the view is the default.

This class is immutable and thread-safe. To construct a new instance, use ViewSettings.AssociatedView.Builder.

  • Method Details

    • getMenuPages

      @NotNull public Set<StructurePage> getMenuPages()
      Returns:
      unmodifiable set of pages which have this view in the drop-down
    • getDefaultPages

      @NotNull public Set<StructurePage> getDefaultPages()
      Returns:
      unmodifiable set of pages which have this view as the default
    • getViewId

      public long getViewId()
      Returns:
      the view ID
    • isOnMenu

      public boolean isOnMenu(StructurePage page)
      Checks if the view should be displayed in the menu on the specified page.
      Parameters:
      page - page with Structure widget
      Returns:
      true if the view should be offered in the drop-down
    • isDefault

      public boolean isDefault(StructurePage page)
      Checks if the view is the default on the specified page.
      Parameters:
      page - page with Structure widget
      Returns:
      true if the view is the default
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object