Class RebuildParameterFilter

  • All Implemented Interfaces:
    ExtensionPoint

    public abstract class RebuildParameterFilter
    extends Object
    implements ExtensionPoint
    This extension point allows you, to specify whether a given parameter should be included in a rebuild of a job, or not.

    It can be used to remove automatically generated parameters, so that the rebuild can progress safely.

    Each RebuildParameterFilter is called for each parameter of the previous build, that is about to be rebuilt. If any filter returns false when queried for isParameterAllowed(ParameterValue), the value is not copied into the new build.

    Do note, that the parameter may still be present -- only that in these cases the default value from the project will be used, as if there were no value from the previous build.

    Also do note, that the current rebuild implementation filters out all parameters, that are not StringParameterValues (or subclasses). This is not guaranteed though, which is why this class accepts generic ParameterValues.

    Author:
    Martin Schroeder
    • Constructor Detail

      • RebuildParameterFilter

        public RebuildParameterFilter()
    • Method Detail

      • isParameterAllowed

        public abstract boolean isParameterAllowed​(ParameterValue value)
        Check if the given parameter value is permitted to be used in a rebuild.

        As soon as one RebuildParameterFilter denies a value, it is ignored when generating rebuilds.

        Do note, that the parameter may still be added to the next build, if the project itself defines it. All that is removed, is the user-defined value of the parameter from the previous build.

        Parameters:
        value - the value to verify.
        Returns:
        true, if the parameter is permitted to be used in a rebuild. False otherwise.
      • isParameterAllowedByAll

        public static boolean isParameterAllowedByAll​(ParameterValue val)
        Wrapper around isParameterAllowed(ParameterValue) that loops over all filters return by all().
        Parameters:
        val - the value to verify.
        Returns:
        true, if the parameter is permitted to be used in a rebuild. False otherwise.