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 Summary
Nested 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 Summary
Constructors -
Method Summary
Modifier 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
-
ScanOnDemandBaseAction
SODBaseAction constructor.- Parameters:
project- current project.
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
hasPermission
public boolean hasPermission()Checks if the current user hasItem.CONFIGUREorItem.BUILDpermission.- Returns:
- true if so.
-
checkPermission
public void checkPermission()Checks if the current user hasItem.CONFIGUREorItem.BUILDpermission. -
getProject
Returns the project.- Returns:
- project
-
removeRunActions
public void removeRunActions(hudson.matrix.MatrixBuild build) Method for remove matrix run actions.- Parameters:
build- the MatrixBuild.
-
doPerformScan
public 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 requestresponse- the response- Throws:
jakarta.servlet.ServletException- if soInterruptedException- if soIOException- if so
-
getDefault
Finds 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.
-
getDynamic
Stapler function to enable 'scan-on-demand/all' etc.- Parameters:
url- the scan mode- Returns:
- most likely a
ScanOnDemandBaseAction.ScanMode
-
getMode
Finds 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.
-