|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.layout.TransientUserLayoutManagerWrapper
public class TransientUserLayoutManagerWrapper
Wraps IUserLayoutManager interface to provide ability to
incorporate channels into a user layout that are not part of
their layout structure (persistent).
The channels are incorporated upon request (functional name)
and remain part of the layout structure only as long as they
are the target channel.
| Field Summary | |
|---|---|
static String |
SUBSCRIBE_PREFIX
|
static String |
TRANSIENT_FOLDER_ID
|
| Constructor Summary | |
|---|---|
TransientUserLayoutManagerWrapper(IUserLayoutManager manager)
|
|
| Method Summary | |
|---|---|
boolean |
addLayoutEventListener(LayoutEventListener l)
Register a layout event listener |
IUserLayoutNodeDescription |
addNode(IUserLayoutNodeDescription node,
String parentId,
String nextSiblingId)
Add a new node to a current user layout. |
boolean |
canAddNode(IUserLayoutNodeDescription node,
String parentId,
String nextSiblingId)
Test if a particular node can be added at a given location. |
boolean |
canDeleteNode(String nodeId)
Tests if a particular node can be deleted. |
boolean |
canMoveNode(String nodeId,
String parentId,
String nextSiblingId)
Test if a particular node can be moved to a given location. |
boolean |
canUpdateNode(IUserLayoutNodeDescription node)
Test if a certain node can be updated. |
IUserLayoutNodeDescription |
createNodeDescription(int nodeType)
A factory method to create an empty IUserLayoutNodeDescription instance |
boolean |
deleteNode(String nodeId)
Delete a node (folder or a channel) from a user layout. |
String |
getCacheKey()
Return a cache key, uniqly corresponding to the composition and the structure of the user layout. |
protected IChannelDefinition |
getChannelDefinition(String subId)
Given a subscribe Id, return a ChannelDefinition. |
Enumeration |
getChildIds(String nodeId)
Returns a list of child node Ids for a given node. |
int |
getDepth(String nodeId)
Returns the depth of a node in the layout tree. |
String |
getFname(String subId)
Given a subscribe Id, return its functional name. |
String |
getFocusedId()
Get the current focused layout subscribe id. |
int |
getLayoutId()
Returns a layout Id associated with this manager/ |
String |
getNextSiblingId(String nodeId)
Determine an Id of a next sibling node. |
IUserLayoutNodeDescription |
getNode(String nodeId)
Obtain a description of a node (channel or a folder) in a given user layout. |
IUserLayoutManager |
getOriginalLayoutManager()
|
String |
getParentId(String nodeId)
Returns an Id of a parent user layout node. |
String |
getPreviousSiblingId(String nodeId)
Determine an Id of a previous sibling node. |
String |
getRootFolderId()
Returns an id of the root folder. |
String |
getSubscribeId(String fname)
Given an functional name, return its subscribe id. |
IUserLayout |
getUserLayout()
Gets a user layout (with appropriate markings). |
void |
getUserLayout(ContentHandler ch)
Output user layout (with appropriate markings) into a ContentHandler |
void |
getUserLayout(String nodeId,
ContentHandler ch)
Output subtree of a user layout (with appropriate markings) defined by a particular node into a ContentHandler |
Document |
getUserLayoutDOM()
|
void |
loadUserLayout()
Calls IUserLayoutManager.loadUserLayout(boolean) passing false. |
void |
loadUserLayout(boolean reload)
Signal manager to load a user layout. |
void |
markAddTargets(IUserLayoutNodeDescription node)
Ask manager to output markings at the locations where a given node can be added. |
void |
markMoveTargets(String nodeId)
Ask manager to output markings at the locations where a given node can be moved. |
boolean |
moveNode(String nodeId,
String parentId,
String nextSiblingId)
Move a node (channel or folder) from one location to another. |
void |
processLayoutParameters(IPerson person,
UserPreferences userPrefs,
HttpServletRequest req)
Delegates to the wrapped layout manager's implementation. |
boolean |
removeLayoutEventListener(LayoutEventListener l)
Remove a registered layout event listener. |
void |
saveUserLayout()
Signal manager to persist user layout to a database |
void |
setFocusedId(String subscribeId)
Set the current focused layout subscribe id. |
void |
setLayoutStore(IUserLayoutStore ls)
Set a user layout store implementation. |
void |
setOriginalLayoutManager(IUserLayoutManager man)
|
void |
setUserLayout(IUserLayout userLayout)
Sets a user layout (with appropriate markings). |
boolean |
updateNode(IUserLayoutNodeDescription node)
Update a given node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TRANSIENT_FOLDER_ID
public static final String SUBSCRIBE_PREFIX
| Constructor Detail |
|---|
public TransientUserLayoutManagerWrapper(IUserLayoutManager manager)
throws PortalException
PortalException| Method Detail |
|---|
public IUserLayoutManager getOriginalLayoutManager()
throws PortalException
PortalException
public void setOriginalLayoutManager(IUserLayoutManager man)
throws PortalException
PortalException
public IUserLayout getUserLayout()
throws PortalException
IUserLayoutManager
getUserLayout in interface IUserLayoutManagerPortalException - if an error occurs
public void setUserLayout(IUserLayout userLayout)
throws PortalException
IUserLayoutManager
setUserLayout in interface IUserLayoutManageruserLayout - the user layout
PortalException - if an error occurs
public void getUserLayout(ContentHandler ch)
throws PortalException
IUserLayoutManagerContentHandler
getUserLayout in interface IUserLayoutManagerch - a ContentHandler value
PortalException - if an error occurs
public void getUserLayout(String nodeId,
ContentHandler ch)
throws PortalException
IUserLayoutManagerContentHandler
getUserLayout in interface IUserLayoutManagernodeId - a String a node determining a user layout subtree.ch - a ContentHandler value
PortalException - if an error occurspublic void setLayoutStore(IUserLayoutStore ls)
IUserLayoutManager
setLayoutStore in interface IUserLayoutManagerls - an IUserLayoutStore value
public Document getUserLayoutDOM()
throws PortalException
getUserLayoutDOM in interface IUserLayoutManagerPortalException
public void loadUserLayout()
throws PortalException
IUserLayoutManagerIUserLayoutManager.loadUserLayout(boolean) passing false.
loadUserLayout in interface IUserLayoutManagerPortalException
public void loadUserLayout(boolean reload)
throws PortalException
IUserLayoutManager
loadUserLayout in interface IUserLayoutManagerreload - If true the reload will be forced, purging any cached data.
PortalException - PortalException if an error occurs
public void saveUserLayout()
throws PortalException
IUserLayoutManager
saveUserLayout in interface IUserLayoutManagerPortalException - if an error occurs
public IUserLayoutNodeDescription getNode(String nodeId)
throws PortalException
IUserLayoutManager
getNode in interface IUserLayoutManagernodeId - a String channel subscribe id or folder id.
UserLayoutNodeDescription value
PortalException - if an error occurs
public IUserLayoutNodeDescription addNode(IUserLayoutNodeDescription node,
String parentId,
String nextSiblingId)
throws PortalException
IUserLayoutManager
addNode in interface IUserLayoutManagernode - an UserLayoutNodeDescription value of a node to be added (Id doesn't have to be set)parentId - a String id of a folder to which the new node (channel or folder) should be added.nextSiblingId - a String an id of a sibling node (channel or folder) prior to which the new node should be inserted.
UserLayoutNodeDescription value with a newly determined Id.
PortalException - if an error occurs
public boolean moveNode(String nodeId,
String parentId,
String nextSiblingId)
throws PortalException
IUserLayoutManager
moveNode in interface IUserLayoutManagernodeId - a String value of a node Id.parentId - a String id of a folder to which the node should be moved.nextSiblingId - a String id of a sibling node (folder or channel) prior to which the node should be placed. (null to append at the end)
boolean value noting if the operation was successful
PortalException - if an error occurs
public boolean deleteNode(String nodeId)
throws PortalException
IUserLayoutManager
deleteNode in interface IUserLayoutManagernodeId - a String id (channel subscribe id or folder id)
boolean value noting if the operation was successful
PortalException - if an error occurs
public boolean updateNode(IUserLayoutNodeDescription node)
throws PortalException
IUserLayoutManager
updateNode in interface IUserLayoutManagernode - an UserLayoutNodeDescription value with a valid id.
boolean value noting if the operation was successful
PortalException - if an error occurs
public boolean canAddNode(IUserLayoutNodeDescription node,
String parentId,
String nextSiblingId)
throws PortalException
IUserLayoutManager
canAddNode in interface IUserLayoutManagernode - an UserLayoutNodeDescription value describing the node to be added.parentId - a String id of a parent to which the node to be added.nextSiblingId - a String id of a sibling prior to which the node to be inserted. (null to append at the end)
boolean value
PortalException - if an error occurs
public boolean canMoveNode(String nodeId,
String parentId,
String nextSiblingId)
throws PortalException
IUserLayoutManager
canMoveNode in interface IUserLayoutManagernodeId - a String id of a node to be moved.parentId - a String id of a parent to which the node to be moved.nextSiblingId - a String id of a sibling prior to which the node is to be inserted (null to append at the end)
boolean value
PortalException - if an error occurs
public boolean canDeleteNode(String nodeId)
throws PortalException
IUserLayoutManager
canDeleteNode in interface IUserLayoutManagernodeId - a String node id.
boolean value
PortalException - if an error occurs
public boolean canUpdateNode(IUserLayoutNodeDescription node)
throws PortalException
IUserLayoutManager
canUpdateNode in interface IUserLayoutManagernode - a IUserLayoutNodeDescription node id.
boolean value
PortalException - if an error occurs
public void markAddTargets(IUserLayoutNodeDescription node)
throws PortalException
IUserLayoutManagergetUserLayout method is called.
markAddTargets in interface IUserLayoutManagernode - an UserLayoutNodeDescription value or null to stop outputting add markings.
PortalException - if an error occurs
public void markMoveTargets(String nodeId)
throws PortalException
IUserLayoutManagergetUserLayout method is called.
markMoveTargets in interface IUserLayoutManagernodeId - a String value or null to stop outputting move markings.
PortalException - if an error occurs
public String getParentId(String nodeId)
throws PortalException
IUserLayoutManagerIUserLayout.ROOT_NODE_NAME
getParentId in interface IUserLayoutManagernodeId - a String value
String value
PortalException - if an error occurs
public Enumeration getChildIds(String nodeId)
throws PortalException
IUserLayoutManager
getChildIds in interface IUserLayoutManagernodeId - a String value
List of String child node Ids.
PortalException - if an error occurs
public String getNextSiblingId(String nodeId)
throws PortalException
IUserLayoutManager
getNextSiblingId in interface IUserLayoutManagernodeId - a String value
String Id value of a next sibling node, or null if this is the last sibling.
PortalException - if an error occurs
public String getPreviousSiblingId(String nodeId)
throws PortalException
IUserLayoutManager
getPreviousSiblingId in interface IUserLayoutManagernodeId - a String value
String Id value of a previous sibling node, or null if this is the first sibling.
PortalException - if an error occurs
public String getCacheKey()
throws PortalException
IUserLayoutManager
getCacheKey in interface IUserLayoutManagerString value
PortalException - if an error occurspublic int getLayoutId()
IUserLayoutManager
getLayoutId in interface IUserLayoutManagerint layout Id value;public String getRootFolderId()
IUserLayoutManager
getRootFolderId in interface IUserLayoutManagerString value
public int getDepth(String nodeId)
throws PortalException
getDepth in interface IUserLayoutManagernodeId - a String value
PortalException - if an error occurs
public IUserLayoutNodeDescription createNodeDescription(int nodeType)
throws PortalException
IUserLayoutManagerIUserLayoutNodeDescription instance
createNodeDescription in interface IUserLayoutManagernodeType - a node type constant from IUserLayoutNodeDescription interface
IUserLayoutNodeDescription instance
PortalException - if the error occurs.public boolean addLayoutEventListener(LayoutEventListener l)
IUserLayoutManager
addLayoutEventListener in interface IUserLayoutManagerl - a LayoutEventListener object
boolean success statuspublic boolean removeLayoutEventListener(LayoutEventListener l)
IUserLayoutManager
removeLayoutEventListener in interface IUserLayoutManagerl - a LayoutEventListener object
boolean success status
protected IChannelDefinition getChannelDefinition(String subId)
throws PortalException
subId - the subscribe id for the ChannelDefinition.
ChannelDefinition
PortalExceptionpublic String getFname(String subId)
subId - the subscribe id to lookup
public String getSubscribeId(String fname)
throws PortalException
getSubscribeId in interface IUserLayoutManagerfname - the functional name to lookup
PortalExceptionpublic String getFocusedId()
public void setFocusedId(String subscribeId)
subscribeId - Id to be set as focused.
public void processLayoutParameters(IPerson person,
UserPreferences userPrefs,
HttpServletRequest req)
throws PortalException
processLayoutParameters in interface IUserLayoutManagerPortalException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||