Methods Summary |
---|
public java.util.Vector | getInstalledSuites()Gets a vector of installed suites.
updateInstalledSuites();
/** copy vector of installed suites into new vector */
int totalSuites = installedSuites.size();
Vector suites = new Vector(totalSuites);
for (int i = 0; i < totalSuites; i++) {
Object o = installedSuites.elementAt(i);
suites.addElement(o);
}
return suites;
|
static synchronized com.sun.midp.automation.AutoSuiteStorageImpl | getInstance()Gets class instance
if (instance == null) {
instance = new AutoSuiteStorageImpl();
}
return instance;
|
public AutoSuiteDescriptor | installSuite(java.lang.String location)Installs suite from specified location.
AutoSuiteDescriptor suite = null;
int suiteID;
installer = AutoGetInstallerTunnel.getInstaller(location);
suiteID = installer.installJad(location, Constants.INTERNAL_STORAGE_ID,
true, true, null);
suite = AutoSuiteDescriptorImpl.getInstanceBySuiteID(suiteID,
storage);
return suite;
|
public void | uninstallSuite(AutoSuiteDescriptor suite)Uninstalls specified suite.
AutoSuiteDescriptorImpl suiteImpl = (AutoSuiteDescriptorImpl)suite;
suiteImpl.guaranteeSuiteValid("uninstallSuite");
if (suiteImpl.isExternalSuite()) {
int suiteID = suiteImpl.getSuiteID();
storage.remove(suiteID);
}
/** uninstalling suite makes it invalid */
suiteImpl.invalidate();
|
private void | updateInstalledSuites()Updates vector of installed suites
int[] suiteIDs;
suiteIDs = storage.getListOfSuites();
installedSuites = new Vector(suiteIDs.length);
for (int i = 0; i < suiteIDs.length; i++) {
AutoSuiteDescriptor suite;
try {
suite = AutoSuiteDescriptorImpl.getInstanceBySuiteID(
suiteIDs[i], storage);
installedSuites.addElement(suite);
} catch (Exception e) {
// ignore and move to next suite
}
}
|