public class ContractTCLockHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The full name of this command.
|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
static int |
RC_ACQUIRE_NEWLOCK
Return code: acquire a new lock successful.
|
static int |
RC_ALLOWED_TO_UNLOCK
Return code: The current logon user is allowed to unlock the resource.
|
static int |
RC_DIFF_LOCK_OWNER
Return code: The lock's owner is different from the current logon user.
|
static int |
RC_EXECUTION_EXCEPTION
Return code: System exception is thrown during execution.
|
static int |
RC_FAIL_TO_LOCK
Return code: Failed to lock the resource.
|
static int |
RC_FAIL_TO_UNLOCK
Return code: Failed to unlock the resource.
|
static int |
RC_INVALID_LOCK
Return code: The lock on the resource has been altered, it no longer belongs to the current
logon user.
|
static int |
RC_INVALID_LOCKINFO
Return code: The current lock information is invalid.
|
static int |
RC_LOCK_IS_FOUND
Return code: The lock for the resource is found.
|
static int |
RC_LOL_GREATER_TCL
Return code: The lock is created before the lock's owner last logon time.
|
static int |
RC_LOL_LESS_TCL
Return code: The lock is created after the lock's owner last logon time.
|
static int |
RC_NOLOCK_BUT_FAIL_TO_LOCK
Return code: Cannot find the lock for the resource but failed to create a new lock for it.
|
static int |
RC_NOT_ALLOWED_TO_UNLOCK
Return code: The current logon user is not allowed to unlock the resource.
|
static int |
RC_RENEW_LOCK
Return code: Renew the lock successful
|
static int |
RC_UNLOCK
Return code: Unlock the resource successful.
|
static int |
RC_UNLOCK_AND_NEWLOCK
Return code: The lock on the resource has been released and a new lock is created on the
resource successful.
|
static int |
TCTYPE_GENERAL_OTHERS_PAGES
The general, participants, attachment, and remarks pages type.
|
static int |
TCTYPE_ORDER_APPROVAL
The order approval terms and conditions type.
|
static int |
TCTYPE_PAYMENT
The payment terms and conditions type.
|
static int |
TCTYPE_PRICING
The pricing terms and conditions type.
|
static int |
TCTYPE_RETURNS
The returns terms and conditions type.
|
static int |
TCTYPE_SHIPPING
The shipping terms and conditions type.
|
Constructor and Description |
---|
ContractTCLockHelper(com.ibm.commerce.command.CommandContext cmdCtxt,
java.lang.Long contractId,
int tcType)
Constructor for ContractTCLockHelper
|
Modifier and Type | Method and Description |
---|---|
int |
forceUnlockTC()
Forces an unlock operation on the resource regardless of who owns the lock.
|
int |
forceUnlockTCAndAcquireNewLock()
To force an unlock operation on the resource regardless who owns the lock.
|
java.lang.String |
getCurrentLockCreationTimestamp()
Returns the creation timestamp for the current lock.
|
java.lang.String |
getCurrentLockOwnerLogonId()
Returns the logon ID for the current lock's owner.
|
int |
managingLock()
This is the business logic that manages different lock scenarios while terms and conditions
JSP pages are loaded.
|
int |
verifyAndUnlockTC()
Verifies if the lock still exists and is still owned by the current logon user, then unlock
the terms and conditions resource.
|
public static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public static final int RC_ACQUIRE_NEWLOCK
public static final int RC_ALLOWED_TO_UNLOCK
public static final int RC_DIFF_LOCK_OWNER
public static final int RC_EXECUTION_EXCEPTION
public static final int RC_FAIL_TO_LOCK
public static final int RC_FAIL_TO_UNLOCK
public static final int RC_INVALID_LOCK
public static final int RC_INVALID_LOCKINFO
public static final int RC_LOCK_IS_FOUND
public static final int RC_LOL_GREATER_TCL
public static final int RC_LOL_LESS_TCL
public static final int RC_NOLOCK_BUT_FAIL_TO_LOCK
public static final int RC_NOT_ALLOWED_TO_UNLOCK
public static final int RC_RENEW_LOCK
public static final int RC_UNLOCK
public static final int RC_UNLOCK_AND_NEWLOCK
public static final int TCTYPE_GENERAL_OTHERS_PAGES
public static final int TCTYPE_ORDER_APPROVAL
public static final int TCTYPE_PAYMENT
public static final int TCTYPE_PRICING
public static final int TCTYPE_RETURNS
public static final int TCTYPE_SHIPPING
public ContractTCLockHelper(com.ibm.commerce.command.CommandContext cmdCtxt, java.lang.Long contractId, int tcType)
cmdCtxt
- The command context.contractId
- The Contract ID.tcType
- The terms and conditions type.public int forceUnlockTC()
public int forceUnlockTCAndAcquireNewLock()
public java.lang.String getCurrentLockCreationTimestamp()
public java.lang.String getCurrentLockOwnerLogonId()
public int managingLock()
public int verifyAndUnlockTC()