org.apache.jetspeed.components.portletentity
Class PortletEntityImpl

java.lang.Object
  extended byorg.apache.jetspeed.components.portletentity.PortletEntityImpl
All Implemented Interfaces:
org.apache.pluto.om.Controller, org.apache.pluto.om.Model, org.apache.jetspeed.om.common.portlet.MutablePortletEntity, org.apache.pluto.om.entity.PortletEntity, org.apache.pluto.om.entity.PortletEntityCtrl, org.apache.jetspeed.om.common.portlet.PrincipalAware, org.apache.jetspeed.components.persistence.store.RemovalAware

public class PortletEntityImpl
extends Object
implements org.apache.jetspeed.om.common.portlet.MutablePortletEntity, org.apache.jetspeed.om.common.portlet.PrincipalAware, org.apache.jetspeed.components.persistence.store.RemovalAware

Portlet Entity default implementation.

Version:
$Id: PortletEntityImpl.java,v 1.9 2005/04/29 13:59:08 weaver Exp $
Author:
David Sean Taylor , Scott T. Weaver

Nested Class Summary
(package private)  class PortletEntityImpl.PortletEntityUserPrincipal
           
 
Field Summary
private  org.apache.pluto.om.entity.PortletApplicationEntity applicationEntity
           
protected  String appName
           
private  boolean dirty
           
static String ENTITY_DEFAULT_PRINCIPAL
           
private  org.apache.jetspeed.om.page.Fragment fragment
           
private  org.apache.jetspeed.util.JetspeedObjectID id
           
private static org.apache.commons.logging.Log log
           
private  org.apache.pluto.om.entity.PortletEntity modifiedObject
           
static String NO_PRINCIPAL
           
private  long oid
           
protected  List originalPreferences
           
protected  Map originalValues
           
protected static org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent pac
           
protected  Map perPrincipalPrefs
           
private  org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite portletDefinition
           
private  long portletId
           
protected  String portletName
           
private  org.apache.pluto.om.window.PortletWindowList portletWindows
           
protected  ThreadLocal principalRef
           
protected static org.apache.jetspeed.components.portletregistry.PortletRegistry registry
           
 
Fields inherited from interface org.apache.jetspeed.om.common.portlet.MutablePortletEntity
PORTLET_ENTITY_ROOT
 
Constructor Summary
PortletEntityImpl()
           
PortletEntityImpl(org.apache.jetspeed.om.page.Fragment fragment)
           
 
Method Summary
protected  void backupValues(org.apache.pluto.om.common.PreferenceSet preferenceSet)
           backupValues
 org.apache.pluto.om.common.Description getDescription(Locale arg0)
           
 org.apache.pluto.om.common.ObjectID getId()
           
 long getOid()
           
 org.apache.pluto.om.entity.PortletApplicationEntity getPortletApplicationEntity()
           
 org.apache.pluto.om.portlet.PortletDefinition getPortletDefinition()
           
 String getPortletUniqueName()
           
 org.apache.pluto.om.window.PortletWindowList getPortletWindowList()
           
 org.apache.pluto.om.common.PreferenceSet getPreferenceSet()
           getPreferenceSet
 org.apache.pluto.om.common.PreferenceSet getPreferenceSet(Principal principal)
           
 Principal getPrincipal()
           
 void postRemoval(org.apache.jetspeed.components.persistence.store.PersistenceStore store)
           postRemoval
 void preRemoval(org.apache.jetspeed.components.persistence.store.PersistenceStore store)
           preRemoval
 void reset()
           reset
 void setFragment(org.apache.jetspeed.om.page.Fragment fragment)
           
 void setId(String id)
           
 void setPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition composite)
           setPortletDefinition
