com.ibm.mashups.enabler.model
Interface NavigationModel

All Superinterfaces:
Discardable, Invalidatable, Locator, Model, com.ibm.mashups.enabler.Primeable, SelectionLocator, TreeModel, TreeModelController

public NavigationModel
extends TreeModelController, SelectionLocator, Discardable, Invalidatable, com.ibm.mashups.enabler.Primeable

Interface for a navigation model. This tree model describes the topology in which the navigation is structured. Elements in this model are navigation elements, such as navigation nodes or labels.

The navigation model supports the following strategies:


Method Summary
 Boolean hasLayoutModel(NavigationElement element)
           Indicates if the specified navigation element has a layout model.
 LayoutModel getLayoutModel(NavigationElement element)
           Returns the layout model for the given navigation element.
 Object getSharedRoot()
          Deprecated.  Use findDefaultAcceptParent instead.
 Object findDefaultAcceptParent()
           Returns a Deferred object to obtain a special node of the model defining the root of all pages, which are shared with a user.
 Boolean confirmExport(NavigationElement element)
           Indicates whether the navigation element can be exported.
 Object create(JSON context)
           Creates a new navigation entity.
 DeferredOperation commit()
           Commits the modifications applied to this model and all dependent models.
 
Methods inherited from interface com.ibm.mashups.enabler.TreeModelController
create, confirmCreate, insert, confirmInsert, remove, confirmRemove
 
Methods inherited from interface com.ibm.mashups.enabler.TreeModel
getRoot, hasChildren, getChildren, getParent
 
Methods inherited from interface com.ibm.mashups.enabler.model.Model
setStrategy, getStrategies, getStrategy, addStrategy, removeStrategy
 
Methods inherited from interface com.ibm.mashups.enabler.Locator
find
 
Methods inherited from interface com.ibm.mashups.enabler.model.SelectionLocator
findDefaultAcceptParent
 
Methods inherited from interface com.ibm.mashups.enabler.Discardable
discard
 
Methods inherited from interface com.ibm.mashups.enabler.Invalidatable
invalidate
 

Method Detail

hasLayoutModel

Boolean hasLayoutModel(NavigationElement element)
Indicates if the specified navigation element has a layout model.

Parameters:
element - navigation element or URI of navigation element for which to check if it has a layout model. Must not be null.
Returns:
true if the specified node has a layout model, false otherwise

getLayoutModel

LayoutModel getLayoutModel(NavigationElement element)
Returns the layout model for the given navigation element.

Parameters:
element - navigation element or the URI of the navigation element for which to return its layout model. The navigation element must be part of this model; must not be null.
Returns:
a layout model or null if none exists.

getSharedRoot

Object getSharedRoot()
Deprecated.  Use findDefaultAcceptParent instead.

Returns a Deferred object to obtain a special node of the model defining the root of all pages, which are shared with a user. May be null if the navigation tree is empty

Returns:
a deferred object used to start this operation. The return value when executed through the deferred object is the shared root object of the tree model

findDefaultAcceptParent

Object findDefaultAcceptParent()
Returns a Deferred object to obtain a special node of the model defining the root of all pages, which are shared with a user. May be null if the navigation tree is empty

Returns:
a deferred object used to start this operation. The return value when executed through the deferred object is the shared root object of the tree model

confirmExport

Boolean confirmExport(NavigationElement element)
Indicates whether the navigation element can be exported.

Parameters:
element - navigation element or URI of the navigation element; must not be null
Returns:
true if the page can be exported, false otherwise.

create

Object create(JSON context)
Creates a new navigation entity. You may create navigation nodes, labels, as well as URLs. Note that the entity will not appear in the model unless it is inserted using the insert method.

Parameters:
context - context of predefined information used for the creation of the navigation entity. Must not be null. Accepted names are:
  type - type of navigation entity to create as defined in  Constants ; must be one of be one of the following:
   NAVIGATION_PAGE
   NAVIGATION_LABEL
   NAVIGATION_URL
  In case type equals NAVIGATION_PAGE, you may specify the following:
  template - creates a new navigation node based on the specified com.ibm.mashups.enabler.navigation.NavigationNode
  Reserved Keywords: private
Returns:
the created navigation entity
See Also:
NavigationNode, NavigationLabel, NavigationURL, Constants

commit

DeferredOperation commit()
Commits the modifications applied to this model and all dependent models.

Returns:
a deferred object used to start this operation. The return value when executed through the deferred object is null


Copyright IBM Corp. 2010 All Rights Reserved.