com.sap.netweaver.bc.uwl

Interface IUWLViewManager


public interface IUWLViewManager

View manager is used to create, modify, and delete the different views and their display attributes. It also allows setting up desired navigation attributes to move around and between views. The Presentation Adaptor does the actual renderings of the views based off of their attributes.

When getting a View the View Manager will automatically merge all Display Attributes along with any Global Display Attribute into the View, it will also check if there is a personalized view for the specified user.

When getting navigation nodes you can have the View manager merge dynamic views into the list, it will also merge in any personalized view where the personalized place holder flag is indicated.

 

Navigation Nodes are used to create the Tabs and Dropdown in the UWL as shown in the example below.


Then the Views are used to display the UWL table as shown in the example below.

Table Header (View header option)
Column header 1 (DisplayAttribute) Column header 2 (DisplayAttribute) Column header 3 (DisplayAttribute) Column header 4 (DisplayAttribute)
Data row      

See Also:
UWLView, NavigationNode, DisplayAttribute

Field Summary
static String UWL_ADD_DYNAMIC_VIEWS
          This is used to indicate the location in the Navigation Node to start adding dynamic views.
static String UWL_LASTACCESS_NAME
          Deprecated. no longer used
static String UWL_PERSONAL_GROUP_ID
          This is the Navigation node Id for the personalization.
static String UWL_PERSONAL_GROUP_NAME
          This is the reference group name for the personalization, used as a place holder in the navigation node.
 
Method Summary
 NavigationNode addNavigationNode(NavigationNode node, UWLContext context)
          Deprecated. see updateNavigationNode
 NavigationNode addToPersonalNode(UWLContext context, UWLView view)
          Deprecated. use updateNavigationNode
 UWLView addView(UWLView viewData, UWLContext context)
          Deprecated. use the updateView
 void appendItemTypesWithItems(NavigationNode navNode, UWLContext context, String configGroup, int maxAppendNumber, String currentSelectedViewId, String substitutedUserId)
          This is used to add dynamic views into the Navigation Node.
 ItemTypeCount[] appendItemTypesWithItems(NavigationNode navNode, UWLContext context, String configGroup, int maxAppendNumber, String currentSelectedViewId, String substitutedUserId, ItemTypeCount[] itemTypeCount)
          This is used to add dynamic views into the Navigation Node.
 void deleteNavigationNode(String id, UWLContext context)
          This method will remove the specified navigation node name from the list of personalized nodes for the specified user.
 void deleteView(UWLView viewName, UWLContext context)
          This method will remove the specified view name from the list of personalized views for the specified user.
 NavigationNode[] getItemTypeNavigationNode(NavigationNode root, String[] baseItemType, UWLContext context, String configGroup, int maxReturn, String currentSelectedViewId, String substitutedUserId)
          Return an array of NavigationNodes for the all ItemTypes which are not in the specified root NavigationNode and have items assigned to the user.
 NavigationNode getNavigationNode(String id, UWLContext context)
          This method will look for the specified Navigation node by its name which is defined in the standard or custom XML files (see example XML).
 List getNavigationNodesByGroup(String groupName, UWLContext context)
          Method getNavigationNodesByGroup.
 List getNavigationNodesUsingViewName(String viewName, UWLContext context)
          Method getNavigationModelsUsingViewId.
 UWLView getView(String id, UWLContext context)
          This is used to get a view by its ID name which is defined in the system or custom XML files (See example) or the name of the personalized view.
 UWLView getViewForItemType(String itemType, UWLContext context)
          Method getViewForItemType.
 NavigationNode updateNavigationNode(NavigationNode node, UWLContext context)
          Use this method to add the passed in navigation node to the users list of personalized nodes.
 UWLView updateView(UWLView viewData, UWLContext context)
          Use this method to add the passed in view to the users list of personalized views.
 

Field Detail

UWL_PERSONAL_GROUP_ID

public static final String UWL_PERSONAL_GROUP_ID
This is the Navigation node Id for the personalization.

See Also:
Constant Field Values

