Uploaded image for project: 'AppFormer'
  1. AppFormer
  2. AF-231 Preferences API
  3. AF-386

Workbench Preferences Bean API

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 0.9.0.Final
    • 1.0.0.Final
    • None
    • None
    • NEW
    • NEW

      Create a bean API, where the user can inject preferences beans (pojos) to read/write its properties. There will be three different annotations:

      • @WorkbenchPreference(root = true (default)): defines a preference object. This object will be serialized and persisted in the file system. If root == true, then the @WorkbenchPreferenceScreen that points to this preference object will be shown as a "root node" in the preferences central screen.
      • @Property(inherited = false (default), editable = true (default)): defines a preference object property. If the property type is annotated with @WorkbenchPreference, then it will generate a child node on the preferences central tree, which will show its associated form (@WorkbenchPreferenceScreen) when clicked. If the property type is not annotated with @Property, it will appear in that preference form (string, boolean and enum). When inherited == false, the property will be individually defined for each preference that uses it ("cloned from the parent"). If inherited == true, then the property content will be loaded/saved from/to another independent preference file, and it'll have the same value for all other preferences that also use it with inherited == true.
      • @WorkbenchPreferenceScreen(identifier = "my-preference", preference = MyPreference.class): Defines a preference form. Allows the preference class that goes on the annotation to be edited. If a root preference does not have a @WorkbenchPreferenceScreen annotation pointing to it, then a default form will be provided by Uberfire.

            paulovmr Paulo Rego
            paulovmr Paulo Rego
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: