Package org.tmatesoft.svn.core.wc2
Class SvnTarget
java.lang.Object
org.tmatesoft.svn.core.wc2.SvnTarget
Represents target of the operation on whose operation will be executed.
Can specify working copy path or repository URL.
- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SvnTarget
Creates a target from filestatic SvnTarget
fromFile
(File file, SVNRevision pegRevision) Creates a target from file and its peg revisionstatic SvnTarget
Creates a target from URLstatic SvnTarget
fromURL
(SVNURL url, SVNRevision pegRevision) Creates a target from URL and its peg revisiongetFile()
Returns target's file, if target is not file returns null.Determines whether target is remote or local, and returns correspondingString
representation of the target's pathDetermines whether target is remote or local, and returns correspondingString
representation of the target's pathReturns target's peg revision, if it was not defined returns null.getResolvedPegRevision
(SVNRevision defaultRemote, SVNRevision defaultLocal) Returns target's peg revision if defined, if not defined determines whether target is remote or local, and returns corresponding default revisiongetURL()
Returns target's URL, if target is not URL returns null.boolean
isFile()
Determines whether target represents fileboolean
isLocal()
Determines whether target is located in the local working copy and its peg revision is working copy specific.boolean
isURL()
Determines whether target represents URLtoString()
Determines whether target is remote or local, and returns correspondingString
representation of the target's path and peg revision.
-
Method Details
-
fromFile
Creates a target from file- Parameters:
file
- target file- Returns:
- a new
SvnTarget
object representing the file
-
fromFile
Creates a target from file and its peg revision- Parameters:
file
- target filepegRevision
- revision in which the file item is first looked up- Returns:
- a new
SvnTarget
object representing the file with revisition
-
fromURL
Creates a target from URL- Parameters:
url
- target URL- Returns:
- a new
SvnTarget
object representing URL
-
fromURL
Creates a target from URL and its peg revision- Parameters:
url
- target URLpegRevision
- revision in which the file item is first looked up- Returns:
- a new
SvnTarget
object representing URL with revisition
-
isLocal
public boolean isLocal()Determines whether target is located in the local working copy and its peg revision is working copy specific.- Returns:
true
if the target and its peg revision refers to local working copy, otherwisefalse
-
isFile
public boolean isFile()Determines whether target represents file- Returns:
true
if the target is file, otherwisefalse
-
isURL
public boolean isURL()Determines whether target represents URL- Returns:
true
if the target is URL, otherwisefalse
-
getURL
Returns target's URL, if target is not URL returns null.- Returns:
- url of the target
-
getFile
Returns target's file, if target is not file returns null.- Returns:
- url of the target
-
getPegRevision
Returns target's peg revision, if it was not defined returns null.- Returns:
- peg revision of the target
-
getResolvedPegRevision
- Returns:
- peg revision of the target
- See Also:
-
getResolvedPegRevision
Returns target's peg revision if defined, if not defined determines whether target is remote or local, and returns corresponding default revision- Parameters:
defaultRemote
- default revision if target is remote targetdefaultLocal
- default revision if target is local target- Returns:
- peg revision of the target
-
getPathOrUrlString
Determines whether target is remote or local, and returns correspondingString
representation of the target's path- Returns:
String
representation of the target's path
-
getPathOrUrlDecodedString
Determines whether target is remote or local, and returns correspondingString
representation of the target's path- Returns:
String
representation of the target
-
toString
Determines whether target is remote or local, and returns correspondingString
representation of the target's path and peg revision.
-