UWL_PERSONAL_GROUP_NAME

public static final String UWL_PERSONAL_GROUP_NAME
This is the reference group name for the personalization, used as a place holder in the navigation node. This is where the users personalized views will be megered.

See Also:
Constant Field Values

UWL_ADD_DYNAMIC_VIEWS

public static final String UWL_ADD_DYNAMIC_VIEWS
This is used to indicate the location in the Navigation Node to start adding dynamic views.

See Also:
Constant Field Values

UWL_LASTACCESS_NAME

public static final String UWL_LASTACCESS_NAME
Deprecated. no longer used

This is the reference group name for the last access, used in the navigation node.

See Also:
Constant Field Values
Method Detail

getView

public UWLView getView(String id,
                       UWLContext context)

This is used to get a view by its ID name which is defined in the system or custom XML files (See example) or the name of the personalized view.

Example XML definition:
<View name="DefaultView"
width="98%" supportedItemTypes="uwl.task" ...

Note: the personalized view can use the same name as system defined view and it will overwrite that view.  See the return order of views below.

The view will be return with the following priority:

  1. Personalized view for the specified user.
  2. The system defined view.
  3. null if none of the above.

Parameters:
id - The view name.
context - The information on the login in user.
Returns:
The view if found else null.

addView

public UWLView addView(UWLView viewData,
                       UWLContext context)
Deprecated. use the updateView

Method addView. Add new view to the users personalization

Parameters:
viewData -
context - the UWL context.
Returns:
UWLView
See Also:
updateView(UWLView, UWLContext)

updateView

public UWLView updateView(UWLView viewData,
                          UWLContext context)

Use this method to add the passed in view to the users list of personalized views.  If the view is already in the list then it will override the old view with this new one.

When personalizing a view always may sure the view has been cloned before change view settings.

Parameters:
viewData - The new view
context - The information on the login in user.
Returns:
UWLView
See Also:
UWLView.clone()

deleteView

public void deleteView(UWLView viewName,
                       UWLContext context)

This method will remove the specified view name from the list of personalized views for the specified user.  

Note:  If the personified view was overriding a system view, then this will have the effect of restore the system view.

Parameters:
viewName -
context - The information on the login in user.

getViewForItemType

public UWLView getViewForItemType(String itemType,
                                  UWLContext context)
Method getViewForItemType. Get the best View for the specified ItemType. If the ItemType does not have a view defined it will check the parent ItemType until a view is located.

Parameters:
itemType -
context - The information on the login in user.
Returns:
UWLView DefaultView will be return if no View can be found.

getNavigationNode

public NavigationNode getNavigationNode(String id,
                                        UWLContext context)

This method will look for the specified Navigation node by its name which is defined in the standard or custom XML files (see example XML).

<NavigationNode name="CombinedTask" view="DefaultView" referenceBundle="tasks">

Parameters:
id - The name defined in the xml file
context - The information on the login in user.
Returns:
NavigationModel If the navigation node can not be found then null is return.

getItemTypeNavigationNode

public NavigationNode[] getItemTypeNavigationNode(NavigationNode root,
                                                  String[] baseItemType,
                                                  UWLContext context,
                                                  String configGroup,
                                                  int maxReturn,
                                                  String currentSelectedViewId,
                                                  String substitutedUserId)
Return an array of NavigationNodes for the all ItemTypes which are not in the specified root NavigationNode and have items assigned to the user. The order of the NavigationNodes returned will be based off of the total number of items assigned to the user.

Parameters:
root - This is the Current NavigationNodes being display, to avoid duplication of NavigationNodes.
baseItemType - the array of strings.
context - The information on the login in user.
maxReturn - Indicate the total number of NavigationNodes to return.
Returns:
NavigationNode[] the array of navigation nodes.
See Also:
appendItemTypesWithItems(NavigationNode, UWLContext, String, int, String, String)

appendItemTypesWithItems

public void appendItemTypesWithItems(NavigationNode navNode,
                                     UWLContext context,
                                     String configGroup,
                                     int maxAppendNumber,
                                     String currentSelectedViewId,
                                     String substitutedUserId)
