org.sakaiproject.service.legacy.authzGroup
Interface Role

All Superinterfaces:
Comparable, Serializable
All Known Implementing Classes:
BaseRole

public interface Role
extends Comparable, Serializable

Role is part of an AuthzGroup, to which users can be assingned, and which is given permissions to various functions.

Author:
Sakai Software Development Team

Method Summary
 void allowFunction(String lock)
          Add this function to the set of functions that users with this role are allowed to perform.
 void allowFunctions(Collection functions)
          Add these functions to the set of functions that users with this role are allowed to perform.
 boolean allowsNoFunctions()
          Check if the Role has no functons in the set of functions that users with this role are allowed to perform.
 void disallowAll()
          Remove all functions from the set of functions that users with this role are allowed to perform.
 void disallowFunction(String lock)
          Remove this function from the set of functions that users with this role are allowed to perform.
 void disallowFunctions(Collection functions)
          Remove these functions from the set of functions that users with this role are allowed to perform.
 Set getAllowedFunctions()
          Access the set of functions that users with this role are allowed to perform.
 String getDescription()
          Access the Role description.
 String getId()
          Access the Role id.
 boolean isAllowed(String function)
          Test if users with this role are allowed to perform this named function.
 void setDescription(String description)
          Set the role description.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getId

public String getId()
Access the Role id.

Returns:
The role id.

getDescription

public String getDescription()
Access the Role description.

Returns:
The role description.

isAllowed

public boolean isAllowed(String function)
Test if users with this role are allowed to perform this named function.

Parameters:
function - The function name.
Returns:
true if users with this role are allowed to perform this named function, false if not.

getAllowedFunctions

public Set getAllowedFunctions()
Access the set of functions that users with this role are allowed to perform.

Returns:
The Set of function names (String) that users with this role are allowed to perform.

setDescription

public void setDescription(String description)
Set the role description.

Parameters:
description - The role description.

allowFunction

public void allowFunction(String lock)
Add this function to the set of functions that users with this role are allowed to perform.


allowFunctions

public void allowFunctions(Collection functions)
Add these functions to the set of functions that users with this role are allowed to perform.

Parameters:
functions - The Collection (String) of function names to add to the allowed set.

disallowFunction

public void disallowFunction(String lock)
Remove this function from the set of functions that users with this role are allowed to perform.


disallowFunctions

public void disallowFunctions(Collection functions)
Remove these functions from the set of functions that users with this role are allowed to perform.


disallowAll

public void disallowAll()
Remove all functions from the set of functions that users with this role are allowed to perform.


allowsNoFunctions

public boolean allowsNoFunctions()
Check if the Role has no functons in the set of functions that users with this role are allowed to perform.

Returns:
true if the role has no allowed functions, false if it does.