Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311475 - [ui] add Policy API to control whether branded update wizard is used
Summary: [ui] add Policy API to control whether branded update wizard is used
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 281226
  Show dependency tree
 
Reported: 2010-05-04 00:36 EDT by Susan McCourt CLA
Modified: 2011-01-25 15:10 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2010-05-04 00:36:03 EDT
We have sample code (rcp.cloud example) that shows how an RCP app could use the UpdateSingleIUWizard to get a branded update notification.  Two problems with this approach:

- the wizard itself is internal
- if an RCP app decides to use the p2.ui.sdk.scheduler bundle to control automatic updating, then the default update wizard will be used.

Both of these problems could be fixed by introducing Policy API to control whether the branded notifier is used.

Policy.setUseBrandedUpdateWizard(boolean useBrandedWizard)

ProvisioningUI would consult the policy when clients call
getProvisioningUI.openUpdateWizard(...)

By doing this, the automatic update notifier would just get the correct behaviro for free, as well as the SDK Update Handlers.
Comment 1 Susan McCourt CLA 2010-05-04 00:37:02 EDT
I'd like to add this early in 3.7, as this would be the last known policy API needed to completely configure bolt-on update without having to write any code.
Comment 2 Susan McCourt CLA 2010-05-04 00:47:33 EDT
another thing to consider here is how the branded update wizard size should be determined.  We might want a preference that allows apps to specify the size of the image so that the wizard can be layed out optimally.
Comment 3 Susan McCourt CLA 2010-12-01 11:27:36 EST
these bugs will be my holiday projects...
Comment 4 Susan McCourt CLA 2011-01-05 13:31:34 EST
Fixed in HEAD.
The new API on Policy is:

get/setUpdateWizardStyle - rather than use a boolean, which locks us into only two styles of presentation, I define constants, which are currently
UPDATE_STYLE_MULTIPLE_IUS 
UPDATE_STYLE_SINGLE_IUS  

get/setUpdateDetailsPreferredSize - this is used to size the browser that contains the update notification page.

RCP Cloud example now reads these values from preferences.
Comment 5 Susan McCourt CLA 2011-01-25 15:10:44 EST
verified through source inspection, I20110124-1800