Class ViewSettings.AssociatedView.Builder

Object
Builder
Enclosing class:
ViewSettings.AssociatedView

public static class ViewSettings.AssociatedView.Builder extends Object
The builder for ViewSettings.AssociatedView record.
  • Constructor Details

    • Builder

      public Builder()
      Creates an empty builder.
    • Builder

      public Builder(ViewSettings.AssociatedView view)
      Creates a builder that copies the state of an already existing AssociatedView record.
      Parameters:
      view - view record to copy
  • Method Details

    • build

      Creates an instance of ViewSettings.AssociatedView.
      Returns:
      new instance of associated view record, or null if the builder is in invalid state (no view ID is set)
    • getMenuPages

      @Nullable public Set<StructurePage> getMenuPages()
      Returns:
      set of pages on which the associated view will be in the menu, or null if the view should be in the menu on all pages.
    • setMenuPages

      public void setMenuPages(@Nullable Set<StructurePage> menuPages)
      Updates the set of pages on which the associated view will be in the menu.
      Parameters:
      menuPages - set of pages, on which the associated view should be in the Views drop-down menu. If null is passed, the view will be in the menu on all pages.
    • getDefaultPages

      @Nullable public Set<StructurePage> getDefaultPages()
      Returns:
      set of pages on which the associated view will be the default, or null if the view should not be default on any page.
    • setDefaultPages

      public void setDefaultPages(@Nullable Set<StructurePage> defaultPages)
      Updates the set of pages on which the associated view will be the default view.
      Parameters:
      defaultPages - set of pages, on which the associated view should be the default view. If null is passed, the view will not be the default on any page.
    • getViewId

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

      public void setViewId(long viewId)
      Sets the ID of the view. No checks are made to make sure a view with such ID exists.
      Parameters:
      viewId - the id of the view
    • toString

      public String toString()
      Overrides:
      toString in class Object