fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/form/FormContainerClient.java
public Form lockFormContainer(
            Form formParam,
            JobView jobViewParam,
            User userToLockAsParam
    ) {
        if(this.serviceTicket != null && formParam != null) {
            formParam.setServiceTicket(this.serviceTicket);
        }

        Long jobViewId = (jobViewParam == null) ?
                null : jobViewParam.getId();

        Long lockAsUserId = (userToLockAsParam == null) ?
                null : userToLockAsParam.getId();

        try {
            return new Form(this.postJson(
                    formParam,
                    WS.Path.FormContainer.Version1.lockFormContainer(
                            jobViewId, lockAsUserId)));
        }
        //rethrow as a Fluid Client exception.
        catch (JSONException jsonExcept) {
            throw new FluidClientException(jsonExcept.getMessage(),
                    FluidClientException.ErrorCode.JSON_PARSING);
        }
    }
public Form lockFormContainer(
            Form formParam,
            JobView jobViewParam,
            User userToLockAsParam
    ) {
        if(this.serviceTicket != null && formParam != null) {
            formParam.setServiceTicket(this.serviceTicket);
        }

        Long jobViewId = (jobViewParam == null) ?
                null : jobViewParam.getId();

        Long lockAsUserId = (userToLockAsParam == null) ?
                null : userToLockAsParam.getId();

        try {
            return new Form(this.postJson(
                    formParam,
                    WS.Path.FormContainer.Version1.lockFormContainer(
                            jobViewId, lockAsUserId)));
        }
        //rethrow as a Fluid Client exception.
        catch (JSONException jsonExcept) {
            throw new FluidClientException(jsonExcept.getMessage(),
                    FluidClientException.ErrorCode.JSON_PARSING);
        }
    }
public Form lockFormContainer ( Form formParam , JobView jobViewParam , User userToLockAsParam ) { if ( this . serviceTicket != null && formParam != null ) { formParam . setServiceTicket ( this . serviceTicket ) ; } Long jobViewId = ( jobViewParam == null ) ? null : jobViewParam . getId ( ) ; Long lockAsUserId = ( userToLockAsParam == null ) ? null : userToLockAsParam . getId ( ) ; try { return new Form ( this . postJson ( formParam , WS . Path . FormContainer . Version1 . lockFormContainer ( jobViewId , lockAsUserId ) ) ) ; } //rethrow as a Fluid Client exception. catch ( JSONException jsonExcept ) { throw new FluidClientException ( jsonExcept . getMessage ( ) , FluidClientException . ErrorCode . JSON_PARSING ) ; } }
Lock the provided form container for logged in user.
If {@code userToLockAsParam} is provided and valid, that user will be used instead.

@param formParam The form to lock.
@param jobViewParam If retrieved from a view, the lock to view from.
@param userToLockAsParam The form will be locked as this user.
The logged in user must have permission to perform this action.

@return The locked form.
Lock the provided form container for logged in user . If { @code userToLockAsParam } is provided and valid that user will be used instead .