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
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Listprivate SVNClientManagerprivate AbstractSVNCommandprivate Stringprivate PrintStreamprivate InputStreamprivate DefaultSVNOptionsprivate PrintStreamprivate Stringprivate booleanFields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSVNCommandEnvironment(String programName, PrintStream out, PrintStream err, 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, String target) combineTargets(Collection targets, boolean warnReserved) protected abstract ISVNAuthenticationManagerprotected abstract DefaultSVNOptionsvoiddispose()private static booleanprotected abstract Stringprotected StringgetCommandName(SVNCommandLine commandLine) private static StringgetCommonAncestor(String p1, String p2) getErr()getIn()getOut()getRelativePath(File file) getURLFromTarget(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(String path) booleanisVersioned(String target) parseRevision(String revStr) voidprintCommitInfo(SVNCommitInfo info) byte[]readFromFile(File file) protected abstract StringrefineCommandName(String commandName, SVNCommandLine commandLine) private SVNURLresolveRepositoryRelativeURL(SVNURL rootURL, String relativeURL) booleanrun()protected voidsetArguments(List newArguments) voidprivate static booleanstartsWith(String p1, String p2) protected voidvalidateOptions(SVNCommandLine commandLine)
-
Field Details
-
ourIsCancelled
private boolean ourIsCancelled -
myIn
-
myErr
-
myOut
-
myClientManager
-
myOptions
-
myArguments
-
myProgramName
-
myCommand
-
myCommandName
-
-
Constructor Details
-
AbstractSVNCommandEnvironment
protected AbstractSVNCommandEnvironment(String programName, PrintStream out, PrintStream err, InputStream in)
-
-
Method Details
-
getProgramName
-
getOut
-
getErr
-
getIn
-
getClientManager
-
getOptions
-
getArguments
-
getCommand
-
getCommandName
-
popArgument
-
setArguments
-
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 String refineCommandName(String commandName, SVNCommandLine commandLine) throws SVNException - Throws:
SVNException
-
createClientOptions
- Throws:
SVNException
-
createClientAuthenticationManager
-
getCommandLineClientName
-
initClientManager
- Throws:
SVNException
-
dispose
public void dispose() -
combineTargets
- Throws:
SVNException
-
parseRevision
-
readFromFile
- Throws:
SVNException
-
handleError
-
handleWarning
public boolean handleWarning(SVNErrorMessage err, SVNErrorCode[] warningCodes, boolean quiet) throws SVNException - Throws:
SVNException
-
getRelativePath
-
getURLFromTarget
- Throws:
SVNException
-
isVersioned
- Throws:
SVNException
-
printCommitInfo
-
resolveRepositoryRelativeURL
- Throws:
SVNException
-
checkRootURLOfTarget
- Throws:
SVNException
-
isReposRelative
-
startsWith
-
equals
-
getCommonAncestor
-
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
-