Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.server
Class S_LockObject

    java.lang.Object
      oracle.ifs.server.S_LibraryObject
          oracle.ifs.server.S_TieLibraryObject
              oracle.ifs.server.S_SystemObject
                  oracle.ifs.server.S_TieSystemObject
                      oracle.ifs.server.S_LockObject

All Implemented Interfaces:
  IfsEventHandler, LibraryObjectInterface, SystemObjectInterface, Traceable

Direct Known Subclasses:
  S_TieLockObject

    public class S_LockObject

extends S_TieSystemObject

S_LockObject is a server side representation of the iFS LOCKOBJECT class. It is meant to represent information associated with locks on a PublicObject

(Published)

Field Summary

Fields inherited from class oracle.ifs.server.S_LibraryObject
`CASCADE_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 Summary
`S_LockObject(S_LibrarySession session, java.lang.Long classId)` Constructs a S_LockObject object.
`S_LockObject(S_LibrarySession session, S_LibraryObjectData data)` Constructs a S_LockObject object - standard variant.

Method Summary
`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 java.util.Vector` | `getReferringPublicObjects(SortSpecification sort)` Gets the PublicObjects that refer to this LockObject
`protected void` | `handleLockPolicy(S_PublicObject po, S_LibraryObjectDefinition def, java.lang.String operationType)` handleLockPolicy - handle any Policy actions associated with locking, unlocking , modifying a locked PublicObject.
`protected void` | `invokeDefaultMethodForPolicyOperation(S_PublicObject po, S_LibraryObjectDefinition def, java.lang.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
`java.lang.String` | `toString()` Return information regarding the LockState and LockHolder
`protected static S_LockObject[]` | `vectorToSLockObjectArray(S_LibrarySession sess, java.util.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.

Methods inherited from class oracle.ifs.server.S_SystemObject
`addCategory, cascadeFree, createCategories, extendedPostInsert, extendedPostUpdate, extendedPreUpdate, getCategories, getCategories, getCategories, handleCascade, removeCategories, updateCategories, verifyCanCreate, verifyCanFree, verifyCanUpdate`

Methods inherited from class oracle.ifs.server.S_LibraryObject
`applyValueDefault, associatedPostFree, associatedPostInsert, associatedPreInsert, cascadeCopy, cascadeUpdate, checkRequiredForInsert, checkSettable, clearArrayTypeAttributeValues, clonePublicObjectAttribute, constructIdArray, constructIdArray, copy, copy, copyVectorToLibraryObjectArray, createDefaultPolicyPropertyBundle, createDefaultPropertyBundle, createInstance, deleteRows, deriveOwnerUniqueName, deriveOwnerUniqueName, deriveUppercasedAttribute, determineClassDomain, determinePolicy, determinePolicy, determineValueDefault, determineValueDomain, dispose, DYNLockRows, equals, executePolicyOperation, extendedPostFree, extendedPreCopy, findPolicyFromPropertyBundleAv, free, free, getAttribute, getAttributeByUpperCaseName, getAuditCertificateName, getAuditDomainContext, getAuditEventFolderContext, getClassData, getClassId, getClassName, getClassObject, 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, issueCascade, isTraced, lockRows, postEvent, postEvent, postFree, postInsert, postUpdate, preFree, preInsert, preUpdate, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, trace, update, updateRows, verifyCanGetContent, verifyCanSetContent, verifyCanSetPolicy, verifyWriteableTransactionInProgress`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface oracle.ifs.common.LibraryObjectInterface
`getAttributeByUpperCaseName, getClassId, getId, getSessionInterface`

Methods inherited from interface oracle.ifs.common.Traceable
`getTraceLogger, isTraced, trace`

Constructor Detail

### S_LockObject

    public S_LockObject(S_LibrarySession session,
                        S_LibraryObjectData data)
                 throws IfsException

  Constructs a S_LockObject object - standard variant.

  Parameters:
    `session` - current LibrarySession
    `data` - data component
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### S_LockObject

    public S_LockObject(S_LibrarySession session,
                        java.lang.Long classId)
                 throws IfsException

  Constructs a S_LockObject object. This variant is used for objects that have not been created in the database yet.

  Parameters:
    `session` - current LibrarySession
    `classId` - class id
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

Method Detail

### deriveDefinition

    protected void deriveDefinition(S_LibraryObjectDefinition def)
                             throws IfsException

  Description copied from class: `S_LockObject`
  Add to the S_LibraryObjectDefinition for this class. This is called by getDefinition() on S_LibraryObject. This must call super.deriveDefinition() before applying any class-specific changes to the S_LibraryObjectDefinition object.

  Overrides:
    `deriveDefinition` in class `S_SystemObject`
  Parameters:
    `def` - the S_LibraryObjectDefinition that contains the definition of the target object.
  Throws:
    `IfsException` - if operation fails.
  (Published)

### extendedPreInsert

    protected void extendedPreInsert(OperationState opState,
                                     S_LibraryObjectDefinition sdef)
                              throws IfsException

  Description copied from class: `S_LockObject`
  Performs pre-insert validation.

  Overrides:
    `extendedPreInsert` in class `S_SystemObject`
  Parameters:
    `opState` - operation state
    `sdef` - the definition of the object being created
  Throws:
    `IfsException` - if operation fails
  (Published)

### extendedPreFree

    protected void extendedPreFree(OperationState opState,
                                   S_LibraryObjectDefinition def)
                            throws IfsException

  Description copied from class: `S_LockObject`
  operations to be performed before freeing an object. This is overridden by classes that need to perform operations after successfully deleting the rows for the freed instance.

  Overrides:
    `extendedPreFree` in class `S_LibraryObject`
  Parameters:
    `opState` - current operation state
    `def` - current object definition
  Throws:
    `IfsException` - if operation fails.
  (Published)

### isLockedForSession

    public boolean isLockedForSession()
                               throws IfsException

  Description copied from class: `S_LockObject`
  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.

  Returns:
    true if LockState is LOCKSTATE_SESSIONLOCK.
  Throws:
    `IfsException` - if operation fails.
  (Published)

### getLockedForSessionId

    public long getLockedForSessionId()
                               throws IfsException

  Description copied from class: `S_LockObject`
  Returns the session id of the session holding this SessionLock or 0 if the LockState of this object is not LOCKSTATE_SESSIONLOCK.

  Returns:
    the session id of the session holding a lock on this object.
  Throws:
    `IfsException` - if operation fails.
  (Unpublished)

### isLockedForSessionByCurrentSession

    public boolean isLockedForSessionByCurrentSession()
                                               throws IfsException

  Description copied from class: `S_LockObject`
  Returns true if the PublicObject that refers to this LockObject has a session lock, and it is held by the invoking session. The LockState of this LockObject is LOCKSTATE_SESSIONLOCK

  Returns:
    true if there is a session lock state on this object, and it is held by the invoking session.
  Throws:
    `IfsException` - if operation fails.
  (Published)

### isUserLockedByCurrentSessionUser

    public boolean isUserLockedByCurrentSessionUser()
                                             throws IfsException

  Description copied from class: `S_LockObject`
  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.

  Returns:
    true if there is a user lock held on this object, and it is held by the invoking session user.
  Throws:
    `IfsException` - if operation fails.
  (Published)

### isTimeLockedByCurrentSessionUser

    public boolean isTimeLockedByCurrentSessionUser()
                                             throws IfsException

  Description copied from class: `S_LockObject`
  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.

  Returns:
    true if there is a timed user lock held on this object, and it is held by the invoking session user.
  Throws:
    `IfsException` - if operation fails.
  (Published)

### handleLockPolicy

    protected void handleLockPolicy(S_PublicObject po,
                                    S_LibraryObjectDefinition def,
                                    java.lang.String operationType)
                             throws IfsException

  Description copied from class: `S_LockObject`
  handleLockPolicy - handle any Policy actions associated with locking, unlocking , modifying a locked PublicObject. freeing a locked PublicObject or modifying a lockobject The policy defines the rules for the above operations

  Parameters:
    `po` - the PublicObject that invoked this
    `def` - the definition for the publicobject that is being updated
    `operationType` - the operation type for the policy
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### invokeDefaultMethodForPolicyOperation

    protected void invokeDefaultMethodForPolicyOperation(S_PublicObject po,
                                                         S_LibraryObjectDefinition def,
                                                         java.lang.String opType)
                                                  throws IfsException

  Description copied from class: `S_LockObject`
  If there is no policy for the operation type, invoke the methods directly which mimic the classic behavior

  Throws:
    `IfsException`

### verifyCanLockPublicObject

    public void verifyCanLockPublicObject(S_PublicObject spo)
                                   throws IfsException

  Description copied from class: `S_LockObject`
  Checks the current lock state. If hardlocked, softlocked, locked by user other than current user, or session locked by sesssion other than current session, throws exception. Otherwise returns. Use this method to see if the object can be locked with a new lockstate.

  Parameters:
    `spo` - the PublicObject that refers to us
  Throws:
    `IfsException` - If the lock is in one of the above states.
  (Unpublished)

### verifyCanUnlockPublicObject

    public void verifyCanUnlockPublicObject(S_PublicObject spo)
                                     throws IfsException

  Description copied from class: `S_LockObject`
  Checks if the current session can unlock the object. Use this function to see if the lock rules based on current lock state and permission levels allow you to unlock the object. Returns true for all lock states when in admin mode because admin can unlock any lock. For non admin users, Hard lock and Soft lock can be unlocked if you have Lock access and Update acess. Unlocking User lock and session locks requires current ownership of the lock. If the lockstate cannot be changed to unlock, this method throws exception.

  Parameters:
    `spo` - that refers to this PublicObject
  Throws:
    `IfsException` - If the unlock operation cannot be done.
  (Unpublished)

### verifyCanModifyLockedPublicObject

    public void verifyCanModifyLockedPublicObject(S_PublicObject po)
                                           throws IfsException

  Description copied from class: `S_LockObject`
  Checks the current lock state. If hardlocked, softlocked, locked by user other than current user, or session locked by sesssion other than current session, throws exception. Otherwise returns. Use this method to see if the object can be modified.

  Throws:
    `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 arg
  (Unpublished)

### verifyCanModifyLockedPublicObjectIfAdmin

    public void verifyCanModifyLockedPublicObjectIfAdmin(S_PublicObject po)
                                                  throws IfsException

  Throws:
    `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 arg
  (Unpublished)

### verifyCanDeleteLockedPublicObject

    public void verifyCanDeleteLockedPublicObject(S_PublicObject po)
                                           throws IfsException

  Description copied from class: `S_LockObject`
  Checks if the object lock state is one of the deletable states. If the Object is hardlocked, userlocked by some other user or session locked by some other user, this throws exception. If the lock state is unlock, softlock, user lock for current user or session lock for current session, this method returns without exception. Use this method to test if we can delete the object based on it's lock state.

  Throws:
    `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 arg
  (Unpublished)

### verifyCanUpdateLockObject

    public void verifyCanUpdateLockObject(S_PublicObject spo)
                                   throws IfsException

  Description copied from class: `S_LockObject`
  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. User lock and session locks requires current ownership of the lock to be modified.

  Parameters:
    `spo` - that refers to this PublicObject
  Throws:
    `IfsException` - If the modify operation cannot be done.
  (Unpublished)

### postSessionLockedEvent

    protected void postSessionLockedEvent(S_PublicObject po)
                                   throws IfsException

  Description copied from class: `S_LockObject`
  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

  Parameters:
    `po` - , the PublicObject that refers to this lockobject
  Throws:
    `IfsException` - If the object cannot be deleted because of it's lock.
  (Unpublished)

### postSessionLockReleasedEvent

    protected void postSessionLockReleasedEvent(S_PublicObject po)
                                         throws IfsException

  Description copied from class: `S_LockObject`
  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

  Parameters:
    `po` - , the PublicObject that refers to this lockobject
  Throws:
    `IfsException` - If the object cannot be deleted because of it's lock.
  (Unpublished)

### postSessionLockFreedEvent

    protected void postSessionLockFreedEvent(S_PublicObject po)
                                      throws IfsException

  Description copied from class: `S_LockObject`
  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

  Parameters:
    `po` - , the PublicObject that refers to this lockobject
  Throws:
    `IfsException` - If the object cannot be deleted because of it's lock.
  (Unpublished)

### createDefaultDefinition

    protected static S_LibraryObjectDefinition createDefaultDefinition(S_LibrarySession sess)
                                                                throws IfsException

  Description copied from class: `S_LockObject`
  Creates a default lockobject definition for locking operations.

  Parameters:
    `sess` - server side representation of current session
  Returns:
    server side definition for LOCKOBJECT
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getReferringPublicObjects

    protected java.util.Vector getReferringPublicObjects(SortSpecification sort)
                                                  throws IfsException

  Description copied from class: `S_LockObject`
  Gets the PublicObjects that refer to this LockObject

  Parameters:
    `sort` - SortSpecification to be used
  Returns:
    Vector of S_LibraryObjectData representing the publicobject
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### isShared

    protected boolean isShared()
                        throws IfsException

  Description copied from class: `S_LockObject`
  Returns true if this LockObject is referenced by multiple PublicObjects

  Returns:
    true if the lockobject is referenced by multiple pos
  Throws:
    `IfsException` - if the operation fails
  (Published)

### clearReferringPublicObjects

    public int clearReferringPublicObjects()
                                    throws IfsException

  Description copied from class: `S_LockObject`
  Release references to an expired LockObject. This is invoked by the LockAgent for LockObjects whose LockTimeoutValue indicates that the lock has expired. All PublicObjects that refer to this LockObject will have their LockObject attribute cleared.

  Returns:
    the number of PublicObjects affected
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### toString

    public java.lang.String toString()

  Description copied from class: `S_LockObject`
  Return information regarding the LockState and LockHolder

  Overrides:
    `toString` in class `S_LibraryObject`
  Returns:
    the name of the object.
  (Published)

### vectorToSLockObjectArray

    protected static S_LockObject[] vectorToSLockObjectArray(S_LibrarySession sess,
                                                             java.util.Vector vector)
                                                      throws IfsException

  Throws:
    `IfsException`
  (Unpublished)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD