| java.lang.Object com.sun.midp.midletsuite.MIDletSuiteStorage
MIDletSuiteStorage | public class MIDletSuiteStorage (Code) | | This class manages the persistent data for MIDlet suites.
Each installed package is uniquely identified by a unique ID.
Only suites installed or updated using this API appear
in the list of known suites.
|
Method Summary | |
native public int | createSuiteID() Returns a unique identifier of MIDlet suite. | native public void | disable(int id) Disables a suite given its suite ID.
The method does not stop the suite if is in use. | native public void | enable(int id) Enables a suite given its suite ID. | InstallInfo | getInstallInfo(MIDletSuiteImpl midletSuite) Get the installation information of a suite. | public synchronized int[] | getListOfSuites() List all installed software packages by storage name. | public synchronized MIDletSuiteImpl | getMIDletSuite(int id, boolean update) Gets the MIDlet Suite from storage, and selects one midlet to be run. | public synchronized byte[] | getMIDletSuiteIcon(int suiteId, String iconName) | public synchronized MIDletSuiteInfo | getMIDletSuiteInfo(int id) Reads the basic information about the midlet suite from the storage. | native public void | getMIDletSuiteInfoImpl0(int id, MIDletSuiteInfo msi) Reads the basic information about the midlet suite from the storage. | public static MIDletSuiteStorage | getMIDletSuiteStorage() Returns a reference to the singleton MIDlet suite storage object. | public static MIDletSuiteStorage | getMIDletSuiteStorage(SecurityToken securityToken) Returns a reference to the singleton MIDlet suite storage object. | native public synchronized String | getMidletSuiteAppImagePath(int id) Get the path for the MONET image of the specified suite. | public synchronized String[] | getMidletSuiteClassPath(int id) Get the midlet suite's class path including a path to the MONET
image of the specified suite and a path to the suite's jar file. | native public synchronized String | getMidletSuiteJarPath(int id) Get the class path for a suite. | static String[] | getPropertiesStrings(Properties props) Fill plain array with properties key/value String pairs. | native public int | getStorageUsed(int id) Gets the amount of storage on the device that this suite is using. | native public static int | getSuiteID(String vendor, String name) Gets the unique identifier of MIDlet suite. | public static void | initSecurityToken(SecurityToken token) Initializes the security token for this class, so it can
perform actions that a normal MIDlet Suite cannot. | public String[] | listRecordStores(int suiteId) Returns an array of the names of record stores owned by the
MIDlet suite. | native public static int | loadSuitesIcons0() Loads the cached icons from the permanent storage into memory. | public void | remove(int id) Removes a software package given its suite ID.
The content handler manager is called to remove any registrations,
if any.
If the component is in use it must continue to be available
to the other components that are using it. | public void | saveSuiteSettings(int id, byte pushInterruptSetting, int pushOptions, byte[] permissions) Saves any of the settings (security or others) that the user may have
changed. | public synchronized void | storeSuite(InstallInfo installInfo, SuiteSettings suiteSettings, MIDletSuiteInfo msi, Properties jadProps, Properties jarProps) Stores or updates a midlet suite. | native public void | storeSuiteVerifyHash(int id, byte[] verifyHash) | native public boolean | suiteExists(int id) Tells if a suite exists. | native public static String | suiteIdToString(int suiteId) Java interface for midp_suiteid2pcsl_string(). |
createSuiteID | native public int createSuiteID()(Code) | | Returns a unique identifier of MIDlet suite.
Constructed from the combination
of the values of the MIDlet-Name and
MIDlet-Vendor attributes.
the platform-specific storage name of the applicationgiven by vendorName and appName |
disable | native public void disable(int id) throws MIDletSuiteLockedException(Code) | | Disables a suite given its suite ID.
The method does not stop the suite if is in use. However any future
attepts to run a MIDlet from this suite while disabled should fail.
Parameters: id - suite ID for the installed package exception: IllegalArgumentException - if the suite cannot be found exception: MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked for updating |
enable | native public void enable(int id) throws MIDletSuiteLockedException(Code) | | Enables a suite given its suite ID.
The method does update an suites that are currently loaded for
settings or of application management purposes.
Parameters: id - suite ID for the installed package exception: IllegalArgumentException - if the suite cannot be found exception: MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked for updating |
getInstallInfo | InstallInfo getInstallInfo(MIDletSuiteImpl midletSuite) throws IOException(Code) | | Get the installation information of a suite.
Parameters: midletSuite - Suite object installation information exception: IOException - if an the information cannot be read |
getListOfSuites | public synchronized int[] getListOfSuites()(Code) | | List all installed software packages by storage name.
an array of ints of the storage names for theinstalled packages exception: SecurityException - if the caller does not have permissionto see what software is installed |
getMIDletSuite | public synchronized MIDletSuiteImpl getMIDletSuite(int id, boolean update) throws MIDletSuiteLockedException, MIDletSuiteCorruptedException(Code) | | Gets the MIDlet Suite from storage, and selects one midlet to be run.
Parameters: id - the unique ID of the suite givenby the installer when it was downloaded Parameters: update - true is this MIDletSuite need to be updated exception: MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked; MIDletSuiteCorruptedException is thrown if the MIDletSuite iscorrupted MIDlet Suite reference |
getMIDletSuiteIcon | public synchronized byte[] getMIDletSuiteIcon(int suiteId, String iconName)(Code) | | Parameters: suiteId - unique identifier of the suite Parameters: iconName - the name of the icon to retrieve |
getMIDletSuiteStorage | public static MIDletSuiteStorage getMIDletSuiteStorage(SecurityToken securityToken) throws SecurityException(Code) | | Returns a reference to the singleton MIDlet suite storage object.
Parameters: securityToken - security token of the calling class the storage reference exception: SecurityException - if the caller does not have permissionto manage midlets |
getMidletSuiteAppImagePath | native public synchronized String getMidletSuiteAppImagePath(int id)(Code) | | Get the path for the MONET image of the specified suite.
Parameters: id - unique ID of the suite image path or null if the suite does not exist |
getMidletSuiteClassPath | public synchronized String[] getMidletSuiteClassPath(int id)(Code) | | Get the midlet suite's class path including a path to the MONET
image of the specified suite and a path to the suite's jar file.
Parameters: id - unique ID of the suite class path or null if the suite does not exist |
getMidletSuiteJarPath | native public synchronized String getMidletSuiteJarPath(int id)(Code) | | Get the class path for a suite.
Parameters: id - unique ID of the suite class path or null if the suite does not exist |
getPropertiesStrings | static String[] getPropertiesStrings(Properties props)(Code) | | Fill plain array with properties key/value String pairs.
It's needed to simplify properties using in a native code.
Parameters: props - properties to get Strings from array of Strings filled with property key/value pairs |
getStorageUsed | native public int getStorageUsed(int id)(Code) | | Gets the amount of storage on the device that this suite is using.
This includes the JAD, JAR, management data, and RMS.
Parameters: id - ID of a MIDlet suite number of bytes of storage the suite is using |
getSuiteID | native public static int getSuiteID(String vendor, String name)(Code) | | Gets the unique identifier of MIDlet suite.
Parameters: vendor - name of the vendor that created the application, asgiven in a JAD file Parameters: name - name of the suite, as given in a JAD file suite ID of the midlet suite given by vendor and nameor MIDletSuite.UNUSED_SUITE_ID if the suite does not exist |
initSecurityToken | public static void initSecurityToken(SecurityToken token)(Code) | | Initializes the security token for this class, so it can
perform actions that a normal MIDlet Suite cannot.
Parameters: token - security token for this class. |
listRecordStores | public String[] listRecordStores(int suiteId)(Code) | | Returns an array of the names of record stores owned by the
MIDlet suite.
The order of RecordStore names returned is implementation
dependent.
Parameters: suiteId - ID of the MIDlet suite that owns the record store array of the names of record stores owned by theMIDlet suite or null if the MIDlet suite does not haveany record stores |
loadSuitesIcons0 | native public static int loadSuitesIcons0()(Code) | | Loads the cached icons from the permanent storage into memory.
status code (0 if no errors) |
remove | public void remove(int id) throws MIDletSuiteLockedException(Code) | | Removes a software package given its suite ID.
The content handler manager is called to remove any registrations,
if any.
If the component is in use it must continue to be available
to the other components that are using it. The resources it
consumes must not be released until it is not in use.
Parameters: id - suite ID for the installed package exception: IllegalArgumentException - if the suite cannot be found exception: MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked |
saveSuiteSettings | public void saveSuiteSettings(int id, byte pushInterruptSetting, int pushOptions, byte[] permissions) throws IOException(Code) | | Saves any of the settings (security or others) that the user may have
changed.
Parameters: id - ID of the suite Parameters: pushInterruptSetting - push interrupt setting Parameters: pushOptions - push options Parameters: permissions - security permissions for the suite exception: IOException - if an error happens while writing |
storeSuite | public synchronized void storeSuite(InstallInfo installInfo, SuiteSettings suiteSettings, MIDletSuiteInfo msi, Properties jadProps, Properties jarProps) throws IOException, MIDletSuiteLockedException(Code) | | Stores or updates a midlet suite.
Parameters: installInfo - structure containing the following information:
id - unique ID of the suite;jadUrl - where the JAD came from, can be null;jarUrl - where the JAR came from;jarFilename - name of the downloaded MIDlet suite jar file;suiteName - name of the suite;suiteVendor - vendor of the suite;authPath - authPath if signed, the authorization path startingwith the most trusted authority;domain - security domain of the suite;trusted - true if suite is trusted;verifyHash - may contain hash value of the suite withpreverified classes or may be NULL; Parameters: suiteSettings - structure containing the following information:
permissions - permissions for the suite;pushInterruptSetting - defines if this MIDlet suite interruptother suites;pushOptions - user options for push interrupts;suiteId - unique ID of the suite, must be equal to the one givenin installInfo;boolean enabled - if true, MIDlet from this suite can be run; Parameters: msi - structure containing the following information:
suiteId - unique ID of the suite, must be equal to the value givenin installInfo and suiteSettings parameters;storageId - ID of the storage where the MIDlet should be installed;numberOfMidlets - number of midlets in the suite;displayName - the suite's name to display to the user;midletToRunClassName - the midlet's class name if the suite containsonly one midlet, ignored otherwise;iconName - name of the icon for this suite. Parameters: jadProps - properties defined in the application descriptor Parameters: jarProps - properties of the manifest exception: IOException - is thrown, if an I/O error occurs duringstoring the suite exception: MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked |
storeSuiteVerifyHash | native public void storeSuiteVerifyHash(int id, byte[] verifyHash)(Code) | | Stores hash value of the suite with preverified classes
Parameters: id - unique ID of the suite Parameters: verifyHash - hash value of the suite with preverified classes |
suiteIdToString | native public static String suiteIdToString(int suiteId)(Code) | | Java interface for midp_suiteid2pcsl_string().
Parameters: suiteId - unique ID of the suite string representation of the given suiteId |
|
|