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:
getInheritedParametersCollectionin interfaceInheritableUserParametersHolder- Specified by:
getInheritedParametersCollectionin interfaceSerializableParametersCollection- Returns:
- collection of inherited parameters.
-
getParametersCollection
@NotNull public Collection<Parameter> getParametersCollection()
Description copied from interface:ReadOnlyUserParametersReturns build and configuration parameters in single collection.- Specified by:
getParametersCollectionin interfaceInheritableUserParametersHolder- Specified by:
getParametersCollectionin interfaceReadOnlyUserParameters- Specified by:
getParametersCollectionin classAbstractParametersProvider- Returns:
- see above
-
getParameter
@Nullable public Parameter getParameter(@NotNull String paramName)
- Specified by:
getParameterin interfaceReadOnlyUserParameters
-
getParameterValue
@Nullable public String getParameterValue(@NotNull String paramName)
- Specified by:
getParameterValuein interfaceReadOnlyUserParameters- Specified by:
getParameterValuein 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:UserParametersHolderAdds parameter.- Specified by:
addParameterin interfaceUserParametersHolder- Specified by:
addParameterin 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:UserParametersHolderRemoves parameter.- Specified by:
removeParameterin 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:InheritableUserParametersHolderExOwn should be last. Root should be first. Should not contain nulls or empty collections.
- Specified by:
getOwnAndParentsNonInheritedParametersin interfaceInheritableUserParametersHolderEx- Returns:
-
getOwnAndParentsNonInheritedParameter
@NotNull public List<Parameter> getOwnAndParentsNonInheritedParameter(@NotNull String paramName)
Description copied from interface:InheritableUserParametersHolderExOwn should be last. Root should be first. Should not contain nulls.
- Specified by:
getOwnAndParentsNonInheritedParameterin interfaceInheritableUserParametersHolderEx- Returns:
-
getOwnParameter
public Parameter getOwnParameter(@NotNull String paramName)
- Specified by:
getOwnParameterin 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:
getOwnParametersCollectionin interfaceInheritableUserParametersHolder- Returns:
- own parameters, without inherited. Yet they would have inherited specs or values (if any).
-
getOwnParametersWithoutInheritedSpec
@NotNull public Collection<Parameter> getOwnParametersWithoutInheritedSpec()
- Specified by:
getOwnParametersWithoutInheritedSpecin interfaceInheritableUserParametersHolder- Specified by:
getOwnParametersWithoutInheritedSpecin interfaceSerializableParametersCollection- Returns:
- own parameters as is, with own parameters spec.
-
getOwnNonInheritedParameter
@Nullable public Parameter getOwnNonInheritedParameter(@NotNull String paramName)
Description copied from interface:InheritableUserParametersHolderExOwn parameter without inherited parameter spec.- Specified by:
getOwnNonInheritedParameterin interfaceInheritableUserParametersHolderEx- Returns:
-
getOwnParameters
@NotNull public Map<String,String> getOwnParameters()
- Specified by:
getOwnParametersin interfaceInheritableUserParametersHolder- Returns:
- own parameters map, without inherited. Yet they would have inherited specs or values (if any).
-
-