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 |
doDiffFiles(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Parses the incoming POST request and redirects as
GET showDiffFiles.
|
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.
|
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<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.
|
hudson.model.AbstractItem |
getProject()
Returns the project for which we want to see the config history, the config files or the diff.
|
boolean |
hasConfigurePermission()
Returns whether the current user may read configurations in the object
returned by
JobConfigHistoryBaseAction.getAccessControlledObject(). |
checkTimestamp, 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.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 final void doDiffFiles(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws javax.servlet.ServletException,
IOException
req - incoming requestrsp - outgoing responsejavax.servlet.ServletException - when parsing the request as MultipartFormDataParser
does not succeed.IOException - when the redirection does not succeed.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 readCopyright © 2004–2013. All rights reserved.