|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.security.Configurable
org.mmbase.security.Authorization
The abstract implementation of the Authorization. To make your own implementation of authorization, you have to extend this class, and implement the abstract methods.
| Nested Class Summary | |
static class |
Authorization.QueryCheck
Defines the result of a security check on a query. |
| Field Summary | |
static Authorization.QueryCheck |
COMPLETE_CHECK
Constant which can be used as a result for the check query function. |
static Authorization.QueryCheck |
NO_CHECK
Constant which can be used as a result for the check query function. |
| Fields inherited from class org.mmbase.security.Configurable |
configFile, configResource, configWatcher, manager |
| Constructor Summary | |
Authorization()
|
|
| Method Summary | |
abstract boolean |
check(UserContext user,
int nodeid,
int srcnodeid,
int dstnodeid,
Operation operation)
This method should be overrided by an extending class. |
abstract boolean |
check(UserContext user,
int nodeid,
Operation operation)
This method should be overrided by an extending class. |
Authorization.QueryCheck |
check(UserContext user,
Query query,
Operation operation)
Checks rights on a query. |
abstract void |
create(UserContext user,
int nodeid)
This method should be overrided by an extending class. |
abstract String |
getContext(UserContext user,
int nodeid)
This method could be overrided by an extending class. |
abstract Set |
getPossibleContexts(UserContext user,
int nodeid)
This method could be overrided by an extending class. |
abstract void |
remove(UserContext user,
int nodeid)
This method should be overrided by an extending class. |
abstract void |
setContext(UserContext user,
int nodeid,
String context)
This method could be overrided by an extending class. |
abstract void |
update(UserContext user,
int nodeid)
This method should be overrided by an extending class. |
void |
verify(UserContext user,
int nodeid,
int srcnodeid,
int dstnodeid,
Operation operation)
This method wraps the check-method with the same arguments. |
void |
verify(UserContext user,
int nodeid,
Operation operation)
This method wraps the check-method with the same arguments. |
| Methods inherited from class org.mmbase.security.Configurable |
load, load |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Authorization.QueryCheck NO_CHECK
public static final Authorization.QueryCheck COMPLETE_CHECK
| Constructor Detail |
public Authorization()
| Method Detail |
public abstract void create(UserContext user,
int nodeid)
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has just been added to
the MMBase cloud.
public abstract void update(UserContext user,
int nodeid)
user - The UserContext, containing the information about the user.nodeid - The id of the MMObjectNode, which has just been changed
in the cloud.
public abstract void remove(UserContext user,
int nodeid)
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has just been removed
in the cloud.
public abstract boolean check(UserContext user,
int nodeid,
Operation operation)
user - The UserContext, containing the information the user.nodeid - The id of the MMObjectNode, which has to be checked.
It the action is CREATE then this will be interpreted as a typedef node.operation - The operation which will be performed.
true if the operation is permitted,
false if the operation is not permitted,
public void verify(UserContext user,
int nodeid,
Operation operation)
throws SecurityException
SecurityException - If the assertion failscheck(UserContext, int, Operation)
public abstract boolean check(UserContext user,
int nodeid,
int srcnodeid,
int dstnodeid,
Operation operation)
user - The UserContext, containing the information about the user.nodeid - The id of the relation which has to be checked. If the operation is CREATE
then this will be interpreted as the typedef node (extending insrel) for the relation to be
created.srcnodeid - The id of the (new) source node of the relation.dstnodeid - The id of the (new) destination node of the relation.operation - The operation which will be performed (CREATE (create
relation) or CHANGE_RELATION (source and/or destination
are changed).
true if the operation is permitted,
false if the operation is not permitted,
public void verify(UserContext user,
int nodeid,
int srcnodeid,
int dstnodeid,
Operation operation)
throws SecurityException
SecurityException - If the assertion failscheck(UserContext, int, int, int, Operation)
public abstract String getContext(UserContext user,
int nodeid)
throws SecurityException
user - The UserContext, containing the information about the user.nodeid - The id of the MMObjectNode, which has to be asserted.
SecurityException - If operation is not allowed(needs read rights)
public abstract void setContext(UserContext user,
int nodeid,
String context)
throws SecurityException
user - The UserContext, containing the information about the user.nodeid - The id of the MMObjectNode, which has to be asserted.context - The context which rights the node will get
SecurityException - If operation is not allowed
SecurityException - If context is not known
public abstract Set getPossibleContexts(UserContext user,
int nodeid)
throws SecurityException
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has to be asserted.
Set of Strings which
represent a context in readable form..
SecurityException
public Authorization.QueryCheck check(UserContext user,
Query query,
Operation operation)
user - The UserContext, for which the query must be consideredquery - The query to be explored
Authorization.QueryCheck structure (containing whether the constriant is sufficient, and the
new constraint or null).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||