blackboard.data
Class AttributePermission
java.lang.Object
java.security.Permission
java.security.BasicPermission
blackboard.data.AttributePermission
- All Implemented Interfaces:
- java.io.Serializable, java.security.Guard
public class AttributePermission
- extends java.security.BasicPermission
Permission encapsulating granular access to data object attributes. Basically, any
data object can use sub-classes of this class to protect read/set access to attributes.
It is important to note that set always implies read access.
Two actions are supported: get and set. There is no implication between the two permissions.
Thus, care should be taken to always test for a single permission. I.e., never test to see if
a caller has "get,set" permissions. Check one, then the other.
- Since:
- Blackboard 6.0
- Version:
- $Revision: #1 $ $Date: 2005/06/27 $
- See Also:
- Serialized Form
Constructor Summary |
AttributePermission(java.lang.String name,
java.lang.String actions)
Constructor accepting both a name and action list. |
Method Summary |
java.lang.String |
getActions()
Returns the actions, in normalized form, which is one of "get", "set", or
"get,set". |
boolean |
implies(java.security.Permission p)
Determines whether the current permission implies the specified permission. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.security.BasicPermission |
equals, hashCode, newPermissionCollection |
Methods inherited from class java.security.Permission |
checkGuard, getName, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
AttributePermission
public AttributePermission(java.lang.String name,
java.lang.String actions)
- Constructor accepting both a name and action list. The name should be of the form [object].[attribute],
where [object] is the class of object, and [attribute] should correspond to the string in the
object's Def file.
- Parameters:
name
- Name of the object.actions
- One of "get", "set", or "get,set"
implies
public boolean implies(java.security.Permission p)
- Determines whether the current permission implies the specified permission.
This is done against first against the permission name, then the actions.
- Overrides:
implies
in class java.security.BasicPermission
- Parameters:
p
- the permission to check against.
- Returns:
- true if the passed permission is equal to or
implied by this permission, false otherwise.
getActions
public java.lang.String getActions()
- Returns the actions, in normalized form, which is one of "get", "set", or
"get,set".
- Overrides:
getActions
in class java.security.BasicPermission
- Returns:
- Normalized action string
main
public static void main(java.lang.String[] args)
Copyright © 2003 Blackboard, Inc. All Rights Reserved.