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 void
apply(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.PoolProjectSelectorData
createContext(String contextId, javax.servlet.http.HttpServletRequest request)
Creates context object.CheckListCurrentStateInfoSupport
createCurrentStateInfoSupport(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.CheckListItemInfo
createItemInfo(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.void
disposeContext(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.Boolean
getCustomOptions(javax.servlet.http.HttpServletRequest request, jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Creates bean with custom options to be passed into custom options JSP page.String
getCustomOptionsBeanName()
Returns name of the bean to be passed into custom options JSP page.String
getCustomOptionsJspPagePath()
Returns path to the JSP page to be added in popup content.String
getItemRendererJspPage()
Returns item renderer JSP page.String
getNoWarningsText()
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 caseString
getTopHtmlNote()
Returns HTML message to be shown on the top of the popup (message is not escaped, so can contain HTML code).String
getValidationProgressText()
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:CheckListPopupDialogType
Creates 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:
createContext
in 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:CheckListPopupDialogType
Collects 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:
collectItems
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Parameters:
context
- check list popup context, seeCheckListPopupDialogType
for 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:CheckListPopupDialogType
Provides 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:
createItemInfo
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Parameters:
item
- item to get information aboutcontext
- check list popup context, seeCheckListPopupDialogType
for more info- Returns:
- information of the specified item
-
getItemRendererJspPage
@NotNull public String getItemRendererJspPage()
Description copied from class:CheckListPopupDialogType
Returns item renderer JSP page.- Specified by:
getItemRendererJspPage
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Returns:
- see above
-
getTopHtmlNote
@Nullable public String getTopHtmlNote()
Description copied from class:CheckListPopupDialogType
Returns HTML message to be shown on the top of the popup (message is not escaped, so can contain HTML code).- Specified by:
getTopHtmlNote
in 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:CheckListPopupDialogType
Creates implementation of custom options support. SeeCheckListCustomOptionsSupport
for more info. Method is called only one time per popup showing.- Specified by:
createCustomOptionsSupport
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Parameters:
context
- check list popup context, seeCheckListPopupDialogType
for more info- Returns:
- implementation of custom options support or null
-
getCustomOptionsJspPagePath
@NotNull public String getCustomOptionsJspPagePath()
Description copied from interface:CheckListCustomOptionsSupport
Returns path to the JSP page to be added in popup content. Your JSP page will be inserted inside the <form> tag.- Specified by:
getCustomOptionsJspPagePath
in interfaceCheckListCustomOptionsSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Returns:
- see above
-
getCustomOptionsBeanName
@NotNull public String getCustomOptionsBeanName()
Description copied from interface:CheckListCustomOptionsSupport
Returns name of the bean to be passed into custom options JSP page.- Specified by:
getCustomOptionsBeanName
in 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:CheckListCustomOptionsSupport
Creates 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:
getCustomOptions
in 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:CheckListPopupDialogType
Creates implementation of filtering support. SeeCheckListFilteringSupport
for more info. Method is called only one time per popup showing.- Specified by:
createFilteringSupport
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Parameters:
context
- check list popup context, seeCheckListPopupDialogType
for 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:CheckListFilteringSupport
Filters check list items.- Specified by:
filterItems
in 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, seeCheckListPopupDialogType
for 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:CheckListPopupDialogType
Creates implementation of current state info support. SeeCheckListCurrentStateInfoSupport
for more info. Method is called only one time per popup showing.- Specified by:
createCurrentStateInfoSupport
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Parameters:
context
- check list popup context, seeCheckListPopupDialogType
for 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:CheckListPopupDialogType
Creates implementation of validation support. SeeCheckListValidationSupport
for more info. Method is called only one time per popup showing.- Specified by:
createValidationSupport
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Parameters:
context
- check list popup context, seeCheckListPopupDialogType
for 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:CheckListValidationSupport
Collects warnings to be shown to user. Method is called on every user change.- Specified by:
getWarnings
in 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, seeCheckListPopupDialogType
for 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:CheckListValidationSupport
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 case- Specified by:
getNoWarningsText
in interfaceCheckListValidationSupport<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Returns:
- see above
-
getValidationProgressText
@NotNull public String getValidationProgressText()
Description copied from interface:CheckListValidationSupport
Returns the text to be displayed while warnings are being collected.- Specified by:
getValidationProgressText
in 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:CheckListPopupDialogType
Applies user changes. Method is called after pressing "Apply" button or right after the changes were made, see#mustApplyChangesImmediately(Object)
for more info.- Specified by:
apply
in 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, seeCheckListPopupDialogType
for more info
-
disposeContext
public void disposeContext(@NotNull jetbrains.buildServer.controllers.agent.PoolProjectSelectorData context)
Description copied from class:CheckListPopupDialogType
Disposes 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:
disposeContext
in classCheckListPopupDialogType<jetbrains.buildServer.controllers.agent.PoolProjectSelectorItem,jetbrains.buildServer.controllers.agent.PoolProjectSelectorData,Boolean>
- Parameters:
context
- check list popup context, seeCheckListPopupDialogType
for more info
-
-