+ New operation type - OperationSupport.OperationType.INTERNAL_UPDATE
is introduced.
+ This operation can be used to find out elements which have updates and
+ which the particular element has the dependency on.
+
OperationContainer
for internal update operation
+ * @return newly constructed instance of OperationContainer
for internal update operation
+ * @since 1.11
+ */
+ public static OperationContainerOperationContainer
for install operation
* @return newly constructed instance of OperationContainer
for install operation
*/
diff -r 1d736701d1bd autoupdate.services/src/org/netbeans/api/autoupdate/OperationSupport.java
--- a/autoupdate.services/src/org/netbeans/api/autoupdate/OperationSupport.java Tue Aug 18 15:24:31 2009 +0400
+++ b/autoupdate.services/src/org/netbeans/api/autoupdate/OperationSupport.java Fri Aug 21 14:44:04 2009 +0400
@@ -151,6 +151,9 @@
case CUSTOM_UNINSTALL:
impl = OperationSupportImpl.forCustomUninstall ();
break;
+ case INTERNAL_UPDATE:
+ impl = OperationSupportImpl.forInternalUpdate ();
+ break;
default:
assert false : "Unknown OperationSupport for type " + type;
}
diff -r 1d736701d1bd autoupdate.services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java
--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java Tue Aug 18 15:24:31 2009 +0400
+++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java Fri Aug 21 14:44:04 2009 +0400
@@ -82,6 +82,7 @@
import org.netbeans.api.autoupdate.InstallSupport.Installer;
import org.netbeans.api.autoupdate.OperationSupport.Restarter;
import org.netbeans.api.autoupdate.InstallSupport.Validator;
+import org.netbeans.api.autoupdate.OperationContainer;
import org.netbeans.api.autoupdate.OperationContainer.OperationInfo;
import org.netbeans.api.autoupdate.OperationException;
import org.netbeans.api.autoupdate.UpdateElement;
@@ -148,6 +149,31 @@
}
infos = support.getContainer ().listAll ();
+ List UpdateElement
*/
UNINSTALL,
+ /** Internally update installed UpdateElement
without version increase */
+ INTERNAL_UPDATE,
/** Uninstall UpdateElement
on-the-fly */
DIRECT_UNINSTALL,
/** Update installed UpdateElement
to newer version. */
diff -r 1d736701d1bd autoupdate.services/src/org/netbeans/modules/autoupdate/services/OperationSupportImpl.java
--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/OperationSupportImpl.java Tue Aug 18 15:24:31 2009 +0400
+++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/services/OperationSupportImpl.java Fri Aug 21 14:44:04 2009 +0400
@@ -79,6 +79,7 @@
private static final OperationSupportImpl FOR_DIRECT_UNINSTALL = new ForDirectUninstall();
private static final OperationSupportImpl FOR_CUSTOM_INSTALL = new ForCustomInstall ();
private static final OperationSupportImpl FOR_CUSTOM_UNINSTALL = new ForCustomUninstall ();
+ private static final OperationSupportImpl FOR_INTERNAL_UPDATE = new ForInternalUpdate();
private static final Logger LOGGER = Logger.getLogger ("org.netbeans.modules.autoupdate.services.OperationSupportImpl");
@@ -109,6 +110,9 @@
public static OperationSupportImpl forCustomUninstall () {
return FOR_CUSTOM_UNINSTALL;
}
+ public static OperationSupportImpl forInternalUpdate () {
+ return FOR_INTERNAL_UPDATE;
+ }
public abstract Boolean doOperation(ProgressHandle progress/*or null*/, OperationContainer> container) throws OperationException;
public abstract void doCancel () throws OperationException;
@@ -551,6 +555,25 @@
}
}
+
+ private static class ForInternalUpdate extends OperationSupportImpl {
+ public synchronized Boolean doOperation(ProgressHandle progress,
+ OperationContainer container) throws OperationException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ public void doCancel () throws OperationException {
+ assert false : "Not supported yet";
+ }
+
+ public void doRestart (Restarter restarter, ProgressHandle progress) throws OperationException {
+ throw new UnsupportedOperationException ("Not supported yet.");
+ }
+
+ public void doRestartLater (Restarter restarter) {
+ throw new UnsupportedOperationException ("Not supported yet.");
+ }
+
+ }
private static class ForCustomInstall extends OperationSupportImpl {
private Collection