Class Capabilities

java.lang.Object
io.jenkins.blueocean.service.embedded.util.Capabilities

public class Capabilities extends Object
Helpers to query @Capability annotations server-side
  • Constructor Details

    • Capabilities

      public Capabilities()
  • Method Details

    • hasCapability

      public static boolean hasCapability(Object item, String capability)
      Check if an item is annotated with a specific capability. Checks super classes even though annotation is not inherited, because that echoes the behaviour when building REST responses.
      Parameters:
      item - a Jenkins Item / BO object
      capability - the string name of the capability you wish to search for
      Returns:
      true if annotation is found