Class PoolProjectSelectorDescriptor
- java.lang.Object
-
- jetbrains.buildServer.controllers.popupDialogs.PopupDialogType<CheckListForm>
-
- jetbrains.buildServer.controllers.popupDialogs.checkLists.CheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
-
- jetbrains.buildServer.controllers.agent.PoolProjectSelectorDescriptor
-
- All Implemented Interfaces:
CheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>,CheckListFilteringSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData>,CheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>,ServerExtension,TeamCityExtension
public class PoolProjectSelectorDescriptor extends CheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean> implements CheckListFilteringSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData>, CheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>, CheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Author:
- Leonid Bushuev from JetBrains
-
-
Constructor Summary
Constructors Constructor Description PoolProjectSelectorDescriptor(AgentPoolManager poolManager, AgentTypeFinder agentTypeFinder, ProjectManager projectManager, SecurityContextEx securityContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem> checkedItems, Boolean dissociateFromOtherPools, jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Applies user changes.List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem>collectItems(jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Collects the items to be listed in popup.jetbrains.buildServer.controllers.agent.PoolProjectSelectorDatacreateContext(String contextId, javax.servlet.http.HttpServletRequest request)Creates context object.CheckListCurrentStateInfoSupportcreateCurrentStateInfoSupport(jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Creates implementation of current state info support.CheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>createCustomOptionsSupport(jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Creates implementation of custom options support.CheckListFilteringSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData>createFilteringSupport(jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Creates implementation of filtering support.CheckListItemInfocreateItemInfo(jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem item, jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Provides the information about the specified item.CheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>createValidationSupport(jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Creates implementation of validation support.voiddisposeContext(jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Disposes context object if needed.Set<String>filterItems(List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem> items, String keyPhrase, jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Filters check list items.BooleangetCustomOptions(javax.servlet.http.HttpServletRequest request, jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Creates bean with custom options to be passed into custom options JSP page.StringgetCustomOptionsBeanName()Returns name of the bean to be passed into custom options JSP page.StringgetCustomOptionsJspPagePath()Returns path to the JSP page to be added in popup content.StringgetItemRendererJspPage()Returns item renderer JSP page.StringgetNoWarningsText()Returns the text to be displayed when no warnings were returned fromCheckListValidationSupport.getWarnings(java.util.List, Object, Object)or null to show no text in that caseStringgetTopHtmlNote()Returns HTML message to be shown on the top of the popup (message is not escaped, so can contain HTML code).StringgetValidationProgressText()Returns the text to be displayed while warnings are being collected.List<Warning>getWarnings(List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem> checkedItems, Boolean dissociateFromOtherPools, jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Collects warnings to be shown to user.-
Methods inherited from class jetbrains.buildServer.controllers.popupDialogs.checkLists.CheckListPopupDialogType
createForm, fillModel
-
Methods inherited from class jetbrains.buildServer.controllers.popupDialogs.PopupDialogType
getActions, getFormClass, getJspPagePath, getTypeId, registerAction
-
-
-
-
Constructor Detail
-
PoolProjectSelectorDescriptor
public PoolProjectSelectorDescriptor(@NotNull AgentPoolManager poolManager, @NotNull AgentTypeFinder agentTypeFinder, @NotNull ProjectManager projectManager, @NotNull SecurityContextEx securityContext)
-
-
Method Detail
-
createContext
@NotNull public jetbrains.buildServer.controllers.agent.PoolProjectSelectorData createContext(@Nullable String contextId, @NotNull javax.servlet.http.HttpServletRequest request)Description copied from class:CheckListPopupDialogTypeCreates context object. Context is an object that holds any info about the certain popup showing. Method is called only one time per popup showing.- Specified by:
createContextin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
collectItems
@NotNull public List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem> collectItems(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from class:CheckListPopupDialogTypeCollects the items to be listed in popup. Actually Item_T need not implement any interfaces, the information about the item is got viaCheckListPopupDialogType.createItemInfo(Object, Object)method. Method is called only one time per popup showing.- Specified by:
collectItemsin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
context- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- list of the items to be listed in popup in the order in which they must be listed
-
createItemInfo
@NotNull public CheckListItemInfo createItemInfo(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem item, @NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from class:CheckListPopupDialogTypeProvides the information about the specified item. This method and all the methods of the created info object are called only one time per item per popup showing.- Specified by:
createItemInfoin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
item- item to get information aboutcontext- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- information of the specified item
-
getItemRendererJspPage
@NotNull public String getItemRendererJspPage()
Description copied from class:CheckListPopupDialogTypeReturns item renderer JSP page.- Specified by:
getItemRendererJspPagein classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
getTopHtmlNote
@Nullable public String getTopHtmlNote()
Description copied from class:CheckListPopupDialogTypeReturns HTML message to be shown on the top of the popup (message is not escaped, so can contain HTML code).- Specified by:
getTopHtmlNotein classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
createCustomOptionsSupport
@NotNull public CheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean> createCustomOptionsSupport(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from class:CheckListPopupDialogTypeCreates implementation of custom options support. SeeCheckListCustomOptionsSupportfor more info. Method is called only one time per popup showing.- Specified by:
createCustomOptionsSupportin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
context- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- implementation of custom options support or null
-
getCustomOptionsJspPagePath
@NotNull public String getCustomOptionsJspPagePath()
Description copied from interface:CheckListCustomOptionsSupportReturns path to the JSP page to be added in popup content. Your JSP page will be inserted inside the <form> tag.- Specified by:
getCustomOptionsJspPagePathin interfaceCheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
getCustomOptionsBeanName
@NotNull public String getCustomOptionsBeanName()
Description copied from interface:CheckListCustomOptionsSupportReturns name of the bean to be passed into custom options JSP page.- Specified by:
getCustomOptionsBeanNamein interfaceCheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
getCustomOptions
@NotNull public Boolean getCustomOptions(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from interface:CheckListCustomOptionsSupportCreates bean with custom options to be passed into custom options JSP page. This method can be called in two cases:- Initializing GET request - then there are no custom parameters in request, so you must create default bean
- Some POST requests - then request contains the values of all form elements on your JSP page
- Specified by:
getCustomOptionsin interfaceCheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
createFilteringSupport
@NotNull public CheckListFilteringSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData> createFilteringSupport(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from class:CheckListPopupDialogTypeCreates implementation of filtering support. SeeCheckListFilteringSupportfor more info. Method is called only one time per popup showing.- Specified by:
createFilteringSupportin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
context- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- implementation of filtering support or null
-
filterItems
@NotNull public Set<String> filterItems(@NotNull List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem> items, @NotNull String keyPhrase, @NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from interface:CheckListFilteringSupportFilters check list items.- Specified by:
filterItemsin interfaceCheckListFilteringSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData>- Parameters:
items- all check list items (items and their order are same as in the list which was returned fromCheckListPopupDialogType.collectItems(Object))keyPhrase- key phrase to filter items by; is guaranteed to be trimmed and non-emptycontext- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- set of the accepted item identifiers (item identifiers must correspond to the ones, which were returned from
CheckListItemInfo.getId())
-
createCurrentStateInfoSupport
@NotNull public CheckListCurrentStateInfoSupport createCurrentStateInfoSupport(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from class:CheckListPopupDialogTypeCreates implementation of current state info support. SeeCheckListCurrentStateInfoSupportfor more info. Method is called only one time per popup showing.- Specified by:
createCurrentStateInfoSupportin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
context- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- implementation of current state info support or null
-
createValidationSupport
@NotNull public CheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean> createValidationSupport(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from class:CheckListPopupDialogTypeCreates implementation of validation support. SeeCheckListValidationSupportfor more info. Method is called only one time per popup showing.- Specified by:
createValidationSupportin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
context- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- implementation of validation support or null
-
getWarnings
@NotNull public List<Warning> getWarnings(@NotNull List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem> checkedItems, @Nullable Boolean dissociateFromOtherPools, @NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from interface:CheckListValidationSupportCollects warnings to be shown to user. Method is called on every user change.- Specified by:
getWarningsin interfaceCheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
checkedItems- checked list items (sublist of the list, returned byCheckListPopupDialogType.collectItems(Object)method, in the same order)dissociateFromOtherPools- not null custom options bean, which was provided byCheckListCustomOptionsSupport, or null if there is no custom options supportcontext- check list popup context, seeCheckListPopupDialogTypefor more info- Returns:
- list of warnings to be listed in popup in the order in which they must be listed
-
getNoWarningsText
@Nullable public String getNoWarningsText()
Description copied from interface:CheckListValidationSupportReturns the text to be displayed when no warnings were returned fromCheckListValidationSupport.getWarnings(java.util.List, Object, Object)or null to show no text in that case- Specified by:
getNoWarningsTextin interfaceCheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
getValidationProgressText
@NotNull public String getValidationProgressText()
Description copied from interface:CheckListValidationSupportReturns the text to be displayed while warnings are being collected.- Specified by:
getValidationProgressTextin interfaceCheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Returns:
- see above
-
apply
public void apply(@NotNull List<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem> checkedItems, @Nullable Boolean dissociateFromOtherPools, @NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Description copied from class:CheckListPopupDialogTypeApplies user changes. Method is called after pressing "Apply" button or right after the changes were made, see#mustApplyChangesImmediately(Object)for more info.- Specified by:
applyin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
checkedItems- checked list items (sublist of the list, returned byCheckListPopupDialogType.collectItems(Object)method, in the same order)dissociateFromOtherPools- not null custom options bean, which was provided byCheckListCustomOptionsSupport, or null if there is no custom options supportcontext- check list popup context, seeCheckListPopupDialogTypefor more info
-
disposeContext
public void disposeContext(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)Description copied from class:CheckListPopupDialogTypeDisposes context object if needed. Method is called after pressing "Apply" button or "Cancel" link in popup and after showing popup of this type in new context.- Specified by:
disposeContextin classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>- Parameters:
context- check list popup context, seeCheckListPopupDialogTypefor more info
-
-