Package jetbrains.buildServer.serverSide
Interface FeatureProvider
-
- All Known Implementing Classes:
BuildTypeFeatureProvider
,SingleFeatureProvider
public interface FeatureProvider
Used for unified access to build type or project features and it's ParametersDescriptior- Since:
- 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParametersDescriptor
addFeature(String type, Map<String,String> parameters)
Add feature of specified type with parametersParametersDescriptor
findParametersById(String id)
Find feature with specified idCollection<? extends ParametersDescriptor>
getFeaturesOfType(String type)
Get all features of specified typeString
getId()
Get external idString
getType()
Returns type of its underlying provider (project, build type etc.)void
persist()
Persist changesParametersDescriptor
removeFeature(String id)
Remove feature with specified idboolean
updateFeature(String id, String type, Map<String,String> parameters)
Updates feature with specified id.
-
-
-
Method Detail
-
getFeaturesOfType
@NotNull Collection<? extends ParametersDescriptor> getFeaturesOfType(@NotNull String type)
Get all features of specified type- Parameters:
type
- feature type- Returns:
- all features of specified type
- Since:
- 2020.1
-
findParametersById
@Nullable ParametersDescriptor findParametersById(@NotNull String id)
Find feature with specified id- Parameters:
id
- feature id- Returns:
- feature with specified id or null if no such feature is found
- Since:
- 2020.1
-
addFeature
@NotNull ParametersDescriptor addFeature(@NotNull String type, @NotNull Map<String,String> parameters)
Add feature of specified type with parameters- Parameters:
type
- feature typeparameters
- feature parameters- Returns:
- created feature
- Since:
- 2020.1
-
updateFeature
boolean updateFeature(@NotNull String id, @NotNull String type, @NotNull Map<String,String> parameters)
Updates feature with specified id. Updates feature type and its parameters- Parameters:
id
- feature idtype
- new feature typeparameters
- new feature parameters- Returns:
- true if feature was updated
- Since:
- 2020.1
-
removeFeature
@Nullable ParametersDescriptor removeFeature(@NotNull String id)
Remove feature with specified id- Parameters:
id
- feature id- Returns:
- removed feature or null if feature with specified id didn't exist
- Since:
- 2020.1
-
persist
void persist() throws PersistFailedException
Persist changes- Throws:
PersistFailedException
- Since:
- 2020.1
-
getId
@NotNull String getId()
Get external id- Returns:
- external id
- Since:
- 2020.1
-
getType
@NotNull String getType()
Returns type of its underlying provider (project, build type etc.)- Returns:
-
-