org.apache.cocoon.portal.layout
Interface Layout

All Known Subinterfaces:
CompositeLayout
All Known Implementing Classes:
AbstractLayout, CompositeLayoutImpl, LinkLayout

public interface Layout

Parameters and temporary parameters: A parameter is a key-value pair consisting of strings for both key and value. While the parameters are persisted, the temporary parameters have only the life-time of a session.

Version:
$Id: Layout.java 328461 2005-10-25 19:44:00Z cziegeler $

Method Summary
 Layout copy()
          Make a copy of this layout object and of all it's children.
 String getId()
          Get the unique id of this object.
 String getLayoutRendererName()
          Get the name of a custom Renderer for this layout.
 String getName()
          The name given from the factory.
 String getParameter(String key)
          Return the parameter value for the given key.
 Map getParameters()
          Get parameters map.
 Item getParent()
           
 String getRendererName()
          Get the name of the Renderer to draw this layout.
 String getTemporaryParameter(String key)
          Return the temporary parameter value for the given key.
 Map getTemporaryParameters()
          Get the temporary parameters map.
 void initialize(String name, String id)
          Initialize the object.
 void setDescription(LayoutDescription description)
          Set the layout description.
 void setParameter(String key, String value)
          Set the parameter to a value.
 void setParent(Item item)
           
 void setTemporaryParameter(String key, String value)
          Set the temporary parameter to a value.
 

Method Detail

getName

public String getName()
The name given from the factory.


getId

public String getId()
Get the unique id of this object.

Returns:
Unique id of the layout or null if this object does not provide a unique id.

setDescription

public void setDescription(LayoutDescription description)
Set the layout description.


initialize

public void initialize(String name,
                       String id)
Initialize the object. This should only be called once directly after the creation.


getParameters

public Map getParameters()
Get parameters map. This method never returns null.

Returns:
A map with key value pairs.

getParameter

public String getParameter(String key)
Return the parameter value for the given key.

Parameters:
key - The name of the parameter.
Returns:
The value of the parameter or null.

setParameter

public void setParameter(String key,
                         String value)
Set the parameter to a value.

Parameters:
key - The name of the parameter.
value - The value.

getTemporaryParameters

public Map getTemporaryParameters()
Get the temporary parameters map. This method never returns null.

Returns:
A map with key value pairs.

getTemporaryParameter

public String getTemporaryParameter(String key)
Return the temporary parameter value for the given key.

Parameters:
key - The name of the parameter.
Returns:
The value of the parameter or null.

setTemporaryParameter

public void setTemporaryParameter(String key,
                                  String value)
Set the temporary parameter to a value.

Parameters:
key - The name of the parameter.
value - The value.

getRendererName

public String getRendererName()
Get the name of the Renderer to draw this layout. If this layout has an own renderer getLayoutRendererName() return this, otherwise the default renderer is returned.

Returns:
String The role name

getLayoutRendererName

public String getLayoutRendererName()
Get the name of a custom Renderer for this layout.

Returns:
String The role name

getParent

public Item getParent()

setParent

public void setParent(Item item)

copy

public Layout copy()
Make a copy of this layout object and of all it's children. This includes copies of items and copletinstancedatas.



Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.