public class ManagedContainer extends Lifecycle implements IManagedContainer
managed container.IManagedContainer.ContainerAwareIContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>ILifecycle.DeferrableActivation| Constructor and Description |
|---|
ManagedContainer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activateElement(java.lang.Object element) |
void |
addPostProcessor(IElementProcessor postProcessor) |
void |
addPostProcessor(IElementProcessor postProcessor,
boolean processExistingElements) |
void |
clearElements() |
protected java.lang.Object |
createElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description) |
protected IRegistry<IFactoryKey,IFactory> |
createFactoryRegistry() |
protected java.util.List<IElementProcessor> |
createPostProcessors() |
protected void |
doActivate() |
protected void |
doDeactivate() |
void |
fireEvent(IEvent event) |
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) |
protected java.util.Map.Entry<org.eclipse.net4j.util.container.ManagedContainer.ElementKey,java.lang.Object>[] |
getElementRegistryEntries() |
protected org.eclipse.net4j.util.container.ManagedContainer.ElementKey[] |
getElementRegistryKeys() |
protected java.lang.Object[] |
getElementRegistryValues() |
java.lang.Object[] |
getElements() |
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() |
protected java.lang.String |
getTypeName() |
boolean |
isEmpty() |
void |
loadElements(java.io.InputStream stream) |
protected java.lang.Object |
postProcessElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description,
java.lang.Object element) |
protected java.lang.Object |
putElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key,
java.lang.Object element) |
java.lang.Object |
putElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description,
java.lang.Object element) |
ManagedContainer |
registerFactory(IFactory factory) |
protected java.lang.Object |
removeElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key) |
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.
|
java.lang.String |
toString() |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivationaddListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactivate, deactivate, getLifecycleState, isActiveaddListener, getListeners, hasListeners, removeListenerpublic java.lang.String getName()
IManagedContainernull if no name has been set.getName in interface IManagedContainerpublic void setName(java.lang.String name)
IManagedContainersetName in interface IManagedContainerpublic IRegistry<IFactoryKey,IFactory> getFactoryRegistry()
getFactoryRegistry in interface IManagedContainerpublic ManagedContainer registerFactory(IFactory factory)
registerFactory in interface IManagedContainerpublic java.util.List<IElementProcessor> getPostProcessors()
getPostProcessors in interface IManagedContainerpublic void addPostProcessor(IElementProcessor postProcessor, boolean processExistingElements)
addPostProcessor in interface IManagedContainerpublic void addPostProcessor(IElementProcessor postProcessor)
addPostProcessor in interface IManagedContainerpublic void removePostProcessor(IElementProcessor postProcessor)
removePostProcessor in interface IManagedContainerpublic java.util.Set<java.lang.String> getProductGroups()
getProductGroups in interface IManagedContainerpublic java.util.Set<java.lang.String> getFactoryTypes(java.lang.String productGroup)
getFactoryTypes in interface IManagedContainerpublic IFactory getFactory(java.lang.String productGroup, java.lang.String factoryType) throws FactoryNotFoundException
getFactory in interface IManagedContainerFactoryNotFoundExceptionpublic boolean isEmpty()
isEmpty in interface IContainer<java.lang.Object>public java.lang.String[] getElementKey(java.lang.Object element)
getElementKey in interface IManagedContainerpublic java.lang.Object[] getElements()
getElements in interface IContainer<java.lang.Object>public java.lang.Object[] getElements(java.lang.String productGroup)
getElements in interface IManagedContainerpublic java.lang.Object[] getElements(java.lang.String productGroup,
java.lang.String factoryType)
getElements in interface IManagedContainerpublic java.lang.Object getElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description)
throws FactoryNotFoundException,
ProductCreationException
getElement in interface IManagedContainerFactoryNotFoundExceptionProductCreationExceptionpublic java.lang.Object getElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description,
boolean activate)
throws FactoryNotFoundException,
ProductCreationException
getElement in interface IManagedContainerFactoryNotFoundExceptionProductCreationExceptionprotected void activateElement(java.lang.Object element)
public java.lang.Object putElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description,
java.lang.Object element)
putElement in interface IManagedContainerprotected java.lang.Object putElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key,
java.lang.Object element)
public java.lang.Object removeElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description)
removeElement in interface IManagedContainerprotected java.lang.Object removeElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key)
public void clearElements()
clearElements in interface IManagedContainerpublic void loadElements(java.io.InputStream stream)
throws java.io.IOException,
FactoryNotFoundException,
ProductCreationException
loadElements in interface IManagedContainerjava.io.IOExceptionFactoryNotFoundExceptionProductCreationExceptionpublic void saveElements(java.io.OutputStream stream)
throws java.io.IOException
saveElements in interface IManagedContainerjava.io.IOExceptionprotected java.lang.String getTypeName()
protected IRegistry<IFactoryKey,IFactory> createFactoryRegistry()
protected java.util.List<IElementProcessor> createPostProcessors()
protected org.eclipse.net4j.util.container.ManagedContainer.ElementKey[] getElementRegistryKeys()
protected java.lang.Object[] getElementRegistryValues()
protected java.util.Map.Entry<org.eclipse.net4j.util.container.ManagedContainer.ElementKey,java.lang.Object>[] getElementRegistryEntries()
protected java.lang.Object createElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description)
throws FactoryNotFoundException,
ProductCreationException
protected java.lang.Object postProcessElement(java.lang.String productGroup,
java.lang.String factoryType,
java.lang.String description,
java.lang.Object element)
protected void doActivate()
throws java.lang.Exception
doActivate in class Lifecyclejava.lang.Exceptionprotected void doDeactivate()
throws java.lang.Exception
doDeactivate in class Lifecyclejava.lang.ExceptionCopyright (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