Package org.tmatesoft.svn.core.wc
Class SVNCommitItem
- java.lang.Object
-
- org.tmatesoft.svn.core.wc.SVNCommitItem
-
public class SVNCommitItem extends java.lang.Object
The SVNCommitItem represents a versioned item that is to be committed to a repository.Used to wrap information about a versioned item into a single object. A commit item can represent either a Working Copy item (speaking of committing local changes in WC files and directories) or one that is located in a repository (for example, when deleting a file/directory right from a repository).
When you call SVNCommitClient's
doCollectCommitItems()
this methods processes the specified paths and collects information on items to be committed in SVNCommitItem objects which are packed into a single SVNCommitPacket object. This object is returned by the method to the caller.- Since:
- 1.2
- Version:
- 1.3
- See Also:
SVNCommitPacket
-
-
Field Summary
Fields Modifier and Type Field Description private SVNRevision
myCopyFromRevision
private SVNURL
myCopyFromURL
private java.io.File
myFile
private java.util.Map
myIncomingProperties
private boolean
myIsAdded
private boolean
myIsContentsModified
private boolean
myIsCopied
private boolean
myIsDeleted
private boolean
myIsLocked
private boolean
myIsPropertiesModified
private SVNNodeKind
myKind
private java.util.Map
myOutgoingProperties
private java.lang.String
myPath
private SVNRevision
myRevision
private SVNURL
myURL
private SVNWCAccess
myWCAccess
-
Constructor Summary
Constructors Constructor Description SVNCommitItem(java.io.File file, SVNURL URL, SVNURL copyFromURL, SVNNodeKind kind, SVNRevision revision, SVNRevision copyFromRevision, boolean isAdded, boolean isDeleted, boolean isPropertiesModified, boolean isContentsModified, boolean isCopied, boolean locked)
Constructs and initializes an SVNCommitItem object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SVNRevision
getCopyFromRevision()
Gets the revision of the versioned item's ancestor from which the item was copied.SVNURL
getCopyFromURL()
Gets the repository location of the versioned item's ancestor from which the item was copied.java.io.File
getFile()
Gets the location of the Working Copy item.java.util.Map
getIncomingProperties()
SVNNodeKind
getKind()
Gets the node kind of the versioned item.java.util.Map
getOutgoingProperties()
Returns properties to commit.java.lang.String
getPath()
Gets the item's relevant path.private java.util.Map
getProperties()
SVNRevision
getRevision()
Gets the revision of the versioned item .SVNURL
getURL()
Gets the versioned item's repository location.SVNWCAccess
getWCAccess()
This method is not intended for users (from an API point of view).boolean
isAdded()
Determines if the item is to be added to version control.boolean
isContentsModified()
Determines if the Working Copy item has local edits to its contents.boolean
isCopied()
Determines if the item is to be added to version control with history.boolean
isDeleted()
Determines if the item is to be deleted from version control.boolean
isLocked()
Determines whether the item needs to be locked.boolean
isPropertiesModified()
Determines if the Working Copy item has local edits to properties.void
setContentsModified(boolean modified)
void
setIncomingProperty(java.lang.String propertyName, SVNPropertyValue propertyValue)
void
setPath(java.lang.String path)
Sets the item's relevant path.void
setPropertiesModified(boolean modified)
void
setProperty(java.lang.String propertyName, SVNPropertyValue propertyValue)
void
setWCAccess(SVNWCAccess wcAccess)
-
-
-
Field Detail
-
myRevision
private SVNRevision myRevision
-
myFile
private java.io.File myFile
-
myURL
private SVNURL myURL
-
myCopyFromURL
private SVNURL myCopyFromURL
-
myKind
private SVNNodeKind myKind
-
myIsAdded
private boolean myIsAdded
-
myIsDeleted
private boolean myIsDeleted
-
myIsPropertiesModified
private boolean myIsPropertiesModified
-
myIsContentsModified
private boolean myIsContentsModified
-
myIsCopied
private boolean myIsCopied
-
myIsLocked
private boolean myIsLocked
-
myPath
private java.lang.String myPath
-
myWCAccess
private SVNWCAccess myWCAccess
-
myCopyFromRevision
private SVNRevision myCopyFromRevision
-
myOutgoingProperties
private java.util.Map myOutgoingProperties
-
myIncomingProperties
private java.util.Map myIncomingProperties
-
-
Constructor Detail
-
SVNCommitItem
public SVNCommitItem(java.io.File file, SVNURL URL, SVNURL copyFromURL, SVNNodeKind kind, SVNRevision revision, SVNRevision copyFromRevision, boolean isAdded, boolean isDeleted, boolean isPropertiesModified, boolean isContentsModified, boolean isCopied, boolean locked)
Constructs and initializes an SVNCommitItem object.- Parameters:
file
- a WC item's locationURL
- the item's repository locationcopyFromURL
- the repository location of the item's ancestor (if the item was or to be copied)kind
- the item's node kindrevision
- the item's revisioncopyFromRevision
- the revision of the item's ancestor it's copied fromisAdded
- true if the item is to be added to version control, otherwise falseisDeleted
- true if the item is to be deleted from version control, otherwise falseisPropertiesModified
- true if the item's properties have local changes, otherwise falseisContentsModified
- true if the item's contents (file contents or directory entries) have local changes, otherwise falseisCopied
- true if the item is to be added to version control with history, otherwise falselocked
- true if the item is to be locked, otherwise false
-
-
Method Detail
-
getRevision
public SVNRevision getRevision()
Gets the revision of the versioned item . For a WC item it is the current working revision.- Returns:
- the revision of the item to be committed
-
getCopyFromRevision
public SVNRevision getCopyFromRevision()
Gets the revision of the versioned item's ancestor from which the item was copied.- Returns:
- the revision the item was copied from
-
getFile
public java.io.File getFile()
Gets the location of the Working Copy item.- Returns:
- the item's local path
-
getURL
public SVNURL getURL()
Gets the versioned item's repository location.- Returns:
- the item's URL pointing to its repository location
-
getCopyFromURL
public SVNURL getCopyFromURL()
Gets the repository location of the versioned item's ancestor from which the item was copied.- Returns:
- the URL of the copy source in an
SVNURL
representation
-
getKind
public SVNNodeKind getKind()
Gets the node kind of the versioned item.- Returns:
- the item's node kind
-
isAdded
public boolean isAdded()
Determines if the item is to be added to version control.- Returns:
- true if added, otherwise false
-
isDeleted
public boolean isDeleted()
Determines if the item is to be deleted from version control.- Returns:
- true if deleted, otherwise false
-
isPropertiesModified
public boolean isPropertiesModified()
Determines if the Working Copy item has local edits to properties.- Returns:
- true if the properties have local changes, otherwise false
-
isContentsModified
public boolean isContentsModified()
Determines if the Working Copy item has local edits to its contents. If the item is a file - that is the file contents, a directory - the directory contents (meaning entries).- Returns:
- true if the contents have local changes, otherwise false
-
isCopied
public boolean isCopied()
Determines if the item is to be added to version control with history.- Returns:
- true if added with history (copied in other words), otherwise false
-
isLocked
public boolean isLocked()
Determines whether the item needs to be locked.- Returns:
- true if locked, otherwise false
-
getPath
public java.lang.String getPath()
Gets the item's relevant path. The path is relevant to the Working Copy root.- Returns:
- the item's relevant path
-
setPath
public void setPath(java.lang.String path)
Sets the item's relevant path.- Parameters:
path
- the item's path relevant to the Working Copy root
-
getWCAccess
public SVNWCAccess getWCAccess()
This method is not intended for users (from an API point of view).- Returns:
- wc access object
-
getOutgoingProperties
public java.util.Map getOutgoingProperties()
Returns properties to commit.- Returns:
- properties to commit
-
setWCAccess
public void setWCAccess(SVNWCAccess wcAccess)
-
setProperty
public void setProperty(java.lang.String propertyName, SVNPropertyValue propertyValue)
-
getProperties
private java.util.Map getProperties()
-
setContentsModified
public void setContentsModified(boolean modified)
-
setPropertiesModified
public void setPropertiesModified(boolean modified)
-
setIncomingProperty
public void setIncomingProperty(java.lang.String propertyName, SVNPropertyValue propertyValue)
-
getIncomingProperties
public java.util.Map getIncomingProperties()
-
-