Packages
 In this topic

*Methods

 

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

 


Interface IPermission

public interface IPermission extends com.ms.util.SetComparison
{
  // Methods
  void check(Object request) throws SecurityException ;
  IPermission combine(IPermission other) ;
  IPermission copy() ;
}

This interface must be implemented by all classes that represent permissions. Instances of the classes that implement this interface can be used as permissions that are attached to classes and used to perform security checks.

SetComparison
  |
  +--IPermission

Methods

check

void check(Object request) throws SecurityException ;

Determines whether the permission object allows the specified action. The request parameter represents a request to perform a particular action. The type of the request parameter depends on the type of the permission object that is being checked.

Return Value:

No return value.

ParameterDescription
request The object that represents the action for which permission is being checked.

Exceptions:

SecurityException if the state of the permission object indicates that the action is not allowed.

combine

IPermission combine(IPermission other) ;

Creates and returns a new permission object that is a combination of the current permission object and the specified permission object. The new object allows access to exactly those resources allowed by either one of the permission objects that it was constructed from.

Return Value:

Returns the resulting permission object.

ParameterDescription
other The permission object that indicates additional resources to allow access to.

Exceptions:

IllegalArgumentException if the specified permission object is not of the same type as the permission object it is being combined with.

copy

IPermission copy() ;

Creates a new permission object that is equivalent to the current one. The copy operation is deep so that modifications to the copy do not affect the behavior of the original object.

Return Value:

Returns a permission object that is a copy of the current one.

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