Package org.tmatesoft.svn.core.wc2
Class SvnCopySource
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnObject
-
- org.tmatesoft.svn.core.wc2.SvnCopySource
-
-
Field Summary
Fields Modifier and Type Field Description private booleancopyContentsprivate SVNRevisionrevisionprivate SvnTargetsource
-
Constructor Summary
Constructors Modifier Constructor Description privateSvnCopySource(SvnTarget source, SVNRevision revision)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SvnCopySourcecreate(SvnTarget source, SVNRevision revision)Creates a newSvnCopySourceobject and initializes its fields.booleanequals(java.lang.Object obj)SVNRevisiongetRevision()Returns the revision of the source.SvnTargetgetSource()Returns the copy source target, can be working copy file or URL with optionalpegRevision.inthashCode()booleanisCopyContents()Tells whether the contents of this copy source should be copied rather than the copy source itself.booleanisLocal()Calculates whethersourceis local andrevisionis local.voidsetCopyContents(boolean copyContents)Sets whether to expand this copy source to its contents or not.private voidsetRevision(SVNRevision revision)Sets the revision of the source.private voidsetSource(SvnTarget source)Sets the copy source target, can be working copy file or URL with optionalpegRevision.java.lang.StringtoString()ReturnsStringrepresentation of the object-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnObject
getUserData, setUserData
-
-
-
-
Field Detail
-
source
private SvnTarget source
-
revision
private SVNRevision revision
-
copyContents
private boolean copyContents
-
-
Constructor Detail
-
SvnCopySource
private SvnCopySource(SvnTarget source, SVNRevision revision)
-
-
Method Detail
-
create
public static SvnCopySource create(SvnTarget source, SVNRevision revision)
Creates a newSvnCopySourceobject and initializes its fields.- Parameters:
source- source target with optionalpegRevision, can be file or URLrevision- revision oftarget
-
isLocal
public boolean isLocal()
Calculates whethersourceis local andrevisionis local.- Returns:
trueif thesourceandrevisionare local, otherwisefalse
-
getSource
public SvnTarget getSource()
Returns the copy source target, can be working copy file or URL with optionalpegRevision.- Returns:
- copy source target
-
getRevision
public SVNRevision getRevision()
Returns the revision of the source.- Returns:
- source revision
-
setSource
private void setSource(SvnTarget source)
Sets the copy source target, can be working copy file or URL with optionalpegRevision.- Parameters:
source- copy source target
-
setRevision
private void setRevision(SVNRevision revision)
Sets the revision of the source.- Parameters:
revision- source revision
-
isCopyContents
public boolean isCopyContents()
Tells whether the contents of this copy source should be copied rather than the copy source itself. This is relevant only for directory copy sources. If a userspecifiesto copy contents of a file he will get anSVNException. So, if this copy source represents a directory and if this method returnstrue, children of this copy source directory will be copied to the target instead of the copy source.- Returns:
trueto expand copy source to children; otherwisefalse
-
setCopyContents
public void setCopyContents(boolean copyContents)
Sets whether to expand this copy source to its contents or not.- Parameters:
copyContents-trueto expand copy source to children; otherwisefalse- See Also:
isCopyContents()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
ReturnsStringrepresentation of the object- Overrides:
toStringin classjava.lang.Object- Returns:
- object as
String
-
-