Package org.eclipse.emf.cdo.view

## Interface CDOUnitManager

- All Superinterfaces:
    `org.eclipse.net4j.util.container.IContainer<CDOUnit>`, `org.eclipse.net4j.util.event.INotifier`

      public interface CDOUnitManager
      extends org.eclipse.net4j.util.container.IContainer<CDOUnit>

  Locally manages the open `units` of a `view`.
  Since:
    4.5
  Author:
    Eike Stepper
  No Implement
    This interface is not intended to be implemented by clients.
  No Extend
    This interface is not intended to be extended by clients.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `CDOUnitManager.UnitExistsException` | An unchecked `CDOException` being thrown from `CDOUnitManager.createUnit()` to indicate that the given root object already is the `root` of an existing `unit`.
    `static class` | `CDOUnitManager.UnitNotFoundException` | An unchecked `CDOException` being thrown from `CDOUnitManager.openUnit()` to indicate that no `unit` exists for the given root object.

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer

      `org.eclipse.net4j.util.container.IContainer.Modifiable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends java.lang.Object>`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

      `org.eclipse.net4j.util.event.INotifier.INotifier2`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CDOUnit` | `createUnit​(EObject root, boolean open, IProgressMonitor monitor)` |
    `CDOUnit` | `getOpenUnit​(EObject object)` |
    `CDOUnit[]` | `getOpenUnits()` |
    `CDOView` | `getView()` |
    `boolean` | `isAutoResourceUnitsEnabled()` |
    `boolean` | `isUnit​(EObject root)` |
    `CDOUnit` | `openUnit​(EObject root, boolean createOnDemand, IProgressMonitor monitor)` |
    `void` | `setAutoResourceUnitsEnabled​(boolean enabled)` |

    - ### Methods inherited from interface org.eclipse.net4j.util.container.IContainer

      `getElements, isEmpty`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Method Detail

    - #### getView

          CDOView getView()

    - #### isUnit

          boolean isUnit​(EObject root)

    - #### createUnit

          CDOUnit createUnit​(EObject root,
                             boolean open,
                             IProgressMonitor monitor)
                      throws CDOUnitManager.UnitExistsException

      Throws:
        `CDOUnitManager.UnitExistsException`

    - #### openUnit

          CDOUnit openUnit​(EObject root,
                           boolean createOnDemand,
                           IProgressMonitor monitor)
                    throws CDOUnitManager.UnitNotFoundException

      Throws:
        `CDOUnitManager.UnitNotFoundException`

    - #### getOpenUnit

          CDOUnit getOpenUnit​(EObject object)

    - #### getOpenUnits

          CDOUnit[] getOpenUnits()

    - #### isAutoResourceUnitsEnabled

          boolean isAutoResourceUnitsEnabled()

    - #### setAutoResourceUnitsEnabled

          void setAutoResourceUnitsEnabled​(boolean enabled)