org.apache.cocoon.portal.layout.impl
Class DefaultLayoutFactory

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.portal.layout.impl.DefaultLayoutFactory
All Implemented Interfaces:
Disposable, Initializable, Component, Configurable, LogEnabled, Serviceable, ThreadSafe, Receiver, LayoutFactory

public class DefaultLayoutFactory
extends AbstractLogEnabled
implements ThreadSafe, Component, LayoutFactory, Configurable, Disposable, Serviceable, Initializable, Receiver

Configuration

layouts List of layouts. req Configuration null
layouts/layout Multiple configured layouts. req Configuration null
layouts/layout/attribute::name Unique layout name. req String null
layouts/layout/attribute::create-id boolean false
layouts/layout/renderers/attribute::default req String null
layouts/layout/renderers/renderer req Configuration null
layouts/layout/renderers/renderer/attribute::name req String null
layouts/layout/aspects/aspect req String null

Version:
CVS $Id: DefaultLayoutFactory.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt

Field Summary
protected  List descriptions
           
protected static long idCounter
           
protected  Map layouts
           
protected  Configuration[] layoutsConf
           
protected  ServiceManager manager
           
protected  ServiceSelector storeSelector
           
 
Fields inherited from interface org.apache.cocoon.portal.layout.LayoutFactory
ROLE
 
Constructor Summary
DefaultLayoutFactory()
           
 
Method Summary
 void configure(Configuration configuration)
           
protected  void configureLayout(Configuration layoutConf)
          Configure a layout
 void dispose()
           
 List getLayoutDescriptions()
           
 void inform(LayoutEvent event, PortalService service)
           
protected  void init()
           
 void initialize()
           
 Layout newInstance(String layoutName)
          Create a new layout instance.
 void prepareLayout(Layout layout)
          This method is invoked for a newly loaded profile
 void remove(Layout layout)
          Remove the layout instance.
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layouts

protected Map layouts

descriptions

protected List descriptions

storeSelector

protected ServiceSelector storeSelector

manager

protected ServiceManager manager

layoutsConf

protected Configuration[] layoutsConf

idCounter

protected static long idCounter
Constructor Detail

DefaultLayoutFactory

public DefaultLayoutFactory()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

configureLayout

protected void configureLayout(Configuration layoutConf)
                        throws ConfigurationException
Configure a layout

Throws:
ConfigurationException

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException

init

protected void init()

prepareLayout

public void prepareLayout(Layout layout)
                   throws ProcessingException
Description copied from interface: LayoutFactory
This method is invoked for a newly loaded profile

Specified by:
prepareLayout in interface LayoutFactory
Throws:
ProcessingException

newInstance

public Layout newInstance(String layoutName)
                   throws ProcessingException
Description copied from interface: LayoutFactory
Create a new layout instance. The instance is also registered at the profile manager.

Specified by:
newInstance in interface LayoutFactory
Throws:
ProcessingException

getLayoutDescriptions

public List getLayoutDescriptions()
Specified by:
getLayoutDescriptions in interface LayoutFactory

dispose

public void dispose()
Specified by:
dispose in interface Disposable

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception

inform

public void inform(LayoutEvent event,
                   PortalService service)
See Also:
Receiver

remove

public void remove(Layout layout)
            throws ProcessingException
Description copied from interface: LayoutFactory
Remove the layout instance. The instance (and all childs) will also be unregistered from the profile manager.

Specified by:
remove in interface LayoutFactory
Throws:
ProcessingException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.