org.tmatesoft.svn.core.wc2

## Class SvnExport

- java.lang.Object
- - org.tmatesoft.svn.core.wc2.SvnOperation<V>
  - - org.tmatesoft.svn.core.wc2.AbstractSvnUpdate<java.lang.Long>
    - - org.tmatesoft.svn.core.wc2.SvnExport

- All Implemented Interfaces:
    ISvnOperationOptionsProvider

      public class SvnExport
      extends AbstractSvnUpdate<java.lang.Long>

  Represents export operation. Exports the contents of either a subversion repository or a subversion working copy (`source`) into a `target` - 'clean' directory (meaning a directory with no administrative directories).

  `source`'s `pegRevision` is the revision where the path is first looked up when exporting from a repository. If `source`'s `pegRevision` is `SVNRevision.UNDEFINED`, then it defaults to `SVNRevision.WORKING`.

  If `revision` is one of:
  `SVNRevision.BASE`
  `SVNRevision.WORKING`
  `SVNRevision.COMMITTED`
  then local export is performed. Otherwise exporting from the repository. If `revision` is `SVNRevision.UNDEFINED` it defaults to `SVNRevision.WORKING`.

  If externals are ignored (`ignoreExternals` is `true`), doesn't process externals definitions as part of this operation.

  `eolStyle` allows you to override the standard eol marker on the platform you are running on. Can be either "LF", "CR" or "CRLF" or `null`. If `null` will use the standard eol marker. Any other value will cause an exception with the error code `SVNErrorCode.IO_UNKNOWN_EOL` error to be returned.

  If `depth` is `SVNDepth.INFINITY`, exports fully recursively. Else if it is `SVNDepth.IMMEDIATES`, exports `source` and its immediate children (if any), but with subdirectories empty and at`SVNDepth.EMPTY`. Else if `SVNDepth.FILES`, exports `source` and its immediate file children (if any) only. If `depth` is `SVNDepth.EMPTY`, then exports exactly `source` and none of its children.

  `SvnOperation.run()` method returns value of the revision actually exported.

  `SvnOperation.run()` throws `SVNException` in the following cases:
  exception with `SVNErrorCode.IO_ERROR` error code - if `target`'s directory already exists and `force` is `false`
  exception with `SVNErrorCode.ILLEGAL_TARGET` error code - if destination file already exists and `force` is `false`, or if destination directory exists and should be overridden by source file
  Version:
    1.7
  Author:
    TMate Software Ltd.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SvnExport(SvnOperationFactory factory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `ensureArgumentsAreValid()`
    `java.lang.String` | `getEolStyle()` Returns the string that denotes a specific End-Of-Line character.
    `protected java.io.File` | `getOperationalWorkingCopy()`
    `SvnTarget` | `getSource()` Returns export's source - working copy path or repository URL.
    `protected void` | `initDefaults()`
    `boolean` | `isChangesWorkingCopy()` Gets whether the operation changes working copy
    `boolean` | `isExpandKeywords()` Gets whether or not all keywords presenting in the file and listed in the file's `SVNProperty.KEYWORDS`property (if set) should be substituted.
    `boolean` | `isForce()` Gets whether to overwrite files or directories.
    `void` | `setEolStyle(java.lang.String eolStyle)` Sets the string that denotes a specific End-Of-Line character.
    `void` | `setExpandKeywords(boolean expandKeywords)` Sets whether or not all keywords presenting in the file and listed in the file's `SVNProperty.KEYWORDS`property (if set) should be substituted.
    `void` | `setForce(boolean force)` Sets whether to overwrite files or directories.
    `void` | `setSource(SvnTarget source)` Sets export's source - working copy path or repository URL.

    - ### Methods inherited from class org.tmatesoft.svn.core.wc2.AbstractSvnUpdate

      `getExternalsHandler, isAllowUnversionedObstructions, isIgnoreExternals, isUpdateLocksOnDemand, setAllowUnversionedObstructions, setExternalsHandler, setIgnoreExternals, setUpdateLocksOnDemand`

    - ### Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation

      `addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SvnExport

          protected SvnExport(SvnOperationFactory factory)

  - ### Method Detail

    - #### isForce

          public boolean isForce()

      Gets whether to overwrite files or directories.
      Returns:
        `true` if export should overwrite files or directories, otherwise `false`

    - #### isExpandKeywords

          public boolean isExpandKeywords()

      Gets whether or not all keywords presenting in the file and listed in the file's `SVNProperty.KEYWORDS`property (if set) should be substituted.
      Returns:
        `true` if keywords should expanded, otherwise `false`
      Since:
        1.7, SVN 1.7

    - #### getEolStyle

          public java.lang.String getEolStyle()

      Returns the string that denotes a specific End-Of-Line character.
      Returns:
        specific End-Of-Line character of the operation
      See Also:
        `setEolStyle(String)`

    - #### setForce

          public void setForce(boolean force)

      Sets whether to overwrite files or directories.
      Parameters:
        `force` - `true` if export should overwrite files or directories, otherwise `false`

    - #### setExpandKeywords

          public void setExpandKeywords(boolean expandKeywords)

      Sets whether or not all keywords presenting in the file and listed in the file's `SVNProperty.KEYWORDS`property (if set) should be substituted.
      Parameters:
        `expandKeywords` - `true` if keywords should expanded, otherwise `false`
      Since:
        1.7, SVN 1.7

    - #### setEolStyle

          public void setEolStyle(java.lang.String eolStyle)

      Sets the string that denotes a specific End-Of-Line character. `eolStyle` allows you to override the standard eol marker on the platform you are running on. Can be either "LF", "CR" or "CRLF" or `null`. If `null` will use the standard eol marker. Any other value will cause an exception with the error code `SVNErrorCode.IO_UNKNOWN_EOL` error to be returned.
      Parameters:
        `eolStyle` - specific End-Of-Line character of the operation

    - #### getSource

          public SvnTarget getSource()

      Returns export's source - working copy path or repository URL.
      Returns:
        source of the export

    - #### setSource

          public void setSource(SvnTarget source)

      Sets export's source - working copy path or repository URL.
      Parameters:
        `source` - source of the export

    - #### ensureArgumentsAreValid

          protected void ensureArgumentsAreValid()
                                          throws SVNException

      Overrides:
        `ensureArgumentsAreValid` in class `SvnOperation<java.lang.Long>`
      Throws:
        `SVNException`

    - #### initDefaults

          protected void initDefaults()

      Overrides:
        `initDefaults` in class `SvnOperation<java.lang.Long>`

    - #### getOperationalWorkingCopy

          protected java.io.File getOperationalWorkingCopy()

      Overrides:
        `getOperationalWorkingCopy` in class `SvnOperation<java.lang.Long>`

    - #### isChangesWorkingCopy

          public boolean isChangesWorkingCopy()

      Gets whether the operation changes working copy
      Overrides:
        `isChangesWorkingCopy` in class `SvnOperation<java.lang.Long>`
      Returns:
        `true` if the operation changes the working copy, otherwise `false`