© 2005 BEA Systems, Inc.

com.bea.netuix.application.manager
Interface IMenuDefinitionManager

All Known Subinterfaces:
BookDefinitionManager

public interface IMenuDefinitionManager

This is the primary interface for performing persistent store operations on MenuDefinitions. 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 preferred 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.

"Definitions" can be thought of as objects in the Library. Objects in the library are not associated to any one Desktop. In other words definitions can be placed on zero or more desktops and changes made in the Library (to the definitions) are cascaded down to object on the desktops. If you are only interested in effecting a single desktop then use the PortalCustomizationManager and make changes to the "Instances".


Method Summary
 MenuDefinition createMenuDefinition(CustomizationContext customizationContext, MenuDefinition menuDefinition)
          Creates a new MenuView Definition with its placeholders.
 void deleteMenuDefinition(CustomizationContext customizationContext, MenuDefinitionId menuDefinitionId)
          Delete a menu definition.
 void deleteMenuDefinitionWithReplacement(CustomizationContext customizationContext, MenuDefinitionId deleteMenuDefinitionId, MenuDefinitionId replacementMenuDefinitionId)
          Delete a menu definition and replace any uses of that menu with a replacement menu.
 MenuDefinition getMenuDefinition(CustomizationContext customizationContext, MenuDefinitionId menuDefinitionId)
          Getter for returning a single MenuDefinition object given a supplied menu definition identifier.
 MenuDefinition getMenuDefinitionFromFile(CustomizationContext customizationContext, String menuFileName, String webAppName)
          Getter for returning a single MenuDefinition object given a supplied menu definition identifier.
 MenuDefinitionId getMenuDefinitionId(CustomizationContext customizationContext, String markupName, String webAppName)
          Getter for returning a single MenuDefinitionId object given a supplied menu markup name.
 MenuDefinition[] getMenuDefinitions(CustomizationContext customizationContext, String webapp)
          Getter for returning a list of all MenuDefinitions scoped to the supplied webapp.
 MenuDefinition[] getMenuDefinitions(CustomizationContext customizationContext, String webapp, MenuDefinitionId firstMenuDefinitionId, int limit)
          Returns MenuDefinitions in definitionId order (create order).
 MenuView getMenuView(CustomizationContext customizationContext, MenuDefinitionId menuDefinitionId)
          Getter for returning an immutable deep copy of a MenuView.
 void updateMenuDefinition(CustomizationContext customizationContext, MenuDefinition menuDefinition)
          Update the menu definition with the new data.
 

Method Detail

createMenuDefinition

public MenuDefinition createMenuDefinition(CustomizationContext customizationContext,
                                           MenuDefinition menuDefinition)
                                    throws RemoteException,
                                           MissingDataException,
                                           NotEntitledException
Creates a new MenuView Definition with its placeholders.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
menuDefinition - the menu data and associated placeholders
Returns:
a fully populated MenuDefinition
Throws:
MissingDataException - the menuDefiniiton supplied as an argument is missing some vital data.
NotEntitledException - the caller is not entitled to create a new menu.
RemoteException

deleteMenuDefinition

public void deleteMenuDefinition(CustomizationContext customizationContext,
                                 MenuDefinitionId menuDefinitionId)
                          throws RemoteException,
                                 ObjectNotFoundException,
                                 ObjectInUseException,
                                 NotEntitledException

Delete a menu definition.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
menuDefinitionId - the id of the menu definition to delete.
Throws:
ObjectNotFoundException - if the menuDefinitionId is bogus
ObjectInUseException - if page instances are currently using this menu
NotEntitledException - the caller is not entitled to perform this operation.
RemoteException
See Also:
deleteMenuDefinitionWithReplacement(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.MenuDefinitionId, com.bea.netuix.application.identifier.MenuDefinitionId)

deleteMenuDefinitionWithReplacement

public void deleteMenuDefinitionWithReplacement(CustomizationContext customizationContext,
                                                MenuDefinitionId deleteMenuDefinitionId,
                                                MenuDefinitionId replacementMenuDefinitionId)
                                         throws RemoteException,
                                                ObjectNotFoundException,
                                                NotEntitledException

Delete a menu definition and replace any uses of that menu with a replacement menu. This method is useful for deleting a menu that is in use by book instances and not having to delete those book instances.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
deleteMenuDefinitionId - the id of the menu definition to delete.
replacementMenuDefinitionId - the id of the replacement menu
Throws:
ObjectNotFoundException - if either of the menuDefinitionIds are bogus
NotEntitledException - the caller is not entitled to perform this operation.
RemoteException
See Also:
deleteMenuDefinition(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.MenuDefinitionId)

getMenuDefinition

public MenuDefinition getMenuDefinition(CustomizationContext customizationContext,
                                        MenuDefinitionId menuDefinitionId)
                                 throws RemoteException

Getter for returning a single MenuDefinition object given a supplied menu definition identifier.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
menuDefinitionId - the unique menu definition identifier.
Returns:
a MenuDefinition object fully populated and internationalized, otherwise, null>/code> if the object does not exist.
Throws:
RemoteException
See Also:
MenuDefinition

getMenuDefinitionFromFile

public MenuDefinition getMenuDefinitionFromFile(CustomizationContext customizationContext,
                                                String menuFileName,
                                                String webAppName)
                                         throws RemoteException

Getter for returning a single MenuDefinition object given a supplied menu definition identifier.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
menuFileName - the name of the .menu file
webAppName - the name of the webapp as defined in the config.xml
Returns:
a MenuDefinition object fully populated and internationalized, otherwise, null>/code> if the object does not exist.
Throws:
RemoteException
See Also:
MenuDefinition

getMenuDefinitionId

public MenuDefinitionId getMenuDefinitionId(CustomizationContext customizationContext,
                                            String markupName,
                                            String webAppName)
                                     throws RemoteException

Getter for returning a single MenuDefinitionId object given a supplied menu markup name.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
markupName - the markup name attribute supplied on the tag,
webAppName - as defined in the config.xml
Returns:
menuDefinitionId the unique menu definition identifier or null if none exist.
Throws:
RemoteException

getMenuDefinitions

public MenuDefinition[] getMenuDefinitions(CustomizationContext customizationContext,
                                           String webapp)
                                    throws RemoteException

Getter for returning a list of all MenuDefinitions scoped to the supplied webapp.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
webapp - the web application these menu definitions are scoped to.
Returns:
an array of MenuDefinition objects if they exist, otherwise, an empty array.
Throws:
RemoteException
See Also:
MenuDefinition

getMenuDefinitions

public MenuDefinition[] getMenuDefinitions(CustomizationContext customizationContext,
                                           String webapp,
                                           MenuDefinitionId firstMenuDefinitionId,
                                           int limit)
                                    throws RemoteException

Returns MenuDefinitions in definitionId order (create order). Starting with the supplied definitionId and limiting the result set to size limit If fewer MenuDefinitions exist than limit, then a smaller result set will be returned. If no definitions are found an empty array is returned. To start at the beginning of the list specify null as the menuDefinitionId. To retrieve from the end of the list and back specify null as the menuDefinitionId and a negative limit. To retrieve all the menuDefinitions in the database supply a limit of 0.
Implementation has to ensure that repeated calls to this method return MenuDefinitions in a consistent order.

Parameters:
customizationContext - customization information such as preferred locales.
webapp - the web application these menu definitions are scoped to.
firstMenuDefinitionId - optional parameter to indicate where the list should start.
limit - the maximum result set size. Note the limit may be negative indicating a reverse sort order. For all the records specify a limit of zero. Note: some elements may be pruned because of entitlements.
Returns:
array of MenuDefinitions no greater than limit in size.
Throws:
RemoteException

getMenuView

public MenuView getMenuView(CustomizationContext customizationContext,
                            MenuDefinitionId menuDefinitionId)
                     throws RemoteException

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

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
menuDefinitionId - the unique menuDefinitionId.
Returns:
an immutable deep copy MenuView object if one exist, otherwise null.
Throws:
RemoteException

updateMenuDefinition

public void updateMenuDefinition(CustomizationContext customizationContext,
                                 MenuDefinition menuDefinition)
                          throws RemoteException,
                                 ObjectNotFoundException,
                                 NotEntitledException

Update the menu definition with the new data.

Parameters:
customizationContext - customization information such as preferred locales and desktopInstanceId
menuDefinition - the menu definition containing the new data
Throws:
ObjectNotFoundException - if the LocalizationIntersectionId in the LocalizationResource is bogus.
RemoteException
NotEntitledException

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved