|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.jobConfigHistory.JobConfigHistoryBaseAction
public abstract class JobConfigHistoryBaseAction
Implements some basic methods needed by the
JobConfigHistoryRootAction and JobConfigHistoryProjectAction.
| Nested Class Summary | |
|---|---|
static class |
JobConfigHistoryBaseAction.SideBySideView
Holds information for the SideBySideView. |
| Constructor Summary | |
|---|---|
JobConfigHistoryBaseAction()
Set the Hudson instance. |
|
| Method Summary | |
|---|---|
protected abstract void |
checkConfigurePermission()
See whether the current user may read configurations in the object returned by getAccessControlledObject(). |
protected boolean |
checkTimestamp(String timestamp)
Checks the url parameter 'timestamp' and returns true if it is parseable as a date. |
protected abstract hudson.security.AccessControlled |
getAccessControlledObject()
Returns the object for which we want to provide access control. |
protected String |
getDiffAsString(File file1,
File file2,
String[] file1Lines,
String[] file2Lines)
Returns a unified diff between two string arrays. |
List<JobConfigHistoryBaseAction.SideBySideView.Line> |
getDiffLines(List<String> diffLines)
Returns side-by-side (i.e. human-readable) diff view lines. |
String |
getDisplayName()
Make method final, as we always want the same display name. |
protected hudson.model.Hudson |
getHudson()
Returns the hudson instance. |
String |
getOutputType()
Returns how the config file should be formatted in configOutput.jelly: as plain text or xml. |
protected JobConfigHistory |
getPlugin()
Returns the JobConfigHistory plugin instance. |
protected String |
getRequestParameter(String parameterName)
Returns the parameter named parameterName from current request. |
String |
getUrlName()
Do not make this method final as JobConfigHistoryRootAction
overrides this method. |
protected abstract boolean |
hasConfigurePermission()
Returns whether the current user may read configurations in the object returned by getAccessControlledObject(). |
| 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 |
|---|
getIconFileName |
| Constructor Detail |
|---|
public JobConfigHistoryBaseAction()
Hudson instance.
| Method Detail |
|---|
public final String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectpublic String getUrlName()
JobConfigHistoryRootAction
overrides this method.
getUrlName in interface hudson.model.Actionpublic final String getOutputType()
protected boolean checkTimestamp(String timestamp)
timestamp - Timestamp of config change.
protected String getRequestParameter(String parameterName)
parameterName from current request.
parameterName - name of the parameter.
protected abstract void checkConfigurePermission()
getAccessControlledObject().
protected abstract boolean hasConfigurePermission()
getAccessControlledObject().
protected final hudson.model.Hudson getHudson()
protected final JobConfigHistory getPlugin()
protected abstract hudson.security.AccessControlled getAccessControlledObject()
public final List<JobConfigHistoryBaseAction.SideBySideView.Line> getDiffLines(List<String> diffLines)
throws IOException
diffLines - Unified diff as list of Strings.
IOException - if reading one of the config files does not succeed.
protected final String getDiffAsString(File file1,
File file2,
String[] file1Lines,
String[] file2Lines)
file1 - first config file.file2 - second config file.file1Lines - the lines of the first file.file2Lines - the lines of the second file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||