Fields Summary |
---|
public String | localJadUrlLocation for the downloaded JAD, could be null |
public String | localJarUrlLocation for the downloaded JAR |
public com.sun.midp.midletsuite.InstallInfo | installInfoContains the data obtained during the installation process |
public com.sun.midp.midletsuite.SuiteSettings | suiteSettingsContains the data obtained during the installation process |
public int | storageIdID of the storage where the new midlet suite will be installed. |
public com.sun.midp.installer.InstallListener | listenerReceives warnings and status. |
public long | startTimeWhen the install started, in milliseconds. |
public int | nextStepWhat to do next. |
public boolean | stopInstallationSignals the installation to stop. |
public boolean | ignoreCancelSignals that installation is at a point where cancel
requests are ignored |
public com.sun.midp.installer.InvalidJadException | exceptionexception that stopped the installation. |
public boolean | forceOption to force an overwrite of existing components without
any version comparison. |
public boolean | removeRMSOption to force the RMS data of the suite to be overwritten to
be removed without comparison to the new suite. |
public byte[] | jadRaw JAD. |
public String | jadEncodingcharacter encoding of the JAD. |
public com.sun.midp.installer.JadProperties | jadPropsParsed JAD. |
public com.sun.midp.installer.ManifestProperties | jarPropsParsed manifest. |
public com.sun.midp.io.j2me.storage.File | fileCached File object. |
protected String | usernameUser name for authentication. |
protected String | passwordPassword for authentication. |
public String | proxyUsernameUser name for proxyAuthentication. |
public String | proxyPasswordPassword for proxy authentication. |
public int | beginTransferDataStatusStatus to signal the beginning of the data transfer. |
public int | transferStatusStatus for the data transfer method to give to the listener. |
public com.sun.midp.security.SecurityHandler | securityHandlerSecurity Handler. |
public byte[] | manifestHolds the unzipped JAR manifest to be saved. |
public com.sun.midp.io.j2me.storage.RandomAccessStream | storageCache of storage object. |
public com.sun.midp.midletsuite.MIDletSuiteStorage | midletSuiteStorageCache of MIDlet suite storage object. |
public String | storageRootThe root of all MIDP persistent system data. |
public boolean | isPreviousVersionSignals that previous version exists. |
public com.sun.midp.midletsuite.MIDletSuiteImpl | previousSuitePrevious MIDlet suite info. |
public com.sun.midp.midletsuite.InstallInfo | previousInstallInfoPrevious MIDlet suite install info. |
Methods Summary |
---|
public void | checkForPermission(int permission, java.lang.String resource)Checks for permission and throw an exception if not allowed.
May block to ask the user a question.
checkForPermission(permission, resource, null);
|
public void | checkForPermission(int permission, java.lang.String resource, java.lang.String extraValue)Checks for permission and throw an exception if not allowed.
May block to ask the user a question.
securityHandler.checkForPermission(permission,
Permissions.getTitle(permission),
Permissions.getQuestion(permission),
Permissions.getOneshotQuestion(permission),
installInfo.suiteName, resource, extraValue,
Permissions.getName(permission));
|
public void | checkIfPermissionAllowed(int permission)Checks to see the suite has the ALLOW level for specific permission.
This is used for by internal APIs that only provide access to
trusted system applications.
Only trust this method if the object has been obtained from the
MIDletStateHandler of the suite.
throw new RuntimeException("Not Implemented");
|
public int | checkPermission(java.lang.String permission)Gets the status of the specified permission.
If no API on the device defines the specific permission
requested then it must be reported as denied.
If the status of the permission is not known because it might
require a user interaction then it should be reported as unknown.
throw new RuntimeException("Not Implemented");
|
public void | close()Close the opened MIDletSuite
|
public java.lang.String | getAppProperty(java.lang.String key)Gets a property of the application to be installed.
First from the jaD, then if not found, the JAR manifeSt.
String value;
if (jadProps != null) {
value = jadProps.getProperty(key);
if (value != null) {
return value;
}
}
if (jarProps != null) {
value = jarProps.getProperty(key);
if (value != null) {
return value;
}
}
return null;
|
public java.lang.String[] | getAuthPath()Gets the authorization path of this suite. The path starts with
the most trusted CA that authorized this suite.
/*
* The auth path returned is no a copy because this object is
* only available to callers with the AMS permission, which
* have permission to build auth paths for new suites.
*/
return installInfo.getAuthPath();
|
public java.lang.String | getDisplayName()Returns the suite's name to display to the user.
String displayName = getAppProperty(MIDletSuite.SUITE_NAME_PROP);
if (displayName == null) {
displayName = String.valueOf(installInfo.id);
}
return displayName;
|
public int | getID()Gets the unique ID that the installed suite was stored with.
return installInfo.id;
|
public int | getJarSize()Gets the expected size of the JAR.
return (installInfo.expectedJarSize + 1023) / 1024;
|
public java.lang.String | getJarUrl()Gets the URL of the JAR.
return installInfo.jarUrl;
|
public com.sun.midp.installer.InvalidJadException | getLastException()Gets the last recoverable exception that stopped the install.
Non-recoverable exceptions are thrown and not saved in the state.
return exception;
|
public java.lang.String | getMIDletName(java.lang.String classname)Get the name of a MIDlet.
throw new RuntimeException("Not Implemented");
|
public com.sun.midp.midletsuite.MIDletInfo | getMidletInfo()Returns the information about the first midlet in the suite.
String midlet;
midlet = getAppProperty("MIDlet-1");
if (midlet == null) {
return null;
}
return new MIDletInfo(midlet);
|
public int | getNumberOfMIDlets()Counts the number of MIDlets from its properties.
IMPL_NOTE: refactor to avoid duplication with MIDletSuiteImpl.
int i;
for (i = 1; getProperty("MIDlet-" + i) != null; i++);
return (i-1);
|
public byte[] | getPermissions()Gets list of permissions for this suite.
return suiteSettings.getPermissions();
|
public java.lang.String | getProperty(java.lang.String key)Gets a property of the suite. A property is an attribute from
either the application descriptor or JAR Manifest.
return getAppProperty(key);
|
public byte | getPushInterruptSetting()Gets push setting for interrupting other MIDlets.
Reuses the Permissions.
return suiteSettings.getPushInterruptSetting();
|
public int | getPushOptions()Gets push options for this suite.
return suiteSettings.getPushOptions();
|
public java.lang.String | getSuiteName()Gets the label for the downloaded JAR.
return installInfo.suiteName;
|
public boolean | isEnabled()Determine if the a MIDlet from this suite can be run. Note that
disable suites can still have their settings changed and their
install info displayed.
throw new RuntimeException("Not Implemented");
|
public boolean | isRegistered(java.lang.String midletName)Indicates if the named MIDlet is registered in the suite
with MIDlet-<n> record in the manifest or
application descriptor.
String midlet;
MIDletInfo midletInfo;
for (int i = 1; ; i++) {
midlet = getAppProperty("MIDlet-" + i);
if (midlet == null) {
return false; // We went past the last MIDlet
}
/* Check if the names match. */
midletInfo = new MIDletInfo(midlet);
if (midletInfo.classname.equals(midletName)) {
return true;
}
}
|
public boolean | isTrusted()Indicates if this suite is trusted.
(not to be confused with a domain named "trusted",
this is used to determine if a trusted symbol should be displayed
to the user and not used for permissions)
return installInfo.trusted;
|
public boolean | isVerified()Check if the suite classes were successfully verified
during the suite installation.
return installInfo.verifyHash != null;
|
public boolean | permissionToInterrupt(java.lang.String connection)Asks the user want to interrupt the current MIDlet with
a new MIDlet that has received network data.
throw new RuntimeException("Not Implemented");
|
public void | saveSettings()Saves any the settings (security or others) that the user may have
changed. Normally called by the scheduler after
the last running MIDlet in the suite is destroyed.
However it could be call during a suspend of the VM so
that persistent settings of the suite can be preserved.
throw new RuntimeException("Not Implemented");
|
public void | setPassword(java.lang.String thePassword)Sets the password to be used for HTTP authentication.
password = thePassword;
|
public void | setProxyPassword(java.lang.String thePassword)Sets the password to be used for HTTP proxy authentication.
proxyPassword = thePassword;
|
public void | setProxyUsername(java.lang.String theUsername)Sets the username to be used for HTTP proxy authentication.
proxyUsername = theUsername;
|
public void | setTempProperty(com.sun.midp.security.SecurityToken token, java.lang.String key, java.lang.String value)Replace or add a property to the suite for this run only.
throw new RuntimeException("Not Implemented");
|
public void | setUsername(java.lang.String theUsername)Sets the username to be used for HTTP authentication.
username = theUsername;
|