net.sf.farrago.session
Interface FarragoSessionPrivilegeMap

All Known Implementing Classes:
FarragoDbSessionPrivilegeMap

public interface FarragoSessionPrivilegeMap

FarragoSessionPrivilegeMap defines a map from object type to a set of privileges relevant to that type. Map instances may be immutable, in which case only read accessors may be called.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/session/FarragoSessionPrivilegeMap.java#7 $
Author:
John V. Sichi

Method Summary
 Set<String> getLegalPrivilegesForType(RefClass refClass)
          Returns a set of privileges mapped as legal for a type.
 void mapPrivilegeForType(RefClass refClass, String privilegeName, boolean isLegal, boolean includeSubclasses)
          Registers a privilege as either legal or illegal for a type.
 

Method Detail

mapPrivilegeForType

void mapPrivilegeForType(RefClass refClass,
                         String privilegeName,
                         boolean isLegal,
                         boolean includeSubclasses)
Registers a privilege as either legal or illegal for a type.

Parameters:
refClass - a JMI class representing the object type (e.g. RelationalPackage.getCwmTable())
privilegeName - name of the privilege to set; standard privilege names are defined in PrivilegedActionEnum, but model extensions may define their own names as well
isLegal - if true, privilege is allowed on type; if false, attempting to grant privilege on type will result in a validator exception
includeSubclasses - if true, set privilege for refClass and all of its subclasses; if false, set privilege for refClass only

getLegalPrivilegesForType

Set<String> getLegalPrivilegesForType(RefClass refClass)
Returns a set of privileges mapped as legal for a type.

Parameters:
refClass - a JMI class representing the object type
Returns:
Set of privilege names