|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.security.Authorization
This class is a empty implementation of the Authorization, it will only return that operations are valid. To make your own implementation of authorization, you have to extend this class.
| Field Summary | |
protected java.io.File |
configFile
The absolute file which is the config file |
protected FileWatcher |
fileWatcher
The file watcher |
protected MMBaseCop |
manager
The SecurityManager, who created this instance |
| Constructor Summary | |
Authorization()
|
|
| Method Summary | |
abstract boolean |
check(UserContext user,
int nodeid,
int srcnodeid,
int dstnodeid,
Operation operation)
This method could be overrided by an extending class. |
abstract boolean |
check(UserContext user,
int nodeid,
Operation operation)
This method could be overrided by an extending class. |
abstract void |
create(UserContext user,
int nodeid)
This method could be overrided by an extending class. |
abstract java.lang.String |
getContext(UserContext user,
int nodeid)
This method could be overrided by an extending class. |
abstract java.util.Set |
getPossibleContexts(UserContext user,
int nodeid)
This method could be overrided by an extending class. |
protected abstract void |
load()
This method could be overrided by an extending class. |
void |
load(MMBaseCop manager,
FileWatcher fileWatcher,
java.lang.String configPath)
The method which sets the settings of this class. |
abstract void |
remove(UserContext user,
int nodeid)
This method could be overrided by an extending class. |
abstract void |
setContext(UserContext user,
int nodeid,
java.lang.String context)
This method could be overrided by an extending class. |
abstract void |
update(UserContext user,
int nodeid)
This method could be overrided by an extending class. |
void |
verify(UserContext user,
int nodeid,
int srcnodeid,
int dstnodeid,
Operation operation)
This method could be overrided by an extending class. |
void |
verify(UserContext user,
int nodeid,
Operation operation)
This method could be overrided by an extending class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected MMBaseCop manager
protected java.io.File configFile
protected FileWatcher fileWatcher
| Constructor Detail |
public Authorization()
| Method Detail |
public final void load(MMBaseCop manager,
FileWatcher fileWatcher,
java.lang.String configPath)
manager - The class that created this instance.fileWatcher - checks the filesconfigPath - The url which contains the config information for.
the authorization.protected abstract void load()
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
about the user.nodeid - The id of the MMObjectNode, which has to be checked.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
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has to be asserted.operation - The operation which will be performed.org.mmbase.SecurityException - If the assertion fails
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.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
user - The UserContext, containing the information about the user.nodeid - The id of the relation which has to be asserted.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).org.mmbase.SecurityException - If the assertion fails
public abstract java.lang.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.org.mmbase.SecurityException - If operation is not allowed(needs read rights)
public abstract void setContext(UserContext user,
int nodeid,
java.lang.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 getorg.mmbase.SecurityException - If operation is not allowedorg.mmbase.SecurityException - If context is not known
public abstract java.util.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..org.mmbase.SecurityException - maybe
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||