Package org.eclipse.emf.cdo.transfer

## Class CDOTransfer

- java.lang.Object
- - org.eclipse.emf.cdo.transfer.CDOTransfer

- All Implemented Interfaces:
    `org.eclipse.net4j.util.event.INotifier`

      public class CDOTransfer
      extends java.lang.Object
      implements org.eclipse.net4j.util.event.INotifier

  Abstracts the transfer of a tree of `elements` for a `source` to a `target` `system`.

  The mappings of the source elements to their target elements is represented as a tree of `transfer mappings`.

  A transfer fires the following `events`:

  - `CDOTransfer.ChildrenChangedEvent` when the `children` of a mapping have changed.
  - `CDOTransfer.RelativePathChangedEvent` when the `relative path` of a mapping has changed.
  - `CDOTransfer.TransferTypeChangedEvent` when the `transfer type` of a mapping has changed.
  - `CDOTransfer.UnmappedModelsEvent` when the set of `unmapped models` has changed.
  Since:
    4.2
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `CDOTransfer.ChildrenChangedEvent` | A `mapping event` fired from a `transfer` when the `children` of a mapping have changed.
    `static class` | `CDOTransfer.MappingEvent` | An abstract base implementation of a `mapping` `event`.
    `static class` | `CDOTransfer.ModelTransferContext` | Encapsulates the model-specific aspects of a `transfer`.
    `static interface` | `CDOTransfer.ModelTransferResolution` | Reserved for future use.
    `static interface` | `CDOTransfer.PathProvider` | Provides the path of a transfer element relative to its parent.
    `static class` | `CDOTransfer.RelativePathChangedEvent` | A `mapping event` fired from a `transfer` when the `relative path` of a mapping has changed.
    `static class` | `CDOTransfer.TransferTypeChangedEvent` | A `mapping event` fired from a `transfer` when the `transfer type` of a mapping has changed.
    `static class` | `CDOTransfer.UnmappedModelsEvent` | An `event` fired from a `transfer` when the set of `unmapped models` has changed.

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

      `org.eclipse.net4j.util.event.INotifier.INotifier2`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected org.eclipse.net4j.util.event.Notifier` | `notifier` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CDOTransfer​(CDOTransferSystem sourceSystem, CDOTransferSystem targetSystem)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addListener​(org.eclipse.net4j.util.event.IListener listener)` |
    `protected void` | `childrenChanged​(CDOTransferMapping mapping, CDOTransferMapping child, CDOTransfer.ChildrenChangedEvent.Kind kind)` |
    `protected CDOTransferMapping` | `createMapping​(CDOTransferElement source, CDOTransferMapping parent, IProgressMonitor monitor)` |
    `protected CDOTransfer.ModelTransferContext` | `createModelTransferContext()` |
    `CDOTransferType` | `getDefaultTransferType()` |
    `org.eclipse.net4j.util.event.IListener[]` | `getListeners()` |
    `int` | `getMappingCount()` |
    `CDOTransfer.ModelTransferContext` | `getModelTransferContext()` |
    `CDOTransfer.PathProvider` | `getPathProvider()` |
    `CDOTransferMapping` | `getRootMapping()` |
    `CDOTransferSystem` | `getSourceSystem()` |
    `IPath` | `getTargetPath()` |
    `CDOTransferSystem` | `getTargetSystem()` |
    `protected CDOTransferType` | `getTransferType​(CDOTransferElement source)` |
    `java.util.Set<CDOTransferType>` | `getUsedTransferTypes()` |
    `boolean` | `hasListeners()` |
    `CDOTransferMapping` | `map​(java.lang.String sourcePath, IProgressMonitor monitor)` |
    `CDOTransferMapping` | `map​(IPath sourcePath, IProgressMonitor monitor)` |
    `CDOTransferMapping` | `map​(CDOTransferElement source, IProgressMonitor monitor)` |
    `protected CDOTransferMapping` | `map​(CDOTransferElement source, CDOTransferMapping parent, IProgressMonitor monitor)` |
    `void` | `perform()` |
    `void` | `perform​(IProgressMonitor monitor)` |
    `protected void` | `perform​(CDOTransferMapping mapping, IProgressMonitor monitor)` |
    `protected void` | `performBinary​(CDOTransferMapping mapping, IProgressMonitor monitor)` |
    `protected void` | `performFolder​(CDOTransferMapping mapping, IProgressMonitor monitor)` |
    `protected void` | `performModel​(CDOTransferMapping mapping, IProgressMonitor monitor)` |
    `protected void` | `performText​(CDOTransferMapping mapping, java.lang.String encoding, IProgressMonitor monitor)` |
    `protected void` | `relativePathChanged​(CDOTransferMapping mapping, IPath oldPath, IPath newPath)` |
    `void` | `removeListener​(org.eclipse.net4j.util.event.IListener listener)` |
    `void` | `setDefaultTransferType​(CDOTransferType defaultTransferType)` |
    `void` | `setPathProvider​(CDOTransfer.PathProvider pathProvider)` |
    `void` | `setTargetPath​(java.lang.String path)` |
    `void` | `setTargetPath​(IPath targetPath)` |
    `protected void` | `transferTypeChanged​(CDOTransferMapping mapping, CDOTransferType oldType, CDOTransferType newType)` |
    `protected void` | `unmap​(CDOTransferMapping mapping)` |
    `protected void` | `validate​(CDOTransferMapping mapping, IProgressMonitor monitor)` |

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

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

