org.apache.jetspeed.components.portletentity
Class PortletEntityImpl

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

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, org.apache.jetspeed.aggregator.RenderTrackable

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
           
protected  long expiration
           
private  org.apache.jetspeed.om.page.Fragment fragment
           
private  ThreadLocal fragmentPortletDefinition
           
private  org.apache.jetspeed.util.JetspeedObjectID id
           
static String NO_PRINCIPAL
           
private  long oid
           
protected  Map originalValues
           
protected static org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent pac
           
protected  PrefsPreferenceSetImpl pagePreferenceSet
           
protected  Map perPrincipalPrefs
           
protected static org.apache.jetspeed.page.PageManager pm
           
private  org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite portletDefinition
           
protected  String portletName
           
private  org.apache.pluto.om.window.PortletWindowList portletWindows
           
protected static org.apache.jetspeed.request.RequestContextComponent rcc
           
protected static org.apache.jetspeed.components.portletregistry.PortletRegistry registry
           
protected  int timeoutCount
           
 
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)
           
 long getExpiration()
           
 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)
           
private  org.apache.pluto.om.common.PreferenceSet getPreferenceSetFromPage()
           
 Principal getPrincipal()
           
 int getRenderTimeoutCount()
           
 void incrementRenderTimeoutCount()
           
private  boolean isEditDefaultsMode()
           
private  void mergePreferencesSet(PrefsPreferenceSetImpl userPrefSet)
           
 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 setExpiration(long expiration)
           
 void setFragment(org.apache.jetspeed.om.page.Fragment fragment)
           
 void setId(String id)
           
 void setPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition composite)
           setPortletDefinition
 void setRenderTimeoutCount(int timeoutCount)
           
 void store()
           store
 void store(Principal principal)
           
private  void storeToPage()
           
 void success()
           
 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

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

rcc

protected static org.apache.jetspeed.request.RequestContextComponent rcc

pm

protected static org.apache.jetspeed.page.PageManager pm

pagePreferenceSet

protected PrefsPreferenceSetImpl pagePreferenceSet

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

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

fragmentPortletDefinition

private ThreadLocal fragmentPortletDefinition

timeoutCount

protected transient int timeoutCount

expiration

protected transient long expiration

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)

getPreferenceSetFromPage

private org.apache.pluto.om.common.PreferenceSet getPreferenceSetFromPage()

mergePreferencesSet

private void mergePreferencesSet(PrefsPreferenceSetImpl userPrefSet)
                          throws BackingStoreException
Throws:
BackingStoreException

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

storeToPage

private void storeToPage()
                  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()
Overrides:
toString in class Object

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.

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

getRenderTimeoutCount

public int getRenderTimeoutCount()
Specified by:
getRenderTimeoutCount in interface org.apache.jetspeed.aggregator.RenderTrackable

incrementRenderTimeoutCount

public void incrementRenderTimeoutCount()
Specified by:
incrementRenderTimeoutCount in interface org.apache.jetspeed.aggregator.RenderTrackable

setExpiration

public void setExpiration(long expiration)
Specified by:
setExpiration in interface org.apache.jetspeed.aggregator.RenderTrackable

getExpiration

public long getExpiration()
Specified by:
getExpiration in interface org.apache.jetspeed.aggregator.RenderTrackable

success

public void success()
Specified by:
success in interface org.apache.jetspeed.aggregator.RenderTrackable

setRenderTimeoutCount

public void setRenderTimeoutCount(int timeoutCount)
Specified by:
setRenderTimeoutCount in interface org.apache.jetspeed.aggregator.RenderTrackable

isEditDefaultsMode

private boolean isEditDefaultsMode()


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