Interface ObjectSelectorParameter.Setter
- All Known Subinterfaces:
ObjectSelectorParameter.Builder
- Enclosing interface:
- ObjectSelectorParameter
public static interface ObjectSelectorParameter.Setter
-
Method Summary
Modifier and TypeMethodDescriptionaddCurrentScopeToDefaultQuery
(boolean value) Configures if the scope of the current Rich Page (or Plan, etc.) should be automatically added to thedefaultQuery(String)
.allowedObjectsQuery
(String query) Sets query limiting the allowed items.allowedPrototypes
(PrototypeEnum firstAllowed, PrototypeEnum... otherAllowed) Sets which prototypes will be selectable by user, overrides values set byallowedPrototypes(Iterable)
If allowed prototypes does not contain target prototype then first allowed prototype is selected as target prototype automatically.allowedPrototypes
(Iterable<String> allowedPrototypes) Sets which prototypes will be selectable by user, overrides values set byallowedPrototypes(PrototypeEnum, PrototypeEnum...)
If allowed prototypes does not contain target prototype then first allowed prototype is selected as target prototype automatically.current()
Sets the selected object to theObjectSelectorParameter.CURRENT
, overrides value set byobjectPath(String)
defaultColumns
(Iterable<String> columns) Sets the default columns for object picker dialog.defaultQuery
(String query) Sets the default query for object picker dialog.defaultSort
(String sort) Sets the default sorting for object picker dialog.
The format is same as forModelObjectsSearch.sort(String)
objectPath
(String objectPath) Sets the selected object, overrides value set bycurrent()
PrototypeSelector<? extends ObjectSelectorParameter.Setter>
Selects target prototype for selector.selectTemplates
(boolean selectTemplates) Configures that only templates can be selected.
-
Method Details
-
prototype
Selects target prototype for selector. If target prototype is not contained in allowed prototypes then it is added automatically. -
allowedPrototypes
@NotNull ObjectSelectorParameter.Setter allowedPrototypes(@NotNull Iterable<String> allowedPrototypes) Sets which prototypes will be selectable by user, overrides values set byallowedPrototypes(PrototypeEnum, PrototypeEnum...)
If allowed prototypes does not contain target prototype then first allowed prototype is selected as target prototype automatically.- Throws:
IllegalArgumentException
- if no value is specified or one of the specified values is not a name of constant fromPrototypeEnum
NullPointerException
- if one of the values is null
-
selectTemplates
Configures that only templates can be selected. Default value is false.
Can be set to true only if allowed prototypes contains only Test Run or Plan.- Throws:
IllegalArgumentException
- if selected allowed prototypes contains something else than Test Run or Plan.
-
allowedObjectsQuery
Sets query limiting the allowed items. When the object selected by user does not match this query, then theObjectSelectorParameter.value()
returns null.
Null or empty string query means there is no limit so all objects are allowed. -
objectPath
Sets the selected object, overrides value set bycurrent()
- Parameters:
objectPath
- - absolute path as returned byModelObjectReference.toPath()
or path relative to current page or container object as returned byHasRelativePath.toRelativePath(String)
orHasNameAndSpaceReference.toSpaceRelativePath(SpaceReference)
. Empty string is treated as null,ObjectSelectorParameter.CURRENT
can be used to refer to current page or container object.
-
current
Sets the selected object to theObjectSelectorParameter.CURRENT
, overrides value set byobjectPath(String)
-
defaultQuery
Sets the default query for object picker dialog. -
defaultSort
Sets the default sorting for object picker dialog.
The format is same as forModelObjectsSearch.sort(String)
-
defaultColumns
Sets the default columns for object picker dialog.- Throws:
IllegalArgumentException
- if no value is specifiedNullPointerException
- if one of the values is null
-
addCurrentScopeToDefaultQuery
Configures if the scope of the current Rich Page (or Plan, etc.) should be automatically added to thedefaultQuery(String)
. If true than the following query is added: ' AND project.id:{current project id}' if the page is in the project. The value is ignored if the selected prototype is Project or User.
-