Class SimpleSearchView
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.View
-
- hudson.model.ListView
-
- com.synopsys.arc.jenkinsci.plugins.dynamic_search.views.SimpleSearchView
-
- All Implemented Interfaces:
ExtensionPoint,Describable<View>,DescriptorByNameOwner,DirectlyModifiableView,ModelObject,Saveable,SearchableModelObject,SearchItem,AccessControlled,ModelObjectWithChildren
public class SimpleSearchView extends ListView
List View with dynamic filters. The class is being displayed as a "Dynamic Search View" in Jenkins UI, but we keep the original class name in order to maintain the backward compatibility. Class uses internal storage to pass parameters between pages.- Author:
- Oleg Nenashev
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleSearchView.DescriptorImpl-
Nested classes/interfaces inherited from class hudson.model.ListView
ListView.Listener
-
Nested classes/interfaces inherited from class hudson.model.View
View.AsynchPeople, View.People, View.PropertyList, View.UserInfo
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static VersionNumberMINIMAL_AUTOREFRESH_VERSIONA minimal version, where views can disable the automatic refresh.-
Fields inherited from class hudson.model.View
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, NEW_PRONOUN, owner, PERMISSIONS, READ, SORTER
-
-
Constructor Summary
Constructors Constructor Description SimpleSearchView(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcleanCache()Cleans internal cache of JSON Objects for the session.voiddoSearchSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)JobsFiltergetDefaultFilters()Gets default search options for UI.StringgetDefaultIncludeRegex()DescribableList<ViewJobFilter,Descriptor<ViewJobFilter>>getDefaultJobFilters()JobsFiltergetFilters()Retrieves view filters for the user.List<TopLevelItem>getItems()SearchgetSearch()static StringgetSessionId()Gets identifier of the current session.booleanhasConfiguredFilters()booleanhasUserJobFilterExtensions()booleanisAutomaticRefreshEnabled()An override for future versions (since 1.557).protected ObjectreadResolve()voidsetDefaultIncludeRegex(String regex)protected voidsubmit(org.kohsuke.stapler.StaplerRequest req)voidupdateSearchCache(JobsFilter filter)-
Methods inherited from class hudson.model.ListView
add, contains, doAddJobToView, doCreateItem, doRemoveJobFromView, getColumns, getDefaultColumns, getIncludeRegex, getJobFilters, getJobNames, getStatusFilter, hasJobFilterExtensions, initColumns, initJobFilters, isAddToCurrentView, isRecurse, jobNamesContains, makeSearchIndex, remove, setColumns, setIncludeRegex, setJobFilters, setJobNames, setRecurse, setStatusFilter
-
Methods inherited from class hudson.model.View
all, allInstantiable, create, createViewFromXML, doCheckJobName, doChildrenContextMenu, doConfigDotXml, doConfigSubmit, doDoDelete, doItemCategories, doRssAll, doRssFailed, doRssLatest, doSubmitDescription, getAbsoluteUrl, getACL, getActions, getAllItems, getAllProperties, getApi, getApplicablePropertyDescriptors, getApproximateQueueItemsQuickly, getAsynchPeople, getBuilds, getComputers, getDescription, getDescriptor, getDisplayName, getDynamic, getIndenter, getItem, getItemCreatePermission, getJob, getNewPronoun, getOwner, getOwnerItemGroup, getOwnerPrimaryView, getOwnerViewActions, getPeople, getPostConstructLandingPage, getProperties, getQueueItems, getSearchUrl, getTimeline, getUrl, getViewName, getViewUrl, getVisiblePropertyDescriptors, getWidgets, hasPeople, isDefault, isEditable, isFilterExecutors, isFilterQueue, makeSearchIndex, onJobRenamed, registerPermissions, rename, save, setDescription, toString, updateByXml, updateTransientActions, writeXml
-
Methods inherited from class hudson.model.AbstractModelObject
getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
-
-
-
-
Field Detail
-
MINIMAL_AUTOREFRESH_VERSION
public static final VersionNumber MINIMAL_AUTOREFRESH_VERSION
A minimal version, where views can disable the automatic refresh.- Since:
- 0.2.1
-
-
Constructor Detail
-
SimpleSearchView
@DataBoundConstructor public SimpleSearchView(String name)
-
-
Method Detail
-
readResolve
protected Object readResolve()
- Overrides:
readResolvein classListView
-
getDefaultIncludeRegex
@CheckForNull public String getDefaultIncludeRegex()
-
getDefaultJobFilters
@CheckForNull public DescribableList<ViewJobFilter,Descriptor<ViewJobFilter>> getDefaultJobFilters()
-
submit
protected void submit(org.kohsuke.stapler.StaplerRequest req) throws javax.servlet.ServletException, Descriptor.FormException, IOException- Overrides:
submitin classListView- Throws:
javax.servlet.ServletExceptionDescriptor.FormExceptionIOException
-
getSessionId
public static String getSessionId()
Gets identifier of the current session.- Returns:
- Unique id of the current session.
-
getSearch
public Search getSearch()
- Specified by:
getSearchin interfaceSearchableModelObject- Overrides:
getSearchin classAbstractModelObject
-
hasConfiguredFilters
public boolean hasConfiguredFilters()
-
getFilters
public JobsFilter getFilters()
Retrieves view filters for the user.- Returns:
- View filters from the session if it is available. Otherwise, default filters will be returned.
-
getDefaultFilters
@Nonnull public JobsFilter getDefaultFilters()
Gets default search options for UI.- Returns:
- a default set of filters.
- Since:
- 0.2
-
isAutomaticRefreshEnabled
public boolean isAutomaticRefreshEnabled()
An override for future versions (since 1.557).- Overrides:
isAutomaticRefreshEnabledin classView- Returns:
- Always false
-
setDefaultIncludeRegex
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setDefaultIncludeRegex(String regex)
-
cleanCache
public String cleanCache()
Cleans internal cache of JSON Objects for the session.- Returns:
- Current Session Id
-
getItems
public List<TopLevelItem> getItems()
-
doSearchSubmit
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("0.3.0") public void doSearchSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, UnsupportedEncodingException, javax.servlet.ServletException, Descriptor.FormException
- Throws:
IOExceptionUnsupportedEncodingExceptionjavax.servlet.ServletExceptionDescriptor.FormException
-
updateSearchCache
public void updateSearchCache(JobsFilter filter)
-
hasUserJobFilterExtensions
public boolean hasUserJobFilterExtensions()
-
-