com.ibm.mashups.enabler.persistence
Interface NavigationModelPersistenceProvider

All Superinterfaces:
ModelPersistenceProvider

public NavigationModelPersistenceProvider
extends ModelPersistenceProvider


Method Summary
 void find(ModelUrl url, Object callback, Object parameters)
           Returns the specified object(s).
 void findBySelection(ModelUrl url, Object selection, Object callback, Object parameters)
           Returns the specified object(s).
 Object create(Object context)
           Creates a navigation object based on a given context.
 
Methods inherited from interface com.ibm.mashups.enabler.persistence.ModelPersistenceProvider
findBySelection, create, remove, store, getModifiable
 

Method Detail

find

void find(ModelUrl url,
          Object callback,
          Object parameters)
Returns the specified object(s).

Parameters:
url - url that specifies the object(s) to find
selection - selection criteria
callback - callback function, which is called with the following arguments: function(result, status, parameters), where
  • result is an array containing the selected objects; may contain zero or more objects
  • status status code of the operation
  • parameters are the parameters as passed into findBySelection
parameters - parameters to pass to the callback function; optional
See Also:
ModelUrl

findBySelection

void findBySelection(ModelUrl url,
                     Object selection,
                     Object callback,
                     Object parameters)
Returns the specified object(s).
selection = {
  sections: SECTIONS,
  pages: {
    select: PAGE_SELECTION,
  },
  spaces: {
    select: SPACE_SELECTION,
  },
  widgets: {
    params: {
      includeDefaultLocale: "true" | "false"
    }
  }
}

where
Example (select the children of a page):
  findBySelection( { sections:["pages"], pages: { select: ["children"]}}, function(result) {
    dojo.forEach(result, function(o) {
      console.log("page ID: ", o.getID());
    })
  });

Parameters:
url - url that specifies the object(s) to find
selection - selection criteria
callback - callback function, which is called with the following arguments: function(result, status, parameters), where
  • result is an array containing the selected objects; may contain zero or more objects;
  • status status code of the operation
  • parameters are the parameters as passed into findBySelection
parameters - parameters to pass to the callback function; optional
See Also:
ModelUrl

create

Object create(Object context)
Creates a navigation object based on a given context.
context = { type: TYPE }

where

Parameters:
context - context defining properties for the object to create
Returns:
new navigation object


Copyright IBM Corp. 2010 All Rights Reserved.