java.lang.Object
io.goobi.viewer.model.administration.configeditor.FileLocks

public class FileLocks extends Object
  • Constructor Details

    • FileLocks

      public FileLocks()
  • Method Details

    • lockFile

      public boolean lockFile(Path file, String sessionId)
      Parameters:
      file -
      sessionId -
      Returns:
      true if file locked successfully; false otherwise
    • unlockFile

      public boolean unlockFile(Path file, String sessionId)
      Parameters:
      file -
      sessionId -
      Returns:
      true if file unlocked successfully; false otherwise
    • isFileLockedByOthers

      public boolean isFileLockedByOthers(Path file, String sessionId)
      Parameters:
      file -
      sessionId -
      Returns:
      true if file locked by different session; false otherwise
    • clearLocksForSessionId

      public void clearLocksForSessionId(String sessionId)
      Parameters:
      sessionId -