| java.lang.Object com.sun.midp.jump.installer.TrustedMIDletSuiteInfo
TrustedMIDletSuiteInfo | public class TrustedMIDletSuiteInfo implements MIDletSuite(Code) | | A proxy for InternalMIDletSuiteImpl to bypass the security check.
Used by the JUMP exective to bypass NullPointerException
thrown at various ams secuirty check code through MIDletStateHandler like
listed below. See JumpInit.init() for the code that
sets MIDletStateHandler.java's MIDletSuite field value.
MIDletStateHandler midletStateHandler =
MIDletStateHandler.getMidletStateHandler();
MIDletSuite midletSuite = midletStateHandler.getMIDletSuite();
midletSuite.checkIfPermissionAllowed(Permissions.AMS);
This is a temporary fix until the security architecture in ams s replaced
with more CDC centric AccessController syntax.
|
Method Summary | |
public void | checkForPermission(int permission, String resource) Check for permission and throw an exception if not allowed. | public void | checkForPermission(int permission, String resource, String extraValue) Checks for permission and throw an exception if not allowed. | public void | checkIfPermissionAllowed(int permission) | public int | checkPermission(String permission) Get 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.
Parameters: permission - to check if denied, allowed, or unknown. | public void | close() | public int | getID() Gets the unique ID of the suite. | public String | getMIDletName(String className) Get the name of a MIDlet to display to the user. | public byte[] | getPermissions() Gets list of permissions for this suite. | public String | getProperty(String key) Get a property of the suite. | public byte | getPushInterruptSetting() Gets push setting for interrupting other MIDlets. | public int | getPushOptions() Gets push options for this suite. | public boolean | isEnabled() Determine if the a MIDlet from this suite can be run. | public boolean | isRegistered(String midletClassName) Indicates if the named MIDlet is registered in the suite
with MIDlet-<n> record in the manifest or
application descriptor. | public boolean | isTrusted() Indicates if this suite is trusted. | public boolean | isVerified() | public boolean | permissionToInterrupt(String connection) Ask the user want to interrupt the current MIDlet with
a new MIDlet that has received network data. | public void | setTempProperty(SecurityToken token, String key, String value) Replace or add a property to the suite for this run only. |
TrustedMIDletSuiteInfo | public TrustedMIDletSuiteInfo()(Code) | | |
checkForPermission | public void checkForPermission(int permission, String resource) throws InterruptedException(Code) | | Check for permission and throw an exception if not allowed.
May block to ask the user a question.
Parameters: permission - ID of the permission to check for,the ID must be fromcom.sun.midp.security.Permissions Parameters: resource - string to insert into the question, can be null ifno %2 in the question exception: SecurityException - if the permission is notallowed by this token exception: InterruptedException - if another thread interrupts thecalling thread while this method is waiting to preempt thedisplay. |
checkForPermission | public void checkForPermission(int permission, String resource, String extraValue) throws InterruptedException(Code) | | Checks for permission and throw an exception if not allowed.
May block to ask the user a question.
Parameters: permission - ID of the permission to check for,the ID must be fromcom.sun.midp.security.Permissions Parameters: resource - string to insert into the question, can be null ifno %2 in the question Parameters: extraValue - string to insert into the question,can be null if no %3 in the question exception: SecurityException - if the permission is notallowed by this token exception: InterruptedException - if another thread interrupts thecalling thread while this method is waiting to preempt thedisplay. |
checkIfPermissionAllowed | public void checkIfPermissionAllowed(int permission)(Code) | | |
checkPermission | public int checkPermission(String permission)(Code) | | Get 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.
Parameters: permission - to check if denied, allowed, or unknown. 0 if the permission is denied; 1 if the permission is allowed;-1 if the status is unknown |
close | public void close()(Code) | | Close the opened MIDletSuite
|
getID | public int getID()(Code) | | Gets the unique ID of the suite.
suite ID |
getMIDletName | public String getMIDletName(String className)(Code) | | Get the name of a MIDlet to display to the user.
Parameters: className - classname of a MIDlet in the suite name to display to the user |
getPermissions | public byte[] getPermissions()(Code) | | Gets list of permissions for this suite.
array of permissions from Permissions |
getProperty | public String getProperty(String key)(Code) | | Get a property of the suite. A property is an attribute from
either the application descriptor or JAR Manifest.
Parameters: key - the name of the property A string with the value of the property.null is returned if no value is available forthe key. |
getPushInterruptSetting | public byte getPushInterruptSetting()(Code) | | Gets push setting for interrupting other MIDlets.
Reuses the Permissions.
push setting for interrupting MIDlets the valuewill be permission level from Permissions |
getPushOptions | public int getPushOptions()(Code) | | Gets push options for this suite.
push options are defined in PushRegistryImpl |
isEnabled | public boolean isEnabled()(Code) | | 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.
true if suite is enabled, false otherwise |
isRegistered | public boolean isRegistered(String midletClassName)(Code) | | Indicates if the named MIDlet is registered in the suite
with MIDlet-<n> record in the manifest or
application descriptor.
Parameters: midletClassName - class name of the MIDlet to be checked true if the MIDlet is registered |
isTrusted | public boolean isTrusted()(Code) | | Indicates if this suite is trusted.
(not to be confused with a domain named "trusted",
this is used for extra checks beyond permission checking)
true if the suite is trusted false if not |
isVerified | public boolean isVerified()(Code) | | Check whether the suite classes are preverified and
the suite content hasn't been changed since installation
true if no more verification needed, false otherwise |
permissionToInterrupt | public boolean permissionToInterrupt(String connection)(Code) | | Ask the user want to interrupt the current MIDlet with
a new MIDlet that has received network data.
Parameters: connection - connection to place in the permission question ornull for alarm true if the use wants interrupt the current MIDlet, else false |
setTempProperty | public void setTempProperty(SecurityToken token, String key, String value)(Code) | | Replace or add a property to the suite for this run only.
Parameters: token - token with the AMS permission set to allowed,can be null to use the suite's permission Parameters: key - the name of the property Parameters: value - the value of the property exception: SecurityException - if the caller's token does not haveinternal AMS permission |
|
|