Succeed a RepositoryAttribute
If the value
of a RepositoryAttribute changes, this can be replicated in enmeshed with this use case.
It allows you to update the content
and keeps a coherent history of all versions by establishing a doubly linked list, using the LocalAttribute’s parameters succeeds
and succeededBy
.
Hence, every LocalAttribute may have exactly one predecessor and one successor.
In case you shared the preceeding version of the RepositoryAttribute, the corresponding own shared IdentityAttribute copy will only be succeeded, if you decide to notify the peer of the respective shared IdentityAttribute about the succession.
Parameters
predecessorId
: theid
of the RepositoryAttribute you want to succeed- The
successorContent
according to the parameters of an IdentityAttribute as described in the data model, except for theowner
, which is automatically set to theaddress
of your Identity.
On Success
- The response returns a
predecessor
and asuccessor
LocalAttribute. - The
predecessor
is an updated version of the RepositoryAttribute belonging topredecessorId
, having thesucceededBy
field set to thesuccessor
’sid
. - The
successor
is a new RepositoryAttribute with the updatedsuccessorContent
. Itssucceeds
property links to thepredecessor
.
On Failure
- The response cannot be created, if the
predecessorId
belongs to a RelationshipAttribute. - The response cannot be created, if the
predecessorId
belongs to an IdentityAttribute with ashareInfo
. - The response cannot be created, if the LocalAttribute already has a successor.
- The response cannot be created, if the
successorContent
contains invalid changes, e.g. of the value type. - The response cannot be created, if the parameters are malformed.