1 19 20 package org.netbeans.modules.autoupdate; 21 22 import java.net.URL ; 23 import java.util.Collection ; 24 import java.util.Date ; 25 26 import org.w3c.dom.*; 27 28 import org.openide.util.*; 29 import org.openide.modules.ModuleInfo; 30 31 32 35 public abstract class Updates extends Object { 36 37 static final int NO_ERROR = 0; 38 static final int AUTH_ERROR = 2; 39 static final int NO_SERVER_ERROR = 3; 40 static final int NO_AVAILABLE_MODULES = 4; 41 static final int NO_NETWORK = 5; 42 static final int PARSE_ERROR = 6; 43 44 45 static protected ModuleInfo[] installedModules = null; 46 47 48 protected boolean checkCanceled; 49 50 52 public abstract void checkUpdates( final Wizard.Validator validator ); 53 54 56 public abstract void checkUpdates( final Wizard.Validator validator, String ucname ); 57 58 60 public abstract void checkUpdates( final Wizard.Validator validator, AutoupdateType at ); 61 62 protected void checkUpdates (final Wizard.Validator validator, AutoupdateType at, boolean background) { 63 checkUpdates (validator, at); 64 } 65 66 public void cancelCheck() { 67 checkCanceled = true; 68 } 69 70 73 public abstract ModuleGroup getRootGroup(); 74 75 77 public abstract Collection getModules(); 78 79 80 public abstract boolean isError(); 81 82 83 public abstract int getError(); 84 85 86 public abstract String getErrorMessage(); 87 88 89 public static ModuleInfo[] getInstalledModules() { 90 if ( installedModules == null ) 91 installedModules = Autoupdater.Support.getModuleDescriptions(); 92 return installedModules; 93 } 94 95 static void reset() { 96 installedModules = null; 97 } 98 99 100 public static ModuleInfo[] getInstalledPatches() { 101 return PatchChecker.getPatches(); 102 } 103 104 105 public abstract Date getTimeStamp(); 106 107 108 public abstract String getNotificationText(); 109 110 111 public abstract URL getNotificationURL(); 112 113 } 114 | Popular Tags |