|
||||||||||
| 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.JobConfigHistoryRootAction
@Extension public class JobConfigHistoryRootAction
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class hudson.plugins.jobConfigHistory.JobConfigHistoryBaseAction |
|---|
JobConfigHistoryBaseAction.SideBySideView |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Constructor Summary | |
|---|---|
JobConfigHistoryRootAction()
Constructor necessary for testing. |
|
| Method Summary | |
|---|---|
protected void |
checkConfigurePermission()
See whether the current user may read configurations in the object returned by JobConfigHistoryBaseAction.getAccessControlledObject(). |
String |
createLinkToJobFiles(ConfigInfo config,
String type)
Creates links to the correct configOutput.jellys for job history vs. system history and for xml vs. plain text. |
void |
doDiffFiles(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Parses the incoming POST request and redirects as
GET showDiffFiles. |
protected hudson.security.AccessControlled |
getAccessControlledObject()
Returns the object for which we want to provide access control. |
List<ConfigInfo> |
getConfigs()
Returns the configuration history entries for either AbstractItems or system changes or deleted jobs
or all of the above. |
String |
getFile()
Returns JobConfigHistoryBaseAction#getConfigXml(String) as
String. |
String |
getIconFileName()
Make method final, as we always want the same icon file. |
protected List<ConfigInfo> |
getJobConfigs(String type)
Returns the configuration history entries for all jobs or deleted jobs in this Hudson instance. |
List<JobConfigHistoryBaseAction.SideBySideView.Line> |
getLines()
Returns the diff between two config files as a list of single lines. |
protected hudson.XmlFile |
getOldConfigXml(String name,
String timestamp)
Gets the version of the config.xml that was saved at a certain time. |
List<ConfigInfo> |
getSingleConfigs(org.kohsuke.stapler.StaplerRequest req)
Returns the configuration history entries for one group of system files. |
protected List<ConfigInfo> |
getSystemConfigs()
Returns the configuration history entries for all system files in this Hudson instance. |
String |
getUrlName()
Do not make this method final as JobConfigHistoryRootAction
overrides this method. |
boolean |
hasConfigurePermission()
Returns whether the current user may read configurations in the object returned by JobConfigHistoryBaseAction.getAccessControlledObject(). |
boolean |
hasJobConfigurePermission()
Returns whether the current user may configure jobs. |
| Methods inherited from class hudson.plugins.jobConfigHistory.JobConfigHistoryBaseAction |
|---|
checkTimestamp, getDiffAsString, getDiffLines, getDisplayName, getHudson, getOutputType, getPlugin, getRequestParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.model.Action |
|---|
getDisplayName |
| Constructor Detail |
|---|
public JobConfigHistoryRootAction()
| Method Detail |
|---|
public final String getUrlName()
JobConfigHistoryRootAction
overrides this method.
This actions always starts from the context directly, so prefix JobConfigHistoryConsts.URLNAME with a
slash.
getUrlName in interface hudson.model.ActiongetUrlName in class JobConfigHistoryBaseActionpublic final String getIconFileName()
null to hide the icon if the user is not allowed to configure
jobs.
getIconFileName in interface hudson.model.Action
public final List<ConfigInfo> getConfigs()
throws IOException
AbstractItems or system changes or deleted jobs
or all of the above.
IOException - if one of the history entries might not be read.
protected List<ConfigInfo> getSystemConfigs()
throws IOException
IOException - if one of the history entries might not be read.
protected List<ConfigInfo> getJobConfigs(String type)
throws IOException
type - Whether we want to see all jobs or just the deleted jobs.
IOException - if one of the history entries might not be read.
public final List<ConfigInfo> getSingleConfigs(org.kohsuke.stapler.StaplerRequest req)
throws IOException
req - The incoming StaplerRequest
IOException - if one of the history entries might not be read.
public final String getFile()
throws IOException
JobConfigHistoryBaseAction#getConfigXml(String) as
String.
config.xml found in directory given by the
request parameter file.
IOException - if the config file could not be read or converted to an xml
string.
public final String createLinkToJobFiles(ConfigInfo config,
String type)
config - ConfigInfo.type - Output type ('xml' or 'plain').
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 hasJobConfigurePermission()
public final void doDiffFiles(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws javax.servlet.ServletException,
IOException
POST request and redirects as
GET showDiffFiles.
req - incoming requestrsp - outgoing response
javax.servlet.ServletException - when parsing the request as MultipartFormDataParser
does not succeed.
IOException - when the redirection does not succeed.
public final List<JobConfigHistoryBaseAction.SideBySideView.Line> getLines()
throws IOException
IOException - If diff doesn't work or xml files can't be read.
protected hudson.XmlFile getOldConfigXml(String name,
String timestamp)
name - The name of the system property or deleted job.timestamp - The timestamp as String.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||