Package org.eclipse.net4j.util.container

# Interface IManagedContainer

All Superinterfaces:
  `IContainer<Object>`, `IDeactivateable`, `ILifecycle`, `INotifier`

All Known Subinterfaces:
  `IPluginContainer`

All Known Implementing Classes:
  `ManagedContainer`

public interface IManagedContainer extends IContainer<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

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

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

### getName

String getName()
Returns the name of this container, or `null` if no name has been set.

Since:
  3.8

### setName

void setName(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)

### unregisterFactory

IManagedContainer unregisterFactory(IFactory factory)

Since:
  3.23

### getPostProcessors

List<IElementProcessor> getPostProcessors()

### addPostProcessor

void addPostProcessor(IElementProcessor postProcessor, boolean processExistingElements)

### addPostProcessor

void addPostProcessor(IElementProcessor postProcessor)

### removePostProcessor

void removePostProcessor(IElementProcessor postProcessor)

### getProductGroups

Set<String> getProductGroups()

### getFactoryTypes

Set<String> getFactoryTypes(String productGroup)

### getFactory

IFactory getFactory(String productGroup, String factoryType) throws FactoryNotFoundException

Throws:
  `FactoryNotFoundException`

### putElement

Object putElement(String productGroup, String factoryType, String description, Object element)

### getElementKey

String[] getElementKey(Object element)

### getElements

Object[] getElements(String productGroup)

### getElements

Object[] getElements(String productGroup, String factoryType)

### getElement

Object getElement(String productGroup, String factoryType, String description) throws FactoryNotFoundException, ProductCreationException

Throws:
  `FactoryNotFoundException`
  `ProductCreationException`

### getElement

Object getElement(String productGroup, String factoryType, String description, boolean activate) throws FactoryNotFoundException, ProductCreationException

Throws:
  `FactoryNotFoundException`
  `ProductCreationException`
Since:
  2.0

### getElementOrNull

<T> T getElementOrNull(String productGroup, String factoryType) throws ProductCreationException

Throws:
  `ProductCreationException`
Since:
  3.23

### getElementOrNull

<T> T getElementOrNull(String productGroup, String factoryType, String description) throws ProductCreationException

Throws:
  `ProductCreationException`
Since:
  3.14

### getElementOrNull

<T> T getElementOrNull(String productGroup, String factoryType, Tree config) throws ProductCreationException

Throws:
  `ProductCreationException`
Since:
  3.23

### createElement

<T> T createElement(String productGroup, String factoryType, String description) throws FactoryNotFoundException, ProductCreationException

Throws:
  `FactoryNotFoundException`
  `ProductCreationException`
Since:
  3.23

### createElement

<T> T createElement(String productGroup, String factoryType, Tree config) throws FactoryNotFoundException, ProductCreationException

Throws:
  `FactoryNotFoundException`
  `ProductCreationException`
Since:
  3.23

### countElements

int countElements(String productGroup)

Since:
  3.22

### countElements

int countElements(String productGroup, String factoryType)

Since:
  3.22

### removeElement

Object removeElement(String productGroup, String factoryType, String description)

### forEachElement

<T> void forEachElement(String productGroup, Class<T> productType, Function<String,String> descriptionProvider, Consumer<T> consumer)

Since:
  3.13

### forEachElement

<T> void forEachElement(String productGroup, Class<T> productType, String description, Consumer<T> consumer)

Since:
  3.13

### forEachElement

<T> void forEachElement(String productGroup, Class<T> productType, Consumer<T> consumer)

Since:
  3.13

### clearElements

void clearElements()

### loadElements

void loadElements(InputStream stream) throws IOException, FactoryNotFoundException, ProductCreationException

Throws:
  `IOException`
  `FactoryNotFoundException`
  `ProductCreationException`

### saveElements

void saveElements(OutputStream stream) throws IOException

Throws:
  `IOException`