com.ibm.portal.dynamicui
Interface DynamicUICtrl

All Superinterfaces:
AbstractDynamicUICtrl, DynamicUIInfo

public interface DynamicUICtrl
extends AbstractDynamicUICtrl

The DynamicUICtrl provides access to those functions of dynamic ui management that alter the current state.
Portlets can get access to the DynamicUICtrl via the DynamicUIManagementFactoryService .
The DynamicUICtrl must be obtained once per action phase of the portlet and should not be stored.

Since:
5.1.0.1
See Also:
DynamicUIManagementFactoryService

Method Summary
 ObjectID addPage(ObjectID pageDefinitionID, Localized localeInformation, PropertyValue[] properties)
          Adds a new page that is a copy of the page definition.
 ObjectID addPage(ObjectID pageDefinitionID, ObjectID pageID, Localized localeInformation, PropertyValue[] properties)
          Adds a new page that is a copy of the page definition.
 ObjectID addPortlet(ObjectID portletDefinitionID, Localized localeInformation, PropertyValue[] properties)
          Adds a portlet.
 ObjectID addPortlet(ObjectID portletDefinitionID, ObjectID portletWindowID, Localized localeInformation, PropertyValue[] properties)
          Adds a new portlet.
 ObjectID addSharedPage(ObjectID pageDefinitionID, Localized localeInformation, PropertyValue[] properties)
          Adds a shared page that is a copy of the page definition.
 ObjectID addSharedPortlet(ObjectID portletDefinitionID, Localized localeInformation, PropertyValue[] properties)
          Adds a shared portlet.
 ObjectID removePage(ObjectID pageID)
          Removes a page.
 void removePortlet(ObjectID portletWindowID)
          Removes a portlet.
 
Methods inherited from interface com.ibm.portal.dynamicui.DynamicUIInfo
isPageClosable, isPortletClosable
 

Method Detail

addPage

ObjectID addPage(ObjectID pageDefinitionID,
                 Localized localeInformation,
                 PropertyValue[] properties)
                 throws DynamicUIManagementException
Description copied from interface: AbstractDynamicUICtrl
Adds a new page that is a copy of the page definition. The layout and content of the page is defined by the page definition. Changes to the page definition will not influence the new page.

The new page is not displayed by default. If the page should be displayed, the portlet should generate a url to the page using its object id and set it as an redirect on the response.

Note: If properties should be passed, the user must be redirected to that page at the end of this action phase. Otherwise the properties are not delivered.

Specified by:
addPage in interface AbstractDynamicUICtrl
Parameters:
pageDefinitionID - The object id of the page definition. It is not allowed to pass null for this parameter.
localeInformation - The titles and descriptions that should be set for the new page. For those locales that are supported by the base page but that are not part of this set, the titles and descriptions of the base page are used. This parameter can be null . If null is passed, the values defined for the page defintion are used.
properties - The properties that should be delivered to all portlets on the page. This parameter can be null .
Returns:
ObjectID The object id of the launched page.
Throws:
ResourceLookupException - The page referenced by the pageDefinitionID cannot be found.
AddUIElementException - A problem occured and the page could not be added.
MissingAccessRightsException - The user has not sufficient access rights for the page definition.
DynamicUIManagementException
See Also:
AbstractDynamicUICtrl.addPage(com.ibm.portal.ObjectID, com.ibm.portal.Localized, com.ibm.portal.propertybroker.property.PropertyValue[])

addPage

ObjectID addPage(ObjectID pageDefinitionID,
                 ObjectID pageID,
                 Localized localeInformation,
                 PropertyValue[] properties)
                 throws DynamicUIManagementException
Description copied from interface: AbstractDynamicUICtrl
Adds a new page that is a copy of the page definition. The layout and content of the page is defined by the page definition. Changes to the page definition will not influence the new page.

When the pageID parameter is set, it is checked whether the page referenced by this object id does exist or not. If yes, the page id is just returned. Otherwise, a new page is added and its object id returned. This method can also be used to initially create a page by passing null for the pageID parameter.

Note: Passed properties are also delivered in the case where an existing page is reused.

Note: If properties should be passed, the user must be redirected to that page at the end of this action phase. Otherwise the properties are not delivered.

The new page is not displayed by default. If the page should be displayed, the portlet should generate a url to the page using its object id and set it as an redirect on the response.

Specified by:
addPage in interface AbstractDynamicUICtrl
Parameters:
pageDefinitionID - The object id of the page definition. It is not allowed to pass null for this parameter.
pageID - The object id of the page that should be used in case that it does exist or null if a new page should be added.
localeInformation - The titles and descriptions that should be set for the new page. For those locales that are supported by the base page but that are not part of this set, the titles and descriptions of the base page are used. This parameter can be null . If null is passed, the values defined for the page defintion are used.
properties - The properties that should be delivered to all portlets on the launched page. This parameter can be null .
Returns:
ObjectID The object id of the launched page.
Throws:
ResourceLookupException - The page referenced by the pageDefinitionID cannot be found.
AddUIElementException - A problem occured and the page could not be added.
MissingAccessRightsException - The user has not sufficient access rights for the page definition.
DynamicUIManagementException
See Also:
AbstractDynamicUICtrl.addPage(com.ibm.portal.ObjectID, com.ibm.portal.ObjectID, com.ibm.portal.Localized, com.ibm.portal.propertybroker.property.PropertyValue[])

addSharedPage

ObjectID addSharedPage(ObjectID pageDefinitionID,
                       Localized localeInformation,
                       PropertyValue[] properties)
                       throws DynamicUIManagementException
Description copied from interface: AbstractDynamicUICtrl
Adds a shared page that is a copy of the page definition. Within a dynamic ui management configuration there can be exactly one shared page for a given page definition. When there already exists a shared page for the passed pageDefinitionID the object id of that page is is returned. If not, a new shared page is created and its object id is returned. The layout and content of the page is defined by the page definition. Changes to the page definition will not influence the new page.

Note: Passed properties are also delivered in the case where an existing page is reused.

Note: If properties should be passed, the user must be redirected to that page at the end of this action phase. Otherwise the properties are not delivered.

The new page is not displayed by default. If the page should be displayed, the portlet should generate a url to the page using its object id and set it as an redirect on the response.

Specified by:
addSharedPage in interface AbstractDynamicUICtrl
Parameters:
pageDefinitionID - The object id of the page definition. It is not allowed to pass null for this parameter.
localeInformation - The titles and descriptions that should be set for the new page. For those locales that are supported by the base page but that are not part of this set, the titles and descriptions of the base page are used. This parameter can be null . If null is passed, the values defined for the page defintion are used.
properties - The properties that should be delivered to all portlets on the launched page. This parameter can be null .
Returns:
ObjectID The object id of the shared page.
Throws:
ResourceLookupException - The page referenced by the pageDefinitionID cannot be found.
AddUIElementException - A problem occured and the page could not be added.
MissingAccessRightsException - The user has not sufficient access rights for the page definition.
DynamicUIManagementException
See Also:
AbstractDynamicUICtrl.addSharedPage(com.ibm.portal.ObjectID, com.ibm.portal.Localized, com.ibm.portal.propertybroker.property.PropertyValue[])

removePage

ObjectID removePage(ObjectID pageID)
                    throws DynamicUIManagementException
Description copied from interface: AbstractDynamicUICtrl
Removes a page.

Specified by:
removePage in interface AbstractDynamicUICtrl
Parameters:
pageID - The id of the page that should be removed. It is not allowed to pass null for this parameter.
Returns:
ObjectID The object id of another available page, to which the user can be redirected.
Throws:
ResourceLookupException - The page referenced by the object id cannot be found.
RemoveUIElementException - An error occured and the element could not be removed.
DynamicUIManagementException
See Also:
AbstractDynamicUICtrl.removePage(com.ibm.portal.ObjectID)

addPortlet

ObjectID addPortlet(ObjectID portletDefinitionID,
                    Localized localeInformation,
                    PropertyValue[] properties)
                    throws DynamicUIManagementException
Adds a portlet. It is only possible to add a portlet to the (dynamic) page the calling portlet is located on. Focus is not set to the newly generated portlet by default. If the new portlet should get focus, the portlet should generate a url to the portlet using its object id and set it as an redirect on the response.

Parameters:
portletDefinitionID - The object id the portlet definition. It is not allowed to pass null for this parameter.
localeInformation - The titles and descriptions that should be set for the new portlet. For those locales that are supported by the portlet definition but that are not part of this set, the titles and descriptions of the portlet definition are used. This parameter can be null . If null is passed, the values defined for the portlet defintion are used.
properties - The properties that should be delivered to the launched portlet. This parameter can be null .
Returns:
ObjectID The object id of the portlet window of the added portlet.
Throws:
ResourceLookupException - The portlet definiton referenced by the portletDefinitionID cannot be found.
AddUIElementException - A problem occured and the portlet could not be added to the page.
MissingAccessRightsException - The user has not sufficient access rights for the portlet definition.
DynamicUIManagementException
See Also:
RedirectURLGenerator

addPortlet

ObjectID addPortlet(ObjectID portletDefinitionID,
                    ObjectID portletWindowID,
                    Localized localeInformation,
                    PropertyValue[] properties)
                    throws DynamicUIManagementException
Adds a new portlet. It is only possible to add a portlet to the (dynamic) page the calling portlet is located on. When the portletWindowID parameter is set, it is checked whether the portlet window referenced by this object id does exist or not. If yes, the portlet window id is just returned. Otherwise, a new portlet is added and its portlet window object id returned. This method can also be used to initially add a portlet to a page by passing null for the portletWindowID parameter.

Note: Passed properties are also delivered in the case where an existing portlet is reused.

Focus is not set to the newly generated portlet by default. If the portlet should get focus, the portlet should generate a url to the portlet using its object id and set it as an redirect on the response.

Parameters:
portletDefinitionID - The object id of the portlet definition. It is not allowed to pass null for this parameter.
portletWindowID - The object id of the portletWindow that should be used in case that it does exist.
localeInformation - The titles and descriptions that should be set for the new portlet. For those locales that are supported by the portlet definition but that are not part of this set, the titles and descriptions of the portlet definition are used. This parameter can be null . If null is passed, the values defined for the portlet defintion are used.
properties - The properties that should be delivered to the portlet. This parameter can be null .
Returns:
ObjectID The object id of the portlet window of the added portlet.
Throws:
ResourceLookupException - The portlet definiton referenced by the portletDefinitionID cannot be found.
AddUIElementException - A problem occured and the portlet could not be added to the page.
MissingAccessRightsException - The user has not sufficient access rights for the portlet definition.
DynamicUIManagementException
See Also:
RedirectURLGenerator

addSharedPortlet

ObjectID addSharedPortlet(ObjectID portletDefinitionID,
                          Localized localeInformation,
                          PropertyValue[] properties)
                          throws DynamicUIManagementException
Adds a shared portlet. It is only possible to add a shared portlet to the (dynamic) page the calling portlet is located on. There can be exactly one shared portlet for a portlet definition on a page. Therfore, it is checked whether there exists a shared portlet for the according portlet definition. If yes, its object id is returned. If not, a new shared portlet is created and its object id is returned.

Note: Passed properties are also delivered in the case where an existing portlet is reused.

Focus is not set to the newly generated portlet by default. If the portlet should get focus, the portlet should generate a url to the portlet using its object id and set it as an redirect on the response.

Parameters:
portletDefinitionID - The object id of the portlet definition. It is not allowed to pass null for this parameter.
localeInformation - The titles and descriptions that should be set for the new portlet. For those locales that are supported by the portlet definition but that are not part of this set, the titles and descriptions of the portlet definition are used. This parameter can be null . If null is passed, the values defined for the portlet defintion are used.
properties - The properties that should be delivered to the portlet. This parameter can be null .
Returns:
ObjectID The object id of the added portlet window.
Throws:
ResourceLookupException - The portlet definiton referenced by the portletDefinitionID cannot be found.
AddUIElementException - A problem occured and the portlet could not be added to the page.
MissingAccessRightsException - The user has not sufficient access rights for the portlet definition.
DynamicUIManagementException
See Also:
RedirectURLGenerator

removePortlet

void removePortlet(ObjectID portletWindowID)
                   throws DynamicUIManagementException
Removes a portlet. It is only possible to remove a portlet from the page the calling portlet is located on.

Parameters:
portletWindowID - The object id of the portlet window that should be removed. It is not allowed to pass null for this parameter.
Throws:
ResourceLookupException - The ui element referenced by the object id cannot be found.
RemoveUIElementException - An error occured and the element could not be removed.
DynamicUIManagementException