3.1.4.4.4 Convert to Exclusive Lock

If the SchemaLockRequestType attribute is set to "ConvertToExclusive", the protocol server considers this schema lock subrequest to be of type, "Convert to exclusive lock". The protocol server process the request to convert a shared lock on the coauthorable file to an exclusive lock on the file.

The protocol server performs the following operations:

  • The conversion of the shared lock to an exclusive lock.

  • The deletion of the coauthoring session.

The protocol server returns an error code value set to "InvalidCoauthSession" to indicate failure if any one of the following conditions is true:

  • There is no shared lock.

  • There is no coauthoring session for the file. The current client is not present in the coauthoring session.

  • There is a current exclusive lock on the file or a shared lock on the file from another client with a different schema lock identifier.

The shared lock is converted to an exclusive lock only if one client is currently editing the document. If the shared lock is successfully converted to an exclusive lock, the protocol server MUST use the unique value of the ExclusiveLockID attribute sent by the client to identify the lock. The ExclusiveLockID attribute is specified in section 2.3.1.13.

If there is more than one client currently editing the file and the ReleaseLockOnConversionToExclusiveFailure attribute is set to false, the protocol server returns an error code value set to "MultipleClientsInCoauthSession" to indicate the failure to convert to an exclusive lock. The protocol server returns an error code value set to "ExitCoauthSessionAsConvertToExclusiveFailed" when the following conditions are both true:

  • The ReleaseLockOnConversionToExclusiveFailure attribute is set to true in the coauthoring subrequest.

  • Multiple clients are in the coauthoring session.

When the ReleaseLockOnConversionToExclusiveFailure attribute is set to true and the conversion to an exclusive lock failed, the protocol server removes the client from the coauthoring session on the file, and it removes the current client’s ClientID from the file coauthoring tracker that was associated with that file. The ReleaseLockOnConversionToExclusiveFailure attribute is specified in section 2.3.1.13.

If any failure occurs such that the subrequest cannot be processed successfully, the protocol server returns an error. The error that the protocol server returns is implementation-specific. Errors that are directly returned by the protocol server are implementation-specific. LockAndCoauthRelatedErrorCodeTypes is defined in section 2.2.5.8, and generic error code types are defined in section 2.2.5.6. For other unknown error types, the protocol server returns an error code value set to "LockRequestFail".