Package org.tmatesoft.svn.core.wc2
Class SvnCommitPacket
java.lang.Object
org.tmatesoft.svn.core.wc2.SvnCommitPacket
Represents storage for
SvnCommitItem
objects which represent information on versioned items intended
for being committed to a repository.
Used by commit-related operations to collect and hold information on paths that are to be committed.
Each SvnCommitPacket
is committed in a single transaction.
- Author:
- TMate Software Ltd.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a commit packet and initializes its fields with empty lists. -
Method Summary
Modifier and TypeMethodDescriptionaddItem
(File path, SVNNodeKind kind, SVNURL repositoryRoot, String repositoryPath, long revision, String copyFromPath, long copyFromRevision, File movedFromAbsPath, int flags) Adds commit item with the path, kind, repository root URL, repository path, revision number, copied from path, copied from revision number, flags to the commit packet.addItem
(File path, SVNURL rootUrl, SVNNodeKind kind, SVNURL url, long revision, SVNURL copyFromUrl, long copyFromRevision, int flags) Adds commit item with the path, repository root URL, kind, URL, revision number, revision number, copied from path, copied from revision number, flags to the commit packet.void
addItem
(SvnCommitItem item, SVNURL repositoryRoot) Adds commit item to the commit packet with the repository root URL.void
dispose()
Disposes the commit packet, if commit runner is set method callsinvalid reference
ISvnCommitRunner#disposeCommitPacket(Object)
Returns the commit item with the pathReturns all commit items in the commit packet with the corresponding repository root URLReturns commit packet's locking context.Returns all lock tokens of commit packet.Returns all unique repository root URLs of all commit items in the commit packetorg.tmatesoft.svn.core.internal.wc2.ISvnCommitRunner
Returns commit packet's runner.boolean
Tests if the commit packet contains the commit item with the pathboolean
isEmpty()
Tests whether the commit packet has commit items.boolean
Tests whether the commit packet has commit items with the repository root URL.boolean
isItemSkipped
(File file) boolean
void
setItemSkipped
(File file, boolean skipped) void
setLockingContext
(org.tmatesoft.svn.core.internal.wc2.ISvnCommitRunner commitRunner, Object context) void
setLockTokens
(Map<SVNURL, String> lockTokens) Sets commit packet's lock tokens, containing the information about locks within commit packet URLs.
-
Constructor Details
-
SvnCommitPacket
public SvnCommitPacket()Creates a commit packet and initializes its fields with empty lists.
-
-
Method Details
-
hasItem
Tests if the commit packet contains the commit item with the path- Parameters:
path
- the path of the commit item to test- Returns:
true
if commit item with the path is contained in the commit packet, otherwisefalse
-
getItem
Returns the commit item with the path- Parameters:
path
- the path of the commit item- Returns:
- commit item
-
getRepositoryRoots
Returns all unique repository root URLs of all commit items in the commit packet- Returns:
- unmodifiable list of URLs of the commit packet
-
getItems
Returns all commit items in the commit packet with the corresponding repository root URL- Returns:
- unmodifiable list of commit items containing info of versioned items to be committed
-
addItem
Adds commit item to the commit packet with the repository root URL.- Parameters:
item
- commit itemrepositoryRoot
- repository root URL
-
addItem
public SvnCommitItem addItem(File path, SVNNodeKind kind, SVNURL repositoryRoot, String repositoryPath, long revision, String copyFromPath, long copyFromRevision, File movedFromAbsPath, int flags) throws SVNException Adds commit item with the path, kind, repository root URL, repository path, revision number, copied from path, copied from revision number, flags to the commit packet.- Parameters:
path
- path of the commit itemkind
- node kind of the commit itemrepositoryRoot
- repository root URL of the commit itemrepositoryPath
- repository path of the commit itemrevision
- revision number of the commit itemcopyFromPath
- path from those commit item was copiedcopyFromRevision
- revision of the repository item from those commit item was copiedflags
- commit item flags- Returns:
- newly created commit item with initialized fields
- Throws:
SVNException
- if URL parse error occurred
-
addItem
public SvnCommitItem addItem(File path, SVNURL rootUrl, SVNNodeKind kind, SVNURL url, long revision, SVNURL copyFromUrl, long copyFromRevision, int flags) throws SVNException Adds commit item with the path, repository root URL, kind, URL, revision number, revision number, copied from path, copied from revision number, flags to the commit packet.- Parameters:
path
- path of the commit itemrootUrl
- repository root URL of the commit itemkind
- node kind of the commit itemurl
- repository URL of the commit itemrevision
- revision number of the commit itemcopyFromUrl
- url from those commit item was copiedcopyFromRevision
- revision of the repository item from those commit item was copiedflags
- commit item flags- Returns:
- newly created commit item with initialized fields
- Throws:
SVNException
- if URL parse error occurred
-
setLockingContext
public void setLockingContext(org.tmatesoft.svn.core.internal.wc2.ISvnCommitRunner commitRunner, Object context) - Parameters:
commitRunner
-context
-
-
dispose
Disposes the commit packet, if commit runner is set method callsinvalid reference
ISvnCommitRunner#disposeCommitPacket(Object)
- Throws:
SVNException
-
setLockTokens
Sets commit packet's lock tokens, containing the information about locks within commit packet URLs.- Parameters:
lockTokens
- hash of URL, lock tokens for this URL
-
getLockTokens
Returns all lock tokens of commit packet.- Returns:
- hash of URL, lock tokens
-
isEmpty
public boolean isEmpty()Tests whether the commit packet has commit items.- Returns:
true
if the commit packet has no commit items, otherwisefalse
-
isEmpty
Tests whether the commit packet has commit items with the repository root URL.- Returns:
true
if the commit packet has no commit items with the repository root, otherwisefalse
-
getLockingContext
Returns commit packet's locking context.- Returns:
- the locking context for the commit packet
-
getRunner
public org.tmatesoft.svn.core.internal.wc2.ISvnCommitRunner getRunner()Returns commit packet's runner.- Returns:
- the runner for the commit packet
-
setItemSkipped
-
isItemSkipped
-
removeSkippedItems
-
isLastPacket
public boolean isLastPacket()
-