org.jboss.metadata.spi.stack
Class MetaDataStackPermission

java.lang.Object
  extended by java.security.Permission
      extended by java.security.BasicPermission
          extended by org.jboss.metadata.spi.stack.MetaDataStackPermission
All Implemented Interfaces:
Serializable, Guard

public class MetaDataStackPermission
extends BasicPermission

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

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

Constructor Summary
MetaDataStackPermission(String name)
          Create a new Permission
MetaDataStackPermission(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

MetaDataStackPermission

public MetaDataStackPermission(String name)
Create a new Permission

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

MetaDataStackPermission

public MetaDataStackPermission(String name,
                               String actions)
Create a new Permission

Parameters:
name - the target
actions - the actions
Throws:
IllegalArgumentException - for an invalid name or target
NullPointerException - for null name
Method Detail

toString

public String toString()
Overrides:
toString in class Permission
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.

Overrides:
implies in class BasicPermission
Parameters:
p - the permission
Returns:
true when the permission is implied

newPermissionCollection

public PermissionCollection newPermissionCollection()
Must override to handle the configure implies access relationship.

Overrides:
newPermissionCollection in class BasicPermission
Returns:
the permission collection


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.