Constructor and Description |
---|
ExtenderImpl() |
Modifier and Type | Method and Description |
---|---|
<E,M extends Trait> |
getExtension(Extensible anExtensible,
ExtensionPoint<E,M> point)
Creates and returns a unique per
ExtensibleTrait object or
null if no extension-point factory is registered for the
given ExtensionPoint .Given that Extensible.getTrait(Class) is used to obtain the
ExtendedTrait that the returned extension is uniquely associated
with, the uniqueness and garbage collection of the returned extension is
dependent on how the given Extensible handles its
ExtendedTrait s. |
void |
register(ExtensionPoint<?,?> point,
ExtensionFactory<?> factory)
Registers an extension-point to factory association to be used in
extension creation.
|
void |
start(ExtensionBundle bundle)
Start life-cycle phase trigger method.
Upon successful execution the bundle will have all its extension points registered using Extender.register(ExtensionPoint, ExtensionFactory) and
ready to be. |
void |
stop(ExtensionBundle bundle)
Start life-cycle phase trigger method.
Upon successful execution the bundle will have all its extension points unregistered using Extender.unregister(ExtensionPoint) . |
void |
stopAll()
Stops all previously registered
ExtensionBundle s. |
void |
unregister(ExtensionPoint<?,?> point)
Unregisters an extension-point to factory association of the given
extension point.
|
getInstance
public void start(ExtensionBundle bundle)
Extender
Extender.register(ExtensionPoint, ExtensionFactory)
and
ready to be.public void stop(ExtensionBundle bundle)
Extender
Extender.unregister(ExtensionPoint)
.public void stopAll()
Extender
ExtensionBundle
s.public <E,M extends Trait> E getExtension(Extensible anExtensible, ExtensionPoint<E,M> point)
Extender
ExtensibleTrait
object or
null
if no extension-point factory is registered for the
given ExtensionPoint
.Extensible.getTrait(Class)
is used to obtain the
ExtendedTrait
that the returned extension is uniquely associated
with, the uniqueness and garbage collection of the returned extension is
dependent on how the given Extensible
handles its
ExtendedTrait
s.getExtension
in class Extender
ExtensibleTrait
extension object or
null
if no extension-point factory is registered for
the given ExtensionPoint
public void register(ExtensionPoint<?,?> point, ExtensionFactory<?> factory)
Extender
ExtensibleTrait
extension is returned by
Extender.getExtension(Extensible, ExtensionPoint)
.register
in class Extender
point
- the extension point to be associated with the given
extension factory during extension retrieval using
Extender.getExtension(Extensible, ExtensionPoint)
public void unregister(ExtensionPoint<?,?> point)
Extender
Extender.getExtension(Extensible, ExtensionPoint)
.unregister
in class Extender
Copyright © 2005–2017 Alfresco Software. All rights reserved.