Interface UpdateDeltaOp
-
- All Superinterfaces:
SPIOperation
public interface UpdateDeltaOp extends SPIOperation
Proper implementation of
UpdateOp
andUpdateAttributeValuesOp
. This operation updates the values in relative or absolute way. Modification of each attribute is described byAttributeDelta
.This operation is meant as a complete replacement of
UpdateOp
andUpdateAttributeValuesOp
that were poorly designed in the early framework versions. The old operations have not provided any practical way how to execute complex attribute changes in an efficient or atomic way. The presence of a single operation inUpdateOp
could not support any kind of relative changes. The two operations added inUpdateAttributeValuesOp
did not really solve the problem either. The fact that there are two operations made it impossible to implement all scenarios due to operation ordering. E.g. invoking remove operation first and add operation second will end up with an error when working with mandatory multi-value attribute. On the other hand invoking add operation first and remove operation second will cause issues with attributes that represent some limited entitlements (e.g. groups that may be assigned only once). Also the fact that the old update operations returns just the Uid make it very hard to implement an efficient and reliable connector. E.g. it is a common case that the name of the object changes when some of the attributes are changed. The old update operations provided no way how to indicate this change even if the connector was aware of the change.- Since:
- 1.4.3
- Author:
- Radovan Semancik
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<AttributeDelta>
updateDelta(ObjectClass objclass, Uid uid, Set<AttributeDelta> modifications, OperationOptions options)
Update the object specified by theObjectClass
andUid
, modifying the values according to the attribute deltas.
-
-
-
Method Detail
-
updateDelta
Set<AttributeDelta> updateDelta(ObjectClass objclass, Uid uid, Set<AttributeDelta> modifications, OperationOptions options)
Update the object specified by the
ObjectClass
andUid
, modifying the values according to the attribute deltas.The connector is supposed to return side-effect changes as a return value from this operation. E.g. if the modification of some of the attributes changed other attribute then these changes should be returned. The connector must return a new value of primary identifier (Uid) if it is changed. But the connector should return other changes only if the connector has an efficient way how to detect them. Connector is not supposed to return all side-effect changes if it does not know about them or if additional operation is required to fetch them.
- Parameters:
objclass
- the type of object to modify. Will never be null.uid
- the uid of the object to modify. Will never be null.modifications
- set of attribute deltas. Each delta describes modification of one attribute. Each attribute will be in the set at most once. The set will never be null.options
- additional options that impact the way this operation is run. Will never be null.- Returns:
- the set of modifications that were a side-effect of the primary modifications specified in the modifications parameters.
- Throws:
UnknownUidException
- if theUid
does not exist on the resource.InvalidAttributeValueException
- if any of the specified values is not appropriate for the attribute, if the delta execution would result in violation of the schema, if the result would be missing mandatory attribute and in similar cases.
-
-