- - ### Field Detail

    - #### notifier

          protected final org.eclipse.net4j.util.event.Notifier notifier

  - ### Constructor Detail

    - #### CDOTransfer

          public CDOTransfer​(CDOTransferSystem sourceSystem,
                             CDOTransferSystem targetSystem)

  - ### Method Detail

    - #### addListener

          public void addListener​(org.eclipse.net4j.util.event.IListener listener)

      Specified by:
        `addListener` in interface `org.eclipse.net4j.util.event.INotifier`

    - #### removeListener

          public void removeListener​(org.eclipse.net4j.util.event.IListener listener)

      Specified by:
        `removeListener` in interface `org.eclipse.net4j.util.event.INotifier`

    - #### hasListeners

          public boolean hasListeners()

      Specified by:
        `hasListeners` in interface `org.eclipse.net4j.util.event.INotifier`

    - #### getListeners

          public org.eclipse.net4j.util.event.IListener[] getListeners()

      Specified by:
        `getListeners` in interface `org.eclipse.net4j.util.event.INotifier`

    - #### getSourceSystem

          public final CDOTransferSystem getSourceSystem()

    - #### getTargetSystem

          public final CDOTransferSystem getTargetSystem()

    - #### getPathProvider

          public final CDOTransfer.PathProvider getPathProvider()

      Since:
        4.3

    - #### setPathProvider

          public final void setPathProvider​(CDOTransfer.PathProvider pathProvider)

      Since:
        4.3

    - #### getModelTransferContext

          public CDOTransfer.ModelTransferContext getModelTransferContext()

    - #### getDefaultTransferType

          public final CDOTransferType getDefaultTransferType()

    - #### setDefaultTransferType

          public final void setDefaultTransferType​(CDOTransferType defaultTransferType)

    - #### getUsedTransferTypes

          public java.util.Set<CDOTransferType> getUsedTransferTypes()

    - #### getRootMapping

          public final CDOTransferMapping getRootMapping()

    - #### getTargetPath

          public IPath getTargetPath()

    - #### setTargetPath

          public void setTargetPath​(IPath targetPath)

    - #### setTargetPath

          public void setTargetPath​(java.lang.String path)

    - #### getMappingCount

          public int getMappingCount()

    - #### map

          public CDOTransferMapping map​(IPath sourcePath,
                                        IProgressMonitor monitor)

    - #### map

          public CDOTransferMapping map​(java.lang.String sourcePath,
                                        IProgressMonitor monitor)

    - #### map

          public CDOTransferMapping map​(CDOTransferElement source,
                                        IProgressMonitor monitor)

    - #### map

          protected CDOTransferMapping map​(CDOTransferElement source,
                                           CDOTransferMapping parent,
                                           IProgressMonitor monitor)

    - #### unmap

          protected void unmap​(CDOTransferMapping mapping)

    - #### createMapping

          protected CDOTransferMapping createMapping​(CDOTransferElement source,
                                                     CDOTransferMapping parent,
                                                     IProgressMonitor monitor)

    - #### createModelTransferContext

          protected CDOTransfer.ModelTransferContext createModelTransferContext()

    - #### getTransferType

          protected CDOTransferType getTransferType​(CDOTransferElement source)

    - #### validate

          protected void validate​(CDOTransferMapping mapping,
                                  IProgressMonitor monitor)

    - #### perform

          public void perform()

    - #### perform

          public void perform​(IProgressMonitor monitor)

    - #### perform

          protected void perform​(CDOTransferMapping mapping,
                                 IProgressMonitor monitor)

    - #### performFolder

          protected void performFolder​(CDOTransferMapping mapping,
                                       IProgressMonitor monitor)

    - #### performModel

          protected void performModel​(CDOTransferMapping mapping,
                                      IProgressMonitor monitor)

    - #### performBinary

          protected void performBinary​(CDOTransferMapping mapping,
                                       IProgressMonitor monitor)

    - #### performText

          protected void performText​(CDOTransferMapping mapping,
                                     java.lang.String encoding,
                                     IProgressMonitor monitor)

    - #### childrenChanged

          protected void childrenChanged​(CDOTransferMapping mapping,
                                         CDOTransferMapping child,
                                         CDOTransfer.ChildrenChangedEvent.Kind kind)

    - #### relativePathChanged

          protected void relativePathChanged​(CDOTransferMapping mapping,
                                             IPath oldPath,
                                             IPath newPath)

    - #### transferTypeChanged

          protected void transferTypeChanged​(CDOTransferMapping mapping,
                                             CDOTransferType oldType,
                                             CDOTransferType newType)