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(CommandContext cmdCtxt, java.lang.Long contractId, int tcType)
Constructor for ContractTCLockHelper
|
Modifier and Type | Method and Description |
---|---|
protected int | checkLockOwnerLastLogonTime()
Examines the lock's creation time and the lock's owner's last logon time.
|
protected int | determineUnlockOption()
Determines whether the current logon user has the option to unlock the resource based on the parameter "allowAcctRepUnlockTC" value set in the StoreCreationWizardRB.properties file.
|
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.
|
protected int | lockIfNoExistingLock()
Locks the terms and conditions resource if there's no existing lock associated with it.
|
int | managingLock()
This is the business logic that manages different lock scenarios while terms and conditions JSP pages are loaded.
|
protected int | renewLockIfUserIsLockOwner(java.lang.Long requestorID)
Renews the lock if the current logon user is the lock's owner.
|
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 COPYRIGHT
public static final java.lang.String CLASSNAME
public static final int TCTYPE_PRICING
public static final int TCTYPE_SHIPPING
public static final int TCTYPE_PAYMENT
public static final int TCTYPE_RETURNS
public static final int TCTYPE_ORDER_APPROVAL
public static final int TCTYPE_GENERAL_OTHERS_PAGES
public static final int RC_ACQUIRE_NEWLOCK
public static final int RC_NOLOCK_BUT_FAIL_TO_LOCK
public static final int RC_LOCK_IS_FOUND
public static final int RC_EXECUTION_EXCEPTION
public static final int RC_INVALID_LOCKINFO
public static final int RC_RENEW_LOCK
public static final int RC_DIFF_LOCK_OWNER
public static final int RC_LOL_GREATER_TCL
public static final int RC_LOL_LESS_TCL
public static final int RC_UNLOCK_AND_NEWLOCK
public static final int RC_FAIL_TO_LOCK
public static final int RC_FAIL_TO_UNLOCK
public static final int RC_UNLOCK
public static final int RC_INVALID_LOCK
public static final int RC_ALLOWED_TO_UNLOCK
public static final int RC_NOT_ALLOWED_TO_UNLOCK
public ContractTCLockHelper(CommandContext cmdCtxt, java.lang.Long contractId, int tcType)
public java.lang.String getCurrentLockOwnerLogonId()
public java.lang.String getCurrentLockCreationTimestamp()
protected int lockIfNoExistingLock()
protected int renewLockIfUserIsLockOwner(java.lang.Long requestorID)
protected int checkLockOwnerLastLogonTime()
protected int determineUnlockOption()
public int managingLock()
public int forceUnlockTCAndAcquireNewLock()
public int forceUnlockTC()
public int verifyAndUnlockTC()