+ 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 install operation
+ * @return newly constructed instance of OperationContainer
for install operation
+ */
+ 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 Wed Aug 19 19:52:12 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/ModuleUpdateElementImpl.java
--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/ModuleUpdateElementImpl.java Tue Aug 18 15:24:31 2009 +0400
+++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/services/ModuleUpdateElementImpl.java Wed Aug 19 19:52:12 2009 +0400
@@ -151,7 +151,7 @@
public String getDate () {
return date;
}
-
+
public String getCategory () {
if (category == null) {
category = item.getCategory ();
diff -r 1d736701d1bd autoupdate.services/src/org/netbeans/modules/autoupdate/services/OperationContainerImpl.java
--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/OperationContainerImpl.java Tue Aug 18 15:24:31 2009 +0400
+++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/services/OperationContainerImpl.java Wed Aug 19 19:52:12 2009 +0400
@@ -68,6 +68,9 @@
public static OperationContainerImplUpdateElement
*/
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 Wed Aug 19 19:52:12 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