Class CmsMenuItemVisibilityMode

    • Method Detail

      • activeInactive

        public static CmsMenuItemVisibilityMode activeInactive​(boolean active)
        Utilitiy method that returns 'active' if the parameter is true, otherwise inactive.

        Parameters:
        active - - whether return value should be 'active'
        Returns:
        the visibility
      • activeInvisible

        public static CmsMenuItemVisibilityMode activeInvisible​(boolean active)
        Utility method that returns 'active' if the parameter is true, otherwise invisible.

        Parameters:
        active - - whether return value should be 'active' rather than 'invisible'
        Returns:
        the visibility
      • valueOf

        public static CmsMenuItemVisibilityMode valueOf​(int type)
        Returns the menu item visibility mode for the given mode value.

        This is used only for serialization and should not be accessed for other purposes.

        Parameters:
        type - the mode value to get the item visibility mode for
        Returns:
        the menu item visibility mode for the given mode value
      • addMessageKey

        public CmsMenuItemVisibilityMode addMessageKey​(java.lang.String messageKey)
        Adds the name of the message key for the visibility mode.

        Parameters:
        messageKey - the name of the message key for the visibility mode
        Returns:
        an extended visibility mode containing the message key
      • getMessageKey

        public java.lang.String getMessageKey()
        Returns the name of the message key for the visibility mode.

        Is usually used as description for the inactive visibility modes.

        Returns:
        the name of the message key for the visibility mode
      • isPrioritized

        public boolean isPrioritized()
        Returns the prioritization flag.

        Returns:
        prioritization flag
      • prioritize

        public CmsMenuItemVisibilityMode prioritize​(boolean prioritized)
        Returns a prioritized instance of the visibility mode.

        Parameters:
        prioritized - true to prioritize
        Returns:
        the new visibility mode instance