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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final PermissionGroup
static final Permission
static final Permission
static final Permission
static final Permission
static final Permission
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doChangeQueueOrder
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Change queue order (item position)void
doReassign
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) void
doReserve
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) void
doReset
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) void
doSaveNote
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) void
doSteal
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) void
doUnlock
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) void
doUnreserve
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Deprecated.getApi()
int
getAssignedResourceAmount
(String labelString) Deprecated.Deprecated.int
getFreeResourceAmount
(String labelString) Deprecated.int
getFreeResourcePercentage
(String labelString) Deprecated.Get a list of all labelsint
Deprecated.Deprecated.getQueue()
getResource
(String resourceName) Get a list of resources
-
Field Details
-
PERMISSIONS_GROUP
-
UNLOCK
-
RESERVE
-
STEAL
-
VIEW
-
QUEUE
-
ICON
- See Also:
-
-
Constructor Details
-
LockableResourcesRootAction
public LockableResourcesRootAction()
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileName
in interfaceAction
-
getApi
-
getUserName
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
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.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
doReserve
public void doReserve(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
doSteal
public void doSteal(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
doReassign
public void doReassign(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
doUnreserve
public void doUnreserve(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
doReset
public void doReset(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
doSaveNote
public void doSaveNote(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
doChangeQueueOrder
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doChangeQueueOrder(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Change queue order (item position)- Throws:
IOException
jakarta.servlet.ServletException
-