org.apache.cocoon.portal.coplet
Class CopletInstanceData

java.lang.Object
  extended byorg.apache.cocoon.portal.coplet.CopletInstanceData

public final class CopletInstanceData
extends Object

A coplet instance data describes an instance of a coplet. Sizing: A coplet can have different sizes: SIZE_NORMAL - this is the normal size, it means that the coplet shares it's space with other coplets. SIZE_MINIMIZED - the coplet is minimized. Usually in this state only the title of the coplet is rendered. SIZE_FULLSCREEN - the coplet is the only coplet on the screen. SIZE_MAXPAGE - the coplet gets the most available space, but still shares its space with other coplets, e.g. a navigation etc. TODO - Remove dependency to pluto

Version:
$Id: CopletInstanceData.java 328453 2005-10-25 19:08:53Z cziegeler $

Field Summary
protected  Map attributes
          Persistet attributes.
protected  CopletData copletData
           
protected  String id
           
protected  PreferenceSetImpl preferences
          Portlet preferences.
protected  int size
          The size of the coplet.
static int SIZE_FULLSCREEN
           
static int SIZE_MAXPAGED
           
static int SIZE_MINIMIZED
           
static int SIZE_NORMAL
           
protected  Map temporaryAttributes
          Temporary attributes are not persisted.
protected  String title
          The title of the coplet.
 
Constructor Summary
CopletInstanceData()
          Constructor.
CopletInstanceData(String id)
          Constructor.
 
Method Summary
 void addAttribute(AttributedMapItem item)
           
protected  Object clone()
           
 CopletInstanceData copy()
           
 Object getAttribute(String key)
           
 Map getAttributes()
           
 Collection getCastorAttributes()
           
 org.apache.pluto.om.common.PreferenceSet getCastorPreferences()
           
 CopletData getCopletData()
           
 String getId()
          The unique identifier of this instance.
 String getInstanceTitle()
           
 org.apache.pluto.om.common.PreferenceSet getPreferences()
           
 int getSize()
          Return the actual size of this coplet.
 Object getTemporaryAttribute(String key)
           
 Map getTemporaryAttributes()
           
 String getTitle()
           
 Object removeAttribute(String key)
           
 Object removeTemporaryAttribute(String key)
           
 void setAttribute(String key, Object value)
           
 void setCastorPreferences(org.apache.pluto.om.common.PreferenceSet castorPreferences)
           
 void setCopletData(CopletData copletData)
          Sets the copletData.
 void setPreferences(PreferenceSetImpl preferences)
           
 void setSize(int size)
          Set the size of this coplet.
 void setTemporaryAttribute(String key, Object value)
           
 void setTitle(String title)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIZE_MINIMIZED

public static final int SIZE_MINIMIZED
See Also:
Constant Field Values

SIZE_NORMAL

public static final int SIZE_NORMAL
See Also:
Constant Field Values

SIZE_MAXPAGED

public static final int SIZE_MAXPAGED
See Also:
Constant Field Values

SIZE_FULLSCREEN

public static final int SIZE_FULLSCREEN
See Also:
Constant Field Values

id

protected final String id

copletData

protected CopletData copletData

attributes

protected Map attributes
Persistet attributes.


temporaryAttributes

protected Map temporaryAttributes
Temporary attributes are not persisted.


preferences

protected PreferenceSetImpl preferences
Portlet preferences.


title

protected String title
The title of the coplet.


size

protected int size
The size of the coplet.

Constructor Detail

CopletInstanceData

public CopletInstanceData()
Constructor.


CopletInstanceData

public CopletInstanceData(String id)
Constructor.

Method Detail

getId

public String getId()
The unique identifier of this instance.

Returns:
The unique identifer.

getCopletData

public CopletData getCopletData()
Returns:
CopletData

setCopletData

public void setCopletData(CopletData copletData)
Sets the copletData.

Parameters:
copletData - The copletData to set

getAttribute

public Object getAttribute(String key)

setAttribute

public void setAttribute(String key,
                         Object value)

removeAttribute

public Object removeAttribute(String key)

getAttributes

public Map getAttributes()

getCastorAttributes

public final Collection getCastorAttributes()

addAttribute

public void addAttribute(AttributedMapItem item)

getTemporaryAttribute

public Object getTemporaryAttribute(String key)

setTemporaryAttribute

public void setTemporaryAttribute(String key,
                                  Object value)

removeTemporaryAttribute

public Object removeTemporaryAttribute(String key)

getTemporaryAttributes

public Map getTemporaryAttributes()

getTitle

public String getTitle()

getInstanceTitle

public String getInstanceTitle()

setTitle

public void setTitle(String title)

setPreferences

public void setPreferences(PreferenceSetImpl preferences)

getPreferences

public org.apache.pluto.om.common.PreferenceSet getPreferences()

getCastorPreferences

public org.apache.pluto.om.common.PreferenceSet getCastorPreferences()

setCastorPreferences

public void setCastorPreferences(org.apache.pluto.om.common.PreferenceSet castorPreferences)

clone

protected Object clone()
                throws CloneNotSupportedException
Throws:
CloneNotSupportedException
See Also:
Object.clone()

copy

public CopletInstanceData copy()

getSize

public int getSize()
Return the actual size of this coplet.


setSize

public void setSize(int size)
Set the size of this coplet.


toString

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


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