FileDocCategorySizeDatePackage
RecordStoreFactory.javaAPI DocphoneME MR2 API (J2ME)2656Wed May 02 18:00:12 BST 2007com.sun.midp.rms

RecordStoreFactory

public class RecordStoreFactory extends Object
A utility class for checking and removing record stores.

Fields Summary
Constructors Summary
private RecordStoreFactory()
Private constructor to prevent any instances from being created.

Methods Summary
public static voidremoveRecordStoresForSuite(com.sun.midp.security.SecurityToken token, int id)
Remove all the Record Stores for a suite. Called by the installer when updating a suite

param
token security token with MIDP AMS permission
param
id ID of the suite


	if (token == null) {
            MIDletSuite midletSuite =
                MIDletStateHandler.getMidletStateHandler().getMIDletSuite();

            // if a MIDlet suite is not scheduled, assume the JAM is calling.
            if (midletSuite != null) {
                midletSuite.checkIfPermissionAllowed(Permissions.AMS);
            }
        } else {
            token.checkIfPermissionAllowed(Permissions.AMS);
        }

        RecordStoreFile.removeRecordStores(id);
    
public static native booleansuiteHasRmsData(int id)
Returns true if the suite has created at least one record store. Called by the installer when updating a suite.

param
id ID of the suite
return
true if the suite has at least one record store