This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 212218
Collapse All | Expand All

(-)a/autoupdate.services/apichanges.xml (-1 / +78 lines)
Lines 2-8 Link Here
2
<!--
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
4
5
Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
5
Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
6
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
8
Other names may be trademarks of their respective owners.
Lines 57-62 Link Here
57
    <!-- ACTUAL CHANGES BEGIN HERE: -->
57
    <!-- ACTUAL CHANGES BEGIN HERE: -->
58
58
59
    <changes>
59
    <changes>
60
        <change id="preffered-update">
61
            <api name="general"/>
62
            <summary>Mark an update as preferred just if needed</summary>
63
            <version major="1" minor="33"/>
64
            <date day="16" month="5" year="2012"/>
65
            <author login="jrechtacek"/>
66
            <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" semantic="compatible" source="compatible"/>
67
            <description>
68
                <p>
69
                    Added a <code>preferredupdate</code> attribute into <code>Update Center Descriptor</code>
70
                    to specify if an update has to be installed before other updates or not. This flag is <b>off</b> as default.
71
                </p>
72
            </description>
73
            <class package="org.netbeans.spi.autoupdate" name="UpdateItem"/>
74
            <issue number="211734"/>
75
        </change>
76
        <change id="content-description">
77
            <api name="general"/>
78
            <summary>Added a method to get a descprition of content of Upadate Center</summary>
79
            <version major="1" minor="33"/>
80
            <date day="16" month="5" year="2012"/>
81
            <author login="jrechtacek"/>
82
            <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" semantic="compatible" source="compatible"/>
83
            <description>
84
                <p>
85
                    {@link org.netbeans.api.autoupdate.UpdateUnitProvider#getContentDescription} returns
86
                    a description of content staging by this provider. The description might contains HTML tags e.g. HTML Links.
87
                </p>
88
            </description>
89
            <class package="org.netbeans.api.autoupdate" name="UpdateUnitProvider"/>
90
            <issue number="211741"/>
91
        </change>
92
        <change id="get-license-id">
93
            <api name="general"/>
94
            <summary>Added a method to get ID of license agreement</summary>
95
            <version major="1" minor="33"/>
96
            <date day="16" month="5" year="2012"/>
97
            <author login="jrechtacek"/>
98
            <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" semantic="compatible" source="compatible"/>
99
            <description>
100
                <p>
101
                    Added a method {@link org.netbeans.api.autoupdate.UpdateElement#getLicenseId}
102
                    to get ID of license agreement if the <code>UpdateElement</code> has a copyright.
103
                </p>
104
                <p>
105
                    This ID could be stored somewhere once an user approves the license and
106
                    will not be asked for approval again the same license ID.                
107
                </p>
108
            </description>
109
            <class package="org.netbeans.api.autoupdate" name="UpdateElement"/>
110
            <issue number="211736"/>
111
        </change>
112
        <change id="check-write-permission">
113
            <api name="general"/>
114
            <summary>Check write permissions to installation directory</summary>
115
            <version major="1" minor="33"/>
116
            <date day="16" month="5" year="2012"/>
117
            <author login="jrechtacek"/>
118
            <compatibility addition="yes" binary="compatible" deletion="no"
119
                deprecation="yes" semantic="compatible" source="compatible"
120
            />
121
            <description>
122
                <p>
123
                    <code>InstallSupport</code> find out the right directory where a plugin
124
                    should be installed. After that it checks if an user has privilege to write there.
125
                    In the case a lack of write permission, throws 
126
                    {@link org.netbeans.api.autoupdate.OperationException.WRITE_PERMISSION}.
127
                </p>
128
                <p>
129
                    Beside this it allows to write into 
130
                    <code>userdir</code> as a fallback in the case of insufficient privilege.
131
                </p>
132
            </description>
133
            <class package="org.netbeans.api.autoupdate" name="InstallSupport"/>
134
            <class package="org.netbeans.api.autoupdate" name="OperationException"/>
135
            <issue number="211777"/>
136
        </change>
60
        <change id="nbm-external">
137
        <change id="nbm-external">
61
            <api name="general"/>
138
            <api name="general"/>
62
            <summary>External NBM contents</summary>
139
            <summary>External NBM contents</summary>
(-)a/autoupdate.services/src/org/netbeans/api/autoupdate/InstallSupport.java (-4 / +23 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
4
 * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
5
 *
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
7
 * Other names may be trademarks of their respective owners.
Lines 44-52 Link Here
44
44
45
package org.netbeans.api.autoupdate;
45
package org.netbeans.api.autoupdate;
46
46
47
import org.netbeans.api.autoupdate.OperationSupport.Restarter;
47
import org.netbeans.api.progress.ProgressHandle;
48
import org.netbeans.api.progress.ProgressHandle;
48
import org.netbeans.modules.autoupdate.services.InstallSupportImpl;
49
import org.netbeans.modules.autoupdate.services.InstallSupportImpl;
49
import org.netbeans.api.autoupdate.OperationSupport.Restarter;
50
50
51
/**
51
/**
52
 * Performs all operations scheduled on instance of <code>OperationContainer</code>.
52
 * Performs all operations scheduled on instance of <code>OperationContainer</code>.
Lines 86-100 Link Here
86
        impl = new InstallSupportImpl (this);
86
        impl = new InstallSupportImpl (this);
87
    }
87
    }
88
    
88
    
89
    /** Downloads all instances i.e. <code>UpdateElement</code>s in corresponing <code>OperationContainer</code>.
89
    /** Downloads all instances i.e. <code>UpdateElement</code>s in corresponding <code>OperationContainer</code>.
90
     * 
90
     * 
91
     * @param progress ProgressHandle for notification progress in downloading, can be <code>null</code>
91
     * @param progress ProgressHandle for notification progress in downloading, can be <code>null</code>
92
     * @param isGlobal if <code>true</code> then forces download instances into shared directories i.e. installation directory
92
     * @param isGlobal if <code>true</code> then forces download instances into shared directories i.e. installation directory
93
     * @return <code>Validator</code> an instance of Validator which allows to verify downloaded instances in the next step
93
     * @return <code>Validator</code> an instance of Validator which allows to verify downloaded instances in the next step
94
     * @throws org.netbeans.api.autoupdate.OperationException
94
     * @throws org.netbeans.api.autoupdate.OperationException
95
     * @deprecated Use {@link #doDownload(ProgressHandle, Boolean, boolean)} instead.
95
     */
96
     */
96
    public Validator doDownload(ProgressHandle progress/*or null*/, boolean isGlobal) throws OperationException {
97
    public Validator doDownload(ProgressHandle progress/*or null*/, boolean isGlobal) throws OperationException {
97
        if (impl.doDownload (progress, isGlobal)) {
98
        if (impl.doDownload (progress, isGlobal ? Boolean.TRUE : null, false)) {
99
            return new Validator ();
100
        } else {
101
            return null;
102
        }
103
    }
104
105
    /** Downloads all instances i.e. <code>UpdateElement</code>s in corresponding <code>OperationContainer</code>.
106
     * 
107
     * @param progress ProgressHandle for notification progress in downloading, can be <code>null</code>
108
     * @param isGlobal if <code>true</code> then forces download plugins into shared directories i.e. installation directory,
109
     * if <code>false</code> then download plugins into <code>userdir</code>. If <code>null</code> then download plugins in a default place.
110
     * @param useUserdirAsFallback if <code>true</code> then download plugins into userdir if no permission to write in shared directories
111
     * @return <code>Validator</code> an instance of Validator which allows to verify downloaded instances in the next step
112
     * @throws org.netbeans.api.autoupdate.OperationException
113
     * @since 1.33
114
     */
115
    public Validator doDownload(ProgressHandle progress/*or null*/, Boolean isGlobal/*or null*/, boolean useUserdirAsFallback) throws OperationException {
116
        if (impl.doDownload (progress, isGlobal, useUserdirAsFallback)) {
98
            return new Validator ();
117
            return new Validator ();
99
        } else {
118
        } else {
100
            return null;
119
            return null;
(-)a/autoupdate.services/src/org/netbeans/api/autoupdate/OperationException.java (-1 / +6 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
4
 * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
5
 *
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
7
 * Other names may be trademarks of their respective owners.
Lines 77-82 Link Here
77
         * Uninstallation of plugin failed
77
         * Uninstallation of plugin failed
78
         */
78
         */
79
        UNINSTALL,
79
        UNINSTALL,
80
        /**
81
         * Lack of write permission to write in installation directory
82
         * @since 1.33
83
         */
84
        WRITE_PERMISSION
80
    }       
85
    }       
81
 
86
 
82
    /**
87
    /**
(-)a/autoupdate.services/src/org/netbeans/api/autoupdate/UpdateElement.java (-2 / +12 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2011 Oracle and/or its affiliates. All rights reserved.
4
 * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
5
 *
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
7
 * Other names may be trademarks of their respective owners.
Lines 45-52 Link Here
45
package org.netbeans.api.autoupdate;
45
package org.netbeans.api.autoupdate;
46
46
47
import java.awt.Image;
47
import java.awt.Image;
48
import org.netbeans.api.autoupdate.UpdateUnitProvider.CATEGORY;
48
import org.netbeans.modules.autoupdate.services.UpdateElementImpl;
49
import org.netbeans.modules.autoupdate.services.UpdateElementImpl;
49
import org.netbeans.api.autoupdate.UpdateUnitProvider.CATEGORY;
50
import org.netbeans.modules.autoupdate.services.UpdateManagerImpl;
50
import org.netbeans.modules.autoupdate.services.UpdateManagerImpl;
51
import org.netbeans.modules.autoupdate.updateprovider.ProviderCategory;
51
import org.netbeans.modules.autoupdate.updateprovider.ProviderCategory;
52
52
Lines 208-213 Link Here
208
        return impl.getDate ();
208
        return impl.getDate ();
209
    }
209
    }
210
210
211
    /** Returns ID of license agreement if the <code>UpdateElement</code> has a copyright.
212
     * 
213
     * @return String or null
214
     * @since 1.33
215
     */
216
    public String getLicenseId () {                
217
        return impl.getLicenseId ();
218
    }
219
    
211
    /** Returns text of license agreement if the <code>UpdateElement</code> has a copyright.
220
    /** Returns text of license agreement if the <code>UpdateElement</code> has a copyright.
212
     * 
221
     * 
213
     * @return String or null
222
     * @return String or null
Lines 243-247 Link Here
243
    public String toString () {
252
    public String toString () {
244
        return impl.getDisplayName() + "[" + impl.getCodeName () + "/" + impl.getSpecificationVersion () + "]";
253
        return impl.getDisplayName() + "[" + impl.getCodeName () + "/" + impl.getSpecificationVersion () + "]";
245
    }
254
    }
255
246
}
256
}
247
257
(-)a/autoupdate.services/src/org/netbeans/api/autoupdate/UpdateUnitProvider.java (-2 / +12 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
4
 * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
5
 *
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
7
 * Other names may be trademarks of their respective owners.
Lines 45-57 Link Here
45
package org.netbeans.api.autoupdate;
45
package org.netbeans.api.autoupdate;
46
46
47
import java.awt.Image;
47
import java.awt.Image;
48
import org.netbeans.spi.autoupdate.*;
49
import java.io.IOException;
48
import java.io.IOException;
50
import java.net.URL;
49
import java.net.URL;
51
import java.util.List;
50
import java.util.List;
52
import org.netbeans.api.autoupdate.UpdateManager.TYPE;
51
import org.netbeans.api.autoupdate.UpdateManager.TYPE;
53
import org.netbeans.api.progress.ProgressHandle;
52
import org.netbeans.api.progress.ProgressHandle;
54
import org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl;
53
import org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl;
54
import org.netbeans.spi.autoupdate.*;
55
55
56
56
57
/**<code>UpdateUnitProvider</code> providers <code>UpdateUnit</code>. The units
57
/**<code>UpdateUnitProvider</code> providers <code>UpdateUnit</code>. The units
Lines 136-141 Link Here
136
        return impl.getSourceDescription();
136
        return impl.getSourceDescription();
137
    }
137
    }
138
138
139
    /** A description of content staging by this provider. The description might contains
140
     * HTML tags e.g. HTML Links.
141
     * 
142
     * @return textual description of content or <code>null</code>
143
     * @since 1.33
144
     */
145
    public String getContentDescription() {
146
        return impl.getContentDescription();
147
    }
148
139
    /** It's special support for <code>UpdateProvider</code> based on Autoupdate Catalog.
149
    /** It's special support for <code>UpdateProvider</code> based on Autoupdate Catalog.
140
     * It's most kind of Update Providers and have a special support in UI.
150
     * It's most kind of Update Providers and have a special support in UI.
141
     * 
151
     * 
(-)a/autoupdate.services/src/org/netbeans/spi/autoupdate/UpdateItem.java (-9 / +56 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
3
 *
4
 * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
4
 * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
5
 *
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
7
 * Other names may be trademarks of their respective owners.
Lines 48-58 Link Here
48
import java.util.Locale;
48
import java.util.Locale;
49
import java.util.Set;
49
import java.util.Set;
50
import java.util.jar.Manifest;
50
import java.util.jar.Manifest;
51
import org.netbeans.modules.autoupdate.services.Trampoline;
52
import org.netbeans.modules.autoupdate.updateprovider.FeatureItem;
51
import org.netbeans.modules.autoupdate.updateprovider.LocalizationItem;
53
import org.netbeans.modules.autoupdate.updateprovider.LocalizationItem;
52
import org.netbeans.modules.autoupdate.updateprovider.FeatureItem;
53
import org.netbeans.modules.autoupdate.updateprovider.ModuleItem;
54
import org.netbeans.modules.autoupdate.updateprovider.ModuleItem;
54
import org.netbeans.modules.autoupdate.updateprovider.NativeComponentItem;
55
import org.netbeans.modules.autoupdate.updateprovider.NativeComponentItem;
55
import org.netbeans.modules.autoupdate.services.Trampoline;
56
import org.netbeans.modules.autoupdate.updateprovider.UpdateItemImpl;
56
import org.netbeans.modules.autoupdate.updateprovider.UpdateItemImpl;
57
57
58
/** Represents a item of content provider by <code>UpdateProvider</code>. These items are exposed to 
58
/** Represents a item of content provider by <code>UpdateProvider</code>. These items are exposed to 
Lines 69-74 Link Here
69
    UpdateItem original;
69
    UpdateItem original;
70
    
70
    
71
    /** Creates a new instance of UpdateItem */
71
    /** Creates a new instance of UpdateItem */
72
    @SuppressWarnings("LeakingThisInConstructor")
72
    UpdateItem (UpdateItemImpl item) {
73
    UpdateItem (UpdateItemImpl item) {
73
        impl = item;
74
        impl = item;
74
        item.setUpdateItem (this);
75
        item.setUpdateItem (this);
Lines 94-100 Link Here
94
     * @param license <code>UpdateLicense</code> represents license name and text of license agreement
95
     * @param license <code>UpdateLicense</code> represents license name and text of license agreement
95
     * @return UpdateItem
96
     * @return UpdateItem
96
     */
97
     */
97
    public static final UpdateItem createModule (
98
    public static UpdateItem createModule (
98
                                    String codeName,
99
                                    String codeName,
99
                                    String specificationVersion,
100
                                    String specificationVersion,
100
                                    URL distribution,
101
                                    URL distribution,
Lines 113-119 Link Here
113
        ModuleItem item = new ModuleItem (codeName, specificationVersion, distribution, 
114
        ModuleItem item = new ModuleItem (codeName, specificationVersion, distribution, 
114
                author, publishDate, downloadSize, homepage, category,
115
                author, publishDate, downloadSize, homepage, category,
115
                manifest, isEager, isAutoload,
116
                manifest, isEager, isAutoload,
116
                needsRestart, isGlobal, targetCluster, license.impl);
117
                needsRestart, isGlobal, false, targetCluster, license.impl);
118
        return new UpdateItem (item);
119
    }
120
    
121
    /** Creates <code>UpdateItem/code> which represents NetBeans Module in Autoupdate infrastructure.
122
     * UpdateItem is identify by <code>codeName</code> and <code>specificationVersion<code>.
123
     * 
124
     * @param codeName code name of module
125
     * @param specificationVersion specification version of module
126
     * @param distribution URL to NBM file
127
     * @param author name of module author or null
128
     * @param downloadSize size of NBM file in bytes
129
     * @param homepage homepage of module or null
130
     * @param publishDate date of publish of item, in date format "yyyy/MM/dd"
131
     * @param category name of category
132
     * @param manifest <code>java.util.jar.Manifest</code> describes the module in NetBeans module system
133
     * @param isEager says if the module is <code>eager</code> or not
134
     * @param isAutoload says if the module is <code>autoload</code> or not
135
     * @param needsRestart if true then IDE must be restarted after module installation
136
     * @param isGlobal control if the module will be installed into the installation directory or into user's dir
137
     * @param isPreferedUpdate if <code>true</code> will be handled in exclusive mode before other updates
138
     * @param targetCluster name of cluster where new module will be installed if installation isGlobal
139
     * @param license <code>UpdateLicense</code> represents license name and text of license agreement
140
     * @return UpdateItem
141
     * @since 1.33
142
     */
143
    public static UpdateItem createModule (
144
                                    String codeName,
145
                                    String specificationVersion,
146
                                    URL distribution,
147
                                    String author,
148
                                    String downloadSize,
149
                                    String homepage,
150
                                    String publishDate,
151
                                    String category,
152
                                    Manifest manifest,
153
                                    Boolean isEager,
154
                                    Boolean isAutoload,
155
                                    Boolean needsRestart,
156
                                    Boolean isGlobal,
157
                                    Boolean isPreferedUpdate,
158
                                    String targetCluster,
159
                                    UpdateLicense license) {
160
        ModuleItem item = new ModuleItem (codeName, specificationVersion, distribution, 
161
                author, publishDate, downloadSize, homepage, category,
162
                manifest, isEager, isAutoload,
163
                needsRestart, isGlobal, isPreferedUpdate, targetCluster, license.impl);
117
        return new UpdateItem (item);
164
        return new UpdateItem (item);
118
    }
165
    }
119
    
166
    
Lines 130-136 Link Here
130
     * @param category name of category
177
     * @param category name of category
131
     * @return UpdateItem
178
     * @return UpdateItem
132
     */
179
     */
133
    public static final UpdateItem createFeature (
180
    public static UpdateItem createFeature (
134
                                    String codeName,
181
                                    String codeName,
135
                                    String specificationVersion,
182
                                    String specificationVersion,
136
                                    Set<String> dependencies,
183
                                    Set<String> dependencies,
Lines 158-164 Link Here
158
     * @param license <code>UpdateLicense</code> represents license name and text of license agreement
205
     * @param license <code>UpdateLicense</code> represents license name and text of license agreement
159
     * @return <code>UpdateItem</code>
206
     * @return <code>UpdateItem</code>
160
     */
207
     */
161
    public static final UpdateItem createNativeComponent (
208
    public static UpdateItem createNativeComponent (
162
                                    String codeName,
209
                                    String codeName,
163
                                    String specificationVersion,
210
                                    String specificationVersion,
164
                                    String downloadSize,
211
                                    String downloadSize,
Lines 188-194 Link Here
188
     * @param uninstaller <code>CustomUninstaller</code> call-back interface
235
     * @param uninstaller <code>CustomUninstaller</code> call-back interface
189
     * @return <code>UpdateItem</code>
236
     * @return <code>UpdateItem</code>
190
     */
237
     */
191
    public static final UpdateItem createInstalledNativeComponent (
238
    public static UpdateItem createInstalledNativeComponent (
192
                                    String codeName,
239
                                    String codeName,
193
                                    String specificationVersion,
240
                                    String specificationVersion,
194
                                    Set<String> dependencies,
241
                                    Set<String> dependencies,
Lines 218-224 Link Here
218
     * @param license <code>UpdateLicense</code> represents license name and text of license agreement
265
     * @param license <code>UpdateLicense</code> represents license name and text of license agreement
219
     * @return <code>UpdateItem</code>
266
     * @return <code>UpdateItem</code>
220
     */
267
     */
221
    public static final UpdateItem createLocalization (
268
    public static UpdateItem createLocalization (
222
                                    String codeName,
269
                                    String codeName,
223
                                    String specificationVersion,
270
                                    String specificationVersion,
224
                                    String moduleSpecificationVersion,
271
                                    String moduleSpecificationVersion,
(-)a/openide.awt/apichanges.xml (-1 / +15 lines)
Lines 2-8 Link Here
2
<!--
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
4
5
Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
5
Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
6
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
8
Other names may be trademarks of their respective owners.
Lines 50-55 Link Here
50
<apidef name="awt">AWT API</apidef>
50
<apidef name="awt">AWT API</apidef>
51
</apidefs>
51
</apidefs>
52
<changes>
52
<changes>
53
    <change id="CheckForUpdatesProvider">
54
        <api name="awt"/>
55
        <summary>Support for Check for Updates feature</summary>
56
        <version major="7" minor="45"/>
57
        <date day="16" month="5" year="2012"/>
58
        <author login="jrechtacek"/>
59
        <compatibility addition="yes" binary="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
60
        <description>
61
            A service provider of UI for Check for Updates feature, for example in About dialog.
62
            The instance of the provider should be installed in default lookup using {@link org.openide.util.lookup.ServiceProvider}.
63
        </description>
64
        <class package="org.openide.awt" name="CheckForUpdatesProvider"/>
65
        <issue number="212218"/>
66
    </change>
53
    <change id="QuickSearch">
67
    <change id="QuickSearch">
54
      <api name="awt"/>
68
      <api name="awt"/>
55
      <summary>QuickSearch class that allows to attach quick search field to an arbitratry component.</summary>
69
      <summary>QuickSearch class that allows to attach quick search field to an arbitratry component.</summary>
(-)bc783a188908 (+75 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2012 Sun Microsystems, Inc.
41
 */
42
package org.openide.awt;
43
44
/** Provides a UI for <code>Check for Updates<code> feature, for example in <code>About</code> dialog.
45
 * An instance of the provider should be installed in the default lookup using {@link org.openide.util.lookup.ServiceProvider}.
46
 *
47
 * @author Jiri Rechtacek
48
 * @since 7.45
49
 */
50
public interface CheckForUpdatesProvider {
51
    
52
    /** Opens a wizard for installation of updates if found some available.
53
     * <b>Note:</b> Call it from AWT queue only.
54
     * 
55
     * @param reload if <code>true</code> then reload the content from all enabled Update Centers
56
     * @return <code>true</code> if all updates were successfully installed, <code>false</code> otherwise.
57
     */
58
    public boolean openCheckForUpdatesWizard(boolean reload);
59
    
60
    /** Runs a check for updates. If some updates found, shows a notification in the status line.
61
     * <b>Note:</b> It could be a time-consuming task, it should not be called from an event queue.
62
     * 
63
     * @param reload if <code>true</code> then reload the content from all enabled Update Centers
64
     * @return <code>true</code> if updates are available and users will be notified
65
     * in the status line, <code>false</code> if no updates found.
66
     */
67
    public boolean notifyAvailableUpdates(boolean reload);
68
    
69
    /** A description of content of enable Update Centers, assuming returns something like <i>7.1 patch1</i>.
70
     *  The description might contains HTML tags e.g. HTML Links.
71
     * 
72
     * @return free-form description of content or <code>null</code>
73
     */
74
    public String getContentDescription();
75
}

Return to bug 212218