@Extension public class CauseManagement extends Object implements hudson.model.RootAction
Modifier and Type | Field and Description |
---|---|
static String |
GRAPH_PAGE_TITLE
Title for the page displaying the graphs.
|
static String |
NEW_CAUSE_DESCRIPTION
The pre-filled description that a new cause gets.
|
static String |
NEW_CAUSE_DYNAMIC_ID
The reserved id for getting a new
FailureCause from getDynamic(String,
org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse) . |
static String |
NEW_CAUSE_NAME
The pre-filled name that a new cause gets.
|
static String |
REQUEST_CAUSE_MANAGEMENT_ERROR
The request attribute key where error messages are added.
|
static String |
SESSION_REMOVED_FAILURE_CAUSE
Session key for the last removed
FailureCause by the user. |
static String |
URL_NAME
Where in the Jenkins name space this action will be.
|
Constructor and Description |
---|
CauseManagement() |
Modifier and Type | Method and Description |
---|---|
void |
doRemoveConfirm(String id,
org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Web call to remove a
FailureCause . |
String |
getDisplayName() |
FailureCause |
getDynamic(String id,
org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Dynamic Stapler URL binding.
|
String |
getErrorMessage(org.kohsuke.stapler.StaplerRequest request)
Used for getting the error message to show on the page.
|
String |
getIconFileName() |
String |
getImageUrl(String size,
String name)
Convenience method for calling
PluginImpl.getImageUrl(String, String) from jelly. |
hudson.ExtensionList<Indication.IndicationDescriptor> |
getIndicationDescriptors()
Provides a list of all IndicationDescriptors.
|
static CauseManagement |
getInstance()
Provides the singleton instance of this class that Jenkins has loaded.
|
hudson.model.ModelObject |
getOwner()
The "owner" of this Action.
|
protected String |
getOwnerUrl()
Where to redirect after the form has been saved, probably to the owner.
|
hudson.security.Permission |
getPermission()
The permission related to this action.
|
hudson.security.Permission |
getRemovePermission()
The permission related to this action.
|
Iterable<FailureCause> |
getShallowCauses()
Convenience method for
KnowledgeBase.getShallowCauses() . |
String |
getUrlName() |
boolean |
isError(org.kohsuke.stapler.StaplerRequest request)
Convenience method for jelly.
|
boolean |
isUnderTest()
Checks if Jenkins is run from inside a HudsonTestCase.
|
public static final String URL_NAME
getUrlName()
,
Constant Field Valuespublic static final String NEW_CAUSE_DYNAMIC_ID
FailureCause
from getDynamic(String,
org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse)
.public static final String NEW_CAUSE_NAME
public static final String NEW_CAUSE_DESCRIPTION
public static final String REQUEST_CAUSE_MANAGEMENT_ERROR
public static final String SESSION_REMOVED_FAILURE_CAUSE
FailureCause
by the user. Will be removed by the index page when it
displays it.public static final String GRAPH_PAGE_TITLE
public String getIconFileName()
getIconFileName
in interface hudson.model.Action
public String getDisplayName()
getDisplayName
in interface hudson.model.Action
getDisplayName
in interface hudson.model.ModelObject
public String getUrlName()
getUrlName
in interface hudson.model.Action
public String getImageUrl(String size, String name)
PluginImpl.getImageUrl(String, String)
from jelly.size
- the sizename
- the namePluginImpl.getImageUrl(String, String)
public Iterable<FailureCause> getShallowCauses() throws Exception
KnowledgeBase.getShallowCauses()
.Exception
- if communication fails.public boolean isError(org.kohsuke.stapler.StaplerRequest request)
request
- the request where the message might be.public String getErrorMessage(org.kohsuke.stapler.StaplerRequest request)
request
- the request where the message might be.public FailureCause getDynamic(String id, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws Exception
/jenkins/failure-cause-management/abf123
id
- the id of the cause of "new" to create a new cause.request
- the requestresponse
- the responseException
- if communication with the knowledge base failed.public void doRemoveConfirm(@QueryParameter String id, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
FailureCause
. Does a permission check for PluginImpl.REMOVE_PERMISSION
.id
- the id of the cause to remove.request
- the stapler request.response
- the stapler response.IOException
- if so during redirect.public hudson.model.ModelObject getOwner()
Hudson.getInstance()
but if the class is
included in some build or something we might want to be able to easier change the side panel for example.protected String getOwnerUrl()
public hudson.ExtensionList<Indication.IndicationDescriptor> getIndicationDescriptors()
Indication.IndicationDescriptor.getAll()
public hudson.security.Permission getPermission()
PluginImpl.UPDATE_PERMISSION
public hudson.security.Permission getRemovePermission()
PluginImpl.UPDATE_PERMISSION
public boolean isUnderTest()
Jenkins.getPluginManager()
.public static CauseManagement getInstance()
Copyright © 2016–2020. All rights reserved.