net.sf.farrago.db
Class FarragoDbSessionPrivilegeMap
java.lang.Object
net.sf.farrago.db.FarragoDbSessionPrivilegeMap
- All Implemented Interfaces:
- FarragoSessionPrivilegeMap
class FarragoDbSessionPrivilegeMap
- extends Object
- implements FarragoSessionPrivilegeMap
FarragoDbSessionPrivilegeMap is a default implementation for FarragoSessionPrivilegeMap
.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/db/FarragoDbSessionPrivilegeMap.java#7 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modelView
private final JmiModelView modelView
mapTypeToSet
private final Map<RefClass,Set<String>> mapTypeToSet
FarragoDbSessionPrivilegeMap
FarragoDbSessionPrivilegeMap(JmiModelView modelView)
mapPrivilegeForType
public void mapPrivilegeForType(RefClass refClass,
String privilegeName,
boolean isLegal,
boolean includeSubclasses)
- Description copied from interface:
FarragoSessionPrivilegeMap
- Registers a privilege as either legal or illegal for a type.
- Specified by:
mapPrivilegeForType
in interface FarragoSessionPrivilegeMap
- 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 wellisLegal
- if true, privilege is allowed on type; if false,
attempting to grant privilege on type will result in a validator
exceptionincludeSubclasses
- if true, set privilege for refClass and all of
its subclasses; if false, set privilege for refClass only
getLegalPrivilegesForType
public Set<String> getLegalPrivilegesForType(RefClass refClass)
- Description copied from interface:
FarragoSessionPrivilegeMap
- Returns a set of privileges mapped as legal for a type.
- Specified by:
getLegalPrivilegesForType
in interface FarragoSessionPrivilegeMap
- Parameters:
refClass
- a JMI class representing the object type
- Returns:
- Set of privilege names
makeImmutable
void makeImmutable()