public class S_LockObject extends S_TieSystemObject
S_LibraryObject.MapInfoCASCADE_OP_COPY_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_COPY_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_DELETE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_DELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_DELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_DELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_DELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_DELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_DELETE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_DELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_FREE_CATEGORY_TO_PUBLICOBJECT, CASCADE_OP_FREE_CATEGORY_TO_SCHEMAOBJECT, CASCADE_OP_FREE_CATEGORY_TO_SYSTEMOBJECT, CASCADE_OP_FREE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_FREE_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_FREE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_FREE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_FREE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_FREE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_FREE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_FREE_SCHEMAOBJECT_TO_CATEGORY, CASCADE_OP_FREE_SYSTEMOBJECT_TO_CATEGORY, CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_FREE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_FREE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_UNDEFINED, CASCADE_OP_UNDELETE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_UNDELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_UNDELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_UNDELETE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_UNDELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_UPDATE_CATEGORY_TO_PUBLICOBJECT, CASCADE_OP_UPDATE_CATEGORY_TO_SCHEMAOBJECT, CASCADE_OP_UPDATE_CATEGORY_TO_SYSTEMOBJECT, CASCADE_OP_UPDATE_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_UPDATE_SCHEMAOBJECT_TO_CATEGORY, CASCADE_OP_UPDATE_SYSTEMOBJECT_TO_CATEGORY, DEFAULT_RENDERER, m_ClassId, m_Id, m_Session| Constructor and Description |
|---|
S_LockObject(S_LibrarySession session,
Long classId)
Constructs a S_LockObject object.
|
S_LockObject(S_LibrarySession session,
S_LibraryObjectData data)
Constructs a S_LockObject object - standard variant.
|
| Modifier and Type | Method and Description |
|---|---|
int |
clearReferringPublicObjects()
Release references to an expired LockObject.
|
protected static S_LibraryObjectDefinition |
createDefaultDefinition(S_LibrarySession sess)
Creates a default lockobject definition for locking operations.
|
protected void |
deriveDefinition(S_LibraryObjectDefinition def)
Add to the S_LibraryObjectDefinition
for this class.
|
protected void |
extendedPreFree(OperationState opState,
S_LibraryObjectDefinition def)
operations to be performed before freeing
an object.
|
protected void |
extendedPreInsert(OperationState opState,
S_LibraryObjectDefinition sdef)
Performs pre-insert validation.
|
long |
getLockedForSessionId()
Returns the session id of the session holding this SessionLock
or 0 if the LockState of this object is not LOCKSTATE_SESSIONLOCK.
|
protected Vector |
getReferringPublicObjects(SortSpecification sort)
Gets the PublicObjects that refer to this LockObject
|
protected void |
handleLockPolicy(S_PublicObject po,
S_LibraryObjectDefinition def,
String operationType)
handleLockPolicy - handle any Policy actions associated
with locking, unlocking , modifying a locked PublicObject.
|
protected void |
invokeDefaultMethodForPolicyOperation(S_PublicObject po,
S_LibraryObjectDefinition def,
String opType)
If there is no policy for the operation type, invoke the methods
directly which mimic the classic behavior
|
boolean |
isLockedForSession()
Returns true if the LockState of this object is LOCKSTATE_SESSIONLOCK
If the PublicObject that points to this LockObject has a session
lock, this will return true.
|
boolean |
isLockedForSessionByCurrentSession()
Returns true if the PublicObject that refers to this LockObject has
a session lock, and it is held by the invoking session.
|
protected boolean |
isShared()
Returns true if this LockObject is referenced by
multiple PublicObjects
|
boolean |
isTimeLockedByCurrentSessionUser()
Returns true if there is a TIMED USER LOCK on this object and it is
held by the currently logged in user of the current session.
|
boolean |
isUserLockedByCurrentSessionUser()
Returns true if the LockState of this object is LOCKSTATE_USERLOCK and it is
held by the currently logged in user of the current session.
|
protected void |
postSessionLockedEvent(S_PublicObject po)
If we session locked, we will post an event on behalf of the PO that
got session locked
FIXME: Verify if this code is really needed
|
protected void |
postSessionLockFreedEvent(S_PublicObject po)
If we freed a session lock, we will post an event on behalf of the PO that
freed the session lock
FIXME: Verify if this code is really needed
|
protected void |
postSessionLockReleasedEvent(S_PublicObject po)
If we released a session lock, we will post an event on behalf of the PO that
released the session lock
FIXME: Verify if this code is really needed
|
String |
toString()
Return information regarding the LockState and LockHolder
|
protected static S_LockObject[] |
vectorToSLockObjectArray(S_LibrarySession sess,
Vector vector) |
void |
verifyCanDeleteLockedPublicObject(S_PublicObject po)
Checks if the object lock state is one of the deletable states.
|
void |
verifyCanLockPublicObject(S_PublicObject spo)
Checks the current lock state.
|
void |
verifyCanModifyLockedPublicObject(S_PublicObject po)
Checks the current lock state.
|
void |
verifyCanModifyLockedPublicObjectIfAdmin(S_PublicObject po) |
void |
verifyCanUnlockPublicObject(S_PublicObject spo)
Checks if the current session can unlock the object.
|
void |
verifyCanUpdateLockObject(S_PublicObject spo)
Checks if this lockobject can be modified
The rules for modifying a lock object are as follows
For non admin users, Hard lock and Soft lock
can be modified only if you have Lock access on the PublicObject
that references this lock.
|
addCategory, cascadeFree, createCategories, extendedPostInsert, extendedPostUpdate, extendedPreUpdate, getCategories, getCategories, getCategories, handleCascade, removeCategories, updateCategories, verifyCanCreate, verifyCanFree, verifyCanUpdateadded, applyValueDefault, associatedPostFree, associatedPostInsert, associatedPreInsert, canPurge, cascadeCopy, cascadeUpdate, checkRequiredForInsert, checkSettable, clearArrayTypeAttributeValues, clearMapTypeAttributeValues, clonePublicObjectAttribute, constructIdArray, constructIdArray, copy, copy, copyVectorToLibraryObjectArray, createDefaultPolicyPropertyBundle, createDefaultPropertyBundle, createDefaultPropertyBundle, createInstance, deleteRows, deriveOwnerUniqueName, deriveOwnerUniqueName, deriveUppercasedAttribute, determineClassDomain, determinePolicy, determinePolicy, determineValueDefault, determineValueDomain, dispose, DYNInvalidateState, DYNLockRows, equals, equals, executePolicyOperation, extendedPostFree, extendedPreCopy, findPolicyFromPropertyBundleAv, free, free, getAttribute, getAttributeByUpperCaseName, getAuditCertificateName, getAuditDomainContext, getAuditDomainContextFolder, getAuditEventFolderContext, getClassData, getClassId, getClassName, getClassObject, getContentStorageManager, getData, getDefinition, getEffectivePolicyActionContexts, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getId, getLibraryConnection, getName, getObjectReferenceAttribute, getPropertyBundle, getPropertyValue, getResourceString, getResourceString, getService, getSession, getSessionInterface, getTraceLogger, handleEvent, hashCode, hasNameAttribute, insertReferenceAttributes, insertRow, insertRows, invalidateState, invokeOperation, invokePolicyMethod, isAuditCertificateSecured, isBroadcastCreateEventEnabled, isInstanceOf, isPersistent, issueCascade, isTraced, lockRows, postEvent, postEvent, postEvent, postFree, postInsert, postUpdate, preFree, preInsert, preUpdate, privilegedUpdate, removed, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, trace, update, updateRows, validateStringArray, verifyCanGetContent, verifyCanSetContent, verifyCanSetPolicy, verifyPersistent, verifyWriteableTransactionInProgressclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAttributeByUpperCaseName, getClassId, getId, getSessionInterfacegetTraceLogger, isTraced, tracepublic S_LockObject(S_LibrarySession session, S_LibraryObjectData data) throws IfsException
session - current LibrarySessiondata - data componentIfsException - if the operation failspublic S_LockObject(S_LibrarySession session, Long classId) throws IfsException
session - current LibrarySessionclassId - class idIfsException - if the operation failsprotected void deriveDefinition(S_LibraryObjectDefinition def) throws IfsException
deriveDefinition in class S_SystemObjectdef - the S_LibraryObjectDefinition that contains
the definition of the target object.IfsException - if operation fails.protected void extendedPreInsert(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
extendedPreInsert in class S_SystemObjectopState - operation statesdef - the definition of the object
being createdIfsException - if operation failsprotected void extendedPreFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
extendedPreFree in class S_LibraryObjectopState - current operation statedef - current object definitionIfsException - if operation fails.public boolean isLockedForSession()
throws IfsException
IfsException - if operation fails.public long getLockedForSessionId()
throws IfsException
IfsException - if operation fails.public boolean isLockedForSessionByCurrentSession()
throws IfsException
IfsException - if operation fails.public boolean isUserLockedByCurrentSessionUser()
throws IfsException
IfsException - if operation fails.public boolean isTimeLockedByCurrentSessionUser()
throws IfsException
IfsException - if operation fails.protected void handleLockPolicy(S_PublicObject po, S_LibraryObjectDefinition def, String operationType) throws IfsException
po - the PublicObject that invoked thisdef - the definition for the publicobject that is being updatedoperationType - the operation type for the policyIfsException - if the operation failsprotected void invokeDefaultMethodForPolicyOperation(S_PublicObject po, S_LibraryObjectDefinition def, String opType) throws IfsException
IfsExceptionpublic void verifyCanLockPublicObject(S_PublicObject spo) throws IfsException
spo - the PublicObject that refers to usIfsException - If the lock is in one of the above states.public void verifyCanUnlockPublicObject(S_PublicObject spo) throws IfsException
spo - that refers to this PublicObjectIfsException - If the unlock operation cannot be done.public void verifyCanModifyLockedPublicObject(S_PublicObject po) throws IfsException
IfsException - If the lock is in one of the above states.
FIXME we pass in the po since all other policy operations take the po as an argpublic void verifyCanModifyLockedPublicObjectIfAdmin(S_PublicObject po) throws IfsException
IfsException - If the lock is in one of the above states.
FIXME we pass in the po since all other policy operations take the po as an argpublic void verifyCanDeleteLockedPublicObject(S_PublicObject po) throws IfsException
IfsException - If the object cannot be deleted because of it's lock.
FIXME we pass in the po since all other policy operations take the po as an argpublic void verifyCanUpdateLockObject(S_PublicObject spo) throws IfsException
spo - that refers to this PublicObjectIfsException - If the modify operation cannot be done.protected void postSessionLockedEvent(S_PublicObject po) throws IfsException
po - , the PublicObject that refers to this lockobjectIfsException - If the object cannot be deleted because of it's lock.protected void postSessionLockReleasedEvent(S_PublicObject po) throws IfsException
po - , the PublicObject that refers to this lockobjectIfsException - If the object cannot be deleted because of it's lock.protected void postSessionLockFreedEvent(S_PublicObject po) throws IfsException
po - , the PublicObject that refers to this lockobjectIfsException - If the object cannot be deleted because of it's lock.protected static S_LibraryObjectDefinition createDefaultDefinition(S_LibrarySession sess) throws IfsException
sess - server side representation of current sessionIfsException - if the operation failsprotected Vector getReferringPublicObjects(SortSpecification sort) throws IfsException
sort - SortSpecification to be usedIfsException - if the operation failsprotected boolean isShared()
throws IfsException
IfsException - if the operation failspublic int clearReferringPublicObjects()
throws IfsException
IfsException - if the operation failspublic String toString()
toString in class S_LibraryObjectprotected static S_LockObject[] vectorToSLockObjectArray(S_LibrarySession sess, Vector vector) throws IfsException
IfsExceptionCopyright © 2025. All rights reserved.