Class PrometheusControlData
java.lang.Object
io.github.tonywasher.joceanus.metis.field.MetisFieldVersionedItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusControlData
- All Implemented Interfaces:
MetisDataItem.MetisDataDeletableItem,MetisDataItem.MetisDataIndexedItem,MetisDataItem.MetisDataObjectFormat,MetisFieldItem,MetisFieldItem.MetisFieldTableItem,MetisFieldItem.MetisFieldUpdatableItem,PrometheusTableItem,Comparable<Object>
ControlData definition and list. The Control Data represents the data version of the entire data
set, allowing for migration code to be written to map between different versions. It also holds a
pointer to the active ControlKey.
When code is loaded from a database, it is possible that more than one control key will be active. This will occur if a failure occurs when we are writing the results of a renew security request to the database and we have changed some records, but not all to the required controlKey. This record points to the active controlKey. All records that are not encrypted by the correct controlKey should be re-encrypted and written to the database.
- Author:
- Tony Washer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classControl Data List.Nested classes/interfaces inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem
MetisFieldItem.MetisFieldDef, MetisFieldItem.MetisFieldItemType, MetisFieldItem.MetisFieldSetDef, MetisFieldItem.MetisFieldTableItem, MetisFieldItem.MetisFieldUpdatableItem, MetisFieldItem.MetisFieldVersionedDefNested classes/interfaces inherited from interface io.github.tonywasher.joceanus.prometheus.data.PrometheusTableItem
PrometheusTableItem.PrometheusTableList<T extends PrometheusTableItem> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringError message for already exists.static final StringList name.static final StringObject name.Fields inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
DESCLEN, ERROR_CREATEITEM, ERROR_DISABLED, ERROR_DUPLICATE, ERROR_EXIST, ERROR_INVALIDCHAR, ERROR_LENGTH, ERROR_MISSING, ERROR_MULT, ERROR_NEGATIVE, ERROR_POSITIVE, ERROR_RANGE, ERROR_RESOLUTION, ERROR_UNKNOWN, ERROR_VALIDATION, ERROR_ZERO, NAMELEN -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrometheusControlData(PrometheusControlData.PrometheusControlDataList pList, PrometheusControlData pSource) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintcompareValues(PrometheusDataItem pThat) compareTo another dataItem.getBase()Get the base item for this item.Get the control key.Get the ControlKeyId for this item.Obtain the fieldSet.Get the data version.getList()Obtain the list.voidResolve all references to current dataSet.protected voidsetControlKey(PrometheusControlKey pControl) Set a new ControlKey.Methods inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
addError, adjustMapForItem, applyChanges, byteLength, clearActive, clearTouches, compareId, compareTo, deRegister, equals, fieldChanged, formatObject, getBaseState, getDataSet, getFieldState, getItemState, getItemType, getNextVersion, getStyle, getTouchStatus, getValueSetVersion, hashCode, includeXmlField, indexOf, isActive, isDisabled, isEditable, isHeader, isListLocked, isLocked, popHistory, removeItem, resolveDataLink, rewindToVersion, setBase, setHeader, setHistory, setNewVersion, setValidEdit, touchItem, touchOnUpdate, touchUnderlyingItems, unLink, updateMaps, validate, validStringMethods inherited from class io.github.tonywasher.joceanus.metis.field.MetisFieldVersionedItem
adjustState, checkForHistory, clearErrors, clearHistory, condenseHistory, fieldChanged, getEditState, getFieldErrors, getFieldErrors, getFirstError, getIndexedId, getOriginalValues, getOriginalVersion, getState, getValidation, getValues, getValuesHistory, getVersion, getVersionedField, hasChanges, hasErrors, hasErrors, hasHistory, isDeleted, isValid, maybePopHistory, newVersionValues, pushHistory, pushHistory, resetHistory, setDeleted, setEditState, setHistory, setIndexedId, setItemType, setValuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataDeletableItem
isDeleted, setDeletedMethods inherited from interface io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataIndexedItem
getIndexedIdMethods inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem.MetisFieldUpdatableItem
checkForHistory, getFieldErrors, getFieldErrors, getOriginalValues, getValues, getValuesHistory, hasErrors, pushHistory, skipField
-
Field Details
-
OBJECT_NAME
Object name. -
LIST_NAME
List name. -
ERROR_CTLEXISTS
Error message for already exists.
-
-
Constructor Details
-
PrometheusControlData
protected PrometheusControlData(PrometheusControlData.PrometheusControlDataList pList, PrometheusControlData pSource) Copy Constructor.- Parameters:
pList- the associated listpSource- The source
-
-
Method Details
-
getDataFieldSet
Description copied from interface:MetisFieldItemObtain the fieldSet.- Specified by:
getDataFieldSetin interfaceMetisFieldItem- Overrides:
getDataFieldSetin classMetisFieldVersionedItem- Returns:
- the fieldSet
-
getDataVersion
Get the data version.- Returns:
- data version
-
getControlKey
Get the control key.- Returns:
- the control key
-
getControlKeyId
Get the ControlKeyId for this item.- Returns:
- the ControlKeyId
-
getBase
Description copied from class:PrometheusDataItemGet the base item for this item.- Overrides:
getBasein classPrometheusDataItem- Returns:
- the Base item or
null
-
getList
Description copied from class:PrometheusDataItemObtain the list.- Overrides:
getListin classPrometheusDataItem- Returns:
- the list
-
compareValues
Description copied from class:PrometheusDataItemcompareTo another dataItem.- Specified by:
compareValuesin classPrometheusDataItem- Parameters:
pThat- the DataItem to compare- Returns:
- the order
-
resolveDataSetLinks
Description copied from class:PrometheusDataItemResolve all references to current dataSet.- Overrides:
resolveDataSetLinksin classPrometheusDataItem- Throws:
OceanusException- on error
-
setControlKey
Set a new ControlKey.- Parameters:
pControl- the new control key- Throws:
OceanusException- on error
-