Package org.eclipse.net4j.util.container

## Interface IManagedContainer

- All Superinterfaces:
    `IContainer<java.lang.Object>`, `IDeactivateable`, `ILifecycle`, `INotifier`
  All Known Subinterfaces:
    `IPluginContainer`
  All Known Implementing Classes:
    `ManagedContainer`

      public interface IManagedContainer
      extends IContainer<java.lang.Object>, ILifecycle

  A `container` that populates itself by means of element `factories` and `post processors` .
  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 interface` | `IManagedContainer.ContainerAware` |

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

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

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `ILifecycle.DeferrableActivation`

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

      `INotifier.INotifier2`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addPostProcessor​(IElementProcessor postProcessor)` |
    `void` | `addPostProcessor​(IElementProcessor postProcessor, boolean processExistingElements)` |
    `void` | `clearElements()` |
    `<T> void` | `forEachElement​(java.lang.String productGroup, java.lang.Class<T> productType, java.lang.String description, java.util.function.Consumer<T> consumer)` |
    `<T> void` | `forEachElement​(java.lang.String productGroup, java.lang.Class<T> productType, java.util.function.Consumer<T> consumer)` |
    `<T> void` | `forEachElement​(java.lang.String productGroup, java.lang.Class<T> productType, java.util.function.Function<java.lang.String,​java.lang.String> descriptionProvider, java.util.function.Consumer<T> consumer)` |
    `java.lang.Object` | `getElement​(java.lang.String productGroup, java.lang.String factoryType, java.lang.String description)` |
    `java.lang.Object` | `getElement​(java.lang.String productGroup, java.lang.String factoryType, java.lang.String description, boolean activate)` |
    `java.lang.String[]` | `getElementKey​(java.lang.Object element)` |
    `<T> T` | `getElementOrNull​(java.lang.String productGroup, java.lang.String factoryType, java.lang.String description)` |
    `java.lang.Object[]` | `getElements​(java.lang.String productGroup)` |
    `java.lang.Object[]` | `getElements​(java.lang.String productGroup, java.lang.String factoryType)` |
    `IFactory` | `getFactory​(java.lang.String productGroup, java.lang.String factoryType)` |
    `IRegistry<IFactoryKey,​IFactory>` | `getFactoryRegistry()` |
    `java.util.Set<java.lang.String>` | `getFactoryTypes​(java.lang.String productGroup)` |
    `java.lang.String` | `getName()` | Returns the name of this container, or `null` if no name has been set.
    `java.util.List<IElementProcessor>` | `getPostProcessors()` |
    `java.util.Set<java.lang.String>` | `getProductGroups()` |
    `void` | `loadElements​(java.io.InputStream stream)` |
    `java.lang.Object` | `putElement​(java.lang.String productGroup, java.lang.String factoryType, java.lang.String description, java.lang.Object element)` |
    `IManagedContainer` | `registerFactory​(IFactory factory)` |
    `java.lang.Object` | `removeElement​(java.lang.String productGroup, java.lang.String factoryType, java.lang.String description)` |
    `void` | `removePostProcessor​(IElementProcessor postProcessor)` |
    `void` | `saveElements​(java.io.OutputStream stream)` |
    `void` | `setName​(java.lang.String name)` | Sets the name of this container before it is activated.

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

      `getElements, isEmpty`

    - ### Methods inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `activate, deactivate, getLifecycleState, isActive`

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

      `addListener, getListeners, hasListeners, removeListener`

- - ### Method Detail

    - #### getName

          java.lang.String getName()

      Returns the name of this container, or `null` if no name has been set.
      Since:
        3.8

    - #### setName

          void setName​(java.lang.String name)

      Sets the name of this container before it is activated.
      Since:
        3.8

    - #### getFactoryRegistry

          IRegistry<IFactoryKey,​IFactory> getFactoryRegistry()

    - #### registerFactory

          IManagedContainer registerFactory​(IFactory factory)

    - #### getPostProcessors

          java.util.List<IElementProcessor> getPostProcessors()

    - #### addPostProcessor

          void addPostProcessor​(IElementProcessor postProcessor,
                                boolean processExistingElements)

    - #### addPostProcessor

          void addPostProcessor​(IElementProcessor postProcessor)

    - #### removePostProcessor

          void removePostProcessor​(IElementProcessor postProcessor)

    - #### getProductGroups

          java.util.Set<java.lang.String> getProductGroups()

    - #### getFactoryTypes

          java.util.Set<java.lang.String> getFactoryTypes​(java.lang.String productGroup)

    - #### getFactory

          IFactory getFactory​(java.lang.String productGroup,
                              java.lang.String factoryType)
                       throws FactoryNotFoundException

      Throws:
        `FactoryNotFoundException`

    - #### putElement

          java.lang.Object putElement​(java.lang.String productGroup,
                                      java.lang.String factoryType,
                                      java.lang.String description,
                                      java.lang.Object element)

    - #### getElementKey

          java.lang.String[] getElementKey​(java.lang.Object element)

    - #### getElements

          java.lang.Object[] getElements​(java.lang.String productGroup)

    - #### getElements

          java.lang.Object[] getElements​(java.lang.String productGroup,
                                         java.lang.String factoryType)

    - #### getElement

          java.lang.Object getElement​(java.lang.String productGroup,
                                      java.lang.String factoryType,
                                      java.lang.String description)
                               throws FactoryNotFoundException,
                                      ProductCreationException

      Throws:
        `FactoryNotFoundException`
        `ProductCreationException`

    - #### getElement

          java.lang.Object getElement​(java.lang.String productGroup,
                                      java.lang.String factoryType,
                                      java.lang.String description,
                                      boolean activate)
                               throws FactoryNotFoundException,
                                      ProductCreationException

      Throws:
        `FactoryNotFoundException`
        `ProductCreationException`
      Since:
        2.0

    - #### getElementOrNull

          <T> T getElementOrNull​(java.lang.String productGroup,
                                 java.lang.String factoryType,
                                 java.lang.String description)

      Since:
        3.14

    - #### removeElement

          java.lang.Object removeElement​(java.lang.String productGroup,
                                         java.lang.String factoryType,
                                         java.lang.String description)

    - #### forEachElement

          <T> void forEachElement​(java.lang.String productGroup,
                                  java.lang.Class<T> productType,
                                  java.util.function.Function<java.lang.String,​java.lang.String> descriptionProvider,
                                  java.util.function.Consumer<T> consumer)

      Since:
        3.13

    - #### forEachElement

          <T> void forEachElement​(java.lang.String productGroup,
                                  java.lang.Class<T> productType,
                                  java.lang.String description,
                                  java.util.function.Consumer<T> consumer)

      Since:
        3.13

    - #### forEachElement

          <T> void forEachElement​(java.lang.String productGroup,
                                  java.lang.Class<T> productType,
                                  java.util.function.Consumer<T> consumer)

      Since:
        3.13

    - #### clearElements

          void clearElements()

    - #### loadElements

          void loadElements​(java.io.InputStream stream)
                     throws java.io.IOException,
                            FactoryNotFoundException,
                            ProductCreationException

      Throws:
        `java.io.IOException`
        `FactoryNotFoundException`
        `ProductCreationException`

    - #### saveElements

          void saveElements​(java.io.OutputStream stream)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`