Class ScanLogAction
- java.lang.Object
-
- com.sonyericsson.jenkins.plugins.bfa.ScanLogAction
-
- All Implemented Interfaces:
Action
,ModelObject
,RunAction2
@ExportedBean public class ScanLogAction extends Object implements RunAction2
The Action for adding a link to the analysis for each run.
-
-
Constructor Summary
Constructors Constructor Description ScanLogAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finished()
To call when the scan is finished.String
getDisplayName()
Long
getEndTime()
The end time of the current scan.String
getExceptionMessage()
Get the exception message if any.String
getIconFileName()
String
getLogText()
Log text for the analysis.Run
getRun()
The run associated with this action, called by jelly.long
getStartTime()
The start time of the current scan.String
getUrlName()
void
onAttached(Run<?,?> r)
void
onLoad(Run<?,?> r)
void
setExceptionMessage(String exceptionMessage)
Set an exception.
-
-
-
Field Detail
-
FILE_NAME
public static final String FILE_NAME
Log file name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getIconFileName
@NonNull public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
@NonNull public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getRun
public Run getRun()
The run associated with this action, called by jelly.- Returns:
- the run
-
getUrlName
@NonNull public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
getLogText
public String getLogText() throws IOException
Log text for the analysis.- Returns:
- the log text, lines are separated by \n
- Throws:
IOException
- if the log can't be found
-
getStartTime
@Exported public long getStartTime()
The start time of the current scan.- Returns:
- time in milliseconds
System.currentTimeMillis()
-
getEndTime
@Exported public Long getEndTime()
The end time of the current scan.- Returns:
- time in milliseconds
System.currentTimeMillis()
-
finished
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) protected void finished()
To call when the scan is finished.
-
getExceptionMessage
public String getExceptionMessage()
Get the exception message if any.- Returns:
- the first exception faced during scan
-
setExceptionMessage
public void setExceptionMessage(String exceptionMessage)
Set an exception.- Parameters:
exceptionMessage
- the exception message to set
-
onAttached
public void onAttached(Run<?,?> r)
- Specified by:
onAttached
in interfaceRunAction2
-
onLoad
public void onLoad(Run<?,?> r)
- Specified by:
onLoad
in interfaceRunAction2
-
-