Package org.tmatesoft.svn.core.wc2
Class SvnTarget
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnTarget
-
public class SvnTarget extends java.lang.ObjectRepresents 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SvnTargetfromFile(java.io.File file)Creates a target from filestatic SvnTargetfromFile(java.io.File file, SVNRevision pegRevision)Creates a target from file and its peg revisionstatic SvnTargetfromURL(SVNURL url)Creates a target from URLstatic SvnTargetfromURL(SVNURL url, SVNRevision pegRevision)Creates a target from URL and its peg revisionjava.io.FilegetFile()Returns target's file, if target is not file returns null.java.lang.StringgetPathOrUrlDecodedString()Determines whether target is remote or local, and returns correspondingStringrepresentation of the target's pathjava.lang.StringgetPathOrUrlString()Determines whether target is remote or local, and returns correspondingStringrepresentation of the target's pathSVNRevisiongetPegRevision()Returns target's peg revision, if it was not defined returns null.SVNRevisiongetResolvedPegRevision()SVNRevisiongetResolvedPegRevision(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 revisionSVNURLgetURL()Returns target's URL, if target is not URL returns null.booleanisFile()Determines whether target represents filebooleanisLocal()Determines whether target is located in the local working copy and its peg revision is working copy specific.booleanisURL()Determines whether target represents URLjava.lang.StringtoString()Determines whether target is remote or local, and returns correspondingStringrepresentation of the target's path and peg revision.
-
-
-
Method Detail
-
fromFile
public static SvnTarget fromFile(java.io.File file)
Creates a target from file- Parameters:
file- target file- Returns:
- a new
SvnTargetobject representing the file
-
fromFile
public static SvnTarget fromFile(java.io.File file, SVNRevision pegRevision)
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
SvnTargetobject representing the file with revisition
-
fromURL
public static SvnTarget fromURL(SVNURL url)
Creates a target from URL- Parameters:
url- target URL- Returns:
- a new
SvnTargetobject representing URL
-
fromURL
public static SvnTarget fromURL(SVNURL url, SVNRevision pegRevision)
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
SvnTargetobject 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:
trueif the target and its peg revision refers to local working copy, otherwisefalse
-
isFile
public boolean isFile()
Determines whether target represents file- Returns:
trueif the target is file, otherwisefalse
-
isURL
public boolean isURL()
Determines whether target represents URL- Returns:
trueif the target is URL, otherwisefalse
-
getURL
public SVNURL getURL()
Returns target's URL, if target is not URL returns null.- Returns:
- url of the target
-
getFile
public java.io.File getFile()
Returns target's file, if target is not file returns null.- Returns:
- url of the target
-
getPegRevision
public SVNRevision getPegRevision()
Returns target's peg revision, if it was not defined returns null.- Returns:
- peg revision of the target
-
getResolvedPegRevision
public SVNRevision getResolvedPegRevision()
- Returns:
- peg revision of the target
- See Also:
getResolvedPegRevision(SVNRevision, SVNRevision)
-
getResolvedPegRevision
public SVNRevision 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 revision- Parameters:
defaultRemote- default revision if target is remote targetdefaultLocal- default revision if target is local target- Returns:
- peg revision of the target
-
getPathOrUrlString
public java.lang.String getPathOrUrlString()
Determines whether target is remote or local, and returns correspondingStringrepresentation of the target's path- Returns:
Stringrepresentation of the target's path
-
getPathOrUrlDecodedString
public java.lang.String getPathOrUrlDecodedString()
Determines whether target is remote or local, and returns correspondingStringrepresentation of the target's path- Returns:
Stringrepresentation of the target
-
toString
public java.lang.String toString()
Determines whether target is remote or local, and returns correspondingStringrepresentation of the target's path and peg revision.- Overrides:
toStringin classjava.lang.Object- Returns:
Stringof the target's path and peg revision
-
-