Package de.xima.fc.form.lock
Class FormRecordLockContext
- java.lang.Object
-
- de.xima.fc.form.lock.FormRecordLockContext
-
- All Implemented Interfaces:
IFormRecordLockContext,Serializable,AutoCloseable
public class FormRecordLockContext extends Object implements IFormRecordLockContext
Acquires a form record lock on creation and releases it when the context is closed- Since:
- 6.6.13 & 7.0.5
- Author:
- XIMA Media GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static FormRecordLockContextempty()static FormRecordLockContextforFormRecord(Vorgang formRecord)static FormRecordLockContextforId(Long id)static FormRecordLockContextforProcessId(String processId)static FormRecordLockContextforRequest(javax.servlet.http.HttpServletRequest req)LonggetFormRecordId()StringtoString()voidupdate(Vorgang newFormRecord)Updates the form record to be locked.
-
-
-
Method Detail
-
forFormRecord
public static FormRecordLockContext forFormRecord(Vorgang formRecord) throws CouldNotLockFormRecordException
- Throws:
CouldNotLockFormRecordException
-
forRequest
public static FormRecordLockContext forRequest(javax.servlet.http.HttpServletRequest req) throws CouldNotLockFormRecordException
- Throws:
CouldNotLockFormRecordException
-
forProcessId
public static FormRecordLockContext forProcessId(String processId) throws CouldNotLockFormRecordException
- Throws:
CouldNotLockFormRecordException
-
forId
public static FormRecordLockContext forId(Long id) throws CouldNotLockFormRecordException
- Throws:
CouldNotLockFormRecordException
-
empty
public static FormRecordLockContext empty() throws CouldNotLockFormRecordException
- Throws:
CouldNotLockFormRecordException
-
getFormRecordId
public Long getFormRecordId()
- Specified by:
getFormRecordIdin interfaceIFormRecordLockContext- Returns:
- ID of the form record that is being locked by this context. May be
nullif no form record is being locked by this context.
-
update
public void update(Vorgang newFormRecord)
Description copied from interface:IFormRecordLockContextUpdates the form record to be locked. This is not possible if the context is already locking a form record.- Specified by:
updatein interfaceIFormRecordLockContext- Parameters:
newFormRecord- to lock
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-