Class Capabilities

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

      • Capabilities

        public Capabilities()
    • Method Detail

      • 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.
        item - a Jenkins Item / BO object
        capability - the string name of the capability you wish to search for
        true if annotation is found