Class ScanOnDemandBaseAction
java.lang.Object
com.sonyericsson.jenkins.plugins.bfa.sod.ScanOnDemandBaseAction
- All Implemented Interfaces:
- Action,- ModelObject
Action class for scanning non scanned build.
- Author:
- Shemeer Sulaiman <shemeer.x.sulaiman@sonymobile.com>
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classScanMode that re-scans all builds regardless if they have been scanned before or not.static classScanMode that scans only previously non scanned builds.static classRepresents the different scan modes that can be used to re-scan the builds of a Job.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidChecks if the current user hasItem.CONFIGUREorItem.BUILDpermission.voiddoPerformScan(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) Shortcut method togetDefault().ScanOnDemandBaseAction.ScanMode.doPerformScan(ScanOnDemandBaseAction, StaplerRequest2, StaplerResponse2)If the user clicks on scan on the default scanmode page.Finds the user's defaultScanOnDemandBaseAction.ScanMode.getDynamic(String url) Stapler function to enable 'scan-on-demand/all' etc.Finds the mode with the provided url as returned byScanOnDemandBaseAction.ScanMode.getUrlName().final Job<?,?> Returns the project.booleanChecks if the current user hasItem.CONFIGUREorItem.BUILDpermission.voidremoveRunActions(hudson.matrix.MatrixBuild build) Method for remove matrix run actions.
- 
Constructor Details- 
ScanOnDemandBaseActionSODBaseAction constructor.- Parameters:
- project- current project.
 
 
- 
- 
Method Details- 
getIconFileName- Specified by:
- getIconFileNamein interface- Action
 
- 
getDisplayName- Specified by:
- getDisplayNamein interface- Action
- Specified by:
- getDisplayNamein interface- ModelObject
 
- 
getUrlName- Specified by:
- getUrlNamein interface- Action
 
- 
hasPermissionpublic boolean hasPermission()Checks if the current user hasItem.CONFIGUREorItem.BUILDpermission.- Returns:
- true if so.
 
- 
checkPermissionpublic void checkPermission()Checks if the current user hasItem.CONFIGUREorItem.BUILDpermission.
- 
getProjectReturns the project.- Returns:
- project
 
- 
removeRunActionspublic void removeRunActions(hudson.matrix.MatrixBuild build) Method for remove matrix run actions.- Parameters:
- build- the MatrixBuild.
 
- 
doPerformScanpublic void doPerformScan(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) throws jakarta.servlet.ServletException, InterruptedException, IOException Shortcut method togetDefault().ScanOnDemandBaseAction.ScanMode.doPerformScan(ScanOnDemandBaseAction, StaplerRequest2, StaplerResponse2)If the user clicks on scan on the default scanmode page.- Parameters:
- request- the request
- response- the response
- Throws:
- jakarta.servlet.ServletException- if so
- InterruptedException- if so
- IOException- if so
 
- 
getDefaultFinds the user's defaultScanOnDemandBaseAction.ScanMode. If no selection is found in the session, or not in the request scope thenScanOnDemandBaseAction.NonScannedis returned.- Returns:
- the default mode.
 
- 
getDynamicStapler function to enable 'scan-on-demand/all' etc.- Parameters:
- url- the scan mode
- Returns:
- most likely a ScanOnDemandBaseAction.ScanMode
 
- 
getModeFinds the mode with the provided url as returned byScanOnDemandBaseAction.ScanMode.getUrlName().- Parameters:
- url- the url to match
- Returns:
- the scan mode or null if no matching scan mode is found.
 
 
-