Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.kernel
Class KernelPermission

    java.lang.Object
      java.security.Permission
          java.security.BasicPermission
              org.jboss.kernel.KernelPermission

All Implemented Interfaces:
  Guard, Serializable

public class KernelPermission
extends BasicPermission

This permission represents "trust" in a signer or codebase. It contains a target name but no actions list. The targets are

- access - access the kernel configuration
- configure - configure the kernel - implies access
- * - all

Version:
  $Revision: 1.3 $
Author:
  adrian@jboss.com
See Also:
  Serialized Form

Constructor Summary
`KernelPermission(String name)` Create a new Permission
`KernelPermission(String name, String actions)` Create a new Permission

Method Summary
`boolean` | `implies(Permission p)` Checks if this KernelPermission object "implies" the specified permission.
`PermissionCollection` | `newPermissionCollection()` Must override to handle the configure implies access relationship.
`String` | `toString()`

Methods inherited from class java.security.BasicPermission
`equals, getActions, hashCode`

Methods inherited from class java.security.Permission
`checkGuard, getName`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### KernelPermission

    public KernelPermission(String name)

  Create a new Permission

Parameters:
  `name` - the target
Throws:
  `IllegalArgumentException` - for invalid name
  `NullPointerException` - for null name

### KernelPermission

    public KernelPermission(String name,
                            String actions)

  Create a new Permission

Parameters:
  `name` - the target
Throws:
  `IllegalArgumentException` - for an invalid name or target
  `NullPointerException` - for null name

Method Detail

### toString

    public String toString()

  Returns:
    human readable string.

### implies

    public boolean implies(Permission p)

  Checks if this KernelPermission object "implies" the specified permission. More specifically, this method returns true if: p is an instance of KernelPermission, p's target names are a subset of this object's target names The configure permission implies the access permission.

  Parameters:
    `p` - the permission
  Returns:
    true when the permission is implied

### newPermissionCollection

    public PermissionCollection newPermissionCollection()

  Must override to handle the configure implies access relationship.

  Returns:
    the permission collection

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 JBoss Inc. All Rights Reserved.