org.eclipse.emf.cdo.view

## Interface CDOViewRegistry

- All Superinterfaces:
    IContainer<CDOViewRegistry.Registration>, INotifier

      public interface CDOViewRegistry
      extends IContainer<CDOViewRegistry.Registration>

  A global registry of all open `views` and `transactions`.
  Since:
    4.2
  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 and Description
    --- | ---
    `static interface` | `CDOViewRegistry.Registration` A bidirectional mapping between a registered `view` and its `class loader`-wide `ID`.

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

      `IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CDOViewRegistry` | `INSTANCE` The `class loader`-wide singleton instance of the `view registry`.
    `static int` | `NOT_REGISTERED` A symbolic constant returned from `getID(CDOView)` if the view is not registered.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getID(CDOView view)` Returns the `ID` of the given `view` if it is registered, 0 otherwise.
    `int[]` | `getIDs()` Returns the `IDs` of all registered `views`.
    `CDOView` | `getView(int id)` Returns the `view` with the given `ID` if it is registered, `null` otherwise.
    `CDOView[]` | `getViews()` Returns all registered `views`.

    - ### 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`

- - ### Field Detail

    - #### INSTANCE

          static final CDOViewRegistry INSTANCE

      The `class loader`-wide singleton instance of the `view registry`.

    - #### NOT_REGISTERED

          static final int NOT_REGISTERED

      A symbolic constant returned from `getID(CDOView)` if the view is not registered.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getIDs

          int[] getIDs()

      Returns the `IDs` of all registered `views`.

    - #### getViews

          CDOView[] getViews()

      Returns all registered `views`.

    - #### getID

          int getID(CDOView view)

      Returns the `ID` of the given `view` if it is registered, 0 otherwise.

    - #### getView

          CDOView getView(int id)

      Returns the `view` with the given `ID` if it is registered, `null` otherwise.

Copyright (c) 2004-2019 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