|
SAP NetWeaver 7.31 Enterprise Portal (SP 16) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ILock
| Method Summary | |
|---|---|
String |
getChangelistId()
Returns the id of the change recording change list containing the object this lock is associated with, or null if the object is not checked out. |
String |
getDescription()
Returns the description which was stored with the lock when this lock object was created. |
long |
getRemainigLifespan()
Returns the remaining lifespan (time to expiration) of this lock object in milliseconds. |
long |
getRemainingProtectionSpan()
Returns the remaining protection span of this lock object in milliseconds. |
String |
getSessionId()
Returns the session id which was relevant for the lock when this lock object was created. |
LockState |
getState()
Returns the current state of this lock object. |
LockState |
getStateAndRefresh(String userId,
String sessionId)
Returns the current state of this lock object and perform a refresh (see refresh(java.lang.String, java.lang.String)for more information) on the
lock if possible. |
String |
getUserId()
Returns the id of the owner of the lock when this lock object was created. |
boolean |
isChangeRecordingLock()
Returns true if the object for which this lock was created is checked out in
a change recording change list. |
void |
refresh(String userId,
String sessionId)
Refresh the lock entry which means that it's last modification time is updated. |
void |
release(String userId,
String sessionId)
Release the lock (i.e. unlock the resource), which removes the lock in the regsitry. |
ILock |
take(String userId,
String sessionId,
String description)
Take this lock from its current owner/session after it's lifespan is over. |
ILock |
take(String userId,
String sessionId,
String description,
boolean administrativeMode)
Take this lock from its current owner/session even before it's lifespan is over. |
| Method Detail |
|---|
String getUserId()
throws LockingException
LockState.ACTIVE,
this is still the owner of the lock.
LockingException - if the lock registry is not accessible
String getChangelistId()
throws LockingException
null if the object is not checked out.
LockingException - if the change recording service is not accessibleboolean isChangeRecordingLock()
true if the object for which this lock was created is checked out in
a change recording change list. Change recording locks does not have a life
span and protection span - they are active as long as the corresponding object is checked out.
Change recording locks can be taken by the same user who checked out the corresponding object.
true if this is a change recording lock, false otherwise.
String getSessionId()
throws LockingException
LockState.ACTIVE, this is still the session id which is stored
in the central lock regisrty.
LockingException - if the lock registry is not accessible
String getDescription()
throws LockingException
LockState.ACTIVE, this is still the description which is stored
in the central lock regisrty.
LockingException - if the lock registry is not accessible
long getRemainingProtectionSpan()
throws LockingException
take(String,String,String)). However, this lock object will
remain in state LockState.ACTIVEeven with a negative protection
span, until the lock expires ((see getRemainigLifespan())).
LockingException - if the lock registry is not accessible or if the lock has
been released in the meanwhile (i.e. its state is
LockState.INACTIVE)
long getRemainigLifespan()
throws LockingException
LockState.INACTIVE
LockingException - if the lock registry is not accessible or if the lock has
been released in the meanwhile (i.e. its state is
LockState.INACTIVE)
LockState getState()
throws LockingException
LockStatefor a description of the various states that a lock
object can have.
LockingException - if the lock registry is not accessible
LockState getStateAndRefresh(String userId,
String sessionId)
throws LockingException
refresh (see refresh(java.lang.String, java.lang.String)for more information) on the
lock if possible. On this instance, getStateAndRefresh can
only be called by the user/session that is returned by
this.getUserId() and this.getSessionId()
respectively. In case that current user/session is identical with the
result of this.getUserId()/
this.getSessionId() but the lock has changed it's owner,
LockState.BROKENis returned and the refresh is
not carried out on the lock. If no lock is active for the resource with
id this.getResourceId(), no refresh is
carried out and LockState.INACTIVEreturned as result.
userId - id of the current usersessionId - id of the current session (only considered, if
doRefresh has value true
LockingException - if the lock registry is not accessible if userId
differs from the value returned by
this.getUserId(), or sessionId differs from the
result of this.getSessionId() if the lock has
been released in the meanwhile (i.e. it's state is
LockState.INACTIVE)
void refresh(String userId,
String sessionId)
throws LockingException
refresh, the current client can rely on owning the lock
for the full lifespan. The only exception is that a user with
administration privileges takes (by calling method
take(String, String, String, boolean)) the lock in this time
interval.
A client, which called refresh during a working session
and has never received a LockingException for one the the
reasons described below, can rely on being the only application that
applied changes on the respective resource for this time interval
(assuming that all other clients cooperate and respect locks).
refresh can only be called by the person owning the lock.
Additionaly, this lock object instance can only used for
refresh by the user/session that is returned by methods
this.getUserId() and this.getSessionId()
respectively. This means that a call of this method is only succesful, if
this.getUserId() = parameter
userIdthis.getSessionId() = parameter
sessionId
userId - the id of the current usersessionId - the id of the current session
LockingException - if the lock registry is not accessible if the lock has been
released in the meanwhile (i.e. it's state is
LockState.INACTIVE), if lock is owned by another
user, which means that this lock object is broken (i.e. it's
state is LockState.BROKEN), or userId differs from the value
returned by this.getUserId(), or sessionId differs from the
result of this.getSessionId()
void release(String userId,
String sessionId)
throws LockingException
LockState.INACTIVE(see method getState()for details).
release can only be called by the user/session owning the
lock. Additionaly, this lock object instance can only used for
refresh by the user/session that is returned by methods
this.getUserId() and this.getSessionId()
respectively. This means that a call of this method is only succesful, if
this.getUserId() = parameter
userIdthis.getSessionId() = parameter
sessionId
userId - sessionId -
LockingException - if the lock registry is not accessible if the lock does not
exist anymore in the registry, which means that this lock
object is not active anymore (i.e. it's state is not
LockState.ACTIVE) if lock is owned by another user,
which means that this lock object is broken (i.e. it's state
is LockState.BROKEN), or userId differs from the value
returned by this.getUserId(), or sessionId differs from the
result of this.getSessionId()
ILock take(String userId,
String sessionId,
String description)
throws LockingException
LockState.ACTIVE, is owned by the user who has userId as
id and has the session id that defined by the value of parameter
sessionId. The description data is appended to the
existing description of the respective lock. At the same time, this lock
object is transfered to state LockState.BROKEN.
userId - the current user, who will become the new owner of the lock
associated with this lock objectdescription - the additional descriptive datasessionId -
take has been completed successfully
LockingException - if the lock registry is not accessible LockState.ACTIVE)
ILock take(String userId,
String sessionId,
String description,
boolean administrativeMode)
throws LockingException
administrativeMode is true the current
lifespan for this lock object is ignored. This is the administrative mode
of the take-operation. If administrativeMode is
false, the behaviour of this method is just like
take(String,String, String).LockState.ACTIVEand is owned by the user who has
userId as id. At the same time, this lock object is
transfered to state LockState.BROKEN.
userId - the current user, who will become the new owner of the lock
associated with this lock objectsessionId - the current user, who will become the new owner of the lock
associated with this lock objectdescription - the additional descriptive dataadministrativeMode - if true, ignore lock's lifespan
take has been completed successfully
LockingException - if the lock registry is not accessible LockState.ACTIVE)administrativeMode was set
to false)| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-BASIS
|
[sap.com]
|
api
|
BC-PIN-PCD
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/pcd/gl/api
|
-
|
EP-PIN
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/pcd/gl/api
|
api
|
EP-PIN
|
[sap.com] EP-RUNTIME
|
[sap.com] tc/ep/semantics/api
|
api
|
EP-PIN
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
|
SAP NetWeaver 7.31 Enterprise Portal (SP 16) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||