Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 124717 - Allow setting autoupdate check interval programatically
Allow setting autoupdate check interval programatically
Product: platform
Classification: Unclassified
Component: Autoupdate
All All
: P3 (vote)
: 6.x
Assigned To: Jiri Rechtacek
Depends on:
  Show dependency treegraph
Reported: 2008-01-04 15:55 UTC by tomwheeler
Modified: 2008-01-13 14:15 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description tomwheeler 2008-01-04 15:55:51 UTC
While it is possible for the user to manually set the AU check interval (Tools|Plugins|Settings|Check Interval),
according to Jiri Rechtacek on the dev@openide mailing list, there is no way for a platform developer to set this
programmatically.  There should be such a way, because the platform developer is in a position to know how often updates
will be published for a given application.
Comment 1 Jiri Rechtacek 2008-01-09 14:40:44 UTC
I'm going to introduce a launcher option "plugin.manager.check.interval" with possible values: EVERY_STARTUP, EVERY_DAY,
EVERY_WEEK, EVERY_2WEEKS, EVERY_MONTH or NEVER. This option can force default value for Autoupdate module, i.e. if your
application is launched with -J-Dplugin.manager.check.interval=EVERY_STARTUP (or with modified etc/netbeans.conf),
content of subscribed UC will be checked every startup. If an user changes the check interval, future Autoupdate
invocations will read user's values regardless the plugin.manager.check.interval, as usual.

Btw. there is an another way how to force refresh content of AU automatically which works in NB6.0 already, do use
Autoupdate (still under-development) API. Call UpdateUnitProviderFactory.getDefault().refreshProviders(<progress handle
or null>, true) forces refresh content of all UC. You can use it as workaround for application built on NB6.0.
Comment 2 tomwheeler 2008-01-09 17:59:29 UTC
That will fulfill my needs.  Will these constant values be the only ones allowed, or are they just convenient way to
specify a value.  If the interval was specified as a value in minutes, then maybe EVERY_DAY would be 60 * 24, but
someone could still specify another value; 60 * 12, for example, would check twice a day.  Perhaps EVERY_STARTUP could
be 0 and NEVER could be -1, since they are the only special values.

Thanks also for the info on refreshProviders!
Comment 3 Jiri Rechtacek 2008-01-13 14:15:12 UTC
Was implemented in main trunk, future NB6.1M1 is coming soon. Needed some changes in original content of check interval
handling. Now is possible to set the interval in minutes or use predefined values: EVERY_STARTUP, EVERY_DAY, ..., NEVER.
Better documentation of all options like this is tracked as issue 125167.

Checking in;
/shared/data/ccvs/repository/autoupdate/ui/src/org/netbeans/modules/autoupdate/ui/,v  <--
new revision: 1.65; previous revision: 1.64
Checking in;
/shared/data/ccvs/repository/autoupdate/ui/src/org/netbeans/modules/autoupdate/ui/,v  <--
new revision: 1.28; previous revision: 1.27
Checking in;
/shared/data/ccvs/repository/autoupdate/ui/src/org/netbeans/modules/autoupdate/ui/,v  <--
new revision: 1.32; previous revision: 1.31
Checking in actions/;
/shared/data/ccvs/repository/autoupdate/ui/src/org/netbeans/modules/autoupdate/ui/actions/,v  <--
new revision: 1.3; previous revision: 1.2
Checking in actions/;
new revision: 1.16; previous revision: 1.15

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo