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 void
close()
static FormRecordLockContext
empty()
static FormRecordLockContext
forFormRecord(Vorgang formRecord)
static FormRecordLockContext
forId(Long id)
static FormRecordLockContext
forProcessId(String processId)
static FormRecordLockContext
forRequest(javax.servlet.http.HttpServletRequest req)
Long
getFormRecordId()
String
toString()
void
update(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:
getFormRecordId
in interfaceIFormRecordLockContext
- Returns:
- ID of the form record that is being locked by this context. May be
null
if no form record is being locked by this context.
-
update
public void update(Vorgang newFormRecord)
Description copied from interface:IFormRecordLockContext
Updates the form record to be locked. This is not possible if the context is already locking a form record.- Specified by:
update
in interfaceIFormRecordLockContext
- Parameters:
newFormRecord
- to lock
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-