org.systinet.security.perm
Class WASPGetPermission

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

public final class WASPGetPermission
extends WSManagePermission

Permission that allows to get package(s) from WASP. The name of the permission can be "*" to match all packages. If it is set, the get action is allowed only to given package name, otherwise it allows to get 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
WASPGetPermission()
          Instantiation through this constructor is used to grant get on every package.
WASPGetPermission(java.lang.String packageName)
          Instantiation through this constructor is used to grant get 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 3 if getName() returns null.
 boolean implies(java.security.Permission permission)
          A permissions is implied from this permission if given permission is instance of WASPGetPermission and this.getName() == null, i.e.
 java.security.PermissionCollection newPermissionCollection()
          Returns a new PermissionCollection object for storing WASPGetPermission 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

WASPGetPermission

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


WASPGetPermission

public WASPGetPermission(java.lang.String packageName)
Instantiation through this constructor is used to grant get 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 WASPGetPermission 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 3 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 WASPGetPermission objects. At most one WASPGetPermission permission with null name can be stored in this collection.

Overrides:
newPermissionCollection in class WSManagePermission
Returns:
a new WASPGetPermissionCollection object suitable for storing WASPGetPermission.