OSGi™ Service Platform
Release 2

org.osgi.framework
Class AdminPermission

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

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.

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.

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.

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.

Returns:
A new PermissionCollection object.

OSGi™ Service Platform
Release 2

Copyright © OSGi Alliance (2000, 2002). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0