Class PrometheusEncryptedDataItem
java.lang.Object
io.github.tonywasher.joceanus.metis.field.MetisFieldVersionedItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusEncryptedDataItem
- All Implemented Interfaces:
MetisDataItem.MetisDataDeletableItem,MetisDataItem.MetisDataIndexedItem,MetisDataItem.MetisDataObjectFormat,MetisFieldItem,MetisFieldItem.MetisFieldTableItem,MetisFieldItem.MetisFieldUpdatableItem,PrometheusTableItem,Comparable<Object>
- Direct Known Subclasses:
PrometheusDataInfoItem,PrometheusStaticDataItem
Encrypted Data Item and List.
- Author:
- Tony Washer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEncrypted DataList.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
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
ConstructorsModifierConstructorDescriptionprotectedPrometheusEncryptedDataItem(PrometheusEncryptedDataItem.PrometheusEncryptedList<?> pList, PrometheusDataValues pValues) Values Constructor.protectedPrometheusEncryptedDataItem(PrometheusEncryptedDataItem.PrometheusEncryptedList<?> pList, PrometheusEncryptedDataItem pSource) Copy Constructor.protectedPrometheusEncryptedDataItem(PrometheusEncryptedDataItem.PrometheusEncryptedList<?> pList, Integer pId) Standard Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadoptSecurity(PrometheusDataKeySet pKeySet, PrometheusEncryptedDataItem pBase) Adopt security for all encrypted values.final PrometheusDataKeySetGet the DataKeySet for this item.final IntegerGet the DataKeySetId for this item.static MetisDataDifferencegetDifference(PrometheusEncryptedPair pCurr, PrometheusEncryptedPair pNew) Determine whether two ValuePair objects differ.Get the Encryptor.getList()Obtain the list.Obtain original Object ValueSet.Obtain Object ValueSet.protected voidinitialiseSecurity(PrometheusDataKeySet pKeySet) Initialise security for all encrypted values.protected PrometheusEncryptedValuesObtain new version values.voidResolve all references to current dataSet.protected final voidsetDataKeySet(PrometheusDataKeySet pKeySet) Set DataKeySet.protected final voidsetDataKeySet(Integer pKeySetId) Set DataKeySet id.protected final voidsetEncryptedValue(MetisDataItem.MetisDataFieldId pFieldId, byte[] pEncrypted) Set encrypted value.protected final voidsetEncryptedValue(MetisDataItem.MetisDataFieldId pFieldId, byte[] pEncrypted, Class<?> pClazz) Set encrypted value.protected final voidsetEncryptedValue(MetisDataItem.MetisDataFieldId pFieldId, Object pValue) Set encrypted value.protected final voidSet Next DataKeySet.protected voidupdateSecurity(PrometheusDataKeySet pKeySet) Update security for all encrypted values.Methods inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
addError, adjustMapForItem, applyChanges, byteLength, clearActive, clearTouches, compareId, compareTo, compareValues, deRegister, equals, fieldChanged, formatObject, getBase, 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, getDataFieldSet, getEditState, getFieldErrors, getFieldErrors, getFirstError, getIndexedId, getOriginalVersion, getState, getValidation, getValuesHistory, getVersion, getVersionedField, hasChanges, hasErrors, hasErrors, hasHistory, isDeleted, isValid, maybePopHistory, 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
getDataFieldSetMethods inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem.MetisFieldUpdatableItem
checkForHistory, getFieldErrors, getFieldErrors, getValuesHistory, hasErrors, pushHistory, skipField
-
Constructor Details
-
PrometheusEncryptedDataItem
protected PrometheusEncryptedDataItem(PrometheusEncryptedDataItem.PrometheusEncryptedList<?> pList, Integer pId) Standard Constructor. This creates a null encryption generator. This will be overridden when a DataKeySet is assigned to the item.- Parameters:
pList- the list that this item is associated withpId- the Id of the new item (or 0 if not yet known)
-
PrometheusEncryptedDataItem
protected PrometheusEncryptedDataItem(PrometheusEncryptedDataItem.PrometheusEncryptedList<?> pList, PrometheusEncryptedDataItem pSource) Copy Constructor. This picks up the generator from the source item.- Parameters:
pList- the list that this item is associated withpSource- the source item
-
PrometheusEncryptedDataItem
protected PrometheusEncryptedDataItem(PrometheusEncryptedDataItem.PrometheusEncryptedList<?> pList, PrometheusDataValues pValues) throws OceanusException Values Constructor. This creates a null encryption generator. This will be overridden when a ControlKey is assigned to the item.- Parameters:
pList- the list that this item is associated withpValues- the data values- Throws:
OceanusException- on error
-
-
Method Details
-
newVersionValues
Description copied from class:MetisFieldVersionedItemObtain new version values.- Overrides:
newVersionValuesin classMetisFieldVersionedItem- Returns:
- new values
-
getValues
Description copied from interface:MetisFieldItem.MetisFieldUpdatableItemObtain Object ValueSet.- Specified by:
getValuesin interfaceMetisFieldItem.MetisFieldUpdatableItem- Overrides:
getValuesin classMetisFieldVersionedItem- Returns:
- the ValueSet of the object
-
getOriginalValues
Description copied from interface:MetisFieldItem.MetisFieldUpdatableItemObtain original Object ValueSet.- Specified by:
getOriginalValuesin interfaceMetisFieldItem.MetisFieldUpdatableItem- Overrides:
getOriginalValuesin classMetisFieldVersionedItem- Returns:
- the ValueSet of the object
-
getDataKeySet
Get the DataKeySet for this item.- Returns:
- the DataKeySet
-
getDataKeySetId
Get the DataKeySetId for this item.- Returns:
- the DataKeySetId
-
getEncryptor
Get the Encryptor.- Returns:
- the encryptor
-
getList
Description copied from class:PrometheusDataItemObtain the list.- Overrides:
getListin classPrometheusDataItem- Returns:
- the list
-
setDataKeySet
Set DataKeySet.- Parameters:
pKeySet- the DataKeySet
-
setNextDataKeySet
protected final void setNextDataKeySet()Set Next DataKeySet. -
setDataKeySet
Set DataKeySet id.- Parameters:
pKeySetId- the KeySet Id- Throws:
OceanusException- on error
-
setEncryptedValue
protected final void setEncryptedValue(MetisDataItem.MetisDataFieldId pFieldId, Object pValue) throws OceanusException Set encrypted value.- Parameters:
pFieldId- the fieldId to setpValue- the value to set- Throws:
OceanusException- on error
-
setEncryptedValue
protected final void setEncryptedValue(MetisDataItem.MetisDataFieldId pFieldId, byte[] pEncrypted) throws OceanusException Set encrypted value.- Parameters:
pFieldId- the fieldId to setpEncrypted- the encrypted value to set- Throws:
OceanusException- on error
-
setEncryptedValue
protected final void setEncryptedValue(MetisDataItem.MetisDataFieldId pFieldId, byte[] pEncrypted, Class<?> pClazz) throws OceanusException Set encrypted value.- Parameters:
pFieldId- the fieldId to setpEncrypted- the encrypted value to setpClazz- the class to decrypt to- Throws:
OceanusException- on error
-
getDifference
public static MetisDataDifference getDifference(PrometheusEncryptedPair pCurr, PrometheusEncryptedPair pNew) Determine whether two ValuePair objects differ.- Parameters:
pCurr- The current PairpNew- The new Pair- Returns:
trueif the objects differ,falseotherwise
-
resolveDataSetLinks
Description copied from class:PrometheusDataItemResolve all references to current dataSet.- Overrides:
resolveDataSetLinksin classPrometheusDataItem- Throws:
OceanusException- on error
-
adoptSecurity
protected void adoptSecurity(PrometheusDataKeySet pKeySet, PrometheusEncryptedDataItem pBase) throws OceanusException Adopt security for all encrypted values.- Parameters:
pKeySet- the new KeySetpBase- the base item- Throws:
OceanusException- on error
-
initialiseSecurity
Initialise security for all encrypted values.- Parameters:
pKeySet- the new KeySet- Throws:
OceanusException- on error
-
updateSecurity
Update security for all encrypted values.- Parameters:
pKeySet- the new KeySet- Throws:
OceanusException- on error
-