Class SvnSetLock

  • All Implemented Interfaces:
    ISvnObjectReceiver<SVNLock>, ISvnOperationOptionsProvider

    public class SvnSetLock
    extends SvnReceivingOperation<SVNLock>
    Represents operation for locking files. Locks file items in a working copy as well as in a repository so that no other user can commit changes to them.

    SvnOperation.run() method returns SVNLock object that represents information of lock. SvnOperation.run() method throws SVNException if one of the following is true:

    • a target's path to be locked is not under version control
    • can not obtain a URL of a local target's path to lock it in the repository - there's no such entry
    • targets to be locked belong to different repositories ((for SVN 1.6 working copy only)
    Version:
    1.7
    • Field Detail

      • stealLock

        private boolean stealLock
      • lockMessage

        private java.lang.String lockMessage
    • Method Detail

      • isStealLock

        public boolean isStealLock()
        Gets whether or not all existing locks on the specified targets will be "stolen" from another user or working copy.
        Returns:
        true if locks should be "stolen", otherwise false
      • setStealLock

        public void setStealLock​(boolean stealLock)
        Sets whether or not all existing locks on the specified targets will be "stolen" from another user or working copy.
        Parameters:
        stealLock - true if locks should be "stolen", otherwise false
      • getLockMessage

        public java.lang.String getLockMessage()
        Gets the optional comment for the lock.
        Returns:
        comment for the lock
      • setLockMessage

        public void setLockMessage​(java.lang.String lockMessage)
        Sets the optional comment for the lock.
        Parameters:
        lockMessage - comment for the lock
      • isChangesWorkingCopy

        public boolean isChangesWorkingCopy()
        Gets whether the operation changes working copy
        Overrides:
        isChangesWorkingCopy in class SvnOperation<SVNLock>
        Returns:
        true if the operation changes the working copy, otherwise false