ants.core.security
Class Permission
java.lang.Object
|
+--ants.core.security.Permission
- Direct Known Subclasses:
- AdminPermission
- public class Permission
- extends java.lang.Object
- implements java.io.Serializable
Describes an abstract permission, consisting of a string name and
an optional set of actions from the set {read,write,execute}.
- Author:
- Andrew Whitaker
- See Also:
- Serialized Form
Constructor Summary |
Permission(java.lang.String name)
Creates a new permission with the given human-readable name and
no actions. |
Permission(java.lang.String name,
java.lang.String actions)
Creates a permission with a set of actions. |
Method Summary |
boolean |
equals(java.lang.Object o)
Tests for exact equality: the name and actions must precisely
match. |
java.lang.String |
getAction()
Returns the actions as a human-readable string |
java.lang.String |
getName()
|
boolean |
implies(Permission p)
test whether this permission implies the given permission. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Permission
public Permission(java.lang.String name)
- Creates a new permission with the given human-readable name and
no actions. Names serve as unique keys.
Permission
public Permission(java.lang.String name,
java.lang.String actions)
- Creates a permission with a set of actions. Actions are
specified by passing an argument string consisting of a subset of
{"read","write","execute"}. The actions must be lower-case. For
example: new Permission ("Routing table","read write")
getAction
public java.lang.String getAction()
- Returns the actions as a human-readable string
getName
public java.lang.String getName()
implies
public boolean implies(Permission p)
- test whether this permission implies the given permission. For
example, read/write implies the read permission. Names are
case-insensitive.
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Tests for exact equality: the name and actions must precisely
match. Names are case-insensitive.
- Overrides:
- equals in class java.lang.Object
This documentation is Copyright (C) 1998-2001 The University of Utah and the University of Washington. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for ANTS v2.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/