au.com.centrumsystems.hudson.plugin.buildpipeline.dashboard
Class ReadOnlyBuildPipelineView

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.View
          extended by au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
              extended by au.com.centrumsystems.hudson.plugin.buildpipeline.dashboard.ReadOnlyBuildPipelineView
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.model.View>, hudson.model.ModelObject, hudson.model.Saveable, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled

public class ReadOnlyBuildPipelineView
extends BuildPipelineView

This class provides a read-only view for the existing build-pipeline view. All calls checking permissions return false. The other reason for this class is that it's used in a different context and not as a child of the view tab.

Since:
04/01/2012
Author:
Ingo Richter (irichter@adobe.com)

Nested Class Summary
 
Nested classes/interfaces inherited from class au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
BuildPipelineView.DescriptorImpl
 
Nested classes/interfaces inherited from class hudson.model.View
hudson.model.View.People, hudson.model.View.PropertyList, hudson.model.View.UserInfo
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.View
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, NEW_PRONOUN, owner, PERMISSIONS, SORTER, transientActions
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
ReadOnlyBuildPipelineView(String displayName, String description, String selectedJob, String noOfDisplayedBuilds, boolean triggerOnlyLatestJob)
           
 
Method Summary
 hudson.model.AbstractProject<?,?> getSelectedProject()
          Gets the selected project
 boolean hasBuildPermission(hudson.model.AbstractProject<?,?> currentProject)
          Checks whether the user has Build permission for the current project.
 boolean hasPermission(hudson.security.Permission p)
           
 
Methods inherited from class au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
contains, doCreateItem, getAlwaysAllowManualTrigger, getBuildPipelineForm, getBuildViewTitle, getDownstreamProjects, getItems, getNoOfDisplayedBuilds, getProjectURL, getRefreshFrequency, getRefreshFrequencyInMillis, getSelectedJob, getShowPipelineParameters, getTriggerOnlyLatestJob, hasConfigurePermission, hasDownstreamProjects, hasSelectedProject, isAlwaysAllowManualTrigger, isShowPipelineParameters, isTriggerOnlyLatestJob, onJobRenamed, rerunSuccessfulBuild, setAlwaysAllowManualTrigger, setBuildViewTitle, setNoOfDisplayedBuilds, setRefreshFrequency, setSelectedJob, setShowPipelineParameters, setTriggerOnlyLatestJob, submit, triggerManualBuild
 
Methods inherited from class hudson.model.View
all, allInstantiable, checkPermission, create, doConfigSubmit, doDoDelete, doRssAll, doRssFailed, doRssLatest, doSubmitDescription, getAbsoluteUrl, getACL, getActions, getAllProperties, getApi, getApplicablePropertyDescriptors, getBuilds, getColumns, getComputers, getDescription, getDescriptor, getDisplayName, getDynamic, getIndenter, getItem, getItemCreatePermission, getJob, getNewPronoun, getOwner, getOwnerItemGroup, getOwnerPrimaryView, getOwnerViewActions, getPeople, getPostConstructLandingPage, getProperties, getQueueItems, getSearchUrl, getTimeline, getUrl, getViewName, getViewUrl, getWidgets, hasPeople, isDefault, isEditable, isFilterExecutors, isFilterQueue, makeSearchIndex, rename, save
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyBuildPipelineView

public ReadOnlyBuildPipelineView(String displayName,
                                 String description,
                                 String selectedJob,
                                 String noOfDisplayedBuilds,
                                 boolean triggerOnlyLatestJob)
Parameters:
displayName - display name of build pipeline view
description - description of build pipeline view
selectedJob - selected job of build pipeline view
noOfDisplayedBuilds - number of displayed build of build pipeline view
triggerOnlyLatestJob - is trigger only latest job?
Method Detail

hasBuildPermission

public boolean hasBuildPermission(hudson.model.AbstractProject<?,?> currentProject)
Description copied from class: BuildPipelineView
Checks whether the user has Build permission for the current project.

Overrides:
hasBuildPermission in class BuildPipelineView
Parameters:
currentProject - - The project being viewed.
Returns:
- true: Has Build permission; false: Does not have Build permission
See Also:
Item

hasPermission

public boolean hasPermission(hudson.security.Permission p)
Specified by:
hasPermission in interface hudson.security.AccessControlled
Overrides:
hasPermission in class hudson.model.View

getSelectedProject

public hudson.model.AbstractProject<?,?> getSelectedProject()
Description copied from class: BuildPipelineView
Gets the selected project

Overrides:
getSelectedProject in class BuildPipelineView
Returns:
- The selected project in the current view


Copyright © 2004-2012. All Rights Reserved.