Class AbstractFolderViewHolder
java.lang.Object
com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder
- Direct Known Subclasses:
DefaultFolderViewHolder
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:
-
Where the
AbstractFolderpermits the views to be configured by the user, use aDefaultFolderViewHolder -
Where the
AbstractFolderhas a fixed set of pre-configured views, the plugin can provide a custom implementation that returns the fixed set of views.
- Since:
- FIXME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringReturns theView.getViewName()of the primary view ornullif the first view should be primary.abstract ViewsTabBarReturns theViewsTabBar.getViews()Returns the list of views.voidCalled byAbstractFolder.save()to signal that the view holder should clear any internal state caches.booleanReturnstrueif the primaryViewis modifiable.booleanReturnstrueif theViewsTabBaris modifiable.booleanReturnstrueif the list of views is modifiable.abstract voidsetPrimaryView(String name) Changes the primaryView.abstract voidsetTabBar(ViewsTabBar tabBar) Changes theViewsTabBar.abstract voidChanges the list ofViews.
-
Constructor Details
-
AbstractFolderViewHolder
public AbstractFolderViewHolder()
-
-
Method Details
-
getViews
Returns the list of views. IfisViewsModifiable()then this list is modifiable.- Returns:
- the list of views.
-
setViews
- Parameters:
views- the new list ofViews.- See Also:
-
isViewsModifiable
public boolean isViewsModifiable()Returnstrueif the list of views is modifiable.- Returns:
trueif the list of views is modifiable.
-
getPrimaryView
Returns theView.getViewName()of the primary view ornullif the first view should be primary.- Returns:
- the
View.getViewName()of the primary view ornullif the first view should be primary.
-
setPrimaryView
- Parameters:
name- theView.getViewName()of the primaryViewofnullto use the first view.- See Also:
-
isPrimaryModifiable
public boolean isPrimaryModifiable()Returnstrueif the primaryViewis modifiable.- Returns:
trueif the primaryViewis modifiable.
-
getTabBar
Returns theViewsTabBar.- Returns:
- the
ViewsTabBar.
-
setTabBar
- Parameters:
tabBar- the newViewsTabBar.- See Also:
-
isTabBarModifiable
public boolean isTabBarModifiable()Returnstrueif theViewsTabBaris modifiable.- Returns:
trueif theViewsTabBaris modifiable.
-
invalidateCaches
public void invalidateCaches()Called byAbstractFolder.save()to signal that the view holder should clear any internal state caches.
-