Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Context Editor Design Notes

Revision as of 11:43, 25 August 2011 by IMacNeill.azigo.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}

This document first discusses the editing of "card" or "profile" contexts (for which the editing logic is identical), and second the editing of "app" contexts. See home page for description of the terms cards, apps and profiles. A card context is one pointed to by a Card (see Proxy vocabulary). Similarly an app context is one pointed to by an App. Ditto for profile.

Note: This does not attempt to identify specific systems, but rather defines the flow of logic in general.

Editing Card/Profile Contexts

When simple attribute values are updated by the user:

  • Begin Transaction
    • The change is immediately pushed to persistent storage.
    • No Errors: Commit Transaction - else Rollback and display error state

For complex attribute values, a modal dialog is presented to the user with all of the relevant context attributes displayed with their current values and 'Ok'/'Cancel' buttons.

  • If the user either closes the tab or the browser, a browser level alert box will be presented requiring the user to confirm the loss of data.
  • When the user clicks on the 'Ok' button:
    • Begin Transaction
      • changes are pushed to persistent storage.
      • No Errors: Commit Transaction - else Rollback and display error state

Editing App Contexts

When a simple attribute values are updated by the user:

  • The user is presented with a dialog (TBD) which specifies (possibly: number of contexts to be changed, list of contexts to be changed) allowing them to confirm or cancel the update before it occurs.
    • If user confirms change should occur:
      • Begin Transaction:
        • Call method to propagate changes across user's contexts (see below).
        • If no errors are returned from call:
          • Push "All About Me" context attribute value change to persistent storage.
            • If update successful, then commit transaction.
            • Else rollback transaction - display error state.
        • Else Rollback Transaction - display error state

For complex attribute values, a modal dialog is presented to the user with all of the relevant context attributes displayed with their current values and 'Ok'/'Cancel' buttons.

  • If the user either closes the tab or the browser, a browser level alert box will be presented requiring the user to confirm the loss of data.
  • When the user clicks on the 'Ok' button:
    • If something has actually been changed:
      • Begin Transaction
        • Call method to propagate changes across user's contexts (see below).
        • If no errors are returned from call:
          • Push app context attribute value change to persistent storage.
            • If update successful, then commit transaction.
            • Else rollback transaction - display error state.
        • Else rollback transaction - display error state.

Propagating a change across all user's contexts

  • Begin iterating the list of user's template contexts:
  • (At any point during the process, if an error occurs - processing will halt and the error returned.)
    • If current searched context is a simple attribute and updated attribute is simple, then:
      • If current searched context attribute/value matches original updated attribute/value, then
        • Push updated attribute value to persistent storage.
      • NO MATCH: proceed to the next.
    • If current searched context is a complex attribute and updated attribute is complex, then:
      • Compare all old attribute/values of the edited complex attribute against the current searched context, if all are equal then:
        • Update the individual attribute values that have changed to match the new updated values.
      • NO MATCH: proceed to the next.
    • Proceed to the next retrieved context

Back to the top