Class ViewSettings.AssociatedView.Builder
Object
Builder
- Enclosing class:
- ViewSettings.AssociatedView
The builder for
ViewSettings.AssociatedView record.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Creates an empty builder.Creates a builder that copies the state of an already existingAssociatedViewrecord. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an instance ofViewSettings.AssociatedView.longvoidsetDefaultPages(Set<StructurePage> defaultPages) Updates the set of pages on which the associated view will be the default view.voidsetMenuPages(Set<StructurePage> menuPages) Updates the set of pages on which the associated view will be in the menu.voidsetViewId(long viewId) Sets the ID of the view.toString()
-
Constructor Details
-
Builder
public Builder()Creates an empty builder. -
Builder
Creates a builder that copies the state of an already existingAssociatedViewrecord.- Parameters:
view- view record to copy
-
-
Method Details
-
build
Creates an instance ofViewSettings.AssociatedView.- Returns:
- new instance of associated view record, or
nullif the builder is in invalid state (no view ID is set)
-
getMenuPages
- Returns:
- set of pages on which the associated view will be in the menu, or
nullif the view should be in the menu on all pages.
-
setMenuPages
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. Ifnullis passed, the view will be in the menu on all pages.
-
getDefaultPages
- Returns:
- set of pages on which the associated view will be the default, or
nullif the view should not be default on any page.
-
setDefaultPages
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. Ifnullis 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
-