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 ofAbstractFolderViewHolder
which 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 String
getPrimaryView()
Returns theView.getViewName()
of the primary view ornull
if the first view should be primary.ViewsTabBar
getTabBar()
Returns theViewsTabBar
.List<View>
getViews()
Returns the list of views.void
setPrimaryView(String primaryView)
Changes the primaryView
.void
setTabBar(ViewsTabBar tabBar)
Changes theViewsTabBar
.void
setViews(List<? extends View> views)
Changes the list ofView
s.-
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:
getViews
in classAbstractFolderViewHolder
- Returns:
- the list of views.
-
setViews
public void setViews(List<? extends View> views)
Changes the list ofView
s. May be a no-op ifAbstractFolderViewHolder.isViewsModifiable()
returnsfalse
.- Specified by:
setViews
in classAbstractFolderViewHolder
- Parameters:
views
- the new list ofView
s.- See Also:
AbstractFolderViewHolder.isViewsModifiable()
-
getPrimaryView
public String getPrimaryView()
Returns theView.getViewName()
of the primary view ornull
if the first view should be primary.- Specified by:
getPrimaryView
in classAbstractFolderViewHolder
- Returns:
- the
View.getViewName()
of the primary view ornull
if 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:
setPrimaryView
in classAbstractFolderViewHolder
- Parameters:
primaryView
- theView.getViewName()
of the primaryView
ofnull
to use the first view.- See Also:
AbstractFolderViewHolder.isPrimaryModifiable()
-
getTabBar
public ViewsTabBar getTabBar()
Returns theViewsTabBar
.- Specified by:
getTabBar
in classAbstractFolderViewHolder
- Returns:
- the
ViewsTabBar
.
-
setTabBar
public void setTabBar(ViewsTabBar tabBar)
Changes theViewsTabBar
. May be a no-op ifAbstractFolderViewHolder.isTabBarModifiable()
returnsfalse
.- Specified by:
setTabBar
in classAbstractFolderViewHolder
- Parameters:
tabBar
- the newViewsTabBar
.- See Also:
AbstractFolderViewHolder.isTabBarModifiable()
-
-