Class PrometheusDataControl
java.lang.Object
io.github.tonywasher.joceanus.prometheus.views.PrometheusDataControl
- All Implemented Interfaces:
OceanusEventRegistrar.OceanusEventProvider<PrometheusDataEvent>
public abstract class PrometheusDataControl
extends Object
implements OceanusEventRegistrar.OceanusEventProvider<PrometheusDataEvent>
Provides top-level control of data.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrometheusDataControl(PrometheusToolkit pToolkit) Constructor for default control. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddError(OceanusException pError) Add new Error.protected abstract booleananalyseData(boolean bPreserve) Analyse the data in the view.protected voidClear error list.voidDerive update list.Obtain the active profile.Obtain the active task.getData()Obtain current DataSet.abstract PrometheusDataStoreObtain Database object.abstract StringObtain the database name.Obtain DataFormatter.Obtain current error.Obtain registration object for listeners.Obtain GuiFactory.abstract PrometheusDataSetObtain DataSet object.getNewProfile(String pTask) Create new profile.abstract PrometheusDataStoreObtain Null Database object.Obtain SecurityManager.Obtain PreferenceManager.abstract PrometheusSpreadSheetObtain SpreadSheet object.Obtain toolkit.Obtain current Updates.Obtain the validator factory.final MetisViewerEntryGet viewer Entry.Obtain ViewerManager.voidIncrement data version.(package private) final voidrefresh the data view.voidReset changes in a viewSet.voidsetData(PrometheusDataSet pData) Record new DataSet.voidSet the validator factory.voidUndo changes in a viewSet.
-
Constructor Details
-
PrometheusDataControl
Constructor for default control.- Parameters:
pToolkit- the toolkit
-
-
Method Details
-
getEventRegistrar
Description copied from interface:OceanusEventRegistrar.OceanusEventProviderObtain registration object for listeners.- Specified by:
getEventRegistrarin interfaceOceanusEventRegistrar.OceanusEventProvider<PrometheusDataEvent>- Returns:
- the registrar
-
setValidatorFactory
Set the validator factory.- Parameters:
pFactory- the validator factory
-
getValidatorFactory
Obtain the validator factory.- Returns:
- the validator factory
-
setData
Record new DataSet.- Parameters:
pData- the new DataSet
-
incrementVersion
public void incrementVersion()Increment data version. -
getData
Obtain current DataSet.- Returns:
- the current DataSet
-
deriveUpdates
Derive update list.- Throws:
OceanusException- on error
-
getUpdates
Obtain current Updates.- Returns:
- the current Updates
-
addError
Add new Error.- Parameters:
pError- the new Error
-
clearErrors
protected void clearErrors()Clear error list. -
getErrors
Obtain current error.- Returns:
- the current Error
-
getToolkit
Obtain toolkit.- Returns:
- the toolkit
-
getDataFormatter
Obtain DataFormatter.- Returns:
- the DataFormatter
-
getPasswordManager
Obtain SecurityManager.- Returns:
- the SecurityManager
-
getPreferenceManager
Obtain PreferenceManager.- Returns:
- the PreferenceManager
-
getViewerManager
Obtain ViewerManager.- Returns:
- the ViewerManager
-
getGuiFactory
Obtain GuiFactory.- Returns:
- the GuiFactory
-
getViewerEntry
Get viewer Entry.- Parameters:
pId- the id of the entry- Returns:
- the Viewer Entry
-
getSpreadSheet
Obtain SpreadSheet object.- Returns:
- SpreadSheet object
-
getDatabaseName
Obtain the database name.- Returns:
- the name
-
getDatabase
Obtain Database object.- Returns:
- database object
- Throws:
OceanusException- on error
-
getNullDatabase
Obtain Null Database object.- Returns:
- database object
- Throws:
OceanusException- on error
-
getNewData
Obtain DataSet object.- Returns:
- dataSet object
-
analyseData
protected abstract boolean analyseData(boolean bPreserve) Analyse the data in the view.- Parameters:
bPreserve- preserve any error- Returns:
- success true/false
-
refreshViews
final void refreshViews()refresh the data view. -
undoLastChange
public void undoLastChange()Undo changes in a viewSet. -
resetChanges
public void resetChanges()Reset changes in a viewSet. -
getNewProfile
Create new profile.- Parameters:
pTask- the name of the task- Returns:
- the new profile
-
getActiveProfile
Obtain the active profile.- Returns:
- the active profile
-
getActiveTask
Obtain the active task.- Returns:
- the active task
-