Package org.apache.sling.distribution

## Enum DistributionRequestType

- java.lang.Object
- - java.lang.Enum<DistributionRequestType>
  - - org.apache.sling.distribution.DistributionRequestType

All Implemented Interfaces:
  `Serializable`, `Comparable<DistributionRequestType>`

    @ProviderType
    public enum DistributionRequestType
    extends Enum<DistributionRequestType>

The request type tied to a specific `DistributionRequest`, used to decide how the distribution content should be aggregated.

`ADD` requests can for example lead to the creation of a package of resources to be persisted on the target instance. `DELETE` requests can for example lead to the creation of a "command package" to be sent to the target instance to actually remove the resources specified in `DistributionRequest.getPaths()`. `PULL` requests can for example lead to the creation of a "command package" that will trigger fetching of content from the target instance. `INVALIDATE` requests can for example lead to the cache invalidation without importing content.

### Enum Constant Summary

Enum Constants
`ADD` Action type for adding content
`DELETE` Action type for deleting content
`INVALIDATE` Action type for invalidating content
`PULL` Action type for pulling content
`TEST` Action type for testing connection.

### Method Summary

All Methods Static Methods Concrete Methods
`static DistributionRequestType` `fromName​(String n)` Creates an action type for the given name.
`static DistributionRequestType` `valueOf​(String name)` Returns the enum constant of this type with the specified name.
`static DistributionRequestType[]` `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

#### ADD

    public static final DistributionRequestType ADD

Action type for adding content

#### DELETE

    public static final DistributionRequestType DELETE

Action type for deleting content

#### PULL

    public static final DistributionRequestType PULL

Action type for pulling content

#### INVALIDATE

    public static final DistributionRequestType INVALIDATE

Action type for invalidating content

#### TEST

    public static final DistributionRequestType TEST

Action type for testing connection. No content is modified.

### Method Detail

#### values

    public static DistributionRequestType[] 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 (DistributionRequestType c : DistributionRequestType.values())
        System.out.println(c);

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

#### valueOf

    public static DistributionRequestType 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

#### fromName

    @Nullable
    public static DistributionRequestType fromName​(@Nullable
                                                   String n)

Creates an action type for the given name. if the name cannot be mapped to a enum type or if it's `null`, `null` is returned.

Parameters:
  `n` - the name
Returns:
  the type or `null`