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.core.util
Class LockUtils

    java.lang.Object
      oracle.ifs.core.util.LockUtils

    public class LockUtils

extends java.lang.Object

A collection of utility methods for LockEntry-based Locking.

Field Summary
`static AccessLevel` | `CHECKOUT_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "checkout" lock.
`static AccessLevel` | `DAV_LOCK_RESTRICTION` AccessLevel specifying the restrictions for a DAV lock.
`static AccessLevel` | `FINALIZED_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "finalized" lock (version immutability lock).
`static AccessLevel` | `FREEZE_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "freeze" lock (used for documents that are put under a legal or audit hold).
`static AccessLevel` | `HAS_RECORD_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "HasRecord" lock This lock is used to prevent deletion and move of Family and Folder instances that contain records.
`static AccessLevel` | `LIFECYCLE_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "lifecycle" lock (used for documents that are classified with a LifecyclePolicy that is configured to imply that the document should also be locked).
`static AccessLevel` | `MANUAL_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "manual" lock.
`static AccessLevel` | `RECORD_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "record" lock (record immutability lock).
`static AccessLevel` | `RETENTION_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "retention" lock (used for documents that are classified with a RetentionPolicy that is configured to imply that the document should also be locked).
`static AccessLevel` | `WORKFLOW_LOCK_RESTRICTION` AccessLevel specifying the restrictions for an ECM "workflow" lock.

Constructor Summary
`LockUtils()`

Method Summary
`static LockEntry` | `acquireManualLock(PublicObject object)` Acquire a manual lock for the given object.
`static void` | `addLockType(LibrarySession session, boolean custom, java.lang.String lockTypeKey, boolean singleton, LockEntryDefinition lockDef)` Adds a new lock type entry to a lock type lookup table.
`static LockEntryDefinition` | `createCheckoutLockEntryDefinition(LibrarySession session)` Creates a LockEntryDefinition that specifies an ECM "checkout" lock.
`static LockEntryDefinition` | `createDavLockEntryDefinition(LibrarySession session, java.util.Date timeout, java.lang.Integer depth, java.lang.String token, java.lang.String davOwner)` Creates a LockEntryDefinition that specifies a DAV lock.
`static void` | `createLockTypeLookupTables(LibrarySession session)` Creates the lock type lookup tables in the instance-wide Domain PropertyBundle.
`static LockEntryDefinition` | `createManualLockEntryDefinition(LibrarySession session)` Creates a LockEntryDefinition that specifies an ECM "manual" lock.
`static SystemLockEntry` | `createNamedFreezeLock(LibrarySession session, Folder domain, java.lang.String freezeName)` Find a Named freeze SystemLockEntry by name.
`static java.lang.Long` | `deleteNamedFreezeLock(LibrarySession session, Folder domain, java.lang.String freezeName)` Delete a Named freeze SystemLockEntry.
`static LockEntry` | `findLockEntry(PublicObject[] objects, int lockEntryType)` Returns the first LockEntry, of the given lockEntryType, found on the given array of PublicObjects.
`static LockEntry` | `findLockEntry(PublicObject object, int lockType)` Returns the first LockEntry on the given PublicObject with its TYPE attribute equal to the given lockEntryType, or null if no LockEntry of the specified TYPE exists on the object.
`static LockEntry` | `findLockEntry(PublicObject object, int[] lockTypes)` Returns the first LockEntry on the given PublicObject with its TYPE attribute equal to one of the given lockTypes, or null if no LockEntry of the specified TYPEs exists on the object.
`static SystemLockEntry` | `findNamedFreezeLock(LibrarySession session, Folder domain, java.lang.String freezeName)` Find a Named freeze SystemLockEntry by name.
`static SystemLockEntry` | `getFinalizedLockEntry(LibrarySession session)` Returns the singleton Oracle "finalized" SystemLockEntry.
`static SystemLockEntry` | `getFreezeLockEntry(LibrarySession session)` Returns the singleton Oracle "freeze" SystemLockEntry.
`static SystemLockEntry` | `getHasRecordLockEntry(LibrarySession session)` Returns the singleton Oracle "hasRecord" SystemLockEntry.
`static SystemLockEntry` | `getLifecycleLockEntry(LibrarySession session)` Returns the singleton Oracle "lifecycle" SystemLockEntry.
`static java.lang.String[]` | `getLockTypeKeys(LibrarySession session, boolean custom)`
`static PropertyBundle` | `getLockTypeLookupTable(LibrarySession session, boolean custom)` Returns either the standard Oracle lock type lookup table or the custom lock type lookup table.
`static SystemLockEntry` | `getRecordLockEntry(LibrarySession session)` Returns the singleton Oracle "record" SystemLockEntry.
`static LockEntryDefinition` | `getRegisteredLockTypeDefinition(LibrarySession session, boolean custom, java.lang.String lockTypeKey, LockEntryDefinition overrideDef)` Returns a registered lock type as a LockEntryDefinition.
`static SystemLockEntry` | `getRegisteredSingletonLockType(LibrarySession session, boolean custom, java.lang.String lockTypeKey)` Returns a registered lock type that is a global shared singleton as a SystemLockEntry.
`static SystemLockEntry` | `getRetentionLockEntry(LibrarySession session)` Returns the singleton Oracle "retention" SystemLockEntry.
`static LockEntry` | `refreshDavLock(PublicObject object, java.util.Date timeout, java.lang.String davOwner)` Refreshes a DAV lock for the given object.
`static void` | `releaseDavLock(PublicObject object)` Releases a DAV lock from the given object, if a DAV lock exists for that object.
`static void` | `releaseManualLock(PublicObject object)` Release the manual lock for the given object if it exists.
`static void` | `removeLockType(LibrarySession session, boolean custom, java.lang.String lockTypeKey)`
`static void` | `unlockIfExists(PublicObject object, int lockEntryType)` Unlocks the LockEntry of the specifed lockEntryType if it exists on the given PublicObject.
`static void` | `verifyLockEntry(LibrarySession session, PublicObject object, LockEntryDefinition def)` Verify that the lockentry definition can be applied to the specifed object.

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

