Interface UpdateOp

  • All Superinterfaces:
    SPIOperation
    All Known Subinterfaces:
    UpdateAttributeValuesOp

    public interface UpdateOp
    extends SPIOperation
    The developer of a Connector should implement either this interface or the UpdateAttributeValuesOp interface if the Connector will allow an authorized caller to update (i.e., modify or replace) objects on the target resource.

    This update method is simpler to implement than {link UpdateAttributeValuesOp}, which must handle any of several different types of update that the caller may specify. However a true implementation of {link UpdateAttributeValuesOp} offers better performance and atomicity semantics.

    Since:
    1.0
    • Method Detail

      • update

        Uid update​(ObjectClass objectClass,
                   Uid uid,
                   java.util.Set<Attribute> replaceAttributes,
                   OperationOptions options)
        Update the object specified by the ObjectClass and Uid, replacing the current values of each attribute with the values provided.

        For each input attribute, replace all of the current values of that attribute in the target object with the values of that attribute.

        If the target object does not currently contain an attribute that the input set contains, then add this attribute (along with the provided values) to the target object.

        If the value of an attribute in the input set is null, then do one of the following, depending on which is most appropriate for the target:

        • If possible, remove that attribute from the target object entirely.
        • Otherwise, replace all of the current values of that attribute in the target object with a single value of null.
        Parameters:
        objectClass - the type of object to modify. Will never be null.
        uid - the uid of the object to modify. Will never be null.
        replaceAttributes - set of new Attribute. the values in this set represent the new, merged values to be applied to the object. This set may also include operational attributes. Will never be null.
        options - additional options that impact the way this operation is run. Will never be null.
        Returns:
        the Uid of the updated object in case the update changes the formation of the unique identifier.
        Throws:
        UnknownUidException - if the Uid does not exist on the resource.