public class KSC_PerformanceReportFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
TIMESPAN_OPTIONS
The array of values that may be used in the timespan declaration of a
graph
|
Modifier and Type | Method and Description |
---|---|
void |
addReport(Report report) |
void |
deleteReportAndSave(int index)
Deletes the indexed report and updates file configuration
|
static void |
getBeginEndTime(String interval,
Calendar begin_time,
Calendar end_time)
This method requires begin time and end time to be set to the current
time prior to call.
|
static KSC_PerformanceReportFactory |
getInstance()
Singleton static call to get the only instance that should exist for the
KSC_PerformanceReportFactory
|
Report |
getReportByIndex(int index)
getReportByIndex
|
Map<Integer,String> |
getReportList()
getReportList
|
Map<Integer,Report> |
getReportMap()
getReportMap
|
static void |
init()
Init routine.
|
void |
reload()
Parses the KSC_PerformanceReport.xml
|
void |
saveCurrent()
Saves the KSC_PerformanceReport.xml data.
|
static void |
setConfigFile(File configFile) |
void |
setReport(int index,
Report report) |
public static final String[] TIMESPAN_OPTIONS
public static void init() throws IOException, FileNotFoundException
IOException
- if any.FileNotFoundException
- if any.public static KSC_PerformanceReportFactory getInstance() throws IllegalStateException
IllegalStateException
- if any.public void reload() throws IOException, FileNotFoundException
IOException
- if any.FileNotFoundException
- if any.public static void setConfigFile(File configFile)
public void saveCurrent() throws IOException, FileNotFoundException
IOException
- if any.FileNotFoundException
- if any.public Report getReportByIndex(int index)
getReportByIndex
index
- a int.Report
object.public void deleteReportAndSave(int index) throws ArrayIndexOutOfBoundsException, IOException, FileNotFoundException
index
- a int.ArrayIndexOutOfBoundsException
- if any.IOException
- if any.FileNotFoundException
- if any.public void addReport(Report report)
public void setReport(int index, Report report)
public static void getBeginEndTime(String interval, Calendar begin_time, Calendar end_time) throws IllegalArgumentException
interval
- a String
object.begin_time
- a Calendar
object.end_time
- a Calendar
object.IllegalArgumentException
- if any.Copyright © 2020. All rights reserved.