/** * Append a new menu item at root level. * * @param sItemID * The new menu item ID. May not be <code>null</code>. * @param aURL * The referenced URL. May not be <code>null</code>. * @param aName * The name of the menu item. May not be <code>null</code>. * @return The created menu item object. Never <code>null</code>. */ @Nonnull default IMenuItemExternal createRootItem (@Nonnull final String sItemID, @Nonnull final ISimpleURL aURL, @Nonnull final IHasDisplayText aName) { return createRootItem (sItemID, new ConstantHasSimpleURL (aURL), aName); }
/** * Append a new menu item separator at root level * * @return The created menu item separator object. Never <code>null</code>. */ @Nonnull default IMenuSeparator createRootSeparator () { return createRootSeparator (GlobalIDFactory.getNewStringID ()); }
/** * Append a new menu item separator as a child of the passed menu item * * @param sParentID * The parent menu item ID to append the separator to. May not be * <code>null</code>. * @return The created menu item separator object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuSeparator createSeparator (@Nonnull final String sParentID) { return createSeparator (sParentID, GlobalIDFactory.getNewStringID ()); }
/** * Append a new menu item below the specified parent. * * @param sParentID * The parent menu item ID to append the item to. May not be * <code>null</code>. * @param sItemID * The new menu item ID. May not be <code>null</code>. * @param aURL * The referenced URL. May not be <code>null</code>. * @param aName * The name of the menu item. May not be <code>null</code>. * @return The created menu item object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuItemExternal createItem (@Nonnull final String sParentID, @Nonnull final String sItemID, @Nonnull final ISimpleURL aURL, @Nonnull final IHasDisplayText aName) { return createItem (sParentID, sItemID, new ConstantHasSimpleURL (aURL), aName); }
/** * Append a new menu item below the specified parent. * * @param aParent * The parent menu item to append the item to. May not be * <code>null</code>. * @param sItemID * The new menu item ID. May not be <code>null</code>. * @param aURL * The referenced URL. May not be <code>null</code>. * @param aName * The name of the menu item. May not be <code>null</code>. * @return The created menu item object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuItemExternal createItem (@Nonnull final IMenuItem aParent, @Nonnull final String sItemID, @Nonnull final ISimpleURL aURL, @Nonnull final IHasDisplayText aName) { return createItem (aParent, sItemID, new ConstantHasSimpleURL (aURL), aName); }
/** * Append a new menu item below the specified parent. * * @param sParentID * The parent menu item ID to append the item to. May not be * <code>null</code>. * @param aPage * The referenced page. May not be <code>null</code>. * @return The created menu item object. The ID of the menu item is the ID of * the page. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuItemPage createItem (@Nonnull final String sParentID, @Nonnull final IPage aPage) { ValueEnforcer.notNull (aPage, "Page"); return createItem (sParentID, aPage.getID (), aPage); }
/** * Append a new menu item separator as a child of the passed menu item * * @param aParent * The parent menu item to append the separator to. May not be * <code>null</code>. * @return The created menu item separator object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuSeparator createSeparator (@Nonnull final IMenuItem aParent) { ValueEnforcer.notNull (aParent, "Parent"); return createSeparator (aParent.getID ()); }
/** * Append a new menu item at root level. * * @param aPage * The referenced page. May not be <code>null</code>. * @return The created menu item object. The ID of the menu item is the ID of * the page. Never <code>null</code>. */ @Nonnull default IMenuItemPage createRootItem (@Nonnull final IPage aPage) { ValueEnforcer.notNull (aPage, "Page"); return createRootItem (aPage.getID (), aPage); }
/** * Append a new menu item below the specified parent. * * @param aParent * The parent menu item to append the item to. May not be * <code>null</code>. * @param sItemID * The new menu item ID. May not be <code>null</code>. * @param aURL * The referenced URL. May not be <code>null</code>. * @param aName * The name of the menu item. May not be <code>null</code>. * @return The created menu item object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuItemExternal createItem (@Nonnull final IMenuItem aParent, @Nonnull final String sItemID, @Nonnull final IHasSimpleURL aURL, @Nonnull final IHasDisplayText aName) { ValueEnforcer.notNull (aParent, "Parent"); return createItem (aParent.getID (), sItemID, aURL, aName); }
/** * Append a new menu item separator as a child of the passed menu item * * @param aParent * The parent menu item to append the separator to. May not be * <code>null</code>. * @param sID * Separator ID to be used. Must be unique. May neither be * <code>null</code> nor empty! * @return The created menu item separator object. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved * @since 8.0.1 */ @Nonnull default IMenuSeparator createSeparator (@Nonnull final IMenuItem aParent, @Nonnull @Nonempty final String sID) { ValueEnforcer.notNull (aParent, "Parent"); return createSeparator (aParent.getID (), sID); }
/** * Append a new menu item below the specified parent. * * @param aParent * The parent menu item to append the item to. May not be * <code>null</code>. * @param aPage * The referenced page. May not be <code>null</code>. * @return The created menu item object. The ID of the menu item is the ID of * the page. Never <code>null</code>. * @throws IllegalArgumentException * If the passed parent menu item could not be resolved */ @Nonnull default IMenuItemPage createItem (@Nonnull final IMenuItem aParent, @Nonnull final IPage aPage) { ValueEnforcer.notNull (aParent, "Parent"); return createItem (aParent.getID (), aPage); }