? SubsystemPermission

java.lang.Object
java.security.Permission
java.security.BasicPermission
org.osgi.service.subsystem.SubsystemPermission
????????:
Serializable, Guard

public final class SubsystemPermission extends BasicPermission
A bundle's authority to perform specific privileged administrative operations on or to get sensitive information about a subsystem. The actions for this permission are:
 Action    Methods
 context   Subsystem.getBundleContext
 execute   Subsystem.start
           Subsystem.stop
 lifecycle Subsystem.install
           Subsystem.uninstall
 metadata  Subsystem.getSubsystemHeaders
           Subsystem.getLocation
 

The name of this permission is a filter expression. The filter gives access to the following attributes:

  • location - The location of a subsystem.
  • id - The subsystem ID of the designated subsystem.
  • name - The symbolic name of a subsystem.
Filter attribute names are processed in a case sensitive manner.
????:
  • ??????

    • EXECUTE

      public static final String EXECUTE
      The action string execute.
      ????:
    • LIFECYCLE

      public static final String LIFECYCLE
      The action string lifecycle.
      ????:
    • METADATA

      public static final String METADATA
      The action string metadata.
      ????:
    • CONTEXT

      public static final String CONTEXT
      The action string context.
      ????:
  • ???????

    • SubsystemPermission

      public SubsystemPermission(String filter, String actions)
      Create a new SubsystemPermission. This constructor must only be used to create a permission that is going to be checked.

      Examples:

       (name=com.acme.*)(location=http://www.acme.com/subsystems/*))
       (id>=1)
       
      ??:
      filter - A filter expression that can use, location, id, and name keys. Filter attribute names are processed in a case sensitive manner. A special value of "*" can be used to match all subsystems.
      actions - execute, lifecycle, metadata, or context.
      ??:
      IllegalArgumentException - If the filter has an invalid syntax.
    • SubsystemPermission

      public SubsystemPermission(Subsystem subsystem, String actions)
      Creates a new requested SubsystemPermission object to be used by the code that must perform checkPermission. SubsystemPermission objects created with this constructor cannot be added to an SubsystemPermission permission collection.
      ??:
      subsystem - A subsystem.
      actions - execute, lifecycle, metadata, or context.
  • ??????

    • implies

      public boolean implies(Permission p)
      Determines if the specified permission is implied by this object. This method throws an exception if the specified permission was not constructed with a subsystem.

      This method returns true if the specified permission is a SubsystemPermission AND

      • this object's filter matches the specified permission's subsystem ID, subsystem symbolic name, and subsystem location OR
      • this object's filter is "*"
      AND this object's actions include all of the specified permission's actions.

      Special case: if the specified permission was constructed with "*" filter, then this method returns true if this object's filter is "*" and this object's actions include all of the specified permission's actions

      ??:
      implies ??? BasicPermission
      ??:
      p - The requested permission.
      ??:
      true if the specified permission is implied by this object; false otherwise.
    • getActions

      public String getActions()
      Returns the canonical string representation of the SubsystemPermission actions.

      Always returns present SubsystemPermission actions in the following order: execute, lifecycle, metadata, context.

      ??:
      getActions ??? BasicPermission
      ??:
      Canonical string representation of the SubsystemPermission actions.
    • newPermissionCollection

      public PermissionCollection newPermissionCollection()
      Returns a new PermissionCollection object suitable for storing SubsystemPermissions.
      ??:
      newPermissionCollection ??? BasicPermission
      ??:
      A new PermissionCollection object.
    • equals

      public boolean equals(Object obj)
      Determines the equality of two SubsystemPermission objects.
      ??:
      equals ??? BasicPermission
      ??:
      obj - The object being compared for equality with this object.
      ??:
      true if obj is equivalent to this SubsystemPermission; false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash code value for this object.
      ??:
      hashCode ??? BasicPermission
      ??:
      Hash code value for this object.