Class MCRMetsLock

java.lang.Object
org.mycore.mets.tools.MCRMetsLock

public class MCRMetsLock extends Object
Used to lock the mets editor for a specific Derivate
Author:
Sebastian Hofmann (mcrshofm)
  • Constructor Details

    • MCRMetsLock

      public MCRMetsLock()
  • Method Details

    • isLocked

      public static boolean isLocked(String derivateIdString)
      Checks if a Derivate is locked
      Parameters:
      derivateIdString - the derivate id
      Returns:
      true if the derivate is locked
    • doLock

      public static boolean doLock(String derivateIdString)
      Locks a Derivate with the current SessionId
      Parameters:
      derivateIdString - the Derivate to lock
      Returns:
      True if the derivate is locked. False if the derivate could not be locked.
    • doUnlock

      public static void doUnlock(String derivateIdString) throws MCRException
      Unlocks a Derivate wich was locked with the current SessionId
      Parameters:
      derivateIdString - the id of the derivate
      Throws:
      MCRException - if the session-id of locker is different from current session-id