org.apache.cocoon.portal.coplet
Class CopletData

java.lang.Object
  extended by org.apache.cocoon.portal.aspect.impl.AbstractAspectalizable
      extended by org.apache.cocoon.portal.factory.impl.AbstractProducible
          extended by org.apache.cocoon.portal.coplet.CopletData
All Implemented Interfaces:
Cloneable, Aspectalizable, Producible, DeltaApplicable

public class CopletData
extends AbstractProducible
implements DeltaApplicable

Version:
CVS $Id: CopletData.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt, Björn Lütkemeier

Field Summary
protected  String allowedRoles
           
protected  List allowedRolesList
           
protected  Map attributes
           
protected  CopletBaseData copletBaseData
           
protected  String title
           
 
Fields inherited from class org.apache.cocoon.portal.factory.impl.AbstractProducible
description, id, name
 
Fields inherited from class org.apache.cocoon.portal.aspect.impl.AbstractAspectalizable
aspectDataHandler, persistentDatas
 
Constructor Summary
CopletData()
          Constructor
 
Method Summary
 void addToAllowedRoles(String role)
           
 boolean applyDelta(Object object)
          Applies the specified delta.
protected  void buildRolesString(List fromList)
           
 boolean deltaApplied()
          Checks if a delta has been applied.
 String getAllowedRoles()
           
 List getAllowedRolesList()
          Return the list of roles that are allowed to access this coplet
 Object getAttribute(String key)
           
 Map getAttributes()
           
 CopletBaseData getCopletBaseData()
          Returns the copletBaseData.
 String getTitle()
          Returns the title.
 Object removeAttribute(String key)
           
 void removeFromAllowedRoles(String role)
           
 void setAllowedRoles(String roles)
           
 void setAttribute(String key, Object value)
           
 void setCopletBaseData(CopletBaseData copletBaseData)
          Sets the copletBaseData.
 void setTitle(String title)
          Sets the title.
 
Methods inherited from class org.apache.cocoon.portal.factory.impl.AbstractProducible
clone, getId, getName, initialize, setDescription, setId, setName
 
Methods inherited from class org.apache.cocoon.portal.aspect.impl.AbstractAspectalizable
addPersistentAspectData, getAspectData, getAspectDatas, getPersistentAspectData, isAspectSupported, setAspectData, setAspectDataHandler
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.portal.aspect.Aspectalizable
addPersistentAspectData, getAspectData, getAspectDatas, getPersistentAspectData, isAspectSupported, setAspectData, setAspectDataHandler
 

Field Detail

title

protected String title

copletBaseData

protected CopletBaseData copletBaseData

attributes

protected Map attributes

allowedRoles

protected String allowedRoles

allowedRolesList

protected transient List allowedRolesList
Constructor Detail

CopletData

public CopletData()
Constructor

Method Detail

getTitle

public String getTitle()
Returns the title.

Returns:
String

setTitle

public void setTitle(String title)
Sets the title.

Parameters:
title - The title to set

getCopletBaseData

public CopletBaseData getCopletBaseData()
Returns the copletBaseData.

Returns:
CopletBaseData

setCopletBaseData

public void setCopletBaseData(CopletBaseData copletBaseData)
Sets the copletBaseData.

Parameters:
copletBaseData - The copletBaseData to set

removeAttribute

public Object removeAttribute(String key)

getAttribute

public Object getAttribute(String key)

setAttribute

public void setAttribute(String key,
                         Object value)

getAttributes

public Map getAttributes()

applyDelta

public boolean applyDelta(Object object)
Applies the specified delta.

Specified by:
applyDelta in interface DeltaApplicable
Returns:
true if the delta could be successfully applied, false otherwise. false can be used if object references stored in maps must be replaced by the caller instead of a delta being applied.
Throws:
ClassCastException - If the object is not of the expected type.

deltaApplied

public boolean deltaApplied()
Checks if a delta has been applied.

Specified by:
deltaApplied in interface DeltaApplicable

getAllowedRoles

public String getAllowedRoles()
Returns:
Returns the allowed roles.

setAllowedRoles

public void setAllowedRoles(String roles)
Parameters:
roles - The allowed roles to set.

getAllowedRolesList

public List getAllowedRolesList()
Return the list of roles that are allowed to access this coplet

Returns:
A list of roles or null if everyone is allowed.

addToAllowedRoles

public void addToAllowedRoles(String role)

removeFromAllowedRoles

public void removeFromAllowedRoles(String role)

buildRolesString

protected void buildRolesString(List fromList)


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