@ExportedBean(defaultVisibility=-1) public class ComputerConfigHistoryAction extends JobConfigHistoryBaseAction
| Constructor and Description |
|---|
ComputerConfigHistoryAction(hudson.model.Slave slave)
Standard constructor using instance
|
| 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 |
getDisplayName() |
String |
getFile()
Returns
JobConfigHistoryBaseAction#getConfigXml(String) as
String. |
String |
getIconFileName() |
List<SideBySideView.Line> |
getLines()
Takes the two timestamp request parameters and returns the diff between the corresponding
config files of this slave 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.Slave |
getSlave()
Returns the slave.
|
List<ConfigInfo> |
getSlaveConfigs()
Returns the configuration history entries for one
Slave. |
List<ConfigInfo> |
getSlaveConfigsREST()
Returns the configuration history entries for one
Slave for the REST API. |
String |
getTimestamp(int timestampNumber)
Used in the Difference jelly only.
|
String |
getUrlName() |
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(). |
checkTimestamp, doDiffFiles, doDiffFilesPrevNext, getDiffAsString, getDiffLines, getHudson, getOutputType, getRequestParameterpublic ComputerConfigHistoryAction(hudson.model.Slave slave)
public final String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectgetDisplayName in class JobConfigHistoryBaseActionpublic String getUrlName()
getUrlName in interface hudson.model.ActiongetUrlName in class JobConfigHistoryBaseActionpublic hudson.model.Slave getSlave()
protected hudson.security.AccessControlled getAccessControlledObject()
JobConfigHistoryBaseActiongetAccessControlledObject in class JobConfigHistoryBaseActionprotected void checkConfigurePermission()
JobConfigHistoryBaseActionJobConfigHistoryBaseAction.getAccessControlledObject().checkConfigurePermission in class JobConfigHistoryBaseActionpublic boolean hasConfigurePermission()
JobConfigHistoryBaseActionJobConfigHistoryBaseAction.getAccessControlledObject().hasConfigurePermission in class JobConfigHistoryBaseActionpublic final String getIconFileName()
public final List<ConfigInfo> getSlaveConfigs() throws IOException
Slave.Slave.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> getSlaveConfigsREST()
throws IOException
Slave for the REST API.Slave, 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 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 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 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.