Package org.tmatesoft.svn.cli
Class AbstractSVNCommandEnvironment
java.lang.Object
org.tmatesoft.svn.cli.AbstractSVNCommandEnvironment
- All Implemented Interfaces:
ISVNCanceller
- Direct Known Subclasses:
SVNAdminCommandEnvironment,SVNCommandEnvironment,SVNDumpFilterCommandEnvironment,SVNLookCommandEnvironment,SVNSyncCommandEnvironment,SVNVersionCommandEnvironment
public abstract class AbstractSVNCommandEnvironment
extends java.lang.Object
implements ISVNCanceller
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate java.util.Listprivate SVNClientManagerprivate AbstractSVNCommandprivate java.lang.Stringprivate java.io.PrintStreamprivate java.io.InputStreamprivate DefaultSVNOptionsprivate java.io.PrintStreamprivate java.lang.Stringprivate booleanFields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSVNCommandEnvironment(java.lang.String programName, java.io.PrintStream out, java.io.PrintStream err, java.io.InputStream in) -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks if the current operation is cancelled (somehow interrupted) and should throw an SVNCancelException or notify the handler if exists.private SVNURLcheckRootURLOfTarget(SVNURL rootURL, java.lang.String target) java.util.List<java.lang.String>combineTargets(java.util.Collection targets, boolean warnReserved) protected abstract ISVNAuthenticationManagerprotected abstract DefaultSVNOptionsvoiddispose()private static booleanequals(java.lang.String p1, java.lang.String p2) java.util.Listprotected abstract java.lang.Stringjava.lang.Stringprotected java.lang.StringgetCommandName(SVNCommandLine commandLine) private static java.lang.StringgetCommonAncestor(java.lang.String p1, java.lang.String p2) java.io.PrintStreamgetErr()java.io.InputStreamgetIn()java.io.PrintStreamgetOut()java.lang.Stringjava.lang.StringgetRelativePath(java.io.File file) getURLFromTarget(java.lang.String target) voidbooleanhandleWarning(SVNErrorMessage err, SVNErrorCode[] warningCodes, boolean quiet) voidinit(SVNCommandLine commandLine) voidprotected voidinitCommand(SVNCommandLine commandLine) protected abstract voidinitOption(SVNOptionValue optionValue) protected voidinitOptions(SVNCommandLine commandLine) private static booleanisReposRelative(java.lang.String path) booleanisVersioned(java.lang.String target) parseRevision(java.lang.String revStr) java.lang.StringvoidprintCommitInfo(SVNCommitInfo info) byte[]readFromFile(java.io.File file) protected abstract java.lang.StringrefineCommandName(java.lang.String commandName, SVNCommandLine commandLine) private SVNURLresolveRepositoryRelativeURL(SVNURL rootURL, java.lang.String relativeURL) booleanrun()protected voidsetArguments(java.util.List newArguments) voidprivate static booleanstartsWith(java.lang.String p1, java.lang.String p2) protected voidvalidateOptions(SVNCommandLine commandLine) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ourIsCancelled
private boolean ourIsCancelled -
myIn
private java.io.InputStream myIn -
myErr
private java.io.PrintStream myErr -
myOut
private java.io.PrintStream myOut -
myClientManager
-
myOptions
-
myArguments
private java.util.List myArguments -
myProgramName
private java.lang.String myProgramName -
myCommand
-
myCommandName
private java.lang.String myCommandName
-
-
Constructor Details
-
AbstractSVNCommandEnvironment
protected AbstractSVNCommandEnvironment(java.lang.String programName, java.io.PrintStream out, java.io.PrintStream err, java.io.InputStream in)
-
-
Method Details
-
getProgramName
public java.lang.String getProgramName() -
getOut
public java.io.PrintStream getOut() -
getErr
public java.io.PrintStream getErr() -
getIn
public java.io.InputStream getIn() -
getClientManager
-
getOptions
-
getArguments
public java.util.List getArguments() -
getCommand
-
getCommandName
public java.lang.String getCommandName() -
popArgument
public java.lang.String popArgument() -
setArguments
protected void setArguments(java.util.List newArguments) -
init
- Throws:
SVNException
-
run
public boolean run() -
initOptions
- Throws:
SVNException
-
initOption
- Throws:
SVNException
-
validateOptions
- Throws:
SVNException
-
initCommand
- Throws:
SVNException
-
getCommandName
- Throws:
SVNException
-
refineCommandName
protected abstract java.lang.String refineCommandName(java.lang.String commandName, SVNCommandLine commandLine) throws SVNException - Throws:
SVNException
-
createClientOptions
- Throws:
SVNException
-
createClientAuthenticationManager
-
getCommandLineClientName
protected abstract java.lang.String getCommandLineClientName() -
initClientManager
- Throws:
SVNException
-
dispose
public void dispose() -
combineTargets
public java.util.List<java.lang.String> combineTargets(java.util.Collection targets, boolean warnReserved) throws SVNException - Throws:
SVNException
-
parseRevision
-
readFromFile
- Throws:
SVNException
-
handleError
-
handleWarning
public boolean handleWarning(SVNErrorMessage err, SVNErrorCode[] warningCodes, boolean quiet) throws SVNException - Throws:
SVNException
-
getRelativePath
public java.lang.String getRelativePath(java.io.File file) -
getURLFromTarget
- Throws:
SVNException
-
isVersioned
- Throws:
SVNException
-
printCommitInfo
-
resolveRepositoryRelativeURL
private SVNURL resolveRepositoryRelativeURL(SVNURL rootURL, java.lang.String relativeURL) throws SVNException - Throws:
SVNException
-
checkRootURLOfTarget
- Throws:
SVNException
-
isReposRelative
private static boolean isReposRelative(java.lang.String path) -
startsWith
private static boolean startsWith(java.lang.String p1, java.lang.String p2) -
equals
private static boolean equals(java.lang.String p1, java.lang.String p2) -
getCommonAncestor
private static java.lang.String getCommonAncestor(java.lang.String p1, java.lang.String p2) -
checkCancelled
Description copied from interface:ISVNCancellerChecks if the current operation is cancelled (somehow interrupted) and should throw an SVNCancelException or notify the handler if exists. This method is often called during iterations when processing trees of versioned items. This way the entire operation may be interrupted without waiting till the iteration run out.- Specified by:
checkCancelledin interfaceISVNCanceller- Throws:
SVNCancelException
-
setCancelled
public void setCancelled() -
createClientManager
-