Oracle

com.bea.console.utils
Class NavTreeExtensionEvent

java.lang.Object
  extended by PortletEvent
      extended by com.bea.console.utils.NavTreeExtensionEvent

public class NavTreeExtensionEvent
extends PortletEvent

This class represents an event that is sent to a listener in the navigation tree portlet. The listener adds or replaces nodes in the navigation tree based on information in this event.

Invoke the constructors for this class from an implementation of NavTreeExtensionBacking.getTreeExtension(PageBackingContext, String). A portal control invokes this method to add itself to the navigation tree. The PageBackingContext and String values that it passes can be used in the constructors for this class.

See Also:
com.bea.netuix.servlets.controls.page.PageBackingContext

Field Summary
static int APPEND_ACTION
          Adds a node to the navigation tree.
static int REPLACE_ACTION
          Replaces a node in the navigation tree.
 
Constructor Summary
NavTreeExtensionEvent(String pageLabel, String url)
          Deprecated. 10.3.0.0
NavTreeExtensionEvent(String pageLabel, String url, String parentPath, TreeNode childNodes)
          Deprecated. 10.3.0.0
NavTreeExtensionEvent(String pageLabel, String url, String parentPath, TreeNode parent, int action)
          Deprecated. 10.3.0.0
NavTreeExtensionEvent(String parentPath, TreeNode parent, int action)
          Constructs a new NavTreeExtensionEvent that can append or replace a node or node tree in a specified location.
 
Method Summary
 int getAction()
          Indicates whether the navigation tree extension adds to the navigation tree or replaces an existing node.
 String getExtensionUrl()
          Deprecated. 10.3.0.0
 String getPageLabel()
          Deprecated. 10.3.0.0
 TreeNode getParent()
          Returns the parent TreeNode for the extension that this event represents.
 String getParentPath()
          Returns a String that describes the path to the parent node in the navigation tree for the extension that this event represents.
 void setAction(int action)
          Whether the navigation tree extension adds to the navigation tree or replaces an existing node.
 void setExtensionUrl(String extensionUrl)
          Deprecated. 10.3.0.0
 void setPageLabel(String pageLabel)
          Deprecated. 10.3.0.0
 void setParent(TreeNode parent)
          Sets the parent TreeNode for the extension that this event represents.
 void setParentPath(String parentPath)
          Sets the path to a parent node in the navigation tree for the extension that this event represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPEND_ACTION

public static int APPEND_ACTION
Adds a node to the navigation tree.


REPLACE_ACTION

public static int REPLACE_ACTION
Replaces a node in the navigation tree.

Constructor Detail

NavTreeExtensionEvent

public NavTreeExtensionEvent(String parentPath,
                             TreeNode parent,
                             int action)

Constructs a new NavTreeExtensionEvent that can append or replace a node or node tree in a specified location.

The parentPath parameter specifies the name of the node to which you want to append or that you want to replace. Use / (slash) to represent the root of the navigation tree and / to separate levels of the tree hierarchy. For example, if you want your node or node tree to display at the top level, specify /. If you want your node to display as a child of Environments, or to replace Environments, specify /Environments.

The parent parameter specifies the extension node to add to the navigation tree. It may contain child nodes.

The action parameter indicates whether you append to or replace the nodes that you named in the parentPath parameter. This class provides fields that you can use as the value of this parameter.

Parameters:
parentPath - The location in which to add or replace the TreeNode
parent - The TreeNode object to add to the navigation tree
action - NavTreeExtensionEvent.APPEND_ACTION or NavTreeExtensionEvent.REPLACE_ACTION
See Also:
com.bea.netuix.servlets.controls.page.PageBackingContext

NavTreeExtensionEvent

public NavTreeExtensionEvent(String pageLabel,
                             String url,
                             String parentPath,
                             TreeNode parent,
                             int action)
Deprecated. 10.3.0.0

Constructs a new NavTreeExtensionEvent that can append or replace a node or node tree in a specified location.

The pageLabel parameter is not used.

The url parameter is not used.

The parentPath parameter specifies the name of the node to which you want to append or that you want to replace. Use / (slash) to represent the root of the navigation tree and / to separate levels of the tree hierarchy. For example, if you want your node or node tree to display at the top level, specify /. If you want your node to display as a child of Environments, or to replace Environments, specify /Environments.

The parent parameter specifies the extension node to add to the navigation tree. It may contain child nodes.

The ACTION parameter indicates whether you append to or replace the nodes that you named in the parentPath parameter. This class provides fields that you can use as the value of this parameter.

This constructor is deprecated. Use NavTreeExtensionEvent(String parentPath, TreeNode parent, int action) instead.

Parameters:
pageLabel - This parameter is not used.
url - This parameter is not used.
parentPath - The location in which to add or replace the TreeNode
parent - The TreeNode object to add to the navigation tree
action - NavTreeExtensionEvent.APPEND_ACTION or NavTreeExtensionEvent.REPLACE_ACTION

NavTreeExtensionEvent

public NavTreeExtensionEvent(String pageLabel,
                             String url,
                             String parentPath,
                             TreeNode childNodes)
Deprecated. 10.3.0.0

Convenience constructor that appends a node or node tree in a specified location.

The pageLabel parameter is not used

The url parameter is not used.

The parentPath parameter specifies the name of the node to which you want to append. Use / (slash) to represent the root of the navigation tree and / to separate levels of the tree hierarchy. For example, if you want your node or node tree to display at the top level, specify /. If you want your node to display as a child of Environments, specify /Environments.

The parent parameter specifies the extension node to add to the navigation tree. It may contain child nodes.

This constructor is deprecated. Use NavTreeExtensionEvent(String parentPath, TreeNode parent, NavTreeExtensionEvent.REPLACE_ACTION) instead.

Parameters:
pageLabel - This parameter is not used
url - This parameter is not used
parentPath - The location in which to add the TreeNode
parent - The TreeNode object to add to the navigation tree

NavTreeExtensionEvent

public NavTreeExtensionEvent(String pageLabel,
                             String url)
Deprecated. 10.3.0.0

Convenience constructor that adds a node or node tree to the end of the navigation tree.

The pageLabel parameter is not used.

The url parameter is not used.

This constructor, which never worked correctly, is deprecated. Use NavTreeExtensionEvent(String parentPath, TreeNode parent, NavTreeExtensionEvent.REPLACE_ACTION) instead.

Method Detail

getParentPath

public String getParentPath()

Returns a String that describes the path to the parent node in the navigation tree for the extension that this event represents.

Returns:
parentPath The path to the parent node.

setParentPath

public void setParentPath(String parentPath)

Sets the path to a parent node in the navigation tree for the extension that this event represents.

Parameters:
parentPath - A string representing the path to the parent.

getParent

public TreeNode getParent()

Returns the parent TreeNode for the extension that this event represents. Each navigation tree extension can have only one parent.

Returns:
parent The TreeNode object representing the extension node parent.

setParent

public void setParent(TreeNode parent)

Sets the parent TreeNode for the extension that this event represents.

Parameters:
parent - A TreeNode representing the parent extension node.

getPageLabel

public String getPageLabel()
Deprecated. 10.3.0.0

Returns a string representing the pageLabel or definitionLabel of the page that this event represents.

The page label is not used therefore this method is not useful. The method has been retained so that existing extensions will still compile. The page label is usually embedded in the node URL which you can get by calling getNode().getNodeUrl(). Also, often the page label is used as the node id (since it is a unique identifier) which you can get by calling getNode().getNodeId().

Returns:
A String representing the pageLabel or definitionLabel

setPageLabel

public void setPageLabel(String pageLabel)
Deprecated. 10.3.0.0

Sets the pageLabel for this extesion. This in many cases is set automatically for you unless you are creating a custom navigation tree extension.

The page label is not used therefore this method is not useful. The method has been retained so that existing extensions will still compile. The page label is usually embedded in the node URL which you can set by calling getNode().setNodeUrl(). Also, often the page label is used as the node id (since it is a unique identifier) which you can set by calling getNode().setNodeId().

Parameters:
pageLabel - A string representing the pageLabel or definitionLabel

getExtensionUrl

public String getExtensionUrl()
Deprecated. 10.3.0.0

Returns a string representation of the default URL to the portal page that this event represents. This URL can be used in hyperlinks to allow the user to navigate to this page. Note, this is only the default URL. You can provide your own URLs in the constructor for the TreeNode of new nodes.

The URL is not used therefore this method is not useful. The method has been retained so that existing extensions will still compile. Use getNode().getNodeUrl instead.

Returns:
extensionURL A String representation of the URL to the page.

setExtensionUrl

public void setExtensionUrl(String extensionUrl)
Deprecated. 10.3.0.0

Sets the URL to the page that this event represents.

The URL is not used therefore this method is not useful. The method has been retained so that existing extensions will still compile. Use getNode().setNodeUrl instead.

Parameters:
extensionUrl - A string representation of the URL.

getAction

public int getAction()

Indicates whether the navigation tree extension adds to the navigation tree or replaces an existing node.

Returns:
NavTreeExtensionEvent.APPEND_ACTION or NavTreeExtensionEvent.REPLACE_ACTION

setAction

public void setAction(int action)

Whether the navigation tree extension adds to the navigation tree or replaces an existing node. Use one of the following values:

  • NavTreeExtensionEvent.APPEND_ACTION - Append a node

  • NavTreeExtensionEvent.REPLACE_ACTION - Replace a node

Parameters:
action - NavTreeExtensionEvent.APPEND_ACTION or NavTreeExtensionEvent.REPLACE_ACTION

Documentation is available at
http://edocs.bea.com/wls/docs103
Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.