info.magnolia.module.blossom.template
Class TemplateExporter

java.lang.Object
  extended by info.magnolia.module.blossom.template.TemplateExporter
All Implemented Interfaces:
BlossomDispatcherAware, EventListener, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener

public class TemplateExporter
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener, BlossomDispatcherAware

Detects templates by inspecting HandlerMappings.

Since:
1.1.1

Constructor Summary
TemplateExporter()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  info.magnolia.ui.dialog.registry.DialogDefinitionProvider createDialogDefinitionProvider(BlossomDialogDescription dialogDescription)
           
protected  info.magnolia.rendering.template.registry.TemplateDefinitionProvider createTemplateDefinitionProvider(BlossomTemplateDefinition definition)
           
protected  void exportTemplates()
           
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 Object postProcessAfterInitialization(Object bean, String beanName)
           
protected  BlossomAreaDefinition postProcessAreaDefinition(BlossomTemplateDefinition templateDefinition, BlossomAreaDefinition areaDefinition)
           
protected  Map<String,info.magnolia.rendering.template.AreaDefinition> postProcessAreaDefinitions(BlossomTemplateDefinition templateDefinition, Map<String,info.magnolia.rendering.template.AreaDefinition> areas)
          Recursively post-process area definitions starting in bottom up order.
protected  BlossomDialogDescription postProcessAreaDialog(BlossomAreaDefinition areaDefinition, BlossomDialogDescription dialogDescription)
          Allows sub-classes to do post-processing on dialogs for areas before they're registered.
 Object postProcessBeforeInitialization(Object bean, String beanName)
           
protected  BlossomDialogDescription postProcessDialogFactoryDialog(BlossomTemplateDefinition templateDefinition, BlossomDialogDescription dialogDescription)
          Allows sub-classes to do post-processing on dialogs for @DialogFactory annotated methods before they're registered.
protected  void postProcessHandler(Object handler, String handlerPath)
           
protected  BlossomTemplateDefinition postProcessTemplateDefinition(BlossomTemplateDefinition templateDefinition)
          Allows sub-classes to do post-processing of the template definition before it is registered.
protected  BlossomDialogDescription postProcessTemplateDialog(BlossomTemplateDefinition templateDefinition, BlossomDialogDescription dialogDescription)
          Allows sub-classes to do post-processing on dialogs for templates before they're registered.
protected  void registerAreaDialog(BlossomAreaDefinition areaDefinition)
           
protected  void registerAreaDialogs(Collection<info.magnolia.rendering.template.AreaDefinition> areas)
           
protected  void registerDialogFactories(BlossomTemplateDefinition templateDefinition)
           
protected  void registerTemplateDialog(BlossomTemplateDefinition templateDefinition)
           
protected  void scanHandlerMapping(org.springframework.web.servlet.handler.AbstractUrlHandlerMapping handlerMapping)
           
 void setBlossomDispatcher(BlossomDispatcher dispatcher)
           
 void setDialogDescriptionBuilder(DialogDescriptionBuilder dialogDescriptionBuilder)
           
 void setTemplateDefinitionBuilder(TemplateDefinitionBuilder templateDefinitionBuilder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateExporter

public TemplateExporter()
Method Detail

setTemplateDefinitionBuilder

public void setTemplateDefinitionBuilder(TemplateDefinitionBuilder templateDefinitionBuilder)

setDialogDescriptionBuilder

public void setDialogDescriptionBuilder(DialogDescriptionBuilder dialogDescriptionBuilder)

setBlossomDispatcher

public void setBlossomDispatcher(BlossomDispatcher dispatcher)
Specified by:
setBlossomDispatcher in interface BlossomDispatcherAware

postProcessBeforeInitialization

public Object postProcessBeforeInitialization(Object bean,
                                              String beanName)
                                       throws org.springframework.beans.BeansException
Specified by:
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

postProcessAfterInitialization

public Object postProcessAfterInitialization(Object bean,
                                             String beanName)
                                      throws org.springframework.beans.BeansException
Specified by:
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

scanHandlerMapping

protected void scanHandlerMapping(org.springframework.web.servlet.handler.AbstractUrlHandlerMapping handlerMapping)

postProcessHandler

protected void postProcessHandler(Object handler,
                                  String handlerPath)

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener

exportTemplates

protected void exportTemplates()

registerDialogFactories

protected void registerDialogFactories(BlossomTemplateDefinition templateDefinition)

registerTemplateDialog

protected void registerTemplateDialog(BlossomTemplateDefinition templateDefinition)

registerAreaDialogs

protected void registerAreaDialogs(Collection<info.magnolia.rendering.template.AreaDefinition> areas)

registerAreaDialog

protected void registerAreaDialog(BlossomAreaDefinition areaDefinition)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

createTemplateDefinitionProvider

protected info.magnolia.rendering.template.registry.TemplateDefinitionProvider createTemplateDefinitionProvider(BlossomTemplateDefinition definition)

createDialogDefinitionProvider

protected info.magnolia.ui.dialog.registry.DialogDefinitionProvider createDialogDefinitionProvider(BlossomDialogDescription dialogDescription)

postProcessTemplateDefinition

protected BlossomTemplateDefinition postProcessTemplateDefinition(BlossomTemplateDefinition templateDefinition)
Allows sub-classes to do post-processing of the template definition before it is registered. If it returns null the template will not be registered and neither will its dialog or any @DialogFactory methods within it.


postProcessAreaDefinitions

protected Map<String,info.magnolia.rendering.template.AreaDefinition> postProcessAreaDefinitions(BlossomTemplateDefinition templateDefinition,
                                                                                                 Map<String,info.magnolia.rendering.template.AreaDefinition> areas)
Recursively post-process area definitions starting in bottom up order.


postProcessAreaDefinition

protected BlossomAreaDefinition postProcessAreaDefinition(BlossomTemplateDefinition templateDefinition,
                                                          BlossomAreaDefinition areaDefinition)

postProcessDialogFactoryDialog

protected BlossomDialogDescription postProcessDialogFactoryDialog(BlossomTemplateDefinition templateDefinition,
                                                                  BlossomDialogDescription dialogDescription)
Allows sub-classes to do post-processing on dialogs for @DialogFactory annotated methods before they're registered. If it returns null the dialog will not be registered.


postProcessTemplateDialog

protected BlossomDialogDescription postProcessTemplateDialog(BlossomTemplateDefinition templateDefinition,
                                                             BlossomDialogDescription dialogDescription)
Allows sub-classes to do post-processing on dialogs for templates before they're registered. If it returns null the dialog will not be registered and the template will not have a dialog.


postProcessAreaDialog

protected BlossomDialogDescription postProcessAreaDialog(BlossomAreaDefinition areaDefinition,
                                                         BlossomDialogDescription dialogDescription)
Allows sub-classes to do post-processing on dialogs for areas before they're registered. If it returns null the dialog will not be registered and the area will not have a dialog.



Copyright © 2009-2014 Magnolia International Ltd.. All Rights Reserved.