|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthudson.plugins.jobConfigHistory.JobConfigHistoryBaseAction
hudson.plugins.jobConfigHistory.ComputerConfigHistoryAction
@ExportedBean(defaultVisibility=-1) public class ComputerConfigHistoryAction
| Constructor Summary | |
|---|---|
ComputerConfigHistoryAction(hudson.model.Slave slave)
Standard constructor using instance |
|
| Method Summary | |
|---|---|
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(). |
| Methods inherited from class hudson.plugins.jobConfigHistory.JobConfigHistoryBaseAction |
|---|
checkTimestamp, doDiffFiles, doDiffFilesPrevNext, getDiffAsString, getDiffLines, getHudson, getOutputType, getRequestParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComputerConfigHistoryAction(hudson.model.Slave slave)
| Method Detail |
|---|
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()
JobConfigHistoryBaseAction
getAccessControlledObject 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 timestamp2
public final String getUser(int timestampNumber)
timestampNumber - 1 for File A and 2 for File B
public final String getOperation(int timestampNumber)
timestampNumber - 1 for File A, 2 for File B
public final String getNextTimestamp(int timestampNumber)
timestampNumber - 1 for File A, 2 for File B
public final String getPrevTimestamp(int timestampNumber)
timestampNumber - 1 for File A, 2 for File B
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 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 StaplerResponse
IOException - If something goes wrong
public final void doForwardToRestoreQuestion(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
req - StaplerRequest created by pressing the buttonrsp - Outgoing StaplerResponse
IOException - If XML file can't be readpublic hudson.model.Api getApi()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||