FileDocCategorySizeDatePackage
PAPICleanUp.javaAPI DocphoneME MR2 API (J2ME)2702Wed May 02 18:00:44 BST 2007com.sun.midp.payment

PAPICleanUp

public class PAPICleanUp extends Object
Real interface to handle MIDlet Payment functionality.

Fields Summary
Constructors Summary
public PAPICleanUp()
public constructor.

    
Methods Summary
public static java.lang.StringcheckMissedTransactions(int suiteId)
The function for a Missed Transactions validation.

param
suiteId The MIDletSuite ID
return
null if there is no pending Transaction for this Suite otherwise returns formated list of missed transactions

        /* 1) Get list of records */
        CldcPaymentModule payModule =
        ((CldcPaymentModule) PaymentModule.getInstance());
        int paymentID = payModule.getPaymentID(suiteId);
        String[] recs =
            payModule.getMissedRecordsHeaders(suiteId);

        /* 2) Prepare message from record feature tile and price */
        if (recs == null) {
            return null;
        }

        StringBuffer mess = new StringBuffer(
        Resource.getString(ResourceConstants
                           .AMS_PERMISSION_PAYMENT_DELETION_QUESTION));
        for (int i = 0; i < recs.length; i++) {
            mess.append(i + 1);
            mess.append(") ");
            mess.append(recs[i]);
            mess.append("\n");
        }
        return mess.toString();
    
public static voidremoveMissedTransaction(int suiteId)
Remove missed transaction for given midlet suite.

param
suiteId midlet suite id

        ((CldcPaymentModule) PaymentModule.getInstance()).removeMissed(suiteId);