org.eclipse.emf.cdo.transfer

## Class CDOTransfer

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

- All Implemented Interfaces:
    INotifier

      public class CDOTransfer
      extends Object
      implements 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 and 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 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.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Notifier` | `notifier`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CDOTransfer(CDOTransferSystem sourceSystem, CDOTransferSystem targetSystem)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addListener(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()`
    `IListener[]` | `getListeners()`
    `int` | `getMappingCount()`
    `CDOTransfer.ModelTransferContext` | `getModelTransferContext()`
    `CDOTransferMapping` | `getRootMapping()`
    `CDOTransferSystem` | `getSourceSystem()`
    `IPath` | `getTargetPath()`
    `CDOTransferSystem` | `getTargetSystem()`
    `protected CDOTransferType` | `getTransferType(CDOTransferElement source)`
    `Set<CDOTransferType>` | `getUsedTransferTypes()`
    `boolean` | `hasListeners()`
    `protected CDOTransferMapping` | `map(CDOTransferElement source, CDOTransferMapping parent, IProgressMonitor monitor)`
    `CDOTransferMapping` | `map(CDOTransferElement source, IProgressMonitor monitor)`
    `CDOTransferMapping` | `map(IPath sourcePath, IProgressMonitor monitor)`
    `CDOTransferMapping` | `map(String sourcePath, IProgressMonitor monitor)`
    `void` | `perform()`
    `protected void` | `perform(CDOTransferMapping mapping, IProgressMonitor monitor)`
    `void` | `perform(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, String encoding, IProgressMonitor monitor)`
    `protected void` | `relativePathChanged(CDOTransferMapping mapping, IPath oldPath, IPath newPath)`
    `void` | `removeListener(IListener listener)`
    `void` | `setDefaultTransferType(CDOTransferType defaultTransferType)`
    `void` | `setTargetPath(IPath targetPath)`
    `void` | `setTargetPath(String path)`
    `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 Notifier notifier

  - ### Constructor Detail

    - #### CDOTransfer

          public CDOTransfer(CDOTransferSystem sourceSystem,
                             CDOTransferSystem targetSystem)

  - ### Method Detail

    - #### addListener

          public void addListener(IListener listener)

      Specified by:
        `addListener` in interface `INotifier`

    - #### removeListener

          public void removeListener(IListener listener)

      Specified by:
        `removeListener` in interface `INotifier`

    - #### hasListeners

          public boolean hasListeners()

      Specified by:
        `hasListeners` in interface `INotifier`

    - #### getListeners

          public IListener[] getListeners()

      Specified by:
        `getListeners` in interface `INotifier`

    - #### getSourceSystem

          public final CDOTransferSystem getSourceSystem()

    - #### getTargetSystem

          public final CDOTransferSystem getTargetSystem()

    - #### getModelTransferContext

          public CDOTransfer.ModelTransferContext getModelTransferContext()

    - #### getDefaultTransferType

          public final CDOTransferType getDefaultTransferType()

    - #### setDefaultTransferType

          public final void setDefaultTransferType(CDOTransferType defaultTransferType)

    - #### getUsedTransferTypes

          public Set<CDOTransferType> getUsedTransferTypes()

    - #### getRootMapping

          public final CDOTransferMapping getRootMapping()

    - #### getTargetPath

          public IPath getTargetPath()

    - #### setTargetPath

          public void setTargetPath(IPath targetPath)

    - #### setTargetPath

          public void setTargetPath(String path)

    - #### getMappingCount

          public int getMappingCount()

    - #### map

          public CDOTransferMapping map(IPath sourcePath,
                                        IProgressMonitor monitor)

    - #### map

          public CDOTransferMapping map(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,
                                     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)

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html