Class AbstractFolderViewHolder

java.lang.Object
com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder
Direct Known Subclasses:
DefaultFolderViewHolder

public abstract class AbstractFolderViewHolder extends Object
Responsible for holding the view configuration of an AbstractFolder. Each AbstractFolder concrete type should define its view configuration holder by returning the implementation from AbstractFolder.newFolderViewHolder() Use-cases:
Since:
FIXME
  • Constructor Details

    • AbstractFolderViewHolder

      public AbstractFolderViewHolder()
  • Method Details

    • getViews

      @NonNull public abstract List<View> getViews()
      Returns the list of views. If isViewsModifiable() then this list is modifiable.
      Returns:
      the list of views.
    • setViews

      public abstract void setViews(@NonNull List<? extends View> views)
      Changes the list of Views. May be a no-op if isViewsModifiable() returns false.
      Parameters:
      views - the new list of Views.
      See Also:
    • isViewsModifiable

      public boolean isViewsModifiable()
      Returns true if the list of views is modifiable.
      Returns:
      true if the list of views is modifiable.
    • getPrimaryView

      @CheckForNull public abstract String getPrimaryView()
      Returns the View.getViewName() of the primary view or null if the first view should be primary.
      Returns:
      the View.getViewName() of the primary view or null if the first view should be primary.
    • setPrimaryView

      public abstract void setPrimaryView(@CheckForNull String name)
      Changes the primary View. May be a no-op if isPrimaryModifiable() returns false.
      Parameters:
      name - the View.getViewName() of the primary View of null to use the first view.
      See Also:
    • isPrimaryModifiable

      public boolean isPrimaryModifiable()
      Returns true if the primary View is modifiable.
      Returns:
      true if the primary View is modifiable.
    • getTabBar

      @NonNull public abstract ViewsTabBar getTabBar()
      Returns the ViewsTabBar.
      Returns:
      the ViewsTabBar.
    • setTabBar

      public abstract void setTabBar(@NonNull ViewsTabBar tabBar)
      Changes the ViewsTabBar. May be a no-op if isTabBarModifiable() returns false.
      Parameters:
      tabBar - the new ViewsTabBar.
      See Also:
    • isTabBarModifiable

      public boolean isTabBarModifiable()
      Returns true if the ViewsTabBar is modifiable.
      Returns:
      true if the ViewsTabBar is modifiable.
    • invalidateCaches

      public void invalidateCaches()
      Called by AbstractFolder.save() to signal that the view holder should clear any internal state caches.