org.systinet.security.perm
Class WASPUndeployPermission

java.lang.Object
  extended byjava.security.Permission
      extended byorg.systinet.security.perm.WSManagePermission
          extended byorg.systinet.security.perm.WASPUndeployPermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public final class WASPUndeployPermission
extends WSManagePermission

Permission that allows to undeploy packages from WASP. The name of the permission can be "*" to match all packages. If it is set, the undeploy action is allowed only to given package, otherwise it allows to undeploy every package.

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

Field Summary
 
Fields inherited from class org.systinet.security.perm.WSManagePermission
ALL, ALL_NAMES, GET, SET
 
Constructor Summary
WASPUndeployPermission()
          Instantiation through this constructor is used to grant undeploy on every package.
WASPUndeployPermission(java.lang.String packageName)
          Instantiation through this constructor is used to grant undeploy on specified package name.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks two Permission objects for equality.
 java.lang.String getActions()
          No actions supported by this permission.
 int hashCode()
          Always return the value getName().hashCode() or 2 if getName() returns null.
 boolean implies(java.security.Permission permission)
          A permissions is implied from this permission if given permission is instance of WASPUndeployPermission and this.getName() == null, i.e.
 java.security.PermissionCollection newPermissionCollection()
          Returns a new PermissionCollection object for storing WASPUndeployPermission 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
 

Constructor Detail

WASPUndeployPermission

public WASPUndeployPermission()
Instantiation through this constructor is used to grant undeploy on every package. Constructor with no permission name and no permission actions.


WASPUndeployPermission

public WASPUndeployPermission(java.lang.String packageName)
Instantiation through this constructor is used to grant undeploy on specified package name. Constructor with permission name set to package name and no permission actions.

Parameters:
packageName - name of the package
Method Detail

toString

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

Overrides:
toString in class WSManagePermission
Returns:
description of this

getActions

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

Overrides:
getActions in class WSManagePermission
Returns:
null

implies

public boolean implies(java.security.Permission permission)
A permissions is implied from this permission if given permission is instance of WASPUndeployPermission and

Overrides:
implies in class WSManagePermission
Parameters:
permission - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

hashCode

public int hashCode()
Always return the value getName().hashCode() or 2 if getName() returns null.

Overrides:
hashCode in class WSManagePermission
Returns:
hashcode of this permission

equals

public boolean equals(java.lang.Object obj)
Checks two Permission objects for equality.

Overrides:
equals in class WSManagePermission
Parameters:
obj - the object we are testing for equality with this object
Returns:
true if both Permission objects are equivalent.

newPermissionCollection

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

Overrides:
newPermissionCollection in class WSManagePermission
Returns:
a new WASPUndeployPermissionCollection object suitable for storing WASPUndeployPermission.