This is used to add dynamic views into the Navigation Node. If there is itemType which are subsets of the top Navigation Node views, but are not in the actual Navigation Node childern list, and have items which are for the user it will append this to the Navigation Node.

Parameters:
navNode -
context - The information on the login in user.
maxAppendNumber - - indicate the max number of views which can be added.
currentSelectedViewId - - can be null. This is the current selected ViewId. Used to determine if the dynamic node should be added even if it is empty.

appendItemTypesWithItems

public ItemTypeCount[] appendItemTypesWithItems(NavigationNode navNode,
                                                UWLContext context,
                                                String configGroup,
                                                int maxAppendNumber,
                                                String currentSelectedViewId,
                                                String substitutedUserId,
                                                ItemTypeCount[] itemTypeCount)
This is used to add dynamic views into the Navigation Node. If there is itemType which are subsets of the top Navigation Node views, but are not in the actual Navigation Node childern list, and have items which are for the user it will append this to the Navigation Node.

Parameters:
navNode -
context - The information on the login in user.
maxAppendNumber - - indicate the max number of views which can be added.
currentSelectedViewId - - can be null. This is the current selected ViewId. Used to determine
substitutedUserId - - can be null. This is the user id for which user is being substituted for.
itemTypeCount - - can be null. Used for performance. If not passed in then the Item Manager will be called to get the array, which requires a database call.
Returns:
itemTypeCount - returns the array of item used in the merge. if the dynamic node should be added even if it is empty.

addNavigationNode

public NavigationNode addNavigationNode(NavigationNode node,
                                        UWLContext context)
Deprecated. see updateNavigationNode

Method addNavigationNode.

Parameters:
node -
context - The information on the login in user.
Returns:
NavigationNode
See Also:
updateNavigationNode(NavigationNode, UWLContext)

updateNavigationNode

public NavigationNode updateNavigationNode(NavigationNode node,
                                           UWLContext context)

Use this method to add the passed in navigation node to the users list of personalized nodes.  If the node is already in the list then it will override the old node with this new one.

When personalizing a node always may sure the node has been cloned before change node settings.

Parameters:
node - New navigation node
context - The information on the login in user.
Returns:
NavigationNode
See Also:
NavigationNode.clone(IPrincipal)

deleteNavigationNode

public void deleteNavigationNode(String id,
                                 UWLContext context)

This method will remove the specified navigation node name from the list of personalized nodes for the specified user.  

Note:  If the personified navigation node was overriding a system navigation node, then this will have the effect of restore the back to the system navigation node.

Parameters:
id - the ID.
context - The information on the login in user.

getNavigationNodesUsingViewName

public List getNavigationNodesUsingViewName(String viewName,
                                            UWLContext context)
Method getNavigationModelsUsingViewId.

Get all the navigation nodes which reference a View which is defined in the standard or custom XLM file (see example)

<NavigationNode name="CombinedTask" view="DefaultView" referenceBundle="tasks">

Parameters:
context - The information on the login in user.
Returns:
List If there is no navigation nodes found then the list will be empty.

getNavigationNodesByGroup

public List getNavigationNodesByGroup(String groupName,
                                      UWLContext context)
Method getNavigationNodesByGroup. Returns all the navigation which are of the same group. for example all the personalized nodes will have the group id UWL_PERSONAL.

Parameters:
groupName -
context - The information on the login in user.
Returns:
List
See Also:
UWL_PERSONAL_GROUP_NAME

addToPersonalNode

public NavigationNode addToPersonalNode(UWLContext context,
                                        UWLView view)
Deprecated. use updateNavigationNode

This will add a new child navigation node to the users personalized navigation node. The navigation node that was created will be setup with the correct Group id and and the specified view reference. Note: view which are system owned are not allowed.

Parameters:
context - The information on the login in user.
view -
Returns:
NavigationNode the new navgation node. If the view is a system owned the null is returned
See Also:
UWLView.getOwner()


Copyright 2006 SAP AG Complete Copyright Notice