Class Menu

java.lang.Object
pt.ist.fenixframework.core.AbstractDomainObject
org.fenixedu.cms.domain.Menu_Base
org.fenixedu.cms.domain.Menu
All Implemented Interfaces:
Serializable, Comparable<Menu>, Cloneable, Sluggable, Wrappable, pt.ist.fenixframework.DomainObject

public class Menu extends Menu_Base implements Wrappable, Sluggable, Cloneable, Comparable<Menu>
Model of a Menu for a given Page
See Also:
  • Field Details

  • Constructor Details

    • Menu

      public Menu(Site site, org.fenixedu.commons.i18n.LocalizedString name)
  • Method Details

    • getSite

      public Site getSite()
      Overrides:
      getSite in class Menu_Base
    • delete

      public void delete()
    • setSlug

      public void setSlug(String slug)
      Specified by:
      setSlug in interface Sluggable
      Overrides:
      setSlug in class Menu_Base
    • isValidSlug

      public boolean isValidSlug(String slug)
      A slug is valid if there are no other page on that site that have the same slug.
      Specified by:
      isValidSlug in interface Sluggable
      Parameters:
      slug - slug
      Returns:
      true if it is a valid slug.
    • setName

      public void setName(org.fenixedu.commons.i18n.LocalizedString name)
      saves the name of the post and creates a new slug for the post.
      Overrides:
      setName in class Menu_Base
    • putAt

      public void putAt(MenuItem item, int position)
      Puts a MenuItem at a given position, shifting the existing ones to the right.
      Parameters:
      item - The MenuItem to be added.
      position - the position to save the item.
    • remove

      public void remove(MenuItem mi)
      Removes a given MenuItem from the Menu.
      Parameters:
      mi - the MenuItem to be removed.
    • add

      public void add(MenuItem mi)
      Adds a given MenuItem as the last item.
      Parameters:
      mi - the MenuItem to be added.
    • getToplevelItemsSorted

      public Stream<MenuItem> getToplevelItemsSorted()
    • getItemsSorted

      public Stream<MenuItem> getItemsSorted()
    • clone

      public Menu clone(CloneCache cloneCache)
      Specified by:
      clone in interface Cloneable
    • compareTo

      public int compareTo(Menu o)
      Specified by:
      compareTo in interface Comparable<Menu>
    • makeWrap

      public Wrap makeWrap()
      Specified by:
      makeWrap in interface Wrappable
    • makeWrap

      public Wrap makeWrap(Page page)
    • checkMenuOrder

      public boolean checkMenuOrder()