Package se.conciliate.extensions.publish
Interface MenuProvider
public interface MenuProvider
- Author:
- Richard
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static class
static class
Immutable class, can be called from any thread. -
Method Summary
Modifier and TypeMethodDescriptiondeserializeMenuKey
(String serializedKey) Takes a serialized key and creates a object key.Only BG.Only BG.loadMenuItemEditor
(Consumer<Boolean> accepted, MenuProvider.MenuKey selected) Only BGOnly BG.void
publish
(Path root, Collection<MenuProvider.MenuKey> keys, Set<String> includedModelUUIDs, Collection<MTLanguage> languages) Only BGTakes a key and creates a string representation of it.
-
Method Details
-
getProviderUUID
String getProviderUUID()Only BG.- Returns:
- The provider UUID.
-
loadProviderInfo
MenuProvider.MenuProviderInfo loadProviderInfo()Only BG.- Returns:
- The MenuProviderInfo.
-
loadItems
List<MenuProvider.ProvidedMenuItem> 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
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
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
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
-