|
|||||||||
| 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.JobConfigHistoryProjectAction
@ExportedBean(defaultVisibility=-1) public class JobConfigHistoryProjectAction
| Constructor Summary | |
|---|---|
JobConfigHistoryProjectAction(hudson.model.AbstractItem project)
|
|
| 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 |
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(). |
| Methods inherited from class hudson.plugins.jobConfigHistory.JobConfigHistoryBaseAction |
|---|
checkTimestamp, doDiffFiles, doDiffFilesPrevNext, getDiffAsString, getDiffLines, getDisplayName, getHudson, getOutputType, getRequestParameter, getUrlName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JobConfigHistoryProjectAction(hudson.model.AbstractItem project)
project - for which configurations should be returned.| Method Detail |
|---|
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 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 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 | ||||||||