public final class EntryHistorical extends Object
It is assumed that the common case is not to have conflict and therefore is optimized (in order of importance) for:
Modifier and Type | Field and Description |
---|---|
static String |
HISTORICAL_ATTRIBUTE_NAME
Name of the attribute used to store historical information.
|
Constructor and Description |
---|
EntryHistorical()
Default constructor used before decoding.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttrHistoricalAddValue(AttributeDescription attributeDescription,
CSN csn,
ByteString value)
Updates this entry historical information with the provided add modification.
|
void |
addAttrHistoricalDeleteAttr(AttributeDescription attributeDescription,
CSN csn)
Updates this entry historical information with the provided delete attribute modification.
|
void |
addAttrHistoricalDeleteValue(AttributeDescription attributeDescription,
CSN csn,
ByteString value)
Updates this entry historical information with the provided delete modification.
|
void |
addAttrHistoricalReplaceValue(AttributeDescription attributeDescription,
CSN csn,
ByteString value)
Updates this entry historical information with the provided replace modification.
|
Map<AttributeDescription,AttrHistorical> |
getAllAttrHistorical()
Returns the historical information for all attributes.
|
AttrHistorical |
getAttrHistorical(AttributeDescription attributeDescription)
Returns the historical information for the named attribute.
|
static CSN |
getCSN(Entry entry)
Returns the first CSN in the
ds-sync-hist attribute of the provided entry. |
CSN |
getEntryADDDate()
Returns the CSN of the operation that added this entry.
|
CSN |
getEntryMODDNDate()
Returns the CSN of the operation that renamed this entry.
|
static String |
getEntryUUID(Entry entry)
Get the entry unique Id in String form.
|
static String |
getEntryUUID(PreOperationAddOperation op)
Get the Entry Unique Id from an add operation.
|
static String |
getEntryUUID(SearchResultEntry entry)
Get the entry unique Id in String form.
|
static boolean |
isHistoricalAttribute(Attribute attr)
Check if a given attribute is an attribute used to store historical information.
|
static EntryHistorical |
newInstanceFromEntry(Entry entry)
Construct an Historical object from the provided entry by reading the historical attribute.
|
void |
setEntryADDDate(CSN csn)
Sets the CSN of the operation that added this entry.
|
void |
setEntryMODDNDate(CSN csn)
Sets the CSN of the operation that renamed this entry.
|
String |
toString() |
public static final String HISTORICAL_ATTRIBUTE_NAME
public EntryHistorical()
public static EntryHistorical newInstanceFromEntry(Entry entry)
entry
- The entry which historical information must be loadedpublic static String getEntryUUID(Entry entry)
entry
- The entry for which the unique id should be returned.public static String getEntryUUID(PreOperationAddOperation op)
op
- The operationpublic static String getEntryUUID(SearchResultEntry entry)
entry
- The entry for which the unique id should be returned.public static boolean isHistoricalAttribute(Attribute attr)
attr
- The attribute that needs to be checked.public static CSN getCSN(Entry entry)
ds-sync-hist
attribute of the provided entry.entry
- the non-null entryds-sync-hist
attributepublic CSN getEntryADDDate()
public void setEntryADDDate(CSN csn)
csn
- The CSN of the operation that added this entry.public CSN getEntryMODDNDate()
public void setEntryMODDNDate(CSN csn)
csn
- The CSN of the operation that renamed this entry.public Map<AttributeDescription,AttrHistorical> getAllAttrHistorical()
public AttrHistorical getAttrHistorical(AttributeDescription attributeDescription)
attributeDescription
- The attribute name.null
if there isn't any.public void addAttrHistoricalAddValue(AttributeDescription attributeDescription, CSN csn, ByteString value)
attributeDescription
- The attribute description.csn
- The CSN of the modification.value
- The value that was added.public void addAttrHistoricalDeleteValue(AttributeDescription attributeDescription, CSN csn, ByteString value)
attributeDescription
- The attribute description.csn
- The CSN of the modification.value
- The value that was deleted.public void addAttrHistoricalReplaceValue(AttributeDescription attributeDescription, CSN csn, ByteString value)
attributeDescription
- The attribute description.csn
- The CSN of the modification.value
- The value that was replaced.public void addAttrHistoricalDeleteAttr(AttributeDescription attributeDescription, CSN csn)
attributeDescription
- The attribute description.csn
- The CSN of the modification.Copyright 2010-2022 ForgeRock AS.