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,MetisFieldVersion.MetisFieldUpdatableItem,MetisFieldVersion.MetisFieldVersionedItemCtl,PrometheusCryptographyData.PrometheusControlDataCtl,PrometheusData.PrometheusDataItemCtl,PrometheusTableItem,Comparable<Object>
public class PrometheusControlData
extends PrometheusDataItem
implements PrometheusCryptographyData.PrometheusControlDataCtl
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 renewSecurity 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.MetisFieldSetCtl<T extends MetisFieldItem>, MetisFieldItem.MetisFieldSetDef, MetisFieldItem.MetisFieldTableItem, 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.voidSet 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, 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
isActive, isDeleted, setDeletedMethods inherited from interface io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataIndexedItem
getIndexedIdMethods inherited from interface io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataObjectFormat
formatObjectMethods inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldVersion.MetisFieldUpdatableItem
checkForHistory, getFieldErrors, getFieldErrors, getNextVersion, getOriginalValues, getValues, getValuesHistory, hasErrors, isEditable, popHistory, pushHistory, skipFieldMethods inherited from interface io.github.tonywasher.joceanus.prometheus.data.PrometheusData.PrometheusDataItemCtl
setIndexedIdMethods inherited from interface io.github.tonywasher.joceanus.prometheus.data.PrometheusTableItem
isHeader
-
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
Description copied from interface:PrometheusCryptographyData.PrometheusControlDataCtlGet the control key.- Specified by:
getControlKeyin interfacePrometheusCryptographyData.PrometheusControlDataCtl- 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
public void setControlKey(PrometheusCryptographyData.PrometheusControlKeyCtl pControl) throws OceanusException Description copied from interface:PrometheusCryptographyData.PrometheusControlDataCtlSet a new ControlKey.- Specified by:
setControlKeyin interfacePrometheusCryptographyData.PrometheusControlDataCtl- Parameters:
pControl- the new control key- Throws:
OceanusException- on error
-