com.sap.netweaver.bc.uwl.config

Class NavigationNode

java.lang.Object
  extended by com.sap.netweaver.bc.uwl.config.NavigationNode
All Implemented Interfaces:
Serializable, Cloneable

public final class NavigationNode
extends Object
implements Cloneable, Serializable

The NavigationNode represents one node in the navigation tree. In brief it contains the view to bedisplayed when the navigation node is clicked. The Navigation nodes are defined in the standard or custom XLM files (See XML example) The navigation node will control location of view selection, placement of personalized views, and placement of where dynamic view should be placed.

<NavigationNode name="Main">
<NavigationNode name="CombinedTask" view="DefaultView" referenceBundle="tasks">
    <NavigationNode name="task2" view="DefaultView" referenceBundle="new_and_inprogress_tasks" referenceGroup="UWL_ADD_DYNAMIC_VIEWS">
        <NavigationNode name="PersonalViewPlaceHolderTask2" referenceGroup="UWL_PERSONAL"/>
    </NavigationNode>
    <NavigationNode name="forwarded2" view="WorkItemsForwardedView" referenceBundle="tasks_forwarded" referenceGroup="UWL_ADD_DYNAMIC_VIEWS">
        <NavigationNode name="PersonalViewPlaceHolderforwarded2" referenceGroup="UWL_PERSONAL"/>
    </NavigationNode>
    <NavigationNode name="futureTask" view="FutureTaskView" referenceBundle="tasks_for_resubmission" referenceGroup="UWL_ADD_DYNAMIC_VIEWS">
        <NavigationNode name="PersonalViewPlaceHolderfuture" referenceGroup="UWL_PERSONAL"/>
    </NavigationNode>
    <NavigationNode name="completed2" view="WorkItemsCompletedView" referenceBundle="completed_tasks" referenceGroup="UWL_ADD_DYNAMIC_VIEWS">
        <NavigationNode name="PersonalViewPlaceHolderCompleted2" referenceGroup="UWL_PERSONAL"/>
    </NavigationNode>
</NavigationNode>
</NavigationNode>

See Also:
UWLView, IUWLViewManager.UWL_PERSONAL_GROUP_NAME, Serialized Form

Field Summary
static String UWL_ADD_DYNAMIC_VIEWS
          This is used to define the location in the Navigation Node where Dynamic view will be added as children.
 
Constructor Summary
NavigationNode(String id)
          Constructor for NavigationNode.
 
Method Summary
 void addChild(NavigationNode ret)
          Method addChild.
protected  Object clone()
          This clone is used internally and should not be called directly.
 NavigationNode clone(com.sap.security.api.IPrincipal user)
          Clone the navigation node.
 String getAssociatedViewName()
          Returns the associatedView.
 String getAssociatedViewNameSpace()
          Deprecated. Name space is no longer needed
 ArrayList getChildren()
          Returns the children.
 Descriptions getDisplayName()
          Returns the displayName.
 CompoundExpression getFilter()
          Get the filter which is to be applied to the view for this Navigation node.
 String getGroupId()
          Returns the groupId.
 String getId()
          Returns the id.
 String getLongText(Locale locale)
          Get the long text for the specified locale.
 String getNameSpace()
          Deprecated. Is no longer used
 NavigationNode getParent()
          Returns the parent.
 String getReference()
          Deprecated. Is not used
 String getReferenceBundle()
          Used internally for xml parser to read display name from a reference area.
 String getReferenceGroup()
          Returns the referenceGroup.
 Set getRoles()
          Deprecated. Is not used
 String getShortText(Locale locale)
          Return the display name text for the specified Locale.
 boolean hasAccess(com.sap.security.api.IPrincipal userIn)
          Deprecated. Not used always returns true.
 boolean isDisplayItemCount()
           
 boolean isDisplayItemCountInTitle()
           
 boolean isGlobal()
          Deprecated. No longer used
 boolean isVisible()
          Determine if the Navigation is to be displayed to the user or not.
 void setAssociatedViewName(String associatedView)
          Sets the associatedView.
 void setAssociatedViewNameSpace(String viewNamespace)
          Deprecated. Name space is no longer needed
 void setChildren(ArrayList children)
          Sets the children.
 void setDisplayItemCount(boolean b)
           
 void setDisplayItemCountInTitle(boolean displayItemCountInTitle)
           
 void setDisplayName(Descriptions descriptions)
          Sets the displayName.
 void setFilter(CompoundExpression expression)
          Allow setting a filter for this Navigation Node.
 void setGlobal(boolean global)
          Deprecated. No longer used
 void setGroupId(String groupId)
          Sets the groupId.
 void setNameSpace(String string)
          Deprecated. Is no longer used
 void setParent(NavigationNode parent)
          Sets the parent.
 void setReference(String string)
          Deprecated. Is not used
 void setReferenceBundle(String ref)
          Used internaly only by uwl
 void setReferenceGroup(String referenceGroup)
          Sets the referenceGroup.
 void setRoles(HashSet roles)
          Deprecated. Is not used
 void setVisible(boolean b)
          Indicate if the Navigation should be visibile or not.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UWL_ADD_DYNAMIC_VIEWS

