com.ecyrd.jspwiki.auth.permissions
Class AllPermission

java.lang.Object
  extended by java.security.Permission
      extended by com.ecyrd.jspwiki.auth.permissions.AllPermission
All Implemented Interfaces:
Serializable, Guard

public final class AllPermission
extends Permission

Permission to perform all operations on a given wiki.

Since:
2.3.80
Version:
$Revision: 1.4 $ $Date: 2006/05/20 05:20:34 $
Author:
Andrew Jaquith
See Also:
Serialized Form

Constructor Summary
AllPermission(String wiki)
          Creates a new WikiPermission for a specified set of actions.
 
Method Summary
 boolean equals(Object obj)
          Two AllPermission objects are considered equal if their wikis are equal.
 String getActions()
          No-op; always returns null
 String getWiki()
          Returns the name of the wiki containing the page represented by this permission; may return the wildcard string.
 int hashCode()
          Returns the hash code for this WikiPermission.
 boolean implies(Permission permission)
          WikiPermission can only imply other WikiPermissions; no other permission types are implied.
 PermissionCollection newPermissionCollection()
          Returns a new AllPermissionCollection.
 String toString()
          Prints a human-readable representation 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

AllPermission

public AllPermission(String wiki)
Creates a new WikiPermission for a specified set of actions.

Parameters:
wiki - the wiki to which the permission should apply
Method Detail

equals

public final boolean equals(Object obj)
Two AllPermission objects are considered equal if their wikis are equal.

Specified by:
equals in class Permission
See Also:
Object.equals(java.lang.Object)

getActions

public final String getActions()
No-op; always returns null

Specified by:
getActions in class Permission
See Also:
Permission.getActions()

getWiki

public final String getWiki()
Returns the name of the wiki containing the page represented by this permission; may return the wildcard string.

Returns:
the wiki

hashCode

public final int hashCode()
Returns the hash code for this WikiPermission.

Specified by:
hashCode in class Permission
See Also:
Object.hashCode()

implies

public final boolean implies(Permission permission)
WikiPermission can only imply other WikiPermissions; no other permission types are implied. One WikiPermission implies another if all of the other WikiPermission's actions are equal to, or a subset of, those for this permission.

Specified by:
implies in class Permission
Parameters:
permission - the permission which may (or may not) be implied by this instance
Returns:
true if the permission is implied, false otherwise
See Also:
Permission.implies(java.security.Permission)

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new AllPermissionCollection.

Overrides:
newPermissionCollection in class Permission
See Also:
Permission.newPermissionCollection(), AllPermissionCollection.getInstance(String)

toString

public final String toString()
Prints a human-readable representation of this permission.

Overrides:
toString in class Permission
See Also:
Object.toString()