org.gcube.datatransformation.datatransformationlibrary.reports
Class ReportManager

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.reports.ReportManager

public class ReportManager
extends Object

Author:
Dimitris Katris, NKUA ReportManager is responsible to maintain reports for the performed transformations.

Constructor Summary
ReportManager()
           
 
Method Summary
static void closeReport()
          Closes the report.
protected static Report createReport()
           
static Report getReport()
          Returns the report.
protected static String getReportID()
           
static void initializeReport(boolean create)
          Initializes the reporting mechanism.
static boolean isReportingEnabled()
          Checks if the reporting mechanism is enabled for the transformationUnit which is performed.
static void manageRecord(String objectID, String msg, Record.Status status, Record.Type type)
          If the reporting mechanism is enabled then a record is appended in the report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportManager

public ReportManager()
Method Detail

getReportID

protected static String getReportID()

isReportingEnabled

public static boolean isReportingEnabled()
Checks if the reporting mechanism is enabled for the transformationUnit which is performed.

Returns:
true if the reporting mechanism is enabled.

initializeReport

public static void initializeReport(boolean create)
                             throws Exception
Initializes the reporting mechanism.

Parameters:
create - If true then a new report is created and the reporting mechanism is enabled.
Throws:
Exception - If the report could not be created.

createReport

protected static Report createReport()
                              throws Exception
Throws:
Exception

getReport

public static Report getReport()
                        throws Exception
Returns the report.

Returns:
The report
Throws:
Exception - If no report could be found.

closeReport

public static void closeReport()
Closes the report.


manageRecord

public static void manageRecord(String objectID,
                                String msg,
                                Record.Status status,
                                Record.Type type)
If the reporting mechanism is enabled then a record is appended in the report.

Parameters:
objectID - The id of the DataElement.
msg - The message of the record.
status - The status of the logged operation.
type - The type of the logged operation.


Copyright © 2013. All Rights Reserved.