Field Detail

### CHECKOUT_LOCK_RESTRICTION

    public static AccessLevel CHECKOUT_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "checkout" lock.

### MANUAL_LOCK_RESTRICTION

    public static AccessLevel MANUAL_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "manual" lock.

### DAV_LOCK_RESTRICTION

    public static AccessLevel DAV_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for a DAV lock.

### FINALIZED_LOCK_RESTRICTION

    public static AccessLevel FINALIZED_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "finalized" lock (version immutability lock).

### WORKFLOW_LOCK_RESTRICTION

    public static AccessLevel WORKFLOW_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "workflow" lock.

### RECORD_LOCK_RESTRICTION

    public static AccessLevel RECORD_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "record" lock (record immutability lock).

### HAS_RECORD_LOCK_RESTRICTION

    public static AccessLevel HAS_RECORD_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "HasRecord" lock This lock is used to prevent deletion and move of Family and Folder instances that contain records.

### FREEZE_LOCK_RESTRICTION

    public static AccessLevel FREEZE_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "freeze" lock (used for documents that are put under a legal or audit hold).

### LIFECYCLE_LOCK_RESTRICTION

    public static AccessLevel LIFECYCLE_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "lifecycle" lock (used for documents that are classified with a LifecyclePolicy that is configured to imply that the document should also be locked).

### RETENTION_LOCK_RESTRICTION

    public static AccessLevel RETENTION_LOCK_RESTRICTION

  Description copied from class: `LockUtils`
  AccessLevel specifying the restrictions for an ECM "retention" lock (used for documents that are classified with a RetentionPolicy that is configured to imply that the document should also be locked).

Constructor Detail

### LockUtils

    public LockUtils()

Method Detail

### createCheckoutLockEntryDefinition

    public static LockEntryDefinition createCheckoutLockEntryDefinition(LibrarySession session)
                                                                 throws IfsException

  Description copied from class: `LockUtils`
  Creates a LockEntryDefinition that specifies an ECM "checkout" lock. Uses the current session's user as the "owner" of the checkout.

  Parameters:
    `session` - the current session
  Returns:
    a LockEntryDefinition for a "checkout" lock
  Throws:
    `IfsException` - if the operation fails

### createManualLockEntryDefinition

    public static LockEntryDefinition createManualLockEntryDefinition(LibrarySession session)
                                                               throws IfsException

  Description copied from class: `LockUtils`
  Creates a LockEntryDefinition that specifies an ECM "manual" lock. Uses the current session's user as the "owner" of the manual lock.

  Parameters:
    `session` - the current session
  Returns:
    a LockEntryDefinition for a "manual" lock
  Throws:
    `IfsException` - if the operation fails
  (Published)

