Class SCMHead.HeadByItem

java.lang.Object
jenkins.scm.api.SCMHead.HeadByItem
All Implemented Interfaces:
ExtensionPoint
Enclosing class:
SCMHead

public abstract static class SCMHead.HeadByItem extends Object implements ExtensionPoint
Means of locating a head given an item.
Since:
0.3-beta-2
  • Constructor Details

    • HeadByItem

      public HeadByItem()
  • Method Details

    • getHead

      @CheckForNull public abstract SCMHead getHead(Item item)
      Checks whether a given item corresponds to a particular SCM head.
      Parameters:
      item - such as a child of an SCMSourceOwner
      Returns:
      a corresponding SCM head, or null if this information is unavailable
    • findHead

      @CheckForNull public static SCMHead findHead(Item item)
      Runs all registered implementations.
      Parameters:
      item - an item, such as a branch project
      Returns:
      the corresponding head, if known