public class SpringExtensionBundle extends Object implements org.springframework.beans.factory.InitializingBean
SpringBeanExtension
s collection that get registered on the
Extender
's registry on afterPropertiesSet()
.SpringBeanExtension
s and
SpringExtensionPoint
s to define and start spring based
ExtensionBundle
s of SingletonExtension
s.
<bean id="ep1" class="org.alfresco.traitextender.SpringExtensionPoint">
<property name="extension" value="org.alfresco.sample.Extension1" />
<property name="trait" value="org.alfresco.sample.Trait1" />
</bean>
<bean id="ep2" class="org.alfresco.traitextender.SpringExtensionPoint">
<property name="extension" value="org.alfresco.sample.Extension2" />
<property name="trait" value="org.alfresco.sample.Trait2" />
</bean>
<bean id="extension1" class="org.alfresco.sample.Extension1">
<property name="extensionPoint" ref="ep1" />
</bean>
<bean id="extension2" class="org.alfresco.sample.Extension2">
<property name="extensionPoint" ref="ep2" />
</bean>
<bean id="aBundle" class="org.alfresco.traitextender.SpringExtensionBundle">
<property name="id" value="org.alfresco.sample.aBundle" />
<property name="enabled" value="true" />
<property name="extensions">
<list>
<ref bean="extension1" />
<ref bean="extension2" />
</list >
</property>
</bean>
Constructor and Description |
---|
SpringExtensionBundle() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
boolean |
isEnabled()
Returns whether the current bundle should be registered or not.
|
void |
setEnabled(boolean enabled) |
void |
setExtensions(List<SpringBeanExtension<?,?>> extensions) |
void |
setId(String id) |
void |
start()
Creates a
RegistryExtensionBundle and registers all contained
SpringBeanExtension s with it.When all extension have successfully registered it starts the RegistryExtensionBundle .The previously created RegistryExtensionBundle is stored for
later start or stop() operations. |
void |
stop()
Stops a previously
start() created
RegistryExtensionBundle . |
public void setEnabled(boolean enabled)
enabled
- true
if the current bundle should be
registered.false
if the current bundle should skip extension
registrationpublic boolean isEnabled()
true
if the current bundle should be registered, otherwise false
public void setExtensions(List<SpringBeanExtension<?,?>> extensions)
public void setId(String id)
public void start()
RegistryExtensionBundle
and registers all contained
SpringBeanExtension
s with it.RegistryExtensionBundle
.RegistryExtensionBundle
is stored for
later start or stop()
operations.public void stop()
start()
created
RegistryExtensionBundle
.Copyright © 2005–2017 Alfresco Software. All rights reserved.