### createDavLockEntryDefinition

    public static LockEntryDefinition createDavLockEntryDefinition(LibrarySession session,
                                                                   java.util.Date timeout,
                                                                   java.lang.Integer depth,
                                                                   java.lang.String token,
                                                                   java.lang.String davOwner)
                                                            throws IfsException

  Description copied from class: `LockUtils`
  Creates a LockEntryDefinition that specifies a DAV lock. Uses the current session's user as the "owner" of the manual lock.

  Parameters:
    `session` - the current session
    `timeout` - the timeout value
    `depth` - the depth value
    `token` - the DAV token value
    `davOwner` - the DavOwner value
  Returns:
    a LockEntryDefinition for a DAV lock
  Throws:
    `IfsException` - if the operation fails

### releaseDavLock

    public static void releaseDavLock(PublicObject object)
                               throws IfsException

  Description copied from class: `LockUtils`
  Releases a DAV lock from the given object, if a DAV lock exists for that object.

  Parameters:
    `object` - the object from which to release the DAV lock.
  Throws:
    `IfsException` - if the operation fails.
  (Published)

### refreshDavLock

    public static LockEntry refreshDavLock(PublicObject object,
                                           java.util.Date timeout,
                                           java.lang.String davOwner)
                                    throws IfsException

  Description copied from class: `LockUtils`
  Refreshes a DAV lock for the given object.

  Parameters:
    `object` - the object on which to refresh the DAV lock
    `timeout` - the new timeout value
    `davOwner` - the new DavOwner value
  Returns:
    the LockEntry that was refreshed
  Throws:
    `IfsException` - if the operation fails

### getFinalizedLockEntry

    public static SystemLockEntry getFinalizedLockEntry(LibrarySession session)
                                                 throws IfsException

  Description copied from class: `LockUtils`
  Returns the singleton Oracle "finalized" SystemLockEntry.

  Parameters:
    `session` - the current session
  Returns:
    the singleton "finalized" SystemLockEntry.
  Throws:
    `IfsException` - if the operation fails

### getRecordLockEntry

    public static SystemLockEntry getRecordLockEntry(LibrarySession session)
                                              throws IfsException

  Description copied from class: `LockUtils`
  Returns the singleton Oracle "record" SystemLockEntry.

  Parameters:
    `session` - the current session
  Returns:
    the singleton "record" SystemLockEntry.
  Throws:
    `IfsException` - if the operation fails

### getHasRecordLockEntry

    public static SystemLockEntry getHasRecordLockEntry(LibrarySession session)
                                                 throws IfsException

  Description copied from class: `LockUtils`
  Returns the singleton Oracle "hasRecord" SystemLockEntry.

  Parameters:
    `session` - the current session
  Returns:
    the singleton "hasRecord" SystemLockEntry.
  Throws:
    `IfsException` - if the operation fails

### getFreezeLockEntry

    public static SystemLockEntry getFreezeLockEntry(LibrarySession session)
                                              throws IfsException

  Description copied from class: `LockUtils`
  Returns the singleton Oracle "freeze" SystemLockEntry.

  Parameters:
    `session` - the current session
  Returns:
    the singleton "freeze" SystemLockEntry.
  Throws:
    `IfsException` - if the operation fails

### getLifecycleLockEntry

    public static SystemLockEntry getLifecycleLockEntry(LibrarySession session)
                                                 throws IfsException

  Description copied from class: `LockUtils`
  Returns the singleton Oracle "lifecycle" SystemLockEntry.

  Parameters:
    `session` - the current session
  Returns:
    the singleton "lifecycle" SystemLockEntry.
  Throws:
    `IfsException` - if the operation fails

### getRetentionLockEntry

    public static SystemLockEntry getRetentionLockEntry(LibrarySession session)
                                                 throws IfsException

  Description copied from class: `LockUtils`
  Returns the singleton Oracle "retention" SystemLockEntry.

  Parameters:
    `session` - the current session
  Returns:
    the singleton "retention" SystemLockEntry.
  Throws:
    `IfsException` - if the operation fails

### acquireManualLock

    public static LockEntry acquireManualLock(PublicObject object)
                                       throws IfsException

  Description copied from class: `LockUtils`
  Acquire a manual lock for the given object.

  Parameters:
    `object` - the object to lock
  Returns:
    the Manual LockEntry for the given object
  Throws:
    `IfsException` - if the operation fails

### releaseManualLock

    public static void releaseManualLock(PublicObject object)
                                  throws IfsException

  Description copied from class: `LockUtils`
  Release the manual lock for the given object if it exists.

  Parameters:
    `object` - the object to lock
  Throws:
    `IfsException` - if the operation fails

