com.ibm.portal.content
Interface LayoutModelController<T extends LayoutNode,M extends ModifiableLayoutNode>

Type Parameters:
T - the type of node this model exposes
M - the modifiable version of the type of node this model exposes
All Superinterfaces:
ActiveFlag, BookmarkableFlag, Controller, Identifiable, Invalidatable, InvalidatableTreeModel<T>, LayoutModel<T>, LocatorProvider<T>, ModelController<T,M>, SearchableTreeModel<T>, SearchableTreeModelController<T,M>, ShareableFlag, ThemeProvider, TimeStamped, TreeModel<T>, TreeModelController<T,M>, WireModelControllerProvider, WireModelProvider

public interface LayoutModelController<T extends LayoutNode,M extends ModifiableLayoutNode>
extends LayoutModel<T>, SearchableTreeModelController<T,M>, WireModelControllerProvider

A controller interface for the LayoutModel interface.

Since:
6.1.0

Method Summary
 boolean addAllowedPortlet(ObjectID portletID)
          Adds the specified portlet to the list of allowed portlets for the last layer of the node.
Note: Adding allowed portlets is not possible on private pages.
 boolean addAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Adds the specified portlets to the list of allowed portlets for the last layer of the node.
Note: Adding allowed portlets is not possible on private pages.
 boolean confirmAddAllowedPortlet(ObjectID portletID)
          Indicates if the specified portlet may be added to the allowed portlets.
Note: Setting allowed portlets is not possible on private pages.
 boolean confirmAddAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Indicates if the specified portlets may be added to the allowed portlets.
Note: Setting allowed portlets is not possible on private pages.
 boolean confirmCreate(java.lang.Class nodeClass, CreationContext context)
          Indicates if a modifiable layout node of the specified class and with the specified creation context may be created.
 boolean confirmRemoveAllowedPortlet(ObjectID portletID)
          Indicates if the specified portlet may be removed from the allowed portlets.
Note: Removing allowed portlets is not possible on private pages.
 boolean confirmRemoveAllowedPortlets()
          Indicates if all portlets from the allowed portlets may be removed.
Note: Removing allowed portlets is not possible on private pages.
 boolean confirmRemoveAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Indicates if the specified portlets may be remved from the allowed portlets.
Note: Removing allowed portlets is not possible on private pages.
 boolean confirmRetainAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Indicates if th specified portlets may be retained in the allowed portlets.
Note: Setting allowed portlets is not possible on private pages.
 boolean confirmSetAllPortletsAllowedFlag(boolean flag)
          Indicates if the AllPortletsAllowed flag may be set to the specified value.
 boolean confirmSetDeletableFlag(T node, boolean value)
          Indicates if the deletable flag of the specified node may be set to the specified value.
 boolean confirmSetModifiableFlag(T node, boolean value)
          Indicates if the modifiable flag of the specified node may be set to the specified value.
 M create(java.lang.Class aNodeClass, CreationContext aContext)
          Creates a modifiable layout node.
 PortletModelController getPortletModelController()
          Returns a portlet model controller valid in the scope of this layout model controller.
 WireModelController<Wire,ModifiableWire> getWireModelController()
          Returns a wire model controller valid in the scope of this layout model controller.
 boolean removeAllowedPortlet(ObjectID portletID)
          Removes the specified portlet from the list of allowed portlets for the last layer of the node
Note: Removing allowed portlets is not possible on private pages.
 boolean removeAllowedPortlets()
          Removes all allowed portlets for the last layer of the node.
Note: Removing allowed portlets is not possible on private pages.
 boolean removeAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Removes the specified portlets from the list of allowed portlets for the last layer of the node
Note: Removing allowed portlets is not possible on private pages.
 boolean retainAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Retains the specified portlets of the list of allowed portlets for the last layer of the node
Note: Setting allowed portlets is not possible on private pages.
 boolean setAllPortletsAllowedFlag(boolean flag)
          Sets the AllPortletsAllowed flag value.
Note: Setting the allowed portlet flag is not possible on private pages.
 boolean setDeletableFlag(T node, boolean value)
          Sets the deletable flag value.
 boolean setModifiableFlag(T node, boolean value)
          Sets the modifiable flag value.
 
Methods inherited from interface com.ibm.portal.content.LayoutModel
getAllAllowedPortlets, getAllowedPortlets, getAllPortletsAllowedFlag, getDeletableFlag, getModifiableFlag, getObjectID, getTheme, hasContainerChild, hasControlChild, isActive, isAllPortletsAllowed, isBookmarkable, isDeletable, isModifiable, isShareable
 
Methods inherited from interface com.ibm.portal.Invalidatable
invalidate, invalidate
 
Methods inherited from interface com.ibm.portal.TimeStamped
getCreated, getLastModified
 
Methods inherited from interface com.ibm.portal.wire.WireModelProvider
getWireModel
 
Methods inherited from interface com.ibm.portal.TreeModelController
confirmDelete, confirmInsert, confirmInsert, delete, insert
 
Methods inherited from interface com.ibm.portal.ModelController
confirmGetModifiableNode, getModifiableNode, resolve
 
Methods inherited from interface com.ibm.portal.TreeModel
getChildren, getParent, getRoot, hasChildren
 
Methods inherited from interface com.ibm.portal.LocatorProvider
getLocator
 

Method Detail

create

M create(java.lang.Class aNodeClass,
         CreationContext aContext)
                                      throws CannotInstantiateModifiableNodeException
Creates a modifiable layout node. The created node can be inserted into the model controller using an appropriate insert method defined on a subinterface of this interface. The node will not appear in the model unless it is inserted.

Specified by:
create in interface ModelController<T extends LayoutNode,M extends ModifiableLayoutNode>
Parameters:
aNodeClass - interface class of node to insert
aContext - a context specifying information about the node to create, may be null. If the node class is LayoutControl, then a non-null LayoutControlCreationContext needs to be specified.
Returns:
a modifiable node; never null
Throws:
CannotInstantiateModifiableNodeException - in case the modifiable node cannot be instantiated

setDeletableFlag

boolean setDeletableFlag(T node,
                         boolean value)
                         throws ObjectNotFoundException,
                                CannotModifyPropertyException
Sets the deletable flag value.

Parameters:
node - node to set the deletable flag for. The flag is set for the last layer of the node
value - the new value of the flag
Returns:
the former value of the flag; if none existed, this method returns the value which would be returned by LayoutModel.getDeletableFlag(Object).
Throws:
ObjectNotFoundException - in case the specified node cannot be found
CannotModifyPropertyException - in case the flag cannot be modified

setModifiableFlag

boolean setModifiableFlag(T node,
                          boolean value)
                          throws ObjectNotFoundException,
                                 CannotModifyPropertyException
Sets the modifiable flag value.

Parameters:
node - node to set the modifiable flag for. The flag is set for the last layer of the node
value - the new value of the flag
Returns:
the former value of the flag; if none existed, this method returns the value which would be returned by LayoutModel.getModifiableFlag(Object).
Throws:
ObjectNotFoundException - in case the specified node cannot be found
CannotModifyPropertyException - in case the flag cannot be modified

setAllPortletsAllowedFlag

boolean setAllPortletsAllowedFlag(boolean flag)
                                  throws CannotModifyPropertyException
Sets the AllPortletsAllowed flag value.
Note: Setting the allowed portlet flag is not possible on private pages.

Parameters:
flag - the new value of the flag
Returns:
the former value of the flag; if none existed, this method returns the value which would be returned by LayoutModel.getAllPortletsAllowedFlag().
Throws:
CannotModifyPropertyException - in case the flag cannot be modified

addAllowedPortlets

boolean addAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
                           throws CannotModifyPropertyException
Adds the specified portlets to the list of allowed portlets for the last layer of the node.
Note: Adding allowed portlets is not possible on private pages.

Parameters:
portletIDs - Collection of ObjectIDs of the portlet definitions
Returns:
true if the portlets are added
Throws:
CannotModifyPropertyException - in case the portlets cannot be added

addAllowedPortlet

boolean addAllowedPortlet(ObjectID portletID)
                          throws CannotModifyPropertyException
Adds the specified portlet to the list of allowed portlets for the last layer of the node.
Note: Adding allowed portlets is not possible on private pages.

Parameters:
portletID - ObjectID of the portlet definition
Returns:
true if the portlet is removed
Throws:
CannotModifyPropertyException - in case the portlet cannot be added

removeAllowedPortlet

boolean removeAllowedPortlet(ObjectID portletID)
                             throws CannotModifyPropertyException
Removes the specified portlet from the list of allowed portlets for the last layer of the node
Note: Removing allowed portlets is not possible on private pages.

Parameters:
portletID - ObjectID of the portlet definition
Returns:
true if the portlet is removed
Throws:
CannotModifyPropertyException - in case the portlet cannot be removed

removeAllowedPortlets

boolean removeAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
                              throws CannotModifyPropertyException
Removes the specified portlets from the list of allowed portlets for the last layer of the node
Note: Removing allowed portlets is not possible on private pages.

Parameters:
portletIDs - Collection of ObjectIDs of portlet definitions
Returns:
true if at least one portlet is removed as a result of this call
Throws:
CannotModifyPropertyException - in case the portlets cannot be removed

removeAllowedPortlets

boolean removeAllowedPortlets()
                              throws CannotModifyPropertyException
Removes all allowed portlets for the last layer of the node.
Note: Removing allowed portlets is not possible on private pages.

Returns:
true if at least one allowed portlet has been removed as a result of this call
Throws:
CannotModifyPropertyException - in case the portlets cannot be removed

retainAllowedPortlets

boolean retainAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
                              throws CannotModifyPropertyException
Retains the specified portlets of the list of allowed portlets for the last layer of the node
Note: Setting allowed portlets is not possible on private pages.

Parameters:
portletIDs - Collection with ObjectIDs of the portlet definitions
Returns:
true if the list of allowed portlets has changed as a result of this call
Throws:
CannotModifyPropertyException - in case the portlets cannot be retained

confirmCreate

boolean confirmCreate(java.lang.Class nodeClass,
                      CreationContext context)
Indicates if a modifiable layout node of the specified class and with the specified creation context may be created.

Specified by:
confirmCreate in interface ModelController<T extends LayoutNode,M extends ModifiableLayoutNode>
Parameters:
nodeClass - interface class for which to indicate if a node may be created
context - creation context for which to indicate if a node may be created, may be null. If the node class is LayoutControl, then a non-null LayoutControlCreationContext needs to be specified.
Returns:
true if a node may be created, false otherwise

confirmSetDeletableFlag

boolean confirmSetDeletableFlag(T node,
                                boolean value)
                                throws ObjectNotFoundException
Indicates if the deletable flag of the specified node may be set to the specified value.

Parameters:
node - node for which to indicate if the deletable flag may be set
value - value for which to indicate if the deleteable flag may be set to
Returns:
true if the deletable flag may be set, false otherwise
Throws:
ObjectNotFoundException - in case the specified node cannot be found

confirmSetModifiableFlag

boolean confirmSetModifiableFlag(T node,
                                 boolean value)
                                 throws ObjectNotFoundException
Indicates if the modifiable flag of the specified node may be set to the specified value.

Parameters:
node - node for which to indicate if the modifiable flag may be set
value - value for which to indicate if the modifiable flag may be set to
Returns:
true if the modifiable flag may be set, false otherwise
Throws:
ObjectNotFoundException - in case the specified node cannot be found

confirmSetAllPortletsAllowedFlag

boolean confirmSetAllPortletsAllowedFlag(boolean flag)
Indicates if the AllPortletsAllowed flag may be set to the specified value.

Parameters:
flag - value for which to indicate if the AllPortletsAllowed flag may be set to
Returns:
true if the AllPortletsAllowed flag may be set, false otherwise

confirmAddAllowedPortlets

boolean confirmAddAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
Indicates if the specified portlets may be added to the allowed portlets.
Note: Setting allowed portlets is not possible on private pages.

Parameters:
portletIDs - Collection of ObjectIDs of the portlet definitions
Returns:
true if the specified portlets may be added to the allowed portlets, false otherwise

confirmAddAllowedPortlet

boolean confirmAddAllowedPortlet(ObjectID portletID)
Indicates if the specified portlet may be added to the allowed portlets.
Note: Setting allowed portlets is not possible on private pages.

Parameters:
portletID - ObjectID of the portlet definition
Returns:
true if the specified portlet may be added to the allowed portlets, false otherwise

confirmRemoveAllowedPortlet

boolean confirmRemoveAllowedPortlet(ObjectID portletID)
Indicates if the specified portlet may be removed from the allowed portlets.
Note: Removing allowed portlets is not possible on private pages.

Parameters:
portletID - ObjectID of the portlet definition
Returns:
true if the portlet may be removed from the allowed portlets, false otherwise

confirmRemoveAllowedPortlets

boolean confirmRemoveAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
Indicates if the specified portlets may be remved from the allowed portlets.
Note: Removing allowed portlets is not possible on private pages.

Parameters:
portletIDs - Collection of ObjectIDs of the portlet definitions
Returns:
true if the portlets may be removed from the allowed portlets, false otherwise

confirmRemoveAllowedPortlets

boolean confirmRemoveAllowedPortlets()
Indicates if all portlets from the allowed portlets may be removed.
Note: Removing allowed portlets is not possible on private pages.

Returns:
true if the all portlets may be removed from the allowed portlets, false otherwise

confirmRetainAllowedPortlets

boolean confirmRetainAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
Indicates if th specified portlets may be retained in the allowed portlets.
Note: Setting allowed portlets is not possible on private pages.

Parameters:
portletIDs - Collection of ObjectIDs of the portlet definitions
Returns:
true if the specified portlets may be retained in the allowed portlets, false otherwise

getPortletModelController

PortletModelController getPortletModelController()
                                                 throws CannotInstantiateControllerException
Returns a portlet model controller valid in the scope of this layout model controller. In case a portlet model controller has been requested for the layout model controller before, that instance is returned, otherwise a new portlet model controller is returned. Invoking Committable.commit() on this controller has no effect. Changes made to this controller are stored when the associated content model controller is committed. Invoking Disposable.dispose() on this controller is not allowed.

Returns:
the portlet model controller; never null
Throws:
CannotInstantiateControllerException - in case a controller cannot be instantiated

getWireModelController

WireModelController<Wire,ModifiableWire> getWireModelController()
                                                                throws CannotInstantiateControllerException
Returns a wire model controller valid in the scope of this layout model controller. All wires created with the returned wire model controller originate from the layout model represented by this layout model controller. Changes made to this controller are stored when the associated content model controller is committed.

Specified by:
getWireModelController in interface WireModelControllerProvider
Returns:
A wire model controller.
Throws:
CannotInstantiateControllerException - in case the wire model controller can not be instantiated.