Lines 4-11
Link Here
|
4 |
]> |
4 |
]> |
5 |
|
5 |
|
6 |
<api-answers |
6 |
<api-answers |
7 |
version="$Revision: 1.6 $" date="$date$" |
7 |
version="$Revision: 1.14 $" date="$date$" |
8 |
question-version="1.10" |
8 |
question-version="1.12" |
9 |
module="Autoupdate client" |
9 |
module="Autoupdate client" |
10 |
author="phrebejk@netbeans.org" |
10 |
author="phrebejk@netbeans.org" |
11 |
> |
11 |
> |
Lines 43-51
Link Here
|
43 |
</hint> |
43 |
</hint> |
44 |
</question> |
44 |
</question> |
45 |
--> |
45 |
--> |
46 |
<answer id="compat-i18n"> |
46 |
<answer id="compat-i18n"> |
47 |
Yes |
47 |
<p> |
48 |
</answer> |
48 |
Mostly. Internationalization and branding of the module itself |
|
|
49 |
(<samp>autoupdate.jar</samp>) is done in the regular NetBeans |
50 |
fashion, e.g. localized resources may be placed in |
51 |
<samp>modules/locale/autoupdate_f4j_ja.jar</samp>, etc. Support for |
52 |
the updater (<samp>updater.jar</samp>) is more idiosyncratic because |
53 |
it runs as a standalone application without access to the |
54 |
preconfigured NetBeans classpath and <code>NbBundle.branding</code> |
55 |
system. Therefore it supports internationalization and branding as |
56 |
follows: |
57 |
</p> |
58 |
<ul> |
59 |
<li> |
60 |
<p> |
61 |
Localized and/or branded variants of the updater may be |
62 |
placed in <samp>lib/locale/updater_*.jar</samp> as expected. |
63 |
</p> |
64 |
</li> |
65 |
<li> |
66 |
<p> |
67 |
The file |
68 |
<samp>org/netbeans/updater/resources/updatersplash.gif</samp> |
69 |
may be branded in the regular way, e.g. |
70 |
<samp>org/netbeans/updater/resources/updatersplash_f4j.gif</samp>. |
71 |
But, it <strong>cannot currently be localized</strong>. |
72 |
</p> |
73 |
<p> |
74 |
Note that the <code>-branding</code> startup parameter cannot |
75 |
be used to specify branding for this, since that is |
76 |
interpreted only by the IDE, but the standard |
77 |
<code>lib/branding</code> file is parsed to determine the |
78 |
installation's branding, which normally suffices. The failure |
79 |
to interpret the startup parameter might be a problem if the |
80 |
NetBeans platform were installed in one directory, different |
81 |
IDE consolidations were installed in other directories, and a |
82 |
special startup script used |
83 |
<code>-J-Dnetbeans.dirs=...</code> and <code>-branding</code> |
84 |
to create a branded unified IDE from them all. |
85 |
</p> |
86 |
</li> |
87 |
<li> |
88 |
<p> |
89 |
The file <samp>org/netbeans/updater/Bundle.properties</samp> |
90 |
can be localized in the regular way, e.g. |
91 |
<samp>org/netbeans/updater/Bundle_ja.properties</samp>. But, |
92 |
it <strong>cannot currently be branded</strong>. |
93 |
</p> |
94 |
</li> |
95 |
<li> |
96 |
<p> |
97 |
Since branded splash screens may have different color |
98 |
schemes, you can create a file |
99 |
<samp>org/netbeans/updater/resources/Branding.properties</samp> |
100 |
(<strong>note</strong> the lack of a standard branding |
101 |
suffix!) in your branding JAR which may specify keys |
102 |
(hopefully self-explanatory): |
103 |
</p> |
104 |
<ul> |
105 |
<li><code>UpdaterFrame.TextBackground_R</code></li> |
106 |
<li><code>UpdaterFrame.TextBackground_G</code></li> |
107 |
<li><code>UpdaterFrame.TextBackground_B</code></li> |
108 |
<li><code>UpdaterFrame.TextForeground_R</code></li> |
109 |
<li><code>UpdaterFrame.TextForeground_G</code></li> |
110 |
<li><code>UpdaterFrame.TextForeground_B</code></li> |
111 |
<li><code>UpdaterFrame.hasBorder</code></li> |
112 |
</ul> |
113 |
<p> |
114 |
Issuezilla #21624 may have more information on this weird |
115 |
system. |
116 |
</p> |
117 |
</li> |
118 |
</ul> |
119 |
</answer> |
49 |
|
120 |
|
50 |
|
121 |
|
51 |
|
122 |
|
Lines 60-66
Link Here
|
60 |
The module does not implement any standards. However it defines it's |
131 |
The module does not implement any standards. However it defines it's |
61 |
own XML format for communication with the server and own packaging |
132 |
own XML format for communication with the server and own packaging |
62 |
format for modules. Detailed information about the XML at |
133 |
format for modules. Detailed information about the XML at |
63 |
<A href="autoupdate.netbeans.org">autoupdate homepage</A>. |
134 |
<a href="http://autoupdate.netbeans.org">autoupdate homepage</a>. |
64 |
</answer> |
135 |
</answer> |
65 |
|
136 |
|
66 |
|
137 |
|
Lines 130-137
Link Here
|
130 |
Modules, Utilities, Explorer, Filesystems, Settings, and Datasystems APIs. |
201 |
Modules, Utilities, Explorer, Filesystems, Settings, and Datasystems APIs. |
131 |
The autoupdate module also depends directly |
202 |
The autoupdate module also depends directly |
132 |
on a couple of classes in the NetBeans core which are public specifically for its benefit: |
203 |
on a couple of classes in the NetBeans core which are public specifically for its benefit: |
133 |
<code>org.netbeans.core.ModuleNode.ModuleNewType</code> |
204 |
<a href="http://core.netbeans.org/source/browse/core/src/org/netbeans/core/ModuleNode.java"> |
134 |
and <code>org.netbeans.core.modules.AutomaticDependencies</code>. |
205 |
<code>org.netbeans.core.ModuleNode.ModuleNewType</code></a> |
|
|
206 |
and <a href="http://core.netbeans.org/source/browse/core/src/org/netbeans/core/modules/AutomaticDependencies.java"> |
207 |
<code>org.netbeans.core.modules.AutomaticDependencies</code></a>. |
135 |
It depends on the layout of the NetBeans installation, most of which is implemented |
208 |
It depends on the layout of the NetBeans installation, most of which is implemented |
136 |
by the module system in the NetBeans core. |
209 |
by the module system in the NetBeans core. |
137 |
It uses the file <samp>lib/ide.ks</samp> (a cryptographic keystore) for verifying |
210 |
It uses the file <samp>lib/ide.ks</samp> (a cryptographic keystore) for verifying |
Lines 141-152
Link Here
|
141 |
which are present in the NetBeans launcher that check for downloaded but unapplied |
214 |
which are present in the NetBeans launcher that check for downloaded but unapplied |
142 |
updates, and launch the updater tool (<samp>lib/updater.jar</samp>) if any are detected. |
215 |
updates, and launch the updater tool (<samp>lib/updater.jar</samp>) if any are detected. |
143 |
|
216 |
|
144 |
<api name="modules" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/modules/doc-files/api.html"/> |
217 |
<api name="Modules API" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/modules/doc-files/api.html"/> |
145 |
<api name="filesystems" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/filesystems/doc-files/api.html"/> |
218 |
<api name="Filesystems API" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/filesystems/doc-files/api.html"/> |
146 |
<api name="datasystems" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/loaders/doc-files/api.html"/> |
219 |
<api name="Loaders API" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/loaders/doc-files/api.html"/> |
147 |
<api name="explorer" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/explorer/doc-files/api.html"/> |
220 |
<api name="Explorer API" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/explorer/doc-files/api.html"/> |
148 |
<api name="settings" type="import" category="official" url=""/> |
221 |
<api name="Settings API" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/services-api.html#settings"/> |
149 |
<api name="utilities" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/util/doc-files/api.html"/> |
222 |
<api name="Utilities API" type="import" category="official" url="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/util/doc-files/api.html"/> |
150 |
</answer> |
223 |
</answer> |
151 |
|
224 |
|
152 |
|
225 |
|
Lines 234-240
Link Here
|
234 |
NetBeans module system allows restriction of access rights to |
307 |
NetBeans module system allows restriction of access rights to |
235 |
public classes of your module from other modules. This prevents |
308 |
public classes of your module from other modules. This prevents |
236 |
unwanted dependencies of others on your code and should be used |
309 |
unwanted dependencies of others on your code and should be used |
237 |
whenever possible (<a href="http://www.netbeans.org/download/apis/org/openide/doc-files/upgrade.html#3.4-public-packages"> |
310 |
whenever possible (<a href="http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.4-public-packages"> |
238 |
public packages |
311 |
public packages |
239 |
</a>). |
312 |
</a>). |
240 |
</hint> |
313 |
</hint> |
Lines 245-252
Link Here
|
245 |
in the manifest using: "OpenIDE-Module-Public-Packages: -". The api is currently |
318 |
in the manifest using: "OpenIDE-Module-Public-Packages: -". The api is currently |
246 |
used by the S1S autoupdate module. The separation of the official API/SPI |
319 |
used by the S1S autoupdate module. The separation of the official API/SPI |
247 |
should be done for 4.0. |
320 |
should be done for 4.0. |
248 |
<api name="autoupdate-dtd" type="export" category="stable"/> |
321 |
<api name="autoupdate-dtd" type="export" group="dtd" category="stable" url="http://autoupdate.netbeans.org/nbm/catalog34.dtd"/> |
249 |
<api name="autoupdate-type" type="export" category="stable"/> |
322 |
<api name="info-dtd" type="export" category="stable" group="dtd" url="http://autoupdate.netbeans.org/nbm/info34.dtd"/> |
250 |
|
323 |
|
251 |
</answer> |
324 |
</answer> |
252 |
|
325 |
|
Lines 265-271
Link Here
|
265 |
--> |
338 |
--> |
266 |
<answer id="deploy-shared"> |
339 |
<answer id="deploy-shared"> |
267 |
In order to be able to update the whole NB platform the module has to be installed |
340 |
In order to be able to update the whole NB platform the module has to be installed |
268 |
in the shared directory. |
341 |
in the shared directory. Also the updater jar is stored in the shared directory ( |
|
|
342 |
in the lib subdirectory.) |
269 |
</answer> |
343 |
</answer> |
270 |
|
344 |
|
271 |
|
345 |
|
Lines 373-383
Link Here
|
373 |
</question> |
447 |
</question> |
374 |
--> |
448 |
--> |
375 |
<answer id="exec-reflection"> |
449 |
<answer id="exec-reflection"> |
376 |
<LI>The XMLUtil class in Updater calls invokes XML related methods by reflection |
450 |
<ul> |
377 |
dependent on the fact whether xerces or Sun parser is used.</LI> |
451 |
<li>The XMLUtil class in Updater calls invokes XML related methods by reflection |
378 |
<LI>The Autoupdater class in AU module reads the proxy settings of IDE |
452 |
dependent on the fact whether xerces or Sun parser is used.</li> |
379 |
by reflection</LI> |
453 |
<li>The Autoupdater class in AU module reads the proxy settings of IDE |
380 |
|
454 |
by reflection</li> |
|
|
455 |
</ul> |
381 |
</answer> |
456 |
</answer> |
382 |
|
457 |
|
383 |
|
458 |
|
Lines 414-422
Link Here
|
414 |
</question> |
489 |
</question> |
415 |
--> |
490 |
--> |
416 |
<answer id="format-types"> |
491 |
<answer id="format-types"> |
417 |
<LI>Autoupdate types inf form of XML settings format</LI> |
492 |
<ul> |
418 |
<LI>Update tracking info in own XML format</LI> |
493 |
<li>Autoupdate types inf form of XML settings format</li> |
419 |
<LI>Downloaded .nbm files (basically .jar files)</LI> |
494 |
<li>Update tracking info in own XML format</li> |
|
|
495 |
<li>Downloaded .nbm files (basically .jar files)</li> |
496 |
</ul> |
420 |
</answer> |
497 |
</answer> |
421 |
|
498 |
|
422 |
|
499 |
|
Lines 436-445
Link Here
|
436 |
</question> |
513 |
</question> |
437 |
--> |
514 |
--> |
438 |
<answer id="lookup-lookup"> |
515 |
<answer id="lookup-lookup"> |
439 |
<LI>Searches for AutoupdateTypes declared in XML layer</LI> |
516 |
<ul> |
440 |
<LI>Autoupdater class searches for ClassLoader to be able to invoke |
517 |
<li>Searches for AutoupdateTypes declared in XML layer</li> |
441 |
proxy settings method by reflection.</LI> |
518 |
<li>Autoupdater class searches for ClassLoader to be able to invoke |
442 |
<LI>Autoupdater class searches for ModuleDescriptions using Lookup</LI> |
519 |
proxy settings method by reflection.</li> |
|
|
520 |
<li>Autoupdater class searches for ModuleDescriptions using Lookup</li> |
521 |
</ul> |
443 |
</answer> |
522 |
</answer> |
444 |
|
523 |
|
445 |
|
524 |
|
Lines 630-636
Link Here
|
630 |
</question> |
709 |
</question> |
631 |
--> |
710 |
--> |
632 |
<answer id="resources-file"> |
711 |
<answer id="resources-file"> |
633 |
Yes |
712 |
<p> |
|
|
713 |
There are two keystores in the netbeans installation. One in the lib |
714 |
directory of NetBeans root dir. Second is in the lib directory of the |
715 |
user's dir.<br/> |
716 |
First one contains the default public key and ceritificate distributed |
717 |
with NetBeans, which is used for signing modules on the NetBeans autoupdate |
718 |
server. Certificates are added into the keystore when the autoupdate runs |
719 |
in the root mode. This means that the root user of NetBeans may add certificates |
720 |
for other users.<br/> |
721 |
Second keystore is used for user additions of certificated. I.e. when the |
722 |
user decides to trust some certificate and adds it into the keystore then |
723 |
the cerificate is added into his personal keystore and does not affect other |
724 |
users of the NetBeans installation. |
725 |
</p> |
726 |
<p> |
727 |
There is no support for getting back to older versions of modules using the |
728 |
NetBeans UI. However the autoupdate client does backup of all files it |
729 |
replaces into update/backup subdirectory of either NetBeans root or NetBeans |
730 |
user directory (depends on the mode NetBeans IDE is run in). Autoupdate client |
731 |
also keeps track of the changes made into the installation in the |
732 |
update_tracking subdirectory of NetBeans directory. There is XML file per |
733 |
NetBeans module.<br/> |
734 |
It is possible to do manual backout of installed modules using the files backed |
735 |
up in the backup directory and the information stored in the update_tracking |
736 |
diectory. |
737 |
</p> |
738 |
<p> |
739 |
All these files writen to disk should be considered private. Keystore and |
740 |
backup are in binary form. The au-tracking is in form of XML without any |
741 |
DTD. |
742 |
</p> |
743 |
<api name="autoupdate-keystore" type="export" group="java.io.File" category="private"/> |
744 |
<api name="autoupdate-backup" type="export" group="java.io.File" category="private"/> |
745 |
<api name="autoupdate-tracking" type="export" group="java.io.File" category="private"/> |
634 |
</answer> |
746 |
</answer> |
635 |
|
747 |
|
636 |
|
748 |
|
Lines 656-662
Link Here
|
656 |
settings. Also a template for the standard netbeans Au server is installed |
768 |
settings. Also a template for the standard netbeans Au server is installed |
657 |
using the XML layer. |
769 |
using the XML layer. |
658 |
It also installs the default update centers by registering instances of AU |
770 |
It also installs the default update centers by registering instances of AU |
659 |
service type. Same thing is done by the S1S AU extension. |
771 |
service type. Same thing is done by the S1S AU extension. These settings |
|
|
772 |
are stored on the DefaultFilesystmem in the Services/AutoupdateType folder. |
773 |
Autoupdate types are standard .settings files. However to initialize the server |
774 |
directly from the layer one can use the url_key and enabled attributes of the |
775 |
file. First one points to key in the localizing bundle which contains URL |
776 |
of the server. The second allows for enablig/disabling the server by |
777 |
default. |
778 |
<api name="autoupdate-type" type="export" category="stable" group="layer"/> |
660 |
</answer> |
779 |
</answer> |
661 |
|
780 |
|
662 |
|
781 |
|
Lines 698-703
Link Here
|
698 |
Yes. Modules may register their update server types and templates for these |
817 |
Yes. Modules may register their update server types and templates for these |
699 |
service types in the xml-layer. This is done by the S1S au extension. |
818 |
service types in the xml-layer. This is done by the S1S au extension. |
700 |
This API should probably be rated as under-development. |
819 |
This API should probably be rated as under-development. |
|
|
820 |
The autoupdate-type is described in the resources-leayer question beside this |
821 |
anmd mentioned menus and action template for autoupdate type is registered in the |
822 |
layer. Users may use this template for adding extra AU servers into the |
823 |
Au client. |
701 |
</answer> |
824 |
</answer> |
702 |
|
825 |
|
|
|
826 |
<!-- |
827 |
|
828 |
<question id="keystores"> |
829 |
Is keystore per user or common? |
830 |
|
831 |
<hint> |
832 |
Additional qustion from the ARC team. |
833 |
</hint> |
834 |
</question> |
835 |
--> |
836 |
|
837 |
<!-- |
838 |
<question id="exec-introspection"> |
839 |
Does your module use any kind of runtime type information (<code>instanceof</code>, |
840 |
work with <code>java.lang.Class</code>, etc.)? |
841 |
<hint> |
842 |
Check for cases when you have an object of type A and you also |
843 |
expect it to (possibly) be of type B and do some special action. That |
844 |
should be documented. The same applies on operations in meta-level |
845 |
(Class.isInstance(...), Class.isAssignableFrom(...), etc.). |
846 |
</hint> |
847 |
</question> |
848 |
--> |
849 |
<answer id="exec-introspection"> |
850 |
Of course. For internal types. |
851 |
</answer> |
852 |
|
853 |
|
854 |
|
855 |
<!-- |
856 |
<question id="exec-process"> |
857 |
Do you execute an external process from your module? How do you ensure |
858 |
that the result is the same on different platforms? Do you parse output? |
859 |
Do you depend on result code? |
860 |
<hint> |
861 |
If you feed an input, parse the output please declare that as an API. |
862 |
</hint> |
863 |
</question> |
864 |
--> |
865 |
<answer id="exec-process"> |
866 |
No. |
867 |
</answer> |
868 |
|
869 |
|
703 |
</api-answers> |
870 |
</api-answers> |
|
|
871 |
|
872 |
|
873 |
|