org.jasig.portal.layout
Interface IUserLayout

All Known Implementing Classes:
SimpleLayout

public interface IUserLayout

An interface representing the user layout.

Version:
$Revision: 19776 $
Author:
Michael Ivanov

Field Summary
static String ROOT_NODE_NAME
          The name to use for the root node of the layout.
 
Method Summary
 boolean addLayoutEventListener(LayoutEventListener l)
          Register a layout event listener
 String findNodeId(XPathExpression xpathExpression)
          Returns a node id as resolved by the supplied XPathExpression
 String getCacheKey()
          Return a cache key, uniqly corresponding to the composition and the structure of the user layout.
 Enumeration getChildIds(String nodeId)
          Returns a list of child node Ids for a given node.
 String getId()
          Returns a layout Id associated with this manager/
 String getNextSiblingId(String nodeId)
          Determine an Id of a next sibling node.
 IUserLayoutNodeDescription getNodeDescription(String nodeId)
          Obtain a description of a node (channel or a folder) in a given user layout.
 String getNodeId(String fname)
          Returns a node id associated with the supplied functional name.
 Enumeration getNodeIds()
          Returns a list of node Ids in the layout.
 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 getRootId()
          Returns an id of the root node.
 boolean removeLayoutEventListener(LayoutEventListener l)
          Remove a registered layout event listener.
 void writeTo(ContentHandler ch)
          Writes user layout content (with appropriate markings) into a ContentHandler
 void writeTo(Document document)
          Writes user layout content (with appropriate markings) into a Document object
 void writeTo(String nodeId, ContentHandler ch)
          Writes subtree of a user layout (with appropriate markings) defined by a particular node into a ContentHandler
 void writeTo(String nodeId, Document document)
          Writes subtree of a user layout (with appropriate markings) defined by a particular node into a Document
 

Field Detail

ROOT_NODE_NAME

static final String ROOT_NODE_NAME
The name to use for the root node of the layout. This should be used with regard to rendering position within the layout tree.

See Also:
Constant Field Values
Method Detail

writeTo

void writeTo(ContentHandler ch)
             throws PortalException
Writes user layout content (with appropriate markings) into a ContentHandler

Parameters:
ch - a ContentHandler value
Throws:
PortalException - if an error occurs

writeTo

void writeTo(String nodeId,
             ContentHandler ch)
             throws PortalException
Writes subtree of a user layout (with appropriate markings) defined by a particular node into a ContentHandler

Parameters:
nodeId - a String a node determining a user layout subtree.
ch - a ContentHandler value
Throws:
PortalException - if an error occurs

writeTo

void writeTo(Document document)
             throws PortalException
Writes user layout content (with appropriate markings) into a Document object

Parameters:
document - a Document value
Throws:
PortalException - if an error occurs

writeTo

void writeTo(String nodeId,
             Document document)
             throws PortalException
Writes subtree of a user layout (with appropriate markings) defined by a particular node into a Document

Parameters:
nodeId - a String a node determining a user layout subtree.
document - a Document object
Throws:
PortalException - if an error occurs

getNodeDescription

IUserLayoutNodeDescription getNodeDescription(String nodeId)
                                              throws PortalException
Obtain a description of a node (channel or a folder) in a given user layout.

Parameters:
nodeId - a String channel subscribe id or folder id.
Returns:
an UserLayoutNodeDescription value
Throws:
PortalException - if an error occurs

getParentId

String getParentId(String nodeId)
                   throws PortalException
Returns an Id of a parent user layout node. The user layout root node always has ID="root"

Parameters:
nodeId - a String value
Returns:
a String value
Throws:
PortalException - if an error occurs

getChildIds

Enumeration getChildIds(String nodeId)
                        throws PortalException
Returns a list of child node Ids for a given node.

Parameters:
nodeId - a String value
Returns:
a Enumeration of String child node Ids.
Throws:
PortalException - if an error occurs

getNextSiblingId

String getNextSiblingId(String nodeId)
                        throws PortalException
Determine an Id of a next sibling node.

Parameters:
nodeId - a String value
Returns:
a String Id value of a next sibling node, or null if this is the last sibling.
Throws:
PortalException - if an error occurs

getPreviousSiblingId

String getPreviousSiblingId(String nodeId)
                            throws PortalException
Determine an Id of a previous sibling node.

Parameters:
nodeId - a String value
Returns:
a String Id value of a previous sibling node, or null if this is the first sibling.
Throws:
PortalException - if an error occurs

getCacheKey

String getCacheKey()
                   throws PortalException
Return a cache key, uniqly corresponding to the composition and the structure of the user layout.

Returns:
a String value
Throws:
PortalException - if an error occurs

addLayoutEventListener

boolean addLayoutEventListener(LayoutEventListener l)
Register a layout event listener

Parameters:
l - a LayoutEventListener object
Returns:
a boolean success status

removeLayoutEventListener

boolean removeLayoutEventListener(LayoutEventListener l)
Remove a registered layout event listener.

Parameters:
l - a LayoutEventListener object
Returns:
a boolean success status

getId

String getId()
Returns a layout Id associated with this manager/

Returns:
an String layout Id value;

getNodeId

String getNodeId(String fname)
                 throws PortalException
Returns a node id associated with the supplied functional name.

Parameters:
fname - the functional name to lookup
Returns:
a String subscription id
Throws:
PortalException - if an error occurs

findNodeId

String findNodeId(XPathExpression xpathExpression)
Returns a node id as resolved by the supplied XPathExpression

Parameters:
xpathExpression - The expression to execute against the layout DOM
Returns:
The ID of the resolved node, null if there is no match

getNodeIds

Enumeration getNodeIds()
                       throws PortalException
Returns a list of node Ids in the layout.

Returns:
a Enumeration of node Ids
Throws:
PortalException - if an error occurs

getRootId

String getRootId()
Returns an id of the root node.

Returns:
a String value


Copyright © 2010 Jasig. All Rights Reserved.