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 anAbstractFolder. EachAbstractFolderconcrete type should define its view configuration holder by returning the implementation fromAbstractFolder.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 Constructor Description AbstractFolderViewHolder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetPrimaryView()Returns theView.getViewName()of the primary view ornullif the first view should be primary.abstract ViewsTabBargetTabBar()Returns theViewsTabBar.abstract List<View>getViews()Returns the list of views.voidinvalidateCaches()Called byAbstractFolder.save()to signal that the view holder should clear any internal state caches.booleanisPrimaryModifiable()Returnstrueif the primaryViewis modifiable.booleanisTabBarModifiable()Returnstrueif theViewsTabBaris modifiable.booleanisViewsModifiable()Returnstrueif the list of views is modifiable.abstract voidsetPrimaryView(String name)Changes the primaryView.abstract voidsetTabBar(ViewsTabBar tabBar)Changes theViewsTabBar.abstract voidsetViews(List<? extends View> views)Changes the list ofViews.
-
-
-
Method Detail
-
getViews
@NonNull public abstract List<View> getViews()
Returns the list of views. IfisViewsModifiable()then this list is modifiable.- Returns:
- the list of views.
-
setViews
public abstract void setViews(@NonNull List<? extends View> views)- Parameters:
views- the new list ofViews.- See Also:
isViewsModifiable()
-
isViewsModifiable
public boolean isViewsModifiable()
Returnstrueif the list of views is modifiable.- Returns:
trueif the list of views is modifiable.
-
getPrimaryView
@CheckForNull public abstract String 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
public abstract void setPrimaryView(@CheckForNull String name)- Parameters:
name- theView.getViewName()of the primaryViewofnullto use the first view.- See Also:
isPrimaryModifiable()
-
isPrimaryModifiable
public boolean isPrimaryModifiable()
Returnstrueif the primaryViewis modifiable.- Returns:
trueif the primaryViewis modifiable.
-
getTabBar
@NonNull public abstract ViewsTabBar getTabBar()
Returns theViewsTabBar.- Returns:
- the
ViewsTabBar.
-
setTabBar
public abstract void setTabBar(@NonNull ViewsTabBar tabBar)- Parameters:
tabBar- the newViewsTabBar.- See Also:
isTabBarModifiable()
-
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.
-
-