com.sapportals.portal.prt.pom
Interface IPortalNode

All Superinterfaces:
IEventTarget, INode, IPOMConstants, IReleasable

public interface IPortalNode
extends INode, IEventTarget

The PortalNode is by definition the root node of the Portal Object Model.


Fields inherited from interface com.sapportals.portal.prt.pom.IPOMConstants
ABOUT_MODE, ABOUT_REQUEST_EVENT, ACTION_EVENT, AFTER_CONTENT_EVENT, BEFORE_CONTENT_EVENT, COMPONENT_EVENT, COMPONENT_NODE, DEFAULT_MODE, EDIT_ACKNOWLEDGE_EVENT, EDIT_MODE, EDIT_REQUEST_EVENT, HELP_MODE, HELP_REQUEST_EVENT, LOGON_EVENT, LOGON_MODE, LOGOUT_EVENT, ON_NODE_READY_EVENT, ON_NODE_REMOVE_EVENT, ON_POM_READY_EVENT, PORTAL_NODE, PREVIEW_MODE, PREVIEW_REQUEST_EVENT, REFRESH_MODE, REFRESH_REQUEST_EVENT, REQUEST_EVENT, TEST_MODE
 
Method Summary
 IComponentNode createComponentNode(java.lang.String name, IPortalComponentContext context)
          Create a component node that refers to a Portal Component with context
 IEvent createEvent(EventType eventType, boolean bubbles)
          Creates a POM event, whose propagation cannot be canceled
 IEvent createEvent(EventType eventType, boolean bubbles, boolean cancelable)
          Creates a POM event.
 IPortalComponentEvent createPortalComponentEvent(java.lang.String name)
          Creates a portal component event.
 void fireEventOnNode(IEvent event, INode target)
          Sends an event immediately to a POM node.
 java.lang.String getNodeMark(INode node)
          Retrieves a mark of a node from the data provided by the request.
 NodeMode getNodeMode(INode node)
          Retrieves a mode of a node from the data provided by the request.
 java.lang.String getNodePath(INode node)
          Returns a path in the POM to the given node.
 IPortalComponentRequest getRequest()
          Each instances of IPortalNode is linked to an IPortalComponentRequest object.
 void postEventForNode(IEvent event, INode target)
          Posts an event for a POM node.
 
Methods inherited from interface com.sapportals.portal.prt.pom.INode
addChildNode, getChildNodes, getChildNodesByName, getComponent, getFirstChild, getLastChild, getNextSibling, getNextSiblingOfChild, getNodeMark, getNodeMode, getNodeName, getNodeType, getParentNode, getPortalNode, getPreviousSibling, getPreviousSiblingOfChild, getValue, hasChildNodes, putValue, removeChildNode, removeValue, setNodeMark, setNodeMode, setParentNode, setPortalNode
 
Methods inherited from interface com.sapportals.portal.prt.util.IReleasable
release
 
Methods inherited from interface com.sapportals.portal.prt.pom.IEventTarget
addEventListener, addEventListener, dispatchEvent, removeEventListener
 

Method Detail

createComponentNode

public IComponentNode createComponentNode(java.lang.String name,
                                          IPortalComponentContext context)
Create a component node that refers to a Portal Component with context
Parameters:
parent - The parent node of the new Component Node
name - The name of the node
context - The Portal Component Context describing the Component.
Returns:
An instance of IComponentNode

createEvent

public IEvent createEvent(EventType eventType,
                          boolean bubbles)
Creates a POM event, whose propagation cannot be canceled
Parameters:
eventType - The type of event that has to be created
bubbles - If the event can bubble or not
Returns:
An implementation of IEvent

createEvent

public IEvent createEvent(EventType eventType,
                          boolean bubbles,
                          boolean cancelable)
Creates a POM event.
Parameters:
eventType - The type of event that has to be created
bubbles - If the event can bubble or not
cancelable - If the event's propagation can be canceled
Returns:
An implementation of IEvent

createPortalComponentEvent

public IPortalComponentEvent createPortalComponentEvent(java.lang.String name)
Creates a portal component event. This event is identified by a name and can hold some data ( IPortalComponentEventData) .
It's internally managed like a POM event of type EventType.COMPONENT_EVENT.
Parameters:
name - The name identifying the event. This name can be used by listeners and can be filtered. See IEventTarget.addEventListener(com.sapportals.portal.prt.pom.EventType, com.sapportals.portal.prt.pom.IEventListener)
Returns:
 

fireEventOnNode

public void fireEventOnNode(IEvent event,
                            INode target)
Sends an event immediately to a POM node.
Note: All attached Listener of the target node will be notified.
Parameters:
event - The event to fire
target - The original target of the given event

postEventForNode

public void postEventForNode(IEvent event,
                             INode target)
Posts an event for a POM node. Posted events will be queued until the control flow returns to the core. Posts will be ignored during content assembly.
Parameters:
event - The event to fire
target - The original target of the given event

getRequest

public IPortalComponentRequest getRequest()
Each instances of IPortalNode is linked to an IPortalComponentRequest object.
Returns:
The current active request to which this node is associated.

getNodeMark

public java.lang.String getNodeMark(INode node)
Retrieves a mark of a node from the data provided by the request. This is not necessarily the current mark on that node.
Parameters:
node - The node the mark is to be retrieved for.
Returns:
The node mark for the specified node as passed on by the request, or null if no such information is available.

getNodeMode

public NodeMode getNodeMode(INode node)
Retrieves a mode of a node from the data provided by the request. This is not necessarily the current mode of that node.
Parameters:
node, - an INode
Returns:
The NodeMode for the specified node as passed on by the request, or INode.DEFAULT_MODE if no mode information where provided in the request

getNodePath

public java.lang.String getNodePath(INode node)
Returns a path in the POM to the given node. This is a request stable id of the node in the POM, under the recursive assumption that the POM tree up from here was stable.
Parameters:
node - the node in the POM to retrieve a path for
Returns:
a node path in the POM.