Package org.tmatesoft.svn.core.wc2
Class SvnSetLock
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<T>
-
- org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SVNLock>
-
- org.tmatesoft.svn.core.wc2.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 returnsSVNLockobject that represents information of lock.SvnOperation.run()method throwsSVNExceptionif 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 targetsto be locked belong to different repositories ((for SVN 1.6 working copy only)
- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSvnSetLock(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetLockMessage()Gets the optional comment for the lock.protected intgetMaximumTargetsCount()booleanisChangesWorkingCopy()Gets whether the operation changes working copybooleanisStealLock()Gets whether or not all existing locks on the specified targets will be "stolen" from another user or working copy.voidsetLockMessage(java.lang.String lockMessage)Sets the optional comment for the lock.voidsetStealLock(boolean stealLock)Sets whether or not all existing locks on the specified targets will be "stolen" from another user or working copy.-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnReceivingOperation
first, getReceiver, initDefaults, last, receive, run, setReceiver
-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureArgumentsAreValid, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnSetLock
protected SvnSetLock(SvnOperationFactory factory)
-
-
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:
trueif locks should be "stolen", otherwisefalse
-
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-trueif locks should be "stolen", otherwisefalse
-
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
-
getMaximumTargetsCount
protected int getMaximumTargetsCount()
- Overrides:
getMaximumTargetsCountin classSvnOperation<SVNLock>
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<SVNLock>- Returns:
trueif the operation changes the working copy, otherwisefalse
-
-