### verifyLockEntry

    public static void verifyLockEntry(LibrarySession session,
                                       PublicObject object,
                                       LockEntryDefinition def)
                                throws IfsException

  Description copied from class: `LockUtils`
  Verify that the lockentry definition can be applied to the specifed object.

  Parameters:
    `session` - the session context
    `object` - the object to inspect
    `def` - the LockEntry definition
  Throws:
    `IfsException` - 90704: if a lock exist of the same type specified
    90700: if object's lock state prevents the new lock
    other: if the operation fails

### findLockEntry

    public static LockEntry findLockEntry(PublicObject object,
                                          int lockType)
                                   throws IfsException

  Description copied from class: `LockUtils`
  Returns the first LockEntry on the given PublicObject with its TYPE attribute equal to the given lockEntryType, or null if no LockEntry of the specified TYPE exists on the object.

  Parameters:
    `object` - the PublicObject on which to find the LockEntry of the specified TYPE
    `lockType` - the TYPE of LockEntry to find
  Returns:
    the LockEntry of the specified TYPE, or null if no LockEntry of the specified TYPE exists
  Throws:
    `IfsException` - if the operation fails
  (Published)

### findLockEntry

    public static LockEntry findLockEntry(PublicObject object,
                                          int[] lockTypes)
                                   throws IfsException

  Description copied from class: `LockUtils`
  Returns the first LockEntry on the given PublicObject with its TYPE attribute equal to one of the given lockTypes, or null if no LockEntry of the specified TYPEs exists on the object.

  Parameters:
    `object` - the PublicObject on which to find the LockEntry of the specified TYPE
    `lockTypes` - set of LockEntry TYPEs to find
  Returns:
    the LockEntry matching one of the TYPEs, or null if no matching LockEntry exists
  Throws:
    `IfsException` - if the operation fails
  (Published)

### findLockEntry

    public static LockEntry findLockEntry(PublicObject[] objects,
                                          int lockEntryType)
                                   throws IfsException

  Description copied from class: `LockUtils`
  Returns the first LockEntry, of the given lockEntryType, found on the given array of PublicObjects. The function will iterate through each PublicObject returning the first instance of a LockEntry with the given type.

  Parameters:
    `objects` - the array of PublicObjects on which to find the LockEntry of the specified TYPE
    `lockEntryType` - the TYPE of LockEntry
  Returns:
    the LockEntry of the specified TYPE, or null if no LockEntry of the specified TYPE exists
  Throws:
    `IfsException` - if the operation fails
  (Published)

### unlockIfExists

    public static void unlockIfExists(PublicObject object,
                                      int lockEntryType)
                               throws IfsException

  Description copied from class: `LockUtils`
  Unlocks the LockEntry of the specifed lockEntryType if it exists on the given PublicObject.

  Does nothing if the LockEntry of the specified lockEntryType does not exist on the specified PublicObject.

  Parameters:
    `object` - the PublicObject for which to unlock the LockEntry
    `lockEntryType` - the TYPE of LockEntry to unlock
  Throws:
    `IfsException` - if the operation fails
  (Published)

### findNamedFreezeLock

    public static SystemLockEntry findNamedFreezeLock(LibrarySession session,
                                                      Folder domain,
                                                      java.lang.String freezeName)
                                               throws IfsException

  Description copied from class: `LockUtils`
  Find a Named freeze SystemLockEntry by name.

  The name specified is the "common name" for the freeze. The actual unique name is derived from the combination of the domain and the common name.

  Parameters:
    `session` - the session context
    `domain` - the Domain context
    `freezeName` - the name of the Named freeze lock
  Returns:
    the matching SystemLockEntry, or null if one does not exist
  Throws:
    `IfsException` - if the operation fails

### createNamedFreezeLock

    public static SystemLockEntry createNamedFreezeLock(LibrarySession session,
                                                        Folder domain,
                                                        java.lang.String freezeName)
                                                 throws IfsException

  Description copied from class: `LockUtils`
  Find a Named freeze SystemLockEntry by name.

  The name specified is the "common name" for the freeze. The actual unique name is derived from the combination of the domain and the common name.

  Parameters:
    `session` - the session context
    `domain` - the Domain context
    `freezeName` - the name of the Named freeze lock
  Returns:
    the matching SystemLockEntry, or null if one does not exist
  Throws:
    `IfsException` - if the operation fails

### deleteNamedFreezeLock

    public static java.lang.Long deleteNamedFreezeLock(LibrarySession session,
                                                       Folder domain,
                                                       java.lang.String freezeName)
                                                throws IfsException

  Description copied from class: `LockUtils`
  Delete a Named freeze SystemLockEntry.

  The name specified is the "common name" for the freeze. The actual unique name is derived from the combination of the domain and the common name.

  By deleting the SystemLockEntry, all objects that reference this will have that lock implicitly released. This is done lazily - the referencing PublicObjects will still have that LockEntry in its LockEntry array, but it will be treated as though it is removed in determining lock status.

  Parameters:
    `session` - the session context
    `domain` - the Domain context
    `freezeName` - the name of the Named freeze lock
  Returns:
    the ID of the SystemLockEntry that was freed, or null if there was not one that matched
  Throws:
    `IfsException` - if the operation fails

### createLockTypeLookupTables

    public static void createLockTypeLookupTables(LibrarySession session)
                                           throws IfsException

  Description copied from class: `LockUtils`
  Creates the lock type lookup tables in the instance-wide Domain PropertyBundle.

  Note: this method should only be called at schema initialization time

  Parameters:
    `session` - the session context
  Throws:
    `IfsException` - if the operation fails

### addLockType

    public static void addLockType(LibrarySession session,
                                   boolean custom,
                                   java.lang.String lockTypeKey,
                                   boolean singleton,
                                   LockEntryDefinition lockDef)
                            throws IfsException

  Description copied from class: `LockUtils`
  Adds a new lock type entry to a lock type lookup table.

  Parameters:
    `session` - the current session
    `custom` - true if this is a custom lock; false if it is a standard Oracle lock type
    `lockTypeKey` - the key for the new lock type
    `singleton` - true if this lock type should be a global shared singleton SystemLockEntry; false if it should be a LockEntry definition
    `lockDef` - the definition for the custom lock type
  Throws:
    `IfsException` - if the operation fails

### getLockTypeLookupTable

    public static PropertyBundle getLockTypeLookupTable(LibrarySession session,
                                                        boolean custom)
                                                 throws IfsException

  Description copied from class: `LockUtils`
  Returns either the standard Oracle lock type lookup table or the custom lock type lookup table.

  Parameters:
    `session` - the current session
    `custom` - true if the custom lock type lookup table should be returned; false if the standard Oracle lock type lookup table should be returned
  Returns:
    the specified lock type lookup table
  Throws:
    `IfsException` - if the operation fails

### getRegisteredLockTypeDefinition

    public static LockEntryDefinition getRegisteredLockTypeDefinition(LibrarySession session,
                                                                      boolean custom,
                                                                      java.lang.String lockTypeKey,
                                                                      LockEntryDefinition overrideDef)
                                                               throws IfsException

  Description copied from class: `LockUtils`
  Returns a registered lock type as a LockEntryDefinition.

  Parameters:
    `session` - the current session
    `custom` - true if this is a custom lock type; false if it is a standard Oracle lock type
    `lockTypeKey` - the key for the registered lock type
    `overrideDef` - an optional LockEntryDefinition with overrides
  Returns:
    the default LockEntryDefinition for the specified lock type key, or null if the key does not refer to a registered lock type; optionally merged with overrideDef to include optional overrides
  Throws:
    `IfsException` - if the operation fails

### getRegisteredSingletonLockType

    public static SystemLockEntry getRegisteredSingletonLockType(LibrarySession session,
                                                                 boolean custom,
                                                                 java.lang.String lockTypeKey)
                                                          throws IfsException

  Description copied from class: `LockUtils`
  Returns a registered lock type that is a global shared singleton as a SystemLockEntry.

  Parameters:
    `session` - the current session
    `custom` - true if this is a custom lock type; false if it is a standard Oracle lock type
    `lockTypeKey` - the key for the registered singleton lock type
  Returns:
    a SystemLockEntry instance for the given registered singleton lock type key, or null if the key does not refer to a registered lock type
  Throws:
    `IfsException` - 90780: if lockTypeKey does not refer to a singleton lock type
    other: if the operation fails

### getLockTypeKeys

    public static java.lang.String[] getLockTypeKeys(LibrarySession session,
                                                     boolean custom)
                                              throws IfsException

  Throws:
    `IfsException`

### removeLockType

    public static void removeLockType(LibrarySession session,
                                      boolean custom,
                                      java.lang.String lockTypeKey)
                               throws IfsException

  Throws:
    `IfsException`

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