Package org.tmatesoft.svn.core.wc
Class SVNCommitPacket
- java.lang.Object
-
- org.tmatesoft.svn.core.wc.SVNCommitPacket
-
- Direct Known Subclasses:
SvnCodec.SVNCommitPacketWrapper
public class SVNCommitPacket extends java.lang.Object
The SVNCommitPacket is a storage for SVNCommitItem objects which represent information on versioned items intended for being committed to a repository.Used by
SVNCommitClient
to collect and hold information on paths that are to be committed. EachSVNCommitPacket
is committed in a single transaction.- Since:
- 1.2
- Version:
- 1.3
- See Also:
SVNCommitItem
-
-
Field Summary
Fields Modifier and Type Field Description static SVNCommitPacket
EMPTY
This constant denotes an empty commit items storage (contains noSVNCommitItem
objects).private SVNCommitItem[]
myCommitItems
private boolean
myIsDisposed
private boolean[]
myIsSkipped
private java.util.Map
myLockTokens
-
Constructor Summary
Constructors Constructor Description SVNCommitPacket(SVNWCAccess wcAccess, SVNCommitItem[] items, java.util.Map lockTokens)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes the current object.protected SVNCommitItem[]
filterSkippedItemsAndLockTokens(java.util.Collection<SVNCommitItem> items, java.util.Map<java.lang.String,?> lockTokens)
SVNCommitItem[]
getCommitItems()
Gets an array of SVNCommitItem objects stored in this object.private int
getItemIndex(SVNCommitItem item)
java.util.Map
getLockTokens()
boolean
isCommitItemSkipped(SVNCommitItem item)
Determines if an item intended for a commit is set to be skipped - that is not to be committed.boolean
isDisposed()
Determines if this object is disposed.SVNCommitPacket
removeSkippedItems()
void
setCommitItemSkipped(SVNCommitItem item, boolean skipped)
Sets or unsets a versioned item to be skipped - whether or not it should be committed.java.lang.String
toString()
Gives a string representation of this object.
-
-
-
Field Detail
-
EMPTY
public static final SVNCommitPacket EMPTY
This constant denotes an empty commit items storage (contains noSVNCommitItem
objects).
-
myCommitItems
private SVNCommitItem[] myCommitItems
-
myLockTokens
private java.util.Map myLockTokens
-
myIsSkipped
private boolean[] myIsSkipped
-
myIsDisposed
private boolean myIsDisposed
-
-
Constructor Detail
-
SVNCommitPacket
public SVNCommitPacket(SVNWCAccess wcAccess, SVNCommitItem[] items, java.util.Map lockTokens)
-
-
Method Detail
-
getCommitItems
public SVNCommitItem[] getCommitItems()
Gets an array of SVNCommitItem objects stored in this object.- Returns:
- an array of SVNCommitItem objects containing info of versioned items to be committed
-
setCommitItemSkipped
public void setCommitItemSkipped(SVNCommitItem item, boolean skipped)
Sets or unsets a versioned item to be skipped - whether or not it should be committed.- Parameters:
item
- an item that should be marked skippedskipped
- if true the item is set to be skipped (a commit operation should skip the item), otherwise - unskipped if it was previously marked skipped- See Also:
isCommitItemSkipped(SVNCommitItem)
-
isCommitItemSkipped
public boolean isCommitItemSkipped(SVNCommitItem item)
Determines if an item intended for a commit is set to be skipped - that is not to be committed.- Parameters:
item
- an item to check- Returns:
- true if the item is set to be skipped, otherwise false
- See Also:
setCommitItemSkipped(SVNCommitItem, boolean)
-
isDisposed
public boolean isDisposed()
Determines if this object is disposed.- Returns:
- true if disposed otherwise false
-
dispose
public void dispose() throws SVNException
Disposes the current object.- Throws:
SVNException
-
getItemIndex
private int getItemIndex(SVNCommitItem item)
-
getLockTokens
public java.util.Map getLockTokens()
-
removeSkippedItems
public SVNCommitPacket removeSkippedItems()
-
toString
public java.lang.String toString()
Gives a string representation of this object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representing this object.
-
filterSkippedItemsAndLockTokens
protected SVNCommitItem[] filterSkippedItemsAndLockTokens(java.util.Collection<SVNCommitItem> items, java.util.Map<java.lang.String,?> lockTokens)
-
-