Package org.eclipse.emf.cdo.view

## Interface CDOAdapterPolicy

- All Known Implementing Classes:
    `AbstractObjectConflictResolver.MergeLocalChangesPerFeature`, `AbstractObjectConflictResolver.ThreeWayMerge`

      public interface CDOAdapterPolicy

  A policy that allows to specify valid `Adapter` / `EObject` combinations.
  Since:
    2.0
  Author:
    Simon McDuff
  See Also:
    `CDOView.Options.addChangeSubscriptionPolicy(CDOAdapterPolicy)`, `CDOView.Options.setStrongReferencePolicy(CDOAdapterPolicy)`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static CDOAdapterPolicy` | `ALL` | A default adapter policy that always triggers special behavior.
    `static CDOAdapterPolicy` | `CDO` | A default adapter policy that only triggers special behavior if the adapter under test implements `CDOAdapter`.
    `static CDOAdapterPolicy` | `NONE` | A default adapter policy that never triggers any special behavior.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isValid​(EObject eObject, Adapter adapter)` | Returns `true` if the given adapter on the given object should trigger a certain operation or behavior, `false` otherwise.

- - ### Field Detail

    - #### NONE

          static final CDOAdapterPolicy NONE

      A default adapter policy that never triggers any special behavior.

    - #### CDO

          static final CDOAdapterPolicy CDO

      A default adapter policy that only triggers special behavior if the adapter under test implements `CDOAdapter`.

    - #### ALL

          static final CDOAdapterPolicy ALL

      A default adapter policy that always triggers special behavior.

  - ### Method Detail

    - #### isValid

          boolean isValid​(EObject eObject,
                          Adapter adapter)

      Returns `true` if the given adapter on the given object should trigger a certain operation or behavior, `false` otherwise.
      See Also:
        `CDOView.Options.addChangeSubscriptionPolicy(CDOAdapterPolicy)`, `CDOView.Options.setStrongReferencePolicy(CDOAdapterPolicy)`