|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.portlet.dao.trans.TransientPortletEntityDao
public class TransientPortletEntityDao
Handles entity management for transient portlets, portlets that aren't permanant parts of the user's layout. Portlet
preferences are still persisted but are associated with a transient rendering of the portlet. Transient portlets are
detected by checking the channel subscribe ID against the TransientUserLayoutManagerWrapper.SUBSCRIBE_PREFIX
prefix.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
|---|---|
TransientPortletEntityDao()
|
|
| Method Summary | |
|---|---|
IPortletEntity |
createPortletEntity(IPortletDefinitionId portletDefinitionId,
String channelSubscribeId,
int userId)
Creates, initializes and persists a new IPortletEntity based on the specified IPortletDefinitionId,
channel subscribe id and user id. |
void |
deletePortletEntity(IPortletEntity portletEntity)
Removes the specified IPortletEntity from the persistent store. |
protected String |
determineDatabaseChannelSubscribeId(String channelSubscribeId)
|
protected String |
getDatabaseChannelSubscribeId(IPortletDefinitionId portletDefinitionId)
|
IPortletEntityDao |
getDelegatePortletEntityDao()
|
IPortalRequestUtils |
getPortalRequestUtils()
|
IPortletDefinitionRegistry |
getPortletDefinitionRegistry()
|
Set<IPortletEntity> |
getPortletEntities(IPortletDefinitionId portletDefinitionId)
Get all IPortletEntitys based on the specified IPortletDefinitionId. |
Set<IPortletEntity> |
getPortletEntitiesForUser(int userId)
Get all IPortletEntitys that exist for the specified user id. |
IPortletEntity |
getPortletEntity(IPortletEntityId portletEntityId)
Get a IPortletEntity for the specified IPortletEntityId. |
IPortletEntity |
getPortletEntity(String channelSubscribeId,
int userId)
Get a IPortletEntity for the specified channel subscribe id and user id. |
IUserInstanceManager |
getUserInstanceManager()
|
protected IUserLayoutManager |
getUserLayoutManager()
|
void |
setDelegatePortletEntityDao(IPortletEntityDao delegatePortletEntityDao)
The IPortletEntityDao to delegate calls to for actualy persistence |
void |
setPortalRequestUtils(IPortalRequestUtils portalRequestUtils)
Used to get access to the current portal request |
void |
setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefinitionRegistry)
Registry for looking up data related to portlet definitions |
void |
setUserInstanceManager(IUserInstanceManager userInstanceManager)
Used to get access to the user's layout manager |
protected IPortletEntity |
unwrapEntity(IPortletEntity portletEntity)
Returns the unwrapped entity if it is an instance of TransientPortletEntity. |
void |
updatePortletEntity(IPortletEntity portletEntity)
Persists changes to a IPortletEntity. |
protected Set<IPortletEntity> |
wrapEntities(Set<IPortletEntity> portletEntities)
Calles wrapEntity(IPortletEntity) on each entry in the Set, wrap calls that return null result in the
entitiy being dropped from the returned Set |
protected IPortletEntity |
wrapEntity(IPortletEntity portletEntity)
Adds a TransientPortletEntity wrapper to the portletEntity if it is needed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public TransientPortletEntityDao()
| Method Detail |
|---|
public IPortletEntityDao getDelegatePortletEntityDao()
public void setDelegatePortletEntityDao(IPortletEntityDao delegatePortletEntityDao)
public IPortletDefinitionRegistry getPortletDefinitionRegistry()
public void setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefinitionRegistry)
public IUserInstanceManager getUserInstanceManager()
public void setUserInstanceManager(IUserInstanceManager userInstanceManager)
public IPortalRequestUtils getPortalRequestUtils()
public void setPortalRequestUtils(IPortalRequestUtils portalRequestUtils)
public IPortletEntity createPortletEntity(IPortletDefinitionId portletDefinitionId,
String channelSubscribeId,
int userId)
IPortletEntityDaoIPortletEntity based on the specified IPortletDefinitionId,
channel subscribe id and user id.
createPortletEntity in interface IPortletEntityDaoportletDefinitionId - The id of the IPortletDefinition that is the parent of the new entitychannelSubscribeId - The subscription id for the channel the entity is based on in the user's layout.userId - The id of the user the entity is for.
public void deletePortletEntity(IPortletEntity portletEntity)
IPortletEntityDaoIPortletEntity from the persistent store.
deletePortletEntity in interface IPortletEntityDaoportletEntity - The entity to remove.public Set<IPortletEntity> getPortletEntities(IPortletDefinitionId portletDefinitionId)
IPortletEntityDaoIPortletEntitys based on the specified IPortletDefinitionId.
getPortletEntities in interface IPortletEntityDaoportletDefinitionId - The ID of the parent portlet definition
public Set<IPortletEntity> getPortletEntitiesForUser(int userId)
IPortletEntityDaoIPortletEntitys that exist for the specified user id. (From IPerson.getID().
getPortletEntitiesForUser in interface IPortletEntityDaouserId - The id of the user to get the entities for.
public IPortletEntity getPortletEntity(IPortletEntityId portletEntityId)
IPortletEntityDaoIPortletEntity for the specified IPortletEntityId.
getPortletEntity in interface IPortletEntityDaoportletEntityId - The id to get the entity for.
public IPortletEntity getPortletEntity(String channelSubscribeId,
int userId)
IPortletEntityDaoIPortletEntity for the specified channel subscribe id and user id.
getPortletEntity in interface IPortletEntityDaochannelSubscribeId - The channel subscription id from the user's layout to get the entity foruserId - The user id to get the entity for
public void updatePortletEntity(IPortletEntity portletEntity)
IPortletEntityDaoIPortletEntity.
updatePortletEntity in interface IPortletEntityDaoportletEntity - The portlet entity to store the changes forprotected IPortletEntity unwrapEntity(IPortletEntity portletEntity)
protected IPortletEntity wrapEntity(IPortletEntity portletEntity)
protected Set<IPortletEntity> wrapEntities(Set<IPortletEntity> portletEntities)
wrapEntity(IPortletEntity) on each entry in the Set, wrap calls that return null result in the
entitiy being dropped from the returned Set
protected String determineDatabaseChannelSubscribeId(String channelSubscribeId)
protected String getDatabaseChannelSubscribeId(IPortletDefinitionId portletDefinitionId)
protected IUserLayoutManager getUserLayoutManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||