IPageInstanceManager Interface

com.bea.netuix.application.manager
IPageInstanceManager Interface

public interface IPageInstanceManager

This is the primary interface for performing persistent store operations on PageDefinitions. In general this interface provides coarse grain getters and fine grain setters.

It is important to note that all methods on this interface are fully internationalized and entitled. All titles and descriptions on the objects returned by these methods are internationalized to the prefered locale. Also, all methods are entitled, meaning if the caller does not have the required credentials the method may return a subset of the actual list or be unable to perform the specified function.

Most "Instances" can be thought of as objects tied to a desktop, An Admin has instances derived from the Library Definition, and the "end user" has instances derived from the admin instance. Changes made via these APIs require a DesktopDefinitionId and the changes are scoped to that desktop. In other words changes made here do not affect the Library or other Desktops. If the "visitorMode" on the customization Context is set the false (default) and the user executing the call is in the "Admin" or "PortalSystemAdministrator" role then these changes take affect at the admin level, and affect ALL users. If the visitorMode is false then the changes only affect the calling user.

Related Topics

CustomizationContext.setVisitorMode(boolean)


All Known Subinterfaces

PortalCustomizationManager

Method Summary

public PlaceableInstance
addPlaceable(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PageInstanceId pageInstanceId, PlaceableDefinitionId placeableDefinitionId, PlaceholderDefinitionId placeholderDefinitionId, int position)
Add a placeable (book or portlet) to a page in a specified location.
public PageInstance
getPageInstance(CustomizationContext customizationContext, PageInstanceId pageInstanceId)

Getter for returning a single PageInstance.

public PageView
getPageView(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PageInstanceId pageInstanceId)

Getter for returning an immutable deep copy of a PageView.

public void
movePlaceable(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PlacementId placementId, PageInstanceId toPageInstanceId, PlaceholderDefinitionId placeholderDefinitionId, int position)
Move a placeable instance from one placeholder to another.
public void
removePlaceable(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PlaceableInstance placeableInstance)
Remove a placeable from a page's placeholder.
public PageInstance
updatePageInstance(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PageInstance pageInstance)

Update the page instance with the new data.

Method Detail

addPlaceable(CustomizationContext, DesktopDefinitionId, PageInstanceId, PlaceableDefinitionId, PlaceholderDefinitionId, int) Method

public PlaceableInstance addPlaceable(CustomizationContext customizationContext, 
                                      DesktopDefinitionId desktopDefinitionId, 
                                      PageInstanceId pageInstanceId, 
                                      PlaceableDefinitionId placeableDefinitionId, 
                                      PlaceholderDefinitionId placeholderDefinitionId, 
                                      int position)
throws RemoteException, ObjectNotFoundException, MissingDataException, NotEntitledException, IllegalDependencyException
Add a placeable (book or portlet) to a page in a specified location. This will create a new placeable instance.

Parameters

customizationContext
customization information such as preferred locales.
desktopDefinitionId
context of the desktop to which this applies
pageInstanceId
the page instance id of the page to add the placeable.
placeableDefinitionId
the abstract definition id of the placeable
placeholderDefinitionId
the placehoder to place this placeable in.
position
the position in the placeholder to insert the placeholder.

Returns

a fully populated placeable instance. This will be of a more concrete type depending on the placeable definition supplied.

Exceptions

RemoteException
ObjectNotFoundException
if the PageDefinitionId or the PlaceholderDefinition Id are bogus
MissingDataException
the placeableDefinition is missing some vital data.
NotEntitledException
IllegalDependencyException
adding the Placeable to the PageInstance would cause a recursive dependancy

Related Topics

CustomizationContext.setVisitorMode(boolean)


getPageInstance(CustomizationContext, PageInstanceId) Method

public PageInstance getPageInstance(CustomizationContext customizationContext, 
                                    PageInstanceId pageInstanceId)
throws RemoteException

Getter for returning a single PageInstance.

Parameters

customizationContext
customization information such as preferred locales and desktopInstanceId returned.

Returns

an fully populated PageInstance object.

Exceptions

RemoteException

Related Topics

PageDefinition


getPageView(CustomizationContext, DesktopDefinitionId, PageInstanceId) Method

public PageView getPageView(CustomizationContext customizationContext, 
                            DesktopDefinitionId desktopDefinitionId, 
                            PageInstanceId pageInstanceId)
throws RemoteException

Getter for returning an immutable deep copy of a PageView. The PageView object, unlike the PageDefinition or the PageInstance objects contains a full set of references to all child pages, pages and so on. The PageView object however is immutable.

Parameters

customizationContext
customization information such as preferred locales and desktopInstanceId returned.
desktopDefinitionId
the desktop definition it this page is placed in
pageInstanceId
the unique pageInstanceId.

Returns

an immutable deep copy PageView object if one exist, otherwise null.

Exceptions

RemoteException

movePlaceable(CustomizationContext, DesktopDefinitionId, PlacementId, PageInstanceId, PlaceholderDefinitionId, int) Method

public void movePlaceable(CustomizationContext customizationContext, 
                          DesktopDefinitionId desktopDefinitionId, 
                          PlacementId placementId, 
                          PageInstanceId toPageInstanceId, 
                          PlaceholderDefinitionId placeholderDefinitionId, 
                          int position)
throws RemoteException, ObjectNotFoundException, NotEntitledException, IllegalDependencyException
Move a placeable instance from one placeholder to another. This method is useful for preserving the instance of paceable.

Parameters

customizationContext
customization information such as preferred locales.
desktopDefinitionId
context of the desktop to which this applies
placementId
the placement id of the placeables current placement within the page
toPageInstanceId
the id of the page to move the placeable to.
placeholderDefinitionId
the new placehoder to place this placeable in.
position
the position in the placeholder to insert the placeholder.

Exceptions

RemoteException
ObjectNotFoundException
if the PageDefinitionId or the PlaceholderDefinition Id are bogus
NotEntitledException
the caller is not entitled to perform this action
IllegalDependencyException

removePlaceable(CustomizationContext, DesktopDefinitionId, PlaceableInstance) Method

public void removePlaceable(CustomizationContext customizationContext, 
                            DesktopDefinitionId desktopDefinitionId, 
                            PlaceableInstance placeableInstance)
throws RemoteException, ObjectNotFoundException, MissingDataException, NotEntitledException
Remove a placeable from a page's placeholder. This operation will end up deleting the placeable's instance but not the placeables definitions.

Parameters

customizationContext
customization information such as preferred locales.
desktopDefinitionId
context of the desktop to which this applies
placeableInstance
the instance to be removed

Exceptions

RemoteException
ObjectNotFoundException
If the padeDefinitionId or the placeableInstanceId are bogus definition is in use by other instance.
MissingDataException
NotEntitledException

updatePageInstance(CustomizationContext, DesktopDefinitionId, PageInstance) Method

public PageInstance updatePageInstance(CustomizationContext customizationContext, 
                                       DesktopDefinitionId desktopDefinitionId, 
                                       PageInstance pageInstance)
throws RemoteException, ObjectNotFoundException, NotEntitledException

Update the page instance with the new data.

Parameters

customizationContext
the desktop this instance is associated with
desktopDefinitionId
the page definition containing the new data

Exceptions

RemoteException
ObjectNotFoundException
if the LocalizationIntersectionId in the LocalizationResource is bogus.
NotEntitledException