Interface MenuProvider


public interface MenuProvider
Author:
Richard
  • Method Details

    • getProviderUUID

      String getProviderUUID()
      Only BG.
      Returns:
      The provider UUID.
    • loadProviderInfo

      MenuProvider.MenuProviderInfo loadProviderInfo()
      Only BG.
      Returns:
      The MenuProviderInfo.
    • loadItems

      Only BG.
      Returns:
      The list of menu items.
    • publish

      void publish(Path root, Collection<MenuProvider.MenuKey> keys, Set<String> includedModelUUIDs, Collection<MTLanguage> languages) throws IOException
      Only BG
      Parameters:
      root - A Path.
      keys - The keys.
      includedModelUUIDs - The uuid of models to include.
      languages - The languages.
      Throws:
      IOException - If an IOException occurs.
    • loadMenuItemEditor

      MenuEditor loadMenuItemEditor(Consumer<Boolean> accepted, MenuProvider.MenuKey selected)
      Only BG
      Parameters:
      accepted - A consumer to call if the editor result can/can't be persisted. Call this with true to indicate that the state of the editor is in a persistable state, false to indicate it is not in a persistable state.
      selected - A key returned by a menu editor created by this provider. That is, the "last" time this provider's editor was used, that editor returned the given key as a selected key. If no editor has ever returned a value, then this parameter is null.
      Returns:
      A new menu editor able to create a menu editor component.
    • serializeMenuKey

      String serializeMenuKey(MenuProvider.MenuKey key)
      Takes a key and creates a string representation of it. Note that this form will be appended to a url so all characters must be valid in a URL.
      Parameters:
      key - a menu key that points to a specific menu item
      Returns:
      a string representation of the key
    • deserializeMenuKey

      MenuProvider.MenuKey deserializeMenuKey(String serializedKey)
      Takes a serialized key and creates a object key.
      Parameters:
      serializedKey - a menu key that points to a specific menu item
      Returns:
      a key object