com.ibm.portal.content
Interface ContentModelController<T extends ContentNode,M extends ModifiableContentNode>

All Superinterfaces:
Committable, CommittableTreeModelController<T,M>, ContentModel<T>, Controller, Disposable, Invalidatable, InvalidatableTreeModel<T>, LocatorProvider<T>, ModelController<T,M>, SearchableTreeModel<T>, SearchableTreeModelController<T,M>, TreeModel<T>, TreeModelController<T,M>

public interface ContentModelController<T extends ContentNode,M extends ModifiableContentNode>
extends ContentModel<T>, SearchableTreeModelController<T,M>, Committable, CommittableTreeModelController<T,M>

A controller interface for the ContentModel interface.

Since:
6.1.0

Method Summary
<E extends LayoutNode,G extends ModifiableLayoutNode>
LayoutModelController<E,G>
getLayoutModelController(ContentPage aContentPage)
          Returns a layout model controller for the specified content page.
 
Methods inherited from interface com.ibm.portal.content.ContentModel
getLayoutModel
 
Methods inherited from interface com.ibm.portal.Invalidatable
invalidate, invalidate
 
Methods inherited from interface com.ibm.portal.LocatorProvider
getLocator
 
Methods inherited from interface com.ibm.portal.TreeModelController
confirmDelete, confirmInsert, confirmInsert, delete, insert
 
Methods inherited from interface com.ibm.portal.TreeModel
getChildren, getParent, getRoot, hasChildren
 
Methods inherited from interface com.ibm.portal.ModelController
confirmCreate, confirmGetModifiableNode, create, getModifiableNode, resolve
 
Methods inherited from interface com.ibm.portal.Committable
commit, dispose
 

Method Detail

getLayoutModelController

<E extends LayoutNode,G extends ModifiableLayoutNode> LayoutModelController<E,G> getLayoutModelController(ContentPage aContentPage)
                                                                                                    throws CannotInstantiateControllerException
Returns a layout model controller for the specified content page. In case a layout model controller has been requested for the specified content page before, that instance is returned; otherwise a new layout model controller is returned.
Note A LayoutModelController can only be obtained for pages that either already exist or that were inserted already, i. e. the following code will fail:
 final ModifiableContentPage newPage = contentModelController.create(ContentPage.class, null)
 contentModelController.getLayoutModelController(newPage); // this will throw a CannotInstantiateControllerException
 
Instead this should be used:
 // the create call creates an unmanaged node
 final ModifiableContentPage newPage = contentModelController.create(ContentPage.class, null)
 // Insert the node to make it known to controller
 contentModelController.insert(newPage, parent, sibling);
 // Now the layout might be generated... 
 contentModelController.getLayoutModelController(newPage);
 

Parameters:
aContentPage - content page to return a layout model controller for
Returns:
the layout model controller for the specified content page; never null
Throws:
CannotInstantiateControllerException - in case a controller cannot be instantiated