Class SelfGrantRevertedFailure
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
hudson.model.Failure
io.jenkins.plugins.batchcontrol.ui.SelfGrantRevertedFailure
- All Implemented Interfaces:
Serializable,org.kohsuke.stapler.HttpResponse
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class SelfGrantRevertedFailure
extends Failure
Tells the saving user that the guard reverted the authorization part of their save (SPEC item 2,
D-48, D-58a, D-58b): the item is guarded because a permission window covers it or it was
changed under one and not yet reviewed, so a widening of its authorization is undone whoever
saves it. The rest of the save was kept. The text says how the guard ends (Mark as reviewed)
and, for a viewer who may open it, links the job's Batch Control page (DEF-39).
Answers HTTP 403. A browser (a request that accepts text/html) gets
index.jelly with the standard layout; any other caller (a config.xml POST,
createItem from a script) gets Throwable.getMessage() as plain text. Only the item's
full name is kept (the exception is Serializable); it is escaped on the page and
written as text/plain otherwise. It never changes state.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateResponse(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, Object node) voidgenerateResponse(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, Object node, Throwable throwable) DEF-39: the root-relative URL of the job's Batch Control page, where "Mark as reviewed" is offered, when the viewer may open it (the page exists only for a job, and only for aBatchControl/Requestholder who may read the job); elsenull.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kohsuke.stapler.HttpResponse
generateResponse
-
Constructor Details
-
SelfGrantRevertedFailure
- Parameters:
item- the item whose authorization entries the guard restored
-
-
Method Details
-
getReviewPageUrl
DEF-39: the root-relative URL of the job's Batch Control page, where "Mark as reviewed" is offered, when the viewer may open it (the page exists only for a job, and only for aBatchControl/Requestholder who may read the job); elsenull. -
getItemFullName
-
generateResponse
public void generateResponse(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, Object node, @CheckForNull Throwable throwable) throws IOException, jakarta.servlet.ServletException - Overrides:
generateResponsein classFailure- Throws:
IOExceptionjakarta.servlet.ServletException
-
generateResponse
public void generateResponse(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, Object node) throws IOException, jakarta.servlet.ServletException - Specified by:
generateResponsein interfaceorg.kohsuke.stapler.HttpResponse- Overrides:
generateResponsein classFailure- Throws:
IOExceptionjakarta.servlet.ServletException
-