org.gitana.platform.services.transfer

## Enum TransferImportStrategy

- java.lang.Object
- - java.lang.Enum<TransferImportStrategy>
  - - org.gitana.platform.services.transfer.TransferImportStrategy

All Implemented Interfaces:
  Serializable, Comparable<TransferImportStrategy>

    public enum TransferImportStrategy
    extends Enum<TransferImportStrategy>

Author:
  uzi

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`CLONE` Indicates that the import should reproduce the exact structure with the same IDs and everything in the target container.
`COPY_EVERYTHING` This is the default strategy which indicates that the importer should create new IDs for everything that is being imported.
`COPY_TOP` Indicates that the import should generate a new ID for the top-most imported object.

### Method Summary

All Methods Static Methods Concrete Methods
`static TransferImportStrategy` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static TransferImportStrategy[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### COPY_EVERYTHING

    public static final TransferImportStrategy COPY_EVERYTHING

This is the default strategy which indicates that the importer should create new IDs for everything that is being imported. Prior ID values are substituted with new ID for any objects and object references. Thus, the imported objects will be completely new and unrelated to the original objects. An example of this in practice - importing a domain into a platform. If copy everything is set, then a new domain will be created every time. If you run the importer 3 times, you will have 3 domains with identical content, except for the IDs which will all be unique. Another example is importing branch nodes with childrenOnly set to true. In this case, new copies of all of the content are created in memory (as candidates). The copies are then transactionally committed during which time they may be reconciled with existing nodes based on QName collisions and/or folder paths. A final example is copying a node into a target folder. If COPY_EVERYTHING is set, a full copy of the node and all of its relations will be created and will entirely independent of other copies placed into the same folder.

#### COPY_TOP

    public static final TransferImportStrategy COPY_TOP

Indicates that the import should generate a new ID for the top-most imported object. Everything underneath the top-most container has its ID preserved. After import, subsequent PARTIAL archives can be applied (with no mappings) since IDs have been preserved.

#### CLONE

    public static final TransferImportStrategy CLONE

Indicates that the import should reproduce the exact structure with the same IDs and everything in the target container. After import, subsequent PARTIAL archives can be applied (with no mappings) since IDs have been preserved. This is used for replication.

### Method Detail

#### values

    public static TransferImportStrategy[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (TransferImportStrategy c : TransferImportStrategy.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static TransferImportStrategy valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null