Class InheritableUserParametersHolderImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.AbstractParametersProvider
-
- jetbrains.buildServer.serverSide.impl.AbstractParametersCollection
-
- jetbrains.buildServer.serverSide.impl.InheritableUserParametersHolderImpl
-
- All Implemented Interfaces:
SerializableParametersCollection
,InheritableUserParametersHolder
,InheritableUserParametersHolderEx
,InternalParameters
,ReadOnlyUserParameters
,UserParametersHolder
public class InheritableUserParametersHolderImpl extends AbstractParametersCollection implements InheritableUserParametersHolderEx, SerializableParametersCollection
Created by Eugene Petrenko (eugene.petrenko@gmail.com) Date: 26.01.12 17:09
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.serverSide.impl.AbstractParametersProvider
ACCEPT_ALL_FILTER, BUILD_PARAM_FILTER, CONFIG_PARAM_FILTER
-
-
Constructor Summary
Constructors Constructor Description InheritableUserParametersHolderImpl(ParameterFactory parameterFactory)
-
Method Summary
-
Methods inherited from class jetbrains.buildServer.serverSide.impl.AbstractParametersCollection
addParameters, getBuildParametersCollection, getConfigParametersCollection
-
Methods inherited from class jetbrains.buildServer.serverSide.impl.AbstractParametersProvider
convertParameters, getBuildParameters, getConfigParameters, getParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.InheritableUserParametersHolder
getParameters
-
Methods inherited from interface jetbrains.buildServer.serverSide.InternalParameters
getBooleanInternalParameter, getBooleanInternalParameterOrTrue, getInternalParameterValue
-
-
-
-
Constructor Detail
-
InheritableUserParametersHolderImpl
public InheritableUserParametersHolderImpl(@NotNull ParameterFactory parameterFactory)
-
-
Method Detail
-
clear
public void clear()
-
setParentParameterHolders
public void setParentParameterHolders(@NotNull Collection<InheritableUserParametersHolderEx> holders, @Nullable ReadOnlyUserParameters enforcedParametersProvider)
Last is the root parent - the spec will be got from the last parent containing any spec- Parameters:
holders
- An ordered collection of parent parameter holders from least significant to most significant. Eg such holders for a build configuration would be: [template; parent projects]enforcedParametersProvider
-
-
wrap
@NotNull public static InheritableUserParametersHolderEx wrap(@NotNull ReadOnlyUserParameters parameters)
-
getInheritedParametersCollection
@NotNull public Collection<Parameter> getInheritedParametersCollection()
- Specified by:
getInheritedParametersCollection
in interfaceInheritableUserParametersHolder
- Specified by:
getInheritedParametersCollection
in interfaceSerializableParametersCollection
- Returns:
- collection of inherited parameters.
-
getParametersCollection
@NotNull public Collection<Parameter> getParametersCollection()
Description copied from interface:ReadOnlyUserParameters
Returns build and configuration parameters in single collection.- Specified by:
getParametersCollection
in interfaceInheritableUserParametersHolder
- Specified by:
getParametersCollection
in interfaceReadOnlyUserParameters
- Specified by:
getParametersCollection
in classAbstractParametersProvider
- Returns:
- see above
-
getParameter
@Nullable public Parameter getParameter(@NotNull String paramName)
- Specified by:
getParameter
in interfaceReadOnlyUserParameters
-
getParameterValue
@Nullable public String getParameterValue(@NotNull String paramName)
- Specified by:
getParameterValue
in interfaceReadOnlyUserParameters
- Specified by:
getParameterValue
in classAbstractParametersProvider
- Parameters:
paramName
- parameter name- Returns:
- value of the parameter with given name or null if there is no such parameter
-
addParameter
public void addParameter(@NotNull Parameter param)
Description copied from interface:UserParametersHolder
Adds parameter.- Specified by:
addParameter
in interfaceUserParametersHolder
- Specified by:
addParameter
in classAbstractParametersCollection
- Parameters:
param
- build or config parameter, the type is determined by parameter prefix
-
removeParameter
public void removeParameter(@NotNull String paramName)
Description copied from interface:UserParametersHolder
Removes parameter.- Specified by:
removeParameter
in interfaceUserParametersHolder
- Parameters:
paramName
- build or config parameter name, the type is determined by parameter prefix
-
getOwnAndParentsNonInheritedParameters
@NotNull public List<Collection<Parameter>> getOwnAndParentsNonInheritedParameters()
Description copied from interface:InheritableUserParametersHolderEx
Own should be last. Root should be first. Should not contain nulls or empty collections.
- Specified by:
getOwnAndParentsNonInheritedParameters
in interfaceInheritableUserParametersHolderEx
- Returns:
-
getOwnAndParentsNonInheritedParameter
@NotNull public List<Parameter> getOwnAndParentsNonInheritedParameter(@NotNull String paramName)
Description copied from interface:InheritableUserParametersHolderEx
Own should be last. Root should be first. Should not contain nulls.
- Specified by:
getOwnAndParentsNonInheritedParameter
in interfaceInheritableUserParametersHolderEx
- Returns:
-
getOwnParameter
public Parameter getOwnParameter(@NotNull String paramName)
- Specified by:
getOwnParameter
in interfaceInheritableUserParametersHolder
- Parameters:
paramName
- parameter name- Returns:
- own parameter with given name or null if there is no such parameter
-
getOwnParametersCollection
@NotNull public Collection<Parameter> getOwnParametersCollection()
- Specified by:
getOwnParametersCollection
in interfaceInheritableUserParametersHolder
- Returns:
- own parameters, without inherited. Yet they would have inherited specs or values (if any).
-
getOwnParametersWithoutInheritedSpec
@NotNull public Collection<Parameter> getOwnParametersWithoutInheritedSpec()
- Specified by:
getOwnParametersWithoutInheritedSpec
in interfaceInheritableUserParametersHolder
- Specified by:
getOwnParametersWithoutInheritedSpec
in interfaceSerializableParametersCollection
- Returns:
- own parameters as is, with own parameters spec.
-
getOwnNonInheritedParameter
@Nullable public Parameter getOwnNonInheritedParameter(@NotNull String paramName)
Description copied from interface:InheritableUserParametersHolderEx
Own parameter without inherited parameter spec.- Specified by:
getOwnNonInheritedParameter
in interfaceInheritableUserParametersHolderEx
- Returns:
-
getOwnParameters
@NotNull public Map<String,String> getOwnParameters()
- Specified by:
getOwnParameters
in interfaceInheritableUserParametersHolder
- Returns:
- own parameters map, without inherited. Yet they would have inherited specs or values (if any).
-
-