org.apache.cocoon.portal.layout
Class AbstractLayout

java.lang.Object
  extended byorg.apache.cocoon.portal.layout.AbstractParameters
      extended byorg.apache.cocoon.portal.layout.AbstractLayout
All Implemented Interfaces:
Cloneable, Layout
Direct Known Subclasses:
CompositeLayoutImpl, CopletLayout, FrameLayout, LinkLayout

public abstract class AbstractLayout
extends AbstractParameters
implements Layout

FIXME - We have to remove the dependency to pluto

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

Field Summary
protected  LayoutDescription description
          TODO we should remove the description from here.
protected  String id
           
protected  String name
           
protected  Item parent
           
protected  String rendererName
           
protected  Map temporaryParameters
          The temporary parameters.
 
Fields inherited from class org.apache.cocoon.portal.layout.AbstractParameters
parameters
 
Constructor Summary
AbstractLayout()
           
 
Method Summary
protected  Object clone()
           
 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.
 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 setId(String id)
          Set the unique id of this object
 void setLayoutRendererName(String value)
           
 void setName(String string)
           
 void setParent(Item item)
           
 void setTemporaryParameter(String key, String value)
          Set the temporary parameter to a value.
 String toString()
           
 
Methods inherited from class org.apache.cocoon.portal.layout.AbstractParameters
addParameter, getCastorParameters, getParameter, getParameters, setParameter
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.portal.layout.Layout
getParameter, getParameters, setParameter
 

Field Detail

rendererName

protected String rendererName

parent

protected Item parent

name

protected String name

id

protected String id

description

protected transient LayoutDescription description
TODO we should remove the description from here.


temporaryParameters

protected Map temporaryParameters
The temporary parameters.

Constructor Detail

AbstractLayout

public AbstractLayout()
Method Detail

getName

public String getName()
Description copied from interface: Layout
The name given from the factory.

Specified by:
getName in interface Layout
Returns:
The configured name

setName

public void setName(String string)
Parameters:
string -

setDescription

public void setDescription(LayoutDescription description)
Set the layout description

Specified by:
setDescription in interface Layout

getId

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

Specified by:
getId in interface Layout
Returns:
String Unique id

setId

public void setId(String id)
Set the unique id of this object


initialize

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

Specified by:
initialize in interface Layout

getRendererName

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

Specified by:
getRendererName in interface Layout
Returns:
String The role name
See Also:
Layout.getRendererName()

setLayoutRendererName

public void setLayoutRendererName(String value)

getParent

public Item getParent()
Specified by:
getParent in interface Layout

setParent

public void setParent(Item item)
Specified by:
setParent in interface Layout

getLayoutRendererName

public String getLayoutRendererName()
Description copied from interface: Layout
Get the name of a custom Renderer for this layout.

Specified by:
getLayoutRendererName in interface Layout
Returns:
String The role name
See Also:
Layout.getLayoutRendererName()

getTemporaryParameter

public String getTemporaryParameter(String key)
Description copied from interface: Layout
Return the temporary parameter value for the given key.

Specified by:
getTemporaryParameter in interface Layout
Parameters:
key - The name of the parameter.
Returns:
The value of the parameter or null.
See Also:
Layout.getTemporaryParameter(java.lang.String)

getTemporaryParameters

public Map getTemporaryParameters()
Description copied from interface: Layout
Get the temporary parameters map. This method never returns null.

Specified by:
getTemporaryParameters in interface Layout
Returns:
A map with key value pairs.
See Also:
Layout.getTemporaryParameters()

setTemporaryParameter

public void setTemporaryParameter(String key,
                                  String value)
Description copied from interface: Layout
Set the temporary parameter to a value.

Specified by:
setTemporaryParameter in interface Layout
Parameters:
key - The name of the parameter.
value - The value.
See Also:
Layout.setTemporaryParameter(java.lang.String, java.lang.String)

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class AbstractParameters
Throws:
CloneNotSupportedException
See Also:
Object.clone()

copy

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

Specified by:
copy in interface Layout
See Also:
Layout.copy()

toString

public String toString()
See Also:
Object.toString()


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