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
AbstractFolder
permits the views to be configured by the user, use aDefaultFolderViewHolder
-
Where the
AbstractFolder
has 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
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
Returns theView.getViewName()
of the primary view ornull
if the first view should be primary.abstract ViewsTabBar
Returns theViewsTabBar
.getViews()
Returns the list of views.void
Called byAbstractFolder.save()
to signal that the view holder should clear any internal state caches.boolean
Returnstrue
if the primaryView
is modifiable.boolean
Returnstrue
if theViewsTabBar
is modifiable.boolean
Returnstrue
if the list of views is modifiable.abstract void
setPrimaryView
(String name) Changes the primaryView
.abstract void
setTabBar
(ViewsTabBar tabBar) Changes theViewsTabBar
.abstract void
Changes the list ofView
s.
-
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 ofView
s.- See Also:
-
isViewsModifiable
public boolean isViewsModifiable()Returnstrue
if the list of views is modifiable.- Returns:
true
if the list of views is modifiable.
-
getPrimaryView
Returns theView.getViewName()
of the primary view ornull
if the first view should be primary.- Returns:
- the
View.getViewName()
of the primary view ornull
if the first view should be primary.
-
setPrimaryView
- Parameters:
name
- theView.getViewName()
of the primaryView
ofnull
to use the first view.- See Also:
-
isPrimaryModifiable
public boolean isPrimaryModifiable()Returnstrue
if the primaryView
is modifiable.- Returns:
true
if the primaryView
is modifiable.
-
getTabBar
Returns theViewsTabBar
.- Returns:
- the
ViewsTabBar
.
-
setTabBar
- Parameters:
tabBar
- the newViewsTabBar
.- See Also:
-
isTabBarModifiable
public boolean isTabBarModifiable()Returnstrue
if theViewsTabBar
is modifiable.- Returns:
true
if theViewsTabBar
is modifiable.
-
invalidateCaches
public void invalidateCaches()Called byAbstractFolder.save()
to signal that the view holder should clear any internal state caches.
-