Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.security.permissions   Previous This
Package
Next

 


Class UIAccessRequest

public class UIAccessRequest implements ISecurityRequest
{
  // Constructors
  public UIAccessRequest (int accessType);

  // Methods
  public PermissionID getPermissionID();
  public boolean isWarningBannerNeeded();
  public String toString ();
}

This class represents objects that indicate a request to use an extended aspect of the user interface APIs. UIAccessRequest objects are intended to be used as the security request objects for parameterized security checks involving the user interface permission. The UIPermission.check method expects a UIAccessRequest object as its parameter.

The following example shows how to use a UIAccessRequest object to check permission to create a top-level window.


  ...  
  // Create a UIAccessRequest object that indicates that you
  // want to create top-level windows.

  UIAccessRequest sreq = new UIAccessRequest(UIPermission.ALLOW_TOPLEVELWINDOW);

  // Check to see that all of your callers have the rights to
  // create top-level windows.

  PolicyEngine.checkPermission(sreq); 
  ...

For more information about checking user interface permissions, see the PolicyEngine class and the UIPermission class.

Constructors

UIAccessRequest

public UIAccessRequest (int accessType);

Creates a UIAccessRequest object based on a specified access type.

Return Value:

Returns a request object that indicates a request to access the specified UI feature.

ParameterDescription
accessType The type of access that is being requested. The value must be one of the following constants from the UIPermission class:

Methods

getPermissionID

public PermissionID getPermissionID();

Retrieves the permission identifier for the UIAccessRequest object. This method satisfies the ISecurityRequest interface and returns PermissionID.UI to indicate that instances of the UIAccessRequest class are associated with the user interface permission.

Return Value:

Returns PermissionID.UI.

isWarningBannerNeeded

public boolean isWarningBannerNeeded();

Determines whether top-level windows need warning banners.

Return Value:

Returns true if top-level windows need warning banners; otherwise, returns false.

toString

public String toString ();

Converts the UIAccessRequest object to its string representation.

Return Value:

Returns the string representation of the UIAccessRequest object.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.