com.ibm.portal.portlet
Interface CommonPortletModelController

All Superinterfaces:
Controller, LocatorProvider<Identifiable>, ModelController<Identifiable,ModifiableIdentifiable>
All Known Subinterfaces:
AdminPortletModelController, PortletModelController

public interface CommonPortletModelController
extends ModelController<Identifiable,ModifiableIdentifiable>, LocatorProvider<Identifiable>

A common interface for controllers that operate on the PortletModel or com.ibm.portal.portletmodel.AdminPortletModel.

Since:
7.0.0

Method Summary
 boolean confirmDelete(Identifiable aNode)
          Indicates if the specified node may be deleted from the model.
 ModifiableIdentifiable create(java.lang.Class aNodeClass, CreationContext aContext)
          Creates a modifiable node and inserts it into the model.
 void delete(Identifiable aNode)
          Deletes a node from the model.
 
Methods inherited from interface com.ibm.portal.ModelController
confirmCreate, confirmGetModifiableNode, getModifiableNode, resolve
 
Methods inherited from interface com.ibm.portal.LocatorProvider
getLocator
 

Method Detail

create

ModifiableIdentifiable create(java.lang.Class aNodeClass,
                              CreationContext aContext)
                              throws CannotInstantiateModifiableNodeException
Creates a modifiable node and inserts it into the model.

Specified by:
create in interface ModelController<Identifiable,ModifiableIdentifiable>
Parameters:
aNodeClass - interface class of node to insert
aContext - a context specifying information about the node to create, may be null
Returns:
a modifiable node;
Throws:
CannotInstantiateModifiableNodeException - in case the modifiable node cannot be instantiated

delete

void delete(Identifiable aNode)
            throws ObjectNotFoundException,
                   CannotDeleteNodeException
Deletes a node from the model. All its children are deleted as well.

Parameters:
aNode - the node to delete from the model.
Throws:
ObjectNotFoundException - in case the node cannot be found
CannotDeleteNodeException - in case the node cannot be deleted

confirmDelete

boolean confirmDelete(Identifiable aNode)
                      throws ObjectNotFoundException
Indicates if the specified node may be deleted from the model.

Parameters:
aNode - node to affirm deletion for.
Returns:
true if the node can be deleted, false otherwise
Throws:
ObjectNotFoundException - in case the node cannot be found