Package de.xima.fc.form.lock
Class FormRecordLockContext
java.lang.Object
de.xima.fc.form.lock.FormRecordLockContext
- All Implemented Interfaces:
IFormRecordLockContext
,Serializable
,AutoCloseable
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:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static FormRecordLockContext
empty()
static FormRecordLockContext
forFormRecord
(Vorgang formRecord) static FormRecordLockContext
static FormRecordLockContext
forProcessId
(String processId) static FormRecordLockContext
forRequest
(javax.servlet.http.HttpServletRequest req) toString()
void
Updates the form record to be locked.
-
Method Details
-
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
- Throws:
CouldNotLockFormRecordException
-
empty
- Throws:
CouldNotLockFormRecordException
-
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
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
-
toString
-