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.
 boolean addAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Adds the specified portlets to the list of allowed portlets for the last layer of the node.
 boolean confirmAddAllowedPortlet(ObjectID portletID)
          Indicates if the specified portlet may be added to the allowed portlets.
 boolean confirmAddAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Indicates if the specified portlets may be added to the allowed portlets.
 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.
 boolean confirmRemoveAllowedPortlets()
          Indicates if all portlets from the allowed portlets may be removed.
 boolean confirmRemoveAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Indicates if the specified portlets may be remved from the allowed portlets.
 boolean confirmRetainAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Indicates if th specified portlets may be retained in the allowed portlets.
 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 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
 boolean removeAllowedPortlets()
          Removes all allowed portlets for the last layer of the node.
 boolean removeAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Removes the specified portlets from the list of allowed portlets for the last layer of the node
 boolean retainAllowedPortlets(java.util.Collection<ObjectID> portletIDs)
          Retains the specified portlets of the list of allowed portlets for the last layer of the node
 boolean setAllPortletsAllowedFlag(boolean flag)
          Sets the AllPortletsAllowed flag value.
 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, render
 
Methods inherited from interface com.ibm.portal.TreeModel
getChildren, getParent, getRoot, hasChildren
 
Methods inherited from interface com.ibm.portal.Invalidatable
invalidate, invalidate
 
Methods inherited from interface com.ibm.portal.TreeModel
getChildren, getParent, getRoot, hasChildren
 
Methods inherited from interface com.ibm.portal.LocatorProvider
getLocator
 
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, delete, insert
 
Methods inherited from interface com.ibm.portal.TreeModel
getChildren, getParent, getRoot, hasChildren
 
Methods inherited from interface com.ibm.portal.ModelController
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

com.ibm.portal.content.LayoutNode,boolean)">

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

com.ibm.portal.content.LayoutNode,boolean)">

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.

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.

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.

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

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

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.

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

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

com.ibm.portal.content.LayoutNode,boolean)">

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

com.ibm.portal.content.LayoutNode,boolean)">

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.

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.

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.

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.

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.

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.

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.

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

getWireModelController

WireModelController 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.