Packagecom.endeca.tools.pagebuilder.model
Interfacepublic interface IContentModelFactory

Provides methods for creating various objects for use in the Editor API content model.



Public Methods
 MethodDefined by
  
createContentItem(templateId:String, resultHandler:Function, errorHandler:Function):void
Creates a content item using the template corresponding to the given template ID and then calls the specified result handler function, passing in the newly created content item.
IContentModelFactory
  
createContentItemList(templateType:String, capacity:Number):IContentItemList
Creates an empty IContentItemList of the given type and capacity.
IContentModelFactory
  
Creates an IContentModelList object.
IContentModelFactory
  
createDimensionValue(id:String = null, dimensionId:String = null):IDimensionValue
Creates an IDimensionValue object.
IContentModelFactory
  
Creates an INavigationRecords object.
IContentModelFactory
  
Creates an INavigationRefinements object.
IContentModelFactory
  
Creates an INavQuery object.
IContentModelFactory
  
Creates an IRecordQuery object.
IContentModelFactory
  
createRecordSort(key:String = "", ascending:Boolean = true):IRecordSort
Creates an IRecordSort object.
IContentModelFactory
Method detail
createContentItem()method
public function createContentItem(templateId:String, resultHandler:Function, errorHandler:Function):void

Creates a content item using the template corresponding to the given template ID and then calls the specified result handler function, passing in the newly created content item.

The result handler function must match the following signature:

           function(contentItem:IContentItem):void
         

The error handler function must match the following signature:

           function(templateId:String, errorMessage:String):void
         
Parameters
templateId:String — ID of the template to use to create the content item.
 
resultHandler:Function — A function which is called if the template was successfully loaded and the content item successfully populated.
 
errorHandler:Function — A function which is called if the content item could not be populated. It is passed the ID of the template used in the attempt and an error message.

See also

createContentItemList()method 
public function createContentItemList(templateType:String, capacity:Number):IContentItemList

Creates an empty IContentItemList of the given type and capacity.

Parameters
templateType:String — The type of template to create
 
capacity:Number — The maximum capacity for the new list. An unbounded list is indicated by a capacity of NaN.

Returns
IContentItemList — A new IContentItemList object.

See also

createContentModelList()method 
public function createContentModelList(list:IList = null):IContentModelList

Creates an IContentModelList object.

Parameters
list:IList (default = null) — A list with which to initialize the created list. If null, the created list will be empty.

Returns
IContentModelList — A new IContentModelList object.

See also

createDimensionValue()method 
public function createDimensionValue(id:String = null, dimensionId:String = null):IDimensionValue

Creates an IDimensionValue object.

Parameters
id:String (default = null) — The id of the dimension value. If null, the dimension value id will be null
 
dimensionId:String (default = null) — The id of the dimension associated with this dimension value. If null, the dimension id will be null

Returns
IDimensionValue — A new IDimensionValue object.

See also

createNavigationRecords()method 
public function createNavigationRecords():INavigationRecords

Creates an INavigationRecords object.

Returns
INavigationRecords — A new INavigationRecords object.

See also

createNavigationRefinements()method 
public function createNavigationRefinements():INavigationRefinements

Creates an INavigationRefinements object.

Returns
INavigationRefinements — A new INavigationRefinments object.

See also

createNavQuery()method 
public function createNavQuery():INavQuery

Creates an INavQuery object.

Returns
INavQuery — A new INavQuery object.

See also

createRecordQuery()method 
public function createRecordQuery():IRecordQuery

Creates an IRecordQuery object.

Returns
IRecordQuery — A new IRecordQuery object.

See also

createRecordSort()method 
public function createRecordSort(key:String = "", ascending:Boolean = true):IRecordSort

Creates an IRecordSort object.

Parameters
key:String (default = "") — The sort key. If null, the sort key will be the empty string.
 
ascending:Boolean (default = true) — The sort direction. If null, ascending will be true.

Returns
IRecordSort — A new IRecordSort object.

See also