Class DefaultFolderViewHolder
- java.lang.Object
-
- com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder
-
- com.cloudbees.hudson.plugins.folder.views.DefaultFolderViewHolder
-
public class DefaultFolderViewHolder extends AbstractFolderViewHolder
The default implementation ofAbstractFolderViewHolderwhich allows all the elements to be modified.
-
-
Constructor Summary
Constructors Constructor Description DefaultFolderViewHolder(Collection<? extends View> views, String primaryView, ViewsTabBar tabBar)Our constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPrimaryView()Returns theView.getViewName()of the primary view ornullif the first view should be primary.ViewsTabBargetTabBar()Returns theViewsTabBar.List<View>getViews()Returns the list of views.voidsetPrimaryView(String primaryView)Changes the primaryView.voidsetTabBar(ViewsTabBar tabBar)Changes theViewsTabBar.voidsetViews(List<? extends View> views)Changes the list ofViews.-
Methods inherited from class com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder
invalidateCaches, isPrimaryModifiable, isTabBarModifiable, isViewsModifiable
-
-
-
-
Constructor Detail
-
DefaultFolderViewHolder
@DataBoundConstructor public DefaultFolderViewHolder(@NonNull Collection<? extends View> views, @CheckForNull String primaryView, @NonNull ViewsTabBar tabBar)Our constructor.- Parameters:
views- the initial views.primaryView- the initial primary view.tabBar- the initialViewsTabBar.
-
-
Method Detail
-
getViews
public List<View> getViews()
Returns the list of views. IfAbstractFolderViewHolder.isViewsModifiable()then this list is modifiable.- Specified by:
getViewsin classAbstractFolderViewHolder- Returns:
- the list of views.
-
setViews
public void setViews(List<? extends View> views)
Changes the list ofViews. May be a no-op ifAbstractFolderViewHolder.isViewsModifiable()returnsfalse.- Specified by:
setViewsin classAbstractFolderViewHolder- Parameters:
views- the new list ofViews.- See Also:
AbstractFolderViewHolder.isViewsModifiable()
-
getPrimaryView
public String getPrimaryView()
Returns theView.getViewName()of the primary view ornullif the first view should be primary.- Specified by:
getPrimaryViewin classAbstractFolderViewHolder- Returns:
- the
View.getViewName()of the primary view ornullif the first view should be primary.
-
setPrimaryView
public void setPrimaryView(String primaryView)
Changes the primaryView. May be a no-op ifAbstractFolderViewHolder.isPrimaryModifiable()returnsfalse.- Specified by:
setPrimaryViewin classAbstractFolderViewHolder- Parameters:
primaryView- theView.getViewName()of the primaryViewofnullto use the first view.- See Also:
AbstractFolderViewHolder.isPrimaryModifiable()
-
getTabBar
public ViewsTabBar getTabBar()
Returns theViewsTabBar.- Specified by:
getTabBarin classAbstractFolderViewHolder- Returns:
- the
ViewsTabBar.
-
setTabBar
public void setTabBar(ViewsTabBar tabBar)
Changes theViewsTabBar. May be a no-op ifAbstractFolderViewHolder.isTabBarModifiable()returnsfalse.- Specified by:
setTabBarin classAbstractFolderViewHolder- Parameters:
tabBar- the newViewsTabBar.- See Also:
AbstractFolderViewHolder.isTabBarModifiable()
-
-