Package jetbrains.buildServer.serverSide
Interface FeatureProvider
-
- All Known Implementing Classes:
BuildTypeFeatureProvider,SingleFeatureProvider
public interface FeatureProviderUsed 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 ParametersDescriptoraddFeature(String type, Map<String,String> parameters)Add feature of specified type with parametersParametersDescriptorfindParametersById(String id)Find feature with specified idCollection<? extends ParametersDescriptor>getFeaturesOfType(String type)Get all features of specified typeStringgetId()Get external idStringgetType()Returns type of its underlying provider (project, build type etc.)voidpersist()Persist changesParametersDescriptorremoveFeature(String id)Remove feature with specified idbooleanupdateFeature(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 PersistFailedExceptionPersist 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:
-
-