org.osgi.framework
Class AdminPermission

java.lang.Object
  extended by java.security.Permission
      extended by java.security.BasicPermission
          extended by org.osgi.framework.AdminPermission
All Implemented Interfaces:
java.io.Serializable, java.security.Guard

public final class AdminPermission
extends java.security.BasicPermission

Indicates the caller's authority to perform lifecycle operations on or to get sensitive information about a bundle.

AdminPermission has no actions or target.

The hashCode() method of AdminPermission is inherited from java.security.BasicPermission. The hash code it returns is the hash code of the name "AdminPermission", which is always the same for all instances of AdminPermission.

Version:
$Revision: 1.1 $
Author:
Open Services Gateway Initiative
See Also:
Serialized Form

Constructor Summary
AdminPermission()
          Creates a new AdminPermission object with its name set to "AdminPermission".
AdminPermission(java.lang.String name, java.lang.String actions)
          Creates a new AdminPermission object for use by the Policy object to instantiate new Permission objects.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines the equality of two AdminPermission objects.
 boolean implies(java.security.Permission p)
          Determines if the specified permission is implied by this object.
 java.security.PermissionCollection newPermissionCollection()
          Returns a new PermissionCollection object suitable for storing AdminPermissions.
 
Methods inherited from class java.security.BasicPermission
getActions, hashCode
 
Methods inherited from class java.security.Permission
checkGuard, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdminPermission

public AdminPermission()
Creates a new AdminPermission object with its name set to "AdminPermission".


AdminPermission

public AdminPermission(java.lang.String name,
                       java.lang.String actions)
Creates a new AdminPermission object for use by the Policy object to instantiate new Permission objects.

Parameters:
name - Ignored; always set to "AdminPermission".
actions - Ignored.
Method Detail

implies

public boolean implies(java.security.Permission p)
Determines if the specified permission is implied by this object.

This method returns true if the specified permission is an instance of AdminPermission.

Overrides:
implies in class java.security.BasicPermission
Parameters:
p - The permission to interrogate.
Returns:
true if the permission is an instance of this class; false otherwise.

equals

public boolean equals(java.lang.Object obj)
Determines the equality of two AdminPermission objects.

Two AdminPermission objects are always equal.

Overrides:
equals in class java.security.BasicPermission
Parameters:
obj - The object being compared for equality with this object.
Returns:
true if obj is an AdminPermission; false otherwise.

newPermissionCollection

public java.security.PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object suitable for storing AdminPermissions.

Overrides:
newPermissionCollection in class java.security.BasicPermission
Returns:
A new PermissionCollection object.


Copyright © 2009 IKS, ETH Zurich. All Rights Reserved.