Class BuildTypeFeatureProvider<T extends BuildTypeSettings & BuildTypeIdentity>
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.BuildTypeFeatureProvider<T>
-
- All Implemented Interfaces:
FeatureProvider
public class BuildTypeFeatureProvider<T extends BuildTypeSettings & BuildTypeIdentity> extends Object implements FeatureProvider
-
-
Constructor Summary
Constructors Constructor Description BuildTypeFeatureProvider(T buildType, String type)
-
Method Summary
All Methods Instance Methods Concrete 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 public Collection<? extends ParametersDescriptor> getFeaturesOfType(@NotNull String type)
Description copied from interface:FeatureProvider
Get all features of specified type- Specified by:
getFeaturesOfType
in interfaceFeatureProvider
- Parameters:
type
- feature type- Returns:
- all features of specified type
-
findParametersById
@Nullable public ParametersDescriptor findParametersById(@NotNull String id)
Description copied from interface:FeatureProvider
Find feature with specified id- Specified by:
findParametersById
in interfaceFeatureProvider
- Parameters:
id
- feature id- Returns:
- feature with specified id or null if no such feature is found
-
addFeature
@NotNull public ParametersDescriptor addFeature(@NotNull String type, @NotNull Map<String,String> parameters)
Description copied from interface:FeatureProvider
Add feature of specified type with parameters- Specified by:
addFeature
in interfaceFeatureProvider
- Parameters:
type
- feature typeparameters
- feature parameters- Returns:
- created feature
-
updateFeature
public boolean updateFeature(@NotNull String id, @NotNull String type, @NotNull Map<String,String> parameters)
Description copied from interface:FeatureProvider
Updates feature with specified id. Updates feature type and its parameters- Specified by:
updateFeature
in interfaceFeatureProvider
- Parameters:
id
- feature idtype
- new feature typeparameters
- new feature parameters- Returns:
- true if feature was updated
-
removeFeature
@Nullable public ParametersDescriptor removeFeature(@NotNull String id)
Description copied from interface:FeatureProvider
Remove feature with specified id- Specified by:
removeFeature
in interfaceFeatureProvider
- Parameters:
id
- feature id- Returns:
- removed feature or null if feature with specified id didn't exist
-
persist
public void persist() throws PersistFailedException
Description copied from interface:FeatureProvider
Persist changes- Specified by:
persist
in interfaceFeatureProvider
- Throws:
PersistFailedException
-
getId
@NotNull public String getId()
Description copied from interface:FeatureProvider
Get external id- Specified by:
getId
in interfaceFeatureProvider
- Returns:
- external id
-
getType
@NotNull public String getType()
Description copied from interface:FeatureProvider
Returns type of its underlying provider (project, build type etc.)- Specified by:
getType
in interfaceFeatureProvider
- Returns:
-
-