Class ProcessResults
java.lang.Object
net.sf.basedb.util.extensions.manager.ProcessResults
Class for collecting results from a scan for new/deleted/updated
extensions.
- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2016-11-17 13:36:34 +0100 (to, 17 nov 2016) $
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Scan results for a single XML or JAR file. -
Field Summary
Modifier and TypeFieldDescriptionprivate long
private Map<ExtensionsFile,
ProcessResults.FileResults> private boolean
private int
private Map<ExtensionsFile,
ProcessResults.FileResults> private final long
private String
-
Constructor Summary
ConstructorDescriptionCreate a new process results object.ProcessResults
(ProcessResults oldResults) Create a new process results object, keeping information about previous results. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addErrorMessage
(ExtensionsFile xtFile, String message) Adds a detailed message inidcating a failed operation to a file.void
addMessage
(ExtensionsFile xtFile, String message) Adds a detailed message indicating a successful operation to a file.private void
addMessage
(ExtensionsFile xtFile, String message, boolean error) void
forgetOldResults
(ExtensionsFile xtFile) Forget old processing results for the given file.long
Get the end time of the scan as a millisecond value.int
The number of extension files that could not be completely loaded because of an error.getResults
(ExtensionsFile xtFile) Get the results for a specific extensions file.long
Get the start time of the scan as a millisecond value.Get a summary of the scan results as a textual description.boolean
hasError()
Check if the scan was successful or not.void
setEnded()
Set the end time of the scan.void
setStatus
(ExtensionsFile xtFile, String status) Sets a short overall status message for an entire file.void
setSummary
(String summary) Set a summary of the results.
-
Field Details
-
startTime
private final long startTime -
fileResults
-
oldFileResults
-
hasError
private boolean hasError -
numErrorFiles
private int numErrorFiles -
endTime
private long endTime -
summary
-
-
Constructor Details
-
ProcessResults
public ProcessResults()Create a new process results object. -
ProcessResults
Create a new process results object, keeping information about previous results.- Since:
- 3.2.4
-
-
Method Details
-
getStartTime
public long getStartTime()Get the start time of the scan as a millisecond value.- See Also:
-
getEndTime
public long getEndTime()Get the end time of the scan as a millisecond value.- See Also:
-
setEnded
public void setEnded()Set the end time of the scan. -
getSummary
Get a summary of the scan results as a textual description. -
setSummary
Set a summary of the results. -
hasError
public boolean hasError()Check if the scan was successful or not. For more detailed information usegetResults(ExtensionsFile)
.- Returns:
- TRUE if there was any problems, FALSE if everything was successful
-
getNumErrorFiles
public int getNumErrorFiles()The number of extension files that could not be completely loaded because of an error. -
getAllResults
-
getResults
Get the results for a specific extensions file. If no current results exists, old results are searched.- Parameters:
xtFile
- The extensions file to get the results for- Returns:
- A
ProcessResults.FileResults
object or null if the extensions file is not found
-
forgetOldResults
Forget old processing results for the given file. Should be called when an extension has been uninstalled,- Parameters:
xtFile
- The extensions file to forget- Since:
- 3.2.4
-
setStatus
Sets a short overall status message for an entire file. Example: "Installed", "Failed", etc.- Parameters:
xtFile
- The file to set the status onstatus
- The status message- See Also:
-
addMessage
Adds a detailed message indicating a successful operation to a file.- Parameters:
xtFile
- The file to add the message tomessage
- The message- See Also:
-
addErrorMessage
Adds a detailed message inidcating a failed operation to a file.- Parameters:
xtFile
- The file to add the message tomessage
- The message
-
addMessage
-