protected  void setPrincipal(Principal principal)
           
 void store()
           store
 void store(Principal principal)
           
 String toString()
           
 String toString(int indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

private long oid

portletId

private long portletId

id

private org.apache.jetspeed.util.JetspeedObjectID id

pac

protected static org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent pac

registry

protected static org.apache.jetspeed.components.portletregistry.PortletRegistry registry

log

private static final org.apache.commons.logging.Log log

originalPreferences

protected List originalPreferences

perPrincipalPrefs

protected Map perPrincipalPrefs

originalValues

protected Map originalValues

applicationEntity

private org.apache.pluto.om.entity.PortletApplicationEntity applicationEntity

portletWindows

private org.apache.pluto.om.window.PortletWindowList portletWindows

modifiedObject

private org.apache.pluto.om.entity.PortletEntity modifiedObject

portletDefinition

private org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite portletDefinition

portletName

protected String portletName

appName

protected String appName

dirty

private boolean dirty

fragment

private org.apache.jetspeed.om.page.Fragment fragment

principalRef

protected ThreadLocal principalRef

NO_PRINCIPAL

public static final String NO_PRINCIPAL
See Also:
Constant Field Values

ENTITY_DEFAULT_PRINCIPAL

public static final String ENTITY_DEFAULT_PRINCIPAL
See Also:
Constant Field Values
Constructor Detail

PortletEntityImpl

public PortletEntityImpl(org.apache.jetspeed.om.page.Fragment fragment)

PortletEntityImpl

public PortletEntityImpl()
Method Detail

getId

public org.apache.pluto.om.common.ObjectID getId()
Specified by:
getId in interface org.apache.pluto.om.entity.PortletEntity

getOid

public long getOid()

setId

public void setId(String id)
Specified by:
setId in interface org.apache.pluto.om.entity.PortletEntityCtrl

getPreferenceSet

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

getPreferenceSet

Specified by:
getPreferenceSet in interface org.apache.pluto.om.entity.PortletEntity
Returns:
See Also:
PortletEntity.getPreferenceSet()

getPreferenceSet

public org.apache.pluto.om.common.PreferenceSet getPreferenceSet(Principal principal)

backupValues

protected void backupValues(org.apache.pluto.om.common.PreferenceSet preferenceSet)

backupValues


getPortletDefinition

public org.apache.pluto.om.portlet.PortletDefinition getPortletDefinition()
Specified by:
getPortletDefinition in interface org.apache.pluto.om.entity.PortletEntity

getPortletApplicationEntity

public org.apache.pluto.om.entity.PortletApplicationEntity getPortletApplicationEntity()
Specified by:
getPortletApplicationEntity in interface org.apache.pluto.om.entity.PortletEntity

getPortletWindowList

public org.apache.pluto.om.window.PortletWindowList getPortletWindowList()
Specified by:
getPortletWindowList in interface org.apache.pluto.om.entity.PortletEntity

store

public void store()
           throws IOException

store

Specified by:
store in interface org.apache.pluto.om.entity.PortletEntityCtrl
Throws:
IOException

store

public void store(Principal principal)
           throws IOException
Throws:
IOException

reset

public void reset()
           throws IOException

reset

Specified by:
reset in interface org.apache.pluto.om.entity.PortletEntityCtrl
Throws:
IOException

toString

public String toString()

toString

public String toString(int indent)

getDescription

public org.apache.pluto.om.common.Description getDescription(Locale arg0)
Specified by:
getDescription in interface org.apache.pluto.om.entity.PortletEntity
See Also:
PortletEntity.getDescription(java.util.Locale)

setPortletDefinition

public void setPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition composite)

setPortletDefinition

Specified by:
setPortletDefinition in interface org.apache.pluto.om.entity.PortletEntityCtrl
Parameters:
composite -

getPrincipal

public Principal getPrincipal()
Specified by:
getPrincipal in interface org.apache.jetspeed.om.common.portlet.PrincipalAware
Returns:
Returns the principal.

setPrincipal

protected void setPrincipal(Principal principal)
Parameters:
principal - The principal to set.

postRemoval

public void postRemoval(org.apache.jetspeed.components.persistence.store.PersistenceStore store)

postRemoval

Specified by:
postRemoval in interface org.apache.jetspeed.components.persistence.store.RemovalAware
Parameters:
store -
Throws:
{@link - org.apache.jetspeed.persistence.store.PersistenceStoreRuntimeExcpetion} if the removal of the Preference related to this entity fails
See Also:
RemovalAware.postRemoval(org.apache.jetspeed.components.persistence.store.PersistenceStore)

preRemoval

public void preRemoval(org.apache.jetspeed.components.persistence.store.PersistenceStore store)

preRemoval

not implemented.

Specified by:
preRemoval in interface org.apache.jetspeed.components.persistence.store.RemovalAware
Parameters:
store -
See Also:
RemovalAware.preRemoval(org.apache.jetspeed.components.persistence.store.PersistenceStore)

getPortletUniqueName

public String getPortletUniqueName()
Specified by:
getPortletUniqueName in interface org.apache.jetspeed.om.common.portlet.MutablePortletEntity

setFragment

public void setFragment(org.apache.jetspeed.om.page.Fragment fragment)
Specified by:
setFragment in interface org.apache.jetspeed.om.common.portlet.MutablePortletEntity


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.