Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 14f908225340d737d543badc6f0bb80e546633cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
 * Copyright (c) 2012 Eike Stepper (Loehne, 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
 *
 * Contributors:
 *    Eike Stepper - initial API and implementation
 */
package org.eclipse.emf.cdo.transfer;

import org.eclipse.core.runtime.IPath;

/**
 * The mapping of a source {@link CDOTransferElement element} to a target element in the context of a specific {@link CDOTransfer transfer}.
 *
 * @author Eike Stepper
 * @since 4.2
 */
public interface CDOTransferMapping extends Comparable<CDOTransferMapping>
{
  public static final CDOTransferMapping[] NO_CHILDREN = {};

  public CDOTransfer getTransfer();

  public CDOTransferElement getSource();

  public CDOTransferMapping getParent();

  public boolean isRoot();

  public boolean isDirectory();

  public String getName();

  public void setName(String name);

  public IPath getRelativePath();

  public void setRelativePath(IPath path);

  public void setRelativePath(String path);

  public void accept(Visitor visitor);

  public CDOTransferMapping[] getChildren();

  public CDOTransferMapping getChild(IPath path);

  public CDOTransferMapping getChild(String path);

  public void unmap();

  public CDOTransferType getTransferType();

  public void setTransferType(CDOTransferType transferType);

  public IPath getFullPath();

  public Status getStatus();

  public CDOTransferElement getTarget();

  /**
   * Enumerates the possibles values of {@link CDOTransferMapping#getStatus()}.
   *
   * @author Eike Stepper
   */
  public enum Status
  {
    NEW, MERGE, CONFLICT
  }

  /**
   * A call-back that is called for a {@link CDOTransferMapping mapping} and all its {@link CDOTransferMapping#getChildren() children} when
   * passed into its {@link CDOTransferMapping#accept(Visitor) accept()} method.
   *
   * @author Eike Stepper
   */
  public interface Visitor
  {
    public boolean visit(CDOTransferMapping mapping);
  }
}

Back to the top