org.systinet.security.perm
Class DelegatePermission

java.lang.Object
  extended byjava.security.Permission
      extended byorg.systinet.security.perm.DelegatePermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable
Direct Known Subclasses:
DelegatePackagePermission, DelegateServiceEndpointPermission, DelegateServiceInstancePermission

public abstract class DelegatePermission
extends java.security.Permission

Permission that allows to delegate permissions. This class is abstract and left to be inheritted by specific implementation.

Since:
4.0
See Also:
Serialized Form
Component:
Security-Specific

Field Summary
static java.lang.String ALL_NAMES
          Intended for all names, can be passed to contructor.
 
Constructor Summary
protected DelegatePermission(java.lang.String name)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks two DelegatePermission objects for equality.
 java.lang.String getActions()
          No actions supported by this permission.
 int hashCode()
          Returns the hash code value for this object.
 boolean implies(java.security.Permission p)
          Checks if this DelegatePermission object "implies" the specified permission.
 java.security.PermissionCollection newPermissionCollection()
          Returns a new PermissionCollection object for storing DelegaetPermission objects.
 java.lang.String toString()
          Overriden to return complete description of this permission.
 
Methods inherited from class java.security.Permission
checkGuard, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_NAMES

public static final java.lang.String ALL_NAMES
Intended for all names, can be passed to contructor.

See Also:
Constant Field Values
Constructor Detail

DelegatePermission

protected DelegatePermission(java.lang.String name)
Constructor.

Parameters:
name - implementation specific, null implies all names
Method Detail

toString

public java.lang.String toString()
Overriden to return complete description of this permission.

Returns:
description of this

implies

public boolean implies(java.security.Permission p)
Checks if this DelegatePermission object "implies" the specified permission.

More specifically, this method returns true if:

Parameters:
p - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(java.lang.Object obj)
Checks two DelegatePermission objects for equality. Checks that obj is a DelegatePermission, and has the same name and actions as this object.

Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is a DelegatePermission, and has the same name.
Throws:
java.lang.ClassCastException - if the parameter is not instanceof DelegatePermission

hashCode

public int hashCode()
Returns the hash code value for this object. The hash code used is the hash code of this permissions name, that is, getName().hashCode(), where getName is from the Permission superclass.

Returns:
a hash code value for this object.

getActions

public java.lang.String getActions()
No actions supported by this permission. Null value is returned.

Returns:
null

newPermissionCollection

public java.security.PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing DelegaetPermission objects. At most one WSManage permission can be stored in this collection.

Returns:
a new DelegaetPermissionCollection object suitable for storing DelegaetPermission.