public static final String UWL_ADD_DYNAMIC_VIEWS
This is used to define the location in the Navigation Node where Dynamic view will be added as children. This is used with the referenceGroup setting.

See Also:
Constant Field Values
Constructor Detail

NavigationNode

public NavigationNode(String id)
Constructor for NavigationNode.

Parameters:
id - The unique id for this Navigation Node.
Method Detail

getAssociatedViewName

public String getAssociatedViewName()
Returns the associatedView. This the UWLView name to be used when the Navigation node item is selected.

Returns:
String

getChildren

public ArrayList getChildren()
Returns the children. NavigationNode can have nested Navigation nodes to different levels of navigation.

Returns:
List - NavigationNode

getShortText

public String getShortText(Locale locale)
Return the display name text for the specified Locale.

Parameters:
locale -
Returns:
None NULL string will be returned. If the desired Text is not found then an empty string is returned.

getLongText

public String getLongText(Locale locale)
Get the long text for the specified locale. This is the Text used to create the tooltip.

Parameters:
locale -
Returns:
None NULL string will be returned. If the desired Text is not found then an empty string is returned.

getDisplayName

public Descriptions getDisplayName()
Returns the displayName. This is the Navigation name to be displayed. Use the getShortText or getLongText method to get a non null String.

Returns:
Descriptions This may be null
See Also:
getShortText(Locale), getLongText(Locale)

isGlobal

public boolean isGlobal()
Deprecated. No longer used

Returns the global flag.

Returns:
boolean

getGroupId

public String getGroupId()
Returns the groupId. This is a String which allows grouping NavigationNode together. For example the personalized navigation nodes have the group id of "uwlPersonalViews"

Returns:
String
See Also:
IUWLViewManager.UWL_PERSONAL_GROUP_ID

getId

public String getId()
Returns the id. This is a unique name used to reference the NavigationNode.

Returns:
String

getParent

public NavigationNode getParent()
Returns the parent. If this is a child then you can access the parent with this method.

Returns:
NavigationNode - Null is pased back if there is no parent found.

setAssociatedViewName

public void setAssociatedViewName(String associatedView)
Sets the associatedView. Set the name of the UWLView to be used for this NavigationNode.

Parameters:
associatedView - The associatedView to set

setChildren

public void setChildren(ArrayList children)
Sets the children. The ArrayList must be a list of NavigationNodes

Parameters:
children - The children to set

setDisplayName

public void setDisplayName(Descriptions descriptions)
Sets the displayName.

Parameters:
displayName - The displayName to set

setGlobal

public void setGlobal(boolean global)
Deprecated. No longer used

Sets the global.

Parameters:
global - The global to set

setGroupId

public void setGroupId(String groupId)
Sets the groupId. This is used to allow grouping nodes together like the users personalized nodes.

Parameters:
groupId - The groupId to set

setParent

public void setParent(NavigationNode parent)
Sets the parent.

Parameters:
parent - The parent to set

getReferenceGroup

public String getReferenceGroup()
Returns the referenceGroup. This is used to indicate a place holder where all Navigation which have the specified Group ID should be merged into this NavigationNode.

Returns:
String
See Also:
getGroupId()

getAssociatedViewNameSpace

public String getAssociatedViewNameSpace()
Deprecated. Name space is no longer needed

Returns the viewNamespace.

Returns:
String

setReferenceGroup

public void setReferenceGroup(String referenceGroup)
Sets the referenceGroup. This is used to indicate the location in a navigation tree where grouped navigation nodes should be merged. Current the UWL UI only supports the personalized Group.

Parameters:
referenceGroup - The referenceGroup to set

setAssociatedViewNameSpace

public void setAssociatedViewNameSpace(String viewNamespace)
Deprecated. Name space is no longer needed

Sets the viewNamespace.

Parameters:
viewNamespace - The viewNamespace to set

getRoles

public Set getRoles()
Deprecated. Is not used

Returns the roles.

Returns:
Set

setRoles

public void setRoles(HashSet roles)
Deprecated. Is not used

Sets the roles.

Parameters:
roles - The roles to set

addChild

public void addChild(NavigationNode ret)
Method addChild. Add subnodes to the current navigation node. Note the UWL UI only supports the following levels of children.

Top most parent like (Main)
children like (Task, Alert, Notification,...)
grand children like (All Task, forward task,...)
and Great grand children like(personalized views, dynamic views,...)

Parameters:
ret -

setReference

public void setReference(String string)
Deprecated. Is not used

Method setReference.

Parameters:
string -

hasAccess

public boolean hasAccess(com.sap.security.api.IPrincipal userIn)
Deprecated. Not used always returns true.

Method hasAccess. Test if the user has any of the roles needed for this NavigationNode.

Parameters:
user -
Returns:
boolean

getReference

public String getReference()
Deprecated. Is not used

Returns:

clone

public NavigationNode clone(com.sap.security.api.IPrincipal user)
                     throws CloneNotSupportedException
Clone the navigation node. This will return a copy of the navigation node and will also create copies of all it children and there children and so on...

Parameters:
user - This no longer needed there can be null
Returns:
New Navigation node.
Throws:
CloneNotSupportedException

clone

protected Object clone()
                throws CloneNotSupportedException
This clone is used internally and should not be called directly. Use the clone(IPrincipal) call to get back only Navigations node for the specified user.

Overrides:
clone in class Object
Throws:
CloneNotSupportedException
See Also:
Object.clone()

getReferenceBundle

public String getReferenceBundle()
Used internally for xml parser to read display name from a reference area.

Returns:

setReferenceBundle

public void setReferenceBundle(String ref)
Used internaly only by uwl

Parameters:
ref -

isVisible

public boolean isVisible()
Determine if the Navigation is to be displayed to the user or not. The UWL UI will use this flag to determine if the Navigation Node should be dispalyed or not.

Returns:

setVisible

public void setVisible(boolean b)
Indicate if the Navigation should be visibile or not.

Parameters:
b -

getNameSpace

public String getNameSpace()
Deprecated. Is no longer used

This get the configuration name where the node was read from.

Returns:

setNameSpace

public void setNameSpace(String string)
Deprecated. Is no longer used

Used internaly only by uwl. This is used to set the configuration name where the node was read from.

Parameters:
string -

isDisplayItemCount

public boolean isDisplayItemCount()
Returns:

setDisplayItemCount

public void setDisplayItemCount(boolean b)
Parameters:
b -

getFilter

public CompoundExpression getFilter()
Get the filter which is to be applied to the view for this Navigation node.

Returns:

setFilter

public void setFilter(CompoundExpression expression)
Allow setting a filter for this Navigation Node.

Parameters:
expression -

isDisplayItemCountInTitle

public boolean isDisplayItemCountInTitle()
Returns:
Returns the displayItemCountInTitle.

setDisplayItemCountInTitle

public void setDisplayItemCountInTitle(boolean displayItemCountInTitle)
Parameters:
displayItemCountInTitle - The displayItemCountInTitle to set.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api default EP-BC-UWL
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api - EP-BC-UWL


Copyright 2011 SAP AG Complete Copyright Notice