@ExportedBean(defaultVisibility=-1) public class JobConfigHistoryProjectAction extends JobConfigHistoryBaseAction
| Constructor and Description |
|---|
JobConfigHistoryProjectAction(hudson.model.AbstractItem project) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkConfigurePermission()
See whether the current user may read configurations in the object
returned by
JobConfigHistoryBaseAction.getAccessControlledObject(). |
void |
doForwardToRestoreQuestion(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Action when 'restore' button in showDiffFiles.jelly is pressed.
|
void |
doRestore(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Action when 'restore' button is pressed: Replace current config file by older version.
|
protected hudson.security.AccessControlled |
getAccessControlledObject()
Returns the object for which we want to provide access control.
|
hudson.model.Api |
getApi() |
String |
getFile()
Returns
JobConfigHistoryBaseAction#getConfigXml(String) as
String. |
String |
getIconFileName()
Make method final, as we always want the same icon file.
|
List<ConfigInfo> |
getJobConfigs()
Returns the configuration history entries for one
AbstractItem. |
List<ConfigInfo> |
getJobConfigsREST()
Returns the configuration history entries for one
AbstractItem for the REST API. |
List<SideBySideView.Line> |
getLines()
Takes the two timestamp request parameters and returns the diff between the corresponding
config files of this project as a list of single lines.
|
String |
getNextTimestamp(int timestampNumber)
Used in the Difference jelly only.
|
String |
getOperation(int timestampNumber)
Used in the Difference jelly only.
|
String |
getPrevTimestamp(int timestampNumber)
Used in the Difference jelly only.
|
hudson.model.AbstractItem |
getProject()
Returns the project for which we want to see the config history, the config files or the diff.
|
String |
getTimestamp(int timestampNumber)
Used in the Difference jelly only.
|
String |
getUser(int timestampNumber)
Used in the Difference jelly only.
|
boolean |
hasConfigurePermission()
Returns whether the current user may read configurations in the object
returned by
JobConfigHistoryBaseAction.getAccessControlledObject(). |
boolean |
hasReadExtensionPermission() |
checkTimestamp, doDiffFiles, doDiffFilesPrevNext, getDiffAsString, getDiffLines, getDisplayName, getHudson, getOutputType, getRequestParameter, getUrlNamepublic JobConfigHistoryProjectAction(hudson.model.AbstractItem project)
project - for which configurations should be returned.public final String getIconFileName()
public final List<ConfigInfo> getJobConfigs() throws IOException
AbstractItem.AbstractItem.IOException - if JobConfigHistoryConsts.HISTORY_FILE might not be read or the path might not be urlencoded.@Exported(name="jobConfigHistory",
visibility=1)
public final List<ConfigInfo> getJobConfigsREST()
throws IOException
AbstractItem for the REST API.AbstractItem, or an empty list if not authorized.IOException - if JobConfigHistoryConsts.HISTORY_FILE might not be read or the path might not be urlencoded.public final String getFile() throws IOException
JobConfigHistoryBaseAction#getConfigXml(String) as
String.IOException - if the config file could not be read or converted to an xml
string.public final hudson.model.AbstractItem getProject()
protected hudson.security.AccessControlled getAccessControlledObject()
getAccessControlledObject in class JobConfigHistoryBaseActionprotected void checkConfigurePermission()
JobConfigHistoryBaseActionJobConfigHistoryBaseAction.getAccessControlledObject().checkConfigurePermission in class JobConfigHistoryBaseActionpublic boolean hasConfigurePermission()
JobConfigHistoryBaseActionJobConfigHistoryBaseAction.getAccessControlledObject().hasConfigurePermission in class JobConfigHistoryBaseActionpublic boolean hasReadExtensionPermission()
public final String getTimestamp(int timestampNumber)
timestampNumber - 1 for timestamp1 and 2 for timestamp2public final String getUser(int timestampNumber)
timestampNumber - 1 for File A and 2 for File Bpublic final String getOperation(int timestampNumber)
timestampNumber - 1 for File A, 2 for File Bpublic final String getNextTimestamp(int timestampNumber)
timestampNumber - 1 for File A, 2 for File Bpublic final String getPrevTimestamp(int timestampNumber)
timestampNumber - 1 for File A, 2 for File Bpublic final List<SideBySideView.Line> getLines() throws IOException
IOException - If diff doesn't work or xml files can't be read.public final void doRestore(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
req - Incoming StaplerRequestrsp - Outgoing StaplerResponseIOException - If something goes wrongpublic final void doForwardToRestoreQuestion(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
req - StaplerRequest created by pressing the buttonrsp - Outgoing StaplerResponseIOException - If XML file can't be readpublic hudson.model.Api getApi()
Copyright © 2004–2015. All rights reserved.