FileDocCategorySizeDatePackage
JCRMIPermissions.javaAPI DocphoneME MR2 API (J2ME)2990Wed May 02 18:00:38 BST 2007com.sun.satsa.acl

JCRMIPermissions

public class JCRMIPermissions extends ACLPermissions
This class represents a set of JCRMI permissions.

Fields Summary
Constructors Summary
public JCRMIPermissions(ACSlot parent)
Constructs new object.

param
parent parent ACFile object.

        super(parent);
    
Methods Summary
public voidcheckPermission(java.lang.String className, java.lang.String method)
Verifies that the MIDlet have permission for this remote method.

param
className the name of class.
param
method method name and signature.
throws
SecurityException if access denied


        if (type == ALLOW) {
            return;
        }
        if (type == DISALLOW) {
            throw new SecurityException("Access denied");
        }

        for (int i = 0; i < permissions.size(); i++) {

            JCRMIPermission p = (JCRMIPermission) permissions.elementAt(i);
            if (p.checkAccess(className, method)) {
                return;
            }
        }
        throw new SecurityException("Access denied: " + className +
                " " + method);
    
public java.lang.StringpreparePIN(int pinID, int unblockID, int action, java.lang.String className)
Initializes internal variables, verifies that operation is supported and permitted, returns method name and signature for given PIN operation.

param
pinID PIN identifier.
param
unblockID unblocking PIN identifier.
param
action PIN operation.
param
className the name of class.
return
method name and signature.
throws
java.lang.SecurityException if access denied


        checkPINOperation(pinID, unblockID, action);
        String result = (String) getPINCommand(pinID, action);
        if (result == null) {
            throw new SecurityException();
        }
        checkPermission(className, result);
        return result;