Class LockableResourcesRootAction

java.lang.Object
org.jenkins.plugins.lockableresources.actions.LockableResourcesRootAction
All Implemented Interfaces:
ExtensionPoint, Action, ModelObject, RootAction

@Extension @ExportedBean public class LockableResourcesRootAction extends Object implements RootAction
  • Field Details

  • Constructor Details

    • LockableResourcesRootAction

      public LockableResourcesRootAction()
  • Method Details

    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getApi

      public Api getApi()
    • getUserName

      @CheckForNull public String getUserName()
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getResources

      @Exported @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<LockableResource> getResources()
      Get a list of resources
      Returns:
      All resources.
    • getLabelsList

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public LinkedHashMap<String,LockableResourcesRootAction.LockableResourcesLabel> getLabelsList()
      Get a list of all labels
      Returns:
      All possible labels.
    • getResource

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public LockableResource getResource(String resourceName)
    • getFreeResourceAmount

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public int getFreeResourceAmount(String labelString)
      Deprecated.
      Get amount of free resources assigned to given *labelString*
      Parameters:
      labelString - Label to search.
      Returns:
      Amount of free labels.
    • getFreeResourcePercentage

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public int getFreeResourcePercentage(String labelString)
      Deprecated.
      Get percentage (0-100) usage of resources assigned to given *labelString*

      Used by actions/LockableResourcesRootAction/index.jelly

      Parameters:
      labelString - Label to search.
      Returns:
      Percentage usages of *labelString* around all resources
      Since:
      2.19
    • getAllLabels

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public Set<String> getAllLabels()
      Deprecated.
      Get all existing labels as list.
      Returns:
      All possible labels.
    • getNumberOfAllLabels

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public int getNumberOfAllLabels()
      Deprecated.
      Get amount of all labels.
      Returns:
      Amount of all labels.
    • getAssignedResourceAmount

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public int getAssignedResourceAmount(String labelString)
      Deprecated.
      Get amount of resources assigned to given *labelString*

      Used by actions/LockableResourcesRootAction/index.jelly

      Parameters:
      labelString - Label to search.
      Returns:
      Amount of assigned resources.
    • getQueue

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public LockableResourcesRootAction.Queue getQueue() throws Descriptor.FormException
      Throws:
      Descriptor.FormException
    • getCurrentQueuedContext

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public List<QueuedContextStruct> getCurrentQueuedContext()
      Deprecated.
      Returns current queue
    • getOldestQueue

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull @Deprecated public LockableResourcesStruct getOldestQueue()
      Deprecated.
      Returns current queue
    • doUnlock

      public void doUnlock(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • doReserve

      public void doReserve(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • doSteal

      public void doSteal(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • doReassign

      public void doReassign(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • doUnreserve

      public void doUnreserve(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • doReset

      public void doReset(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • doSaveNote

      public void doSaveNote(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • doChangeQueueOrder

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doChangeQueueOrder(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Change queue order (item position)
      Throws:
      IOException
      javax.servlet.ServletException