Class ShortcutMenuNodeFactory

    • Constructor Detail

      • ShortcutMenuNodeFactory

        public ShortcutMenuNodeFactory​(MenuNodeFactoryContext context,
                                       MenuBean menuBean,
                                       MenuViewConfig viewConfig,
                                       MenuBean targetMenuBean)
        Constructor
        Parameters:
        context - factory context
        menuBean - the MenuBean for which menu nodes are created
        viewConfig - factory viewConfig
        targetMenuBean - the MenuBean to which the shortcut menu nodes of this factory refers
    • Method Detail

      • createMenuTree

        public MenuNode createMenuTree​(MenuNode parentMenuNode)
                                throws BackingBeanException,
                                       SystemException
        not used private ShortcutMenuNodeFactory(MenuNodeFactoryContext context, MenuBean menuBean, MenuViewConfig viewConfig, String shortcutXml) { super(context, menuBean, viewConfig); this.shortcutXml = shortcutXml; }
        Specified by:
        createMenuTree in class MenuNodeFactory
        Parameters:
        parentMenuNode - the parent menuNode under which the rootMenuNode (or its descendants) of this MenuNodeFactory will be added
        Returns:
        the root menu node of tree created
        Throws:
        SystemException - throw if an error occurs
        BackingBeanException
      • createShortcutMenuNode

        public MenuNode createShortcutMenuNode​(MenuBean menuBean,
                                               java.lang.String name,
                                               java.lang.Integer icon,
                                               java.lang.String module,
                                               java.lang.Class entityType,
                                               java.lang.String command)
                                        throws SystemException
        Create shortcut menuNode without context.
        Parameters:
        menuBean - menuBean
        name - menuNode name (not localized). name is use as id and must be unique within the menuBean.
        icon - menuNode icon for commandLink/Button
        module - the module to which the targeted menuNode belongs
        entityType - the targeted menuNode entity type, can be null
        command - the command of targeted menu node, can not be null.
        Returns:
        shortcut menu node, return null if permission is denied.
        Throws:
        SystemException - throw if an error occurs
      • createShortcutMenuNode

        public MenuNode createShortcutMenuNode​(MenuBean menuBean,
                                               java.lang.String name,
                                               java.lang.Integer icon,
                                               java.lang.String module,
                                               java.lang.Class entityType,
                                               java.lang.String command,
                                               TypedMenuNodeFactoryContext context)
                                        throws SystemException
        Create shortcut menuNode with context. If the command is to create/import entities, return null if the current user does not have such permissions.
        Parameters:
        menuBean - menuBean
        name - menuNode name (not localized). name is used as id and must be unique within the menuBean.
        icon - menuNode icon for commandLink/Button
        module - the module to which the targeted menuNode belongs
        entityType - the targeted menuNode entity type, can be null
        command - the command of targeted menu node, can not be null.
        context - TypedMenuNodeFactoryContext of targeted menu node
        Returns:
        shortcut menu node, return null if permission is denied.
        Throws:
        SystemException - throw if an error occurs
      • createShortcutMenuNode

        public MenuNode createShortcutMenuNode​(MenuBean menuBean,
                                               java.lang.String name,
                                               boolean nameLocalized,
                                               java.lang.Integer icon,
                                               java.lang.String module,
                                               java.lang.Class entityType,
                                               java.lang.String command,
                                               java.lang.String contextDataId,
                                               java.lang.String contextTypeName,
                                               boolean checkPermission,
                                               ModuleScopedName permissionRequired)
                                        throws SystemException
        Create shortcut menuNode.
        Parameters:
        menuBean - menuBean
        name - menuNode name (not localized). name is use as id and must be unique within the menuBean.
        nameLocalized - whether menu node name is localized
        icon - menuNode icon for commandLink/Button
        module - the module to which the targeted menuNode belongs
        entityType - the targeted menuNode entity type, can be null
        command - the command of targeted menu node, can not be null.
        contextDataId - the menuNodeFactoryContext.contextDataId of the targeted menuNode, can be null
        contextTypeName - typeName in TypedMenuNodeFactoryContext if any
        checkPermission - whether to check permission
        permissionRequired - permission required, null if permission is not required
        Returns:
        shortcut menu node. return null if current authenticated user does not have the permission.
        Throws:
        SystemException - throw if an error occurs