hudson.plugins.jobConfigHistory
Class JobConfigHistoryRootAction

java.lang.Object
  extended by hudson.plugins.jobConfigHistory.JobConfigHistoryBaseAction
      extended by hudson.plugins.jobConfigHistory.JobConfigHistoryRootAction
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject, hudson.model.RootAction

@Extension
public class JobConfigHistoryRootAction
extends JobConfigHistoryBaseAction
implements hudson.model.RootAction

Author:
Stefan Brausch, mfriedenhagen

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()
           
 
Method Summary
protected  void checkConfigurePermission()
          See whether the current user may read configurations in the object returned by JobConfigHistoryBaseAction.getAccessControlledObject().
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 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<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
doDiffFiles, getConfigXml, getDiff, getDiffFile, getDiffLines, getDisplayName, getFile, getHudson, getPlugin, getRequestParameter, wantRawOutput, wantXmlOutput
 
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

JobConfigHistoryRootAction

public JobConfigHistoryRootAction()
Method Detail

getUrlName

public final String getUrlName()
Do not make this method final as JobConfigHistoryRootAction overrides this method. This actions always starts from the context directly, so prefix JobConfigHistoryConsts.URLNAME with a slash.

Specified by:
getUrlName in interface hudson.model.Action
Overrides:
getUrlName in class JobConfigHistoryBaseAction

getIconFileName

public final String getIconFileName()
Make method final, as we always want the same icon file. Returns null to hide the icon if the user is not allowed to configure jobs.

Specified by:
getIconFileName in interface hudson.model.Action

getConfigs

public final List<ConfigInfo> getConfigs()
                                  throws IOException
Returns the configuration history entries for either AbstractItems or system changes or deleted jobs or all of the above.

Returns:
list of configuration histories (as ConfigInfo)
Throws:
IOException - if one of the history entries might not be read.

getSystemConfigs

protected List<ConfigInfo> getSystemConfigs()
                                     throws IOException
Returns the configuration history entries for all system files in this Hudson instance.

Returns:
List of config infos.
Throws:
IOException - if one of the history entries might not be read.

getJobConfigs

protected List<ConfigInfo> getJobConfigs(String type)
                                  throws IOException
Returns the configuration history entries for all jobs or deleted jobs in this Hudson instance.

Parameters:
type - Whether we want to see all jobs or just the deleted jobs.
Returns:
List of config infos.
Throws:
IOException - if one of the history entries might not be read.

getSingleConfigs

public final List<ConfigInfo> getSingleConfigs(org.kohsuke.stapler.StaplerRequest req)
                                        throws IOException
Returns the configuration history entries for one group of system files.

Parameters:
req - The incoming StaplerRequest
Returns:
Configs list for one group of system configuration files.
Throws:
IOException - if one of the history entries might not be read.

getAccessControlledObject

protected hudson.security.AccessControlled getAccessControlledObject()
Returns the object for which we want to provide access control. Returns the hudson instance.

Specified by:
getAccessControlledObject in class JobConfigHistoryBaseAction
Returns:
the access controlled object.

checkConfigurePermission

protected void checkConfigurePermission()
Description copied from class: JobConfigHistoryBaseAction
See whether the current user may read configurations in the object returned by JobConfigHistoryBaseAction.getAccessControlledObject().

Specified by:
checkConfigurePermission in class JobConfigHistoryBaseAction

hasConfigurePermission

public boolean hasConfigurePermission()
Description copied from class: JobConfigHistoryBaseAction
Returns whether the current user may read configurations in the object returned by JobConfigHistoryBaseAction.getAccessControlledObject().

Specified by:
hasConfigurePermission in class JobConfigHistoryBaseAction
Returns:
true if the current user may read configurations.

hasJobConfigurePermission

public boolean hasJobConfigurePermission()
Returns whether the current user may configure jobs.

Returns:
true if the current user may configure jobs.


Copyright © 2004-2013. All Rights Reserved.