Class SingleFeatureProvider<T extends BuildTypeSettings & BuildTypeIdentity>
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.SingleFeatureProvider<T>
-
- All Implemented Interfaces:
FeatureProvider
public class SingleFeatureProvider<T extends BuildTypeSettings & BuildTypeIdentity> extends Object implements FeatureProvider
-
-
Constructor Summary
Constructors Constructor Description SingleFeatureProvider(T buildType, SBuildFeatureDescriptor buildFeature, String type)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
SingleFeatureProvider
public SingleFeatureProvider(T buildType, SBuildFeatureDescriptor buildFeature, String type)
-
-
Method Detail
-
getFeaturesOfType
@NotNull public Collection<? extends ParametersDescriptor> getFeaturesOfType(@NotNull String type)
Description copied from interface:FeatureProviderGet all features of specified type- Specified by:
getFeaturesOfTypein interfaceFeatureProvider- Parameters:
type- feature type- Returns:
- all features of specified type
-
findParametersById
@Nullable public ParametersDescriptor findParametersById(@NotNull String id)
Description copied from interface:FeatureProviderFind feature with specified id- Specified by:
findParametersByIdin 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:FeatureProviderAdd feature of specified type with parameters- Specified by:
addFeaturein 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:FeatureProviderUpdates feature with specified id. Updates feature type and its parameters- Specified by:
updateFeaturein 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:FeatureProviderRemove feature with specified id- Specified by:
removeFeaturein interfaceFeatureProvider- Parameters:
id- feature id- Returns:
- removed feature or null if feature with specified id didn't exist
-
persist
public void persist() throws PersistFailedExceptionDescription copied from interface:FeatureProviderPersist changes- Specified by:
persistin interfaceFeatureProvider- Throws:
PersistFailedException
-
getId
@NotNull public String getId()
Description copied from interface:FeatureProviderGet external id- Specified by:
getIdin interfaceFeatureProvider- Returns:
- external id
-
getType
@NotNull public String getType()
Description copied from interface:FeatureProviderReturns type of its underlying provider (project, build type etc.)- Specified by:
getTypein interfaceFeatureProvider- Returns:
-
-