Interface RequirementSet

All Superinterfaces:
BambooIdProvider, BambooObject, ImmutableRequirementSet, MinimalRequirementSet
All Known Implementing Classes:
RequirementSetImpl

public interface RequirementSet extends BambooObject, MinimalRequirementSet, ImmutableRequirementSet
  • Method Details

    • getRequirements

      @NotNull @NotNull Set<Requirement> getRequirements()
      Description copied from interface: ImmutableRequirementSet
      Get all requirements as a Set
      Specified by:
      getRequirements in interface ImmutableRequirementSet
      Returns:
      requirements
    • getRequirement

      @Nullable @Nullable Requirement getRequirement(@NotNull @NotNull String key, long ownerId)
      Get a requirement from the set via the key and ownerId.
      Parameters:
      key -
      ownerId -
      Returns:
      requirement
    • getRequirement

      @Nullable @Nullable Requirement getRequirement(long id)
      Get a requirement from the set via the id.
      Specified by:
      getRequirement in interface ImmutableRequirementSet
      Parameters:
      id -
      Returns:
      requirement
    • getRequirementsForPlugin

      Set<Requirement> getRequirementsForPlugin(@NotNull @NotNull String pluginModuleKey, long ownerId)
      Gets all requirements that match the specified ImmutableRequirement.getPluginModuleKey() and ImmutableRequirement.getOwnerId()
      Parameters:
      pluginModuleKey -
      ownerId -
      Returns:
      requirements
    • addRequirement

      void addRequirement(@NotNull @NotNull Requirement requirement)
      Adds a requirement to the set.
      Parameters:
      requirement -
    • addAllRequirements

      void addAllRequirements(Iterable<Requirement> requirements)
      Adds all the specified requirements to the set
      Parameters:
      requirements -
    • removeRequirement

      boolean removeRequirement(@NotNull @NotNull ImmutableRequirement requirement)
      Removes the requirement from the set.
      Parameters:
      requirement - to remove
      Returns:
      removed if the requirement was removed
    • removeRequirements

      int removeRequirements(@NotNull @NotNull Predicate<Requirement> requirementPredicate)
      Remove requirements from set if they match the given Predicate
      Parameters:
      requirementPredicate - for requirements to be removed from the current RequirementSet
      Returns:
      count of matching requirements removed
    • removeRequirements

      int removeRequirements(@NotNull @NotNull Iterable<Requirement> requirements)
      Removes all the specified Requirements from the set.
      Parameters:
      requirements - to remove
      Returns:
      count of matching requirements removed
    • getSystemRequirements

      @NotNull @NotNull Set<Requirement> getSystemRequirements(String type)
      Gets a subset of requirements which are of a particular system type. e.g. system.builder or system.jdk.
      Parameters:
      type -
      Returns:
      requirements