Examples of MIDletSuiteImpl


Examples of com.sun.midp.midletsuite.MIDletSuiteImpl

     */
    protected void checkPreviousVersion()
        throws InvalidJadException, MIDletSuiteLockedException {

        int id;
        MIDletSuiteImpl midletSuite;
        String installedVersion;
        int cmpResult;

        // Check if app already exists
        id = MIDletSuiteStorage.getSuiteID(info.suiteVendor, info.suiteName);
        if (id == MIDletSuite.UNUSED_SUITE_ID) {
            // there is no previous version
            return;
        }

        try {
            midletSuite =
              state.midletSuiteStorage.getMIDletSuite(id, true);

            if (midletSuite == null) {
                // there is no previous version
                return;
            }
            checkVersionFormat(info.suiteVersion);

            state.isPreviousVersion = true;

            // This is now an update, use the old ID
            info.id = id;

            state.previousSuite = midletSuite;
            state.previousInstallInfo = midletSuite.getInstallInfo();

            if (state.force) {
                // do not ask questions, force an overwrite
                return;
            }

            // If it does, check version information
            installedVersion = midletSuite.getProperty(
                MIDletSuite.VERSION_PROP);
            cmpResult = vercmp(info.suiteVersion,
                               installedVersion);
            if (cmpResult < 0) {
                // older version, warn user
View Full Code Here

Examples of com.sun.midp.midletsuite.MIDletSuiteImpl

     */
    protected void checkPreviousVersion()
        throws InvalidJadException, MIDletSuiteLockedException {

        int id;
        MIDletSuiteImpl midletSuite;
        String installedVersion;
        int cmpResult;

        // Check if app already exists
        id = MIDletSuiteStorage.getSuiteID(info.suiteVendor, info.suiteName);
        if (id == MIDletSuite.UNUSED_SUITE_ID) {
            // there is no previous version
            return;
        }

        try {
            midletSuite =
              state.midletSuiteStorage.getMIDletSuite(id, true);

            if (midletSuite == null) {
                // there is no previous version
                return;
            }
            checkVersionFormat(info.suiteVersion);

            state.isPreviousVersion = true;

            // This is now an update, use the old ID
            info.id = id;

            state.previousSuite = midletSuite;
            state.previousInstallInfo = midletSuite.getInstallInfo();

            if (state.force) {
                // do not ask questions, force an overwrite
                return;
            }

            // If it does, check version information
            installedVersion = midletSuite.getProperty(
                MIDletSuite.VERSION_PROP);
            cmpResult = vercmp(info.suiteVersion,
                               installedVersion);
            if (cmpResult < 0) {
                // older version, warn user
View Full Code Here

Examples of com.sun.midp.midletsuite.MIDletSuiteImpl

       return storage.getMIDletSuiteInfo(id);
   }

   private MIDletInfo[] getMIDletInfos(MIDletSuiteInfo suiteInfo)
              throws MIDletSuiteLockedException, MIDletSuiteCorruptedException{
       MIDletSuiteImpl midletSuite = storage.getMIDletSuite(suiteInfo.suiteId, false);

       MIDletInfo[] midletInfos = new MIDletInfo[midletSuite.getNumberOfMIDlets()];
       for (int i = 0; i < midletInfos.length; i++) {
           midletInfos[i] = new MIDletInfo(
                         midletSuite.getProperty("MIDlet-" + (i+1)));
       }

       // Need to unlock midletsuite.
       midletSuite.close();

       return midletInfos;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.