Package com.ibm.dbb.build.report.records
Class RecordFactoryManager
- java.lang.Object
-
- com.ibm.dbb.build.report.records.RecordFactoryManager
-
public class RecordFactoryManager extends java.lang.Object
This class is responsible to collect all factories that could create the records being stored in the build report. The factories are supplied with a system property "dbb.report.record.factories" separated by comma.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
getAllRecordTypes()
Returns all record types registered by their factoriesstatic RecordFactoryManager
getInstance()
Create an instance of the manager.java.lang.String
getNextId(java.lang.String type)
Generate an unique ID for a specific record type.Record
parse(com.google.gson.JsonObject jsonObj)
Create the record from JSON.static void
staticReset()
-
-
-
Method Detail
-
getInstance
public static RecordFactoryManager getInstance()
Create an instance of the manager.- Returns:
- the instance of the manager.
-
staticReset
public static void staticReset()
-
parse
public Record parse(com.google.gson.JsonObject jsonObj)
Create the record from JSON.- Parameters:
jsonObj
- The object in JSON to be parsed.- Returns:
- the record representing by the supplied JSON contents.
-
getNextId
public java.lang.String getNextId(java.lang.String type)
Generate an unique ID for a specific record type.- Parameters:
type
- the type of the record.- Returns:
- the unique ID of the record.
-
getAllRecordTypes
public java.util.Set<java.lang.String> getAllRecordTypes()
Returns all record types registered by their factories- Returns:
- the list of available record types
-
-