Package org.tmatesoft.svn.core.wc2
Class SvnCat
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<java.lang.Void>
-
- org.tmatesoft.svn.core.wc2.SvnCat
-
- All Implemented Interfaces:
ISvnOperationOptionsProvider
public class SvnCat extends SvnOperation<java.lang.Void>
Represents cat operation. Outputs the content of file identified bytarget
and revision to the output streams. The actual node revision selected is determined by thetarget
as it exists intarget
'spegRevision
. Iftarget
is URL and itspegRevision
isSVNRevision.UNDEFINED
, then it defaults toSVNRevision.HEAD
. Iftarget
is local and itspegRevision
isSVNRevision.UNDEFINED
, then it defaults toSVNRevision.WORKING
. Ifrevision
is one of: then the file contents are taken from the working copy file item (no network connection is needed). Otherwise the file item's contents are taken from the repository at a particular revision.SvnOperation.run()
throwsSVNException
in the following cases:- exception with
SVNErrorCode.CLIENT_IS_DIRECTORY
error code - iftarget
refers to a directory - exception with
SVNErrorCode.UNVERSIONED_RESOURCE
error code - iftarget
is not under version control - it's impossible to create temporary files (
createTempFile()
fails) necessary for file translating (used whentarget
is URL)
- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SvnCat(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
ensureArgumentsAreValid()
java.io.OutputStream
getOutput()
Gets the output stream of the operation.boolean
isChangesWorkingCopy()
Gets whether the operation changes working copyboolean
isExpandKeywords()
Gets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDS
property (if set) should be substituted.void
setExpandKeywords(boolean expandKeywords)
Sets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDS
property (if set) should be substituted.void
setOutput(java.io.OutputStream output)
Sets the output stream of the operation.-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, initDefaults, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnCat
protected SvnCat(SvnOperationFactory factory)
-
-
Method Detail
-
isExpandKeywords
public boolean isExpandKeywords()
Gets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDS
property (if set) should be substituted.- Returns:
true
if keywords should expanded, otherwisefalse
-
setExpandKeywords
public void setExpandKeywords(boolean expandKeywords)
Sets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDS
property (if set) should be substituted.- Parameters:
expandKeywords
-true
if keywords should expanded, otherwisefalse
-
getOutput
public java.io.OutputStream getOutput()
Gets the output stream of the operation.- Returns:
- output stream
-
setOutput
public void setOutput(java.io.OutputStream output)
Sets the output stream of the operation.- Parameters:
output
- output stream
-
ensureArgumentsAreValid
protected void ensureArgumentsAreValid() throws SVNException
- Overrides:
ensureArgumentsAreValid
in classSvnOperation<java.lang.Void>
- Throws:
SVNException
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopy
in classSvnOperation<java.lang.Void>
- Returns:
true
if the operation changes the working copy, otherwisefalse
-
-