org.mmbase.security.implementation.basic
Class OwnerAuthorization
java.lang.Object
|
+--org.mmbase.security.Authorization
|
+--org.mmbase.security.implementation.basic.OwnerAuthorization
- public class OwnerAuthorization
- extends Authorization
|
Method Summary |
void |
assert(UserContext user,
int node,
Operation operation)
This method could be overrided by an extending class. |
boolean |
check(UserContext user,
int nodeNumber,
Operation operation)
This method could be overrided by an extending class. |
void |
create(UserContext user,
int nodeNumber)
This method could be overrided by an extending class. |
java.lang.String |
getContext(UserContext user,
int nodeNumber)
This method could be overrided by an extending class. |
java.util.HashSet |
getPossibleContexts(UserContext user,
int nodeNumber)
This method does nothing, except from returning a dummy value |
void |
load()
This method could be overrided by an extending class. |
void |
remove(UserContext user,
int node)
This method could be overrided by an extending class. |
void |
setContext(UserContext user,
int nodeNumber,
java.lang.String context)
This method does nothing, except from checking if the setContext was valid.. |
void |
update(UserContext user,
int nodeNumber)
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 |
OwnerAuthorization
public OwnerAuthorization()
load
public void load()
- Description copied from class:
Authorization
- This method could be overrided by an extending class.
It should set the settings for this class, and when needed
retrieve them from the file at location configPath.
- Overrides:
load in class Authorization
create
public void create(UserContext user,
int nodeNumber)
- Description copied from class:
Authorization
- This method could be overrided by an extending class.
It has to be called, when a new Node has been created.
This way, the authentication can create default rights
for this object, depending on the UserContext and generate
logging information.
- Overrides:
create in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has just been added to
the MMBase cloud.
update
public void update(UserContext user,
int nodeNumber)
- Description copied from class:
Authorization
- This method could be overrided by an extending class.
It has to be called, when a Node has been changed.
This way, the authentication can generate log information
for this object, which can be used for accountability
- Overrides:
update in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has just been changed
in the cloud.
remove
public void remove(UserContext user,
int node)
- Description copied from class:
Authorization
- This method could be overrided by an extending class.
It has to be called, when a Node has been removed from
the cloud.
This way, the authentication can generate log information
for this node, and remove the authorization object which
belongs to this node.
- Overrides:
remove in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has just been removed
in the cloud.
check
public boolean check(UserContext user,
int nodeNumber,
Operation operation)
- Description copied from class:
Authorization
- This method could be overrided by an extending class.
This method checks if an operation is permitted on a certain node done
by a certain user.
- Overrides:
check in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
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.- Returns:
true if the operation is permitted,
false if the operation is not permitted,
assert
public void assert(UserContext user,
int node,
Operation operation)
throws SecurityException
- Description copied from class:
Authorization
- This method could be overrided by an extending class.
This method asserts that an operation is permitted on a
certain node done by a certain user. If not, a exception is thrown
- Overrides:
assert in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
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.- Throws:
org.mmbase.SecurityException - If the assertion fails
getContext
public java.lang.String getContext(UserContext user,
int nodeNumber)
throws SecurityException
- Description copied from class:
Authorization
- This method could be overrided by an extending class.
This method returns the context of a specific node.
- Overrides:
getContext in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
user - The UserContext, containing the information about the user.nodeid - The id of the MMObjectNode, which has to be asserted.- Returns:
- the context setting of the node.
- Throws:
org.mmbase.SecurityException - If operation is not allowed(needs read rights)
setContext
public void setContext(UserContext user,
int nodeNumber,
java.lang.String context)
throws SecurityException
- This method does nothing, except from checking if the setContext was valid..
- Overrides:
setContext in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
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- Throws:
org.mmbase.SecurityException - If operation is not allowedorg.mmbase.SecurityException - If context is not known
getPossibleContexts
public java.util.HashSet getPossibleContexts(UserContext user,
int nodeNumber)
throws SecurityException
- This method does nothing, except from returning a dummy value
- Overrides:
getPossibleContexts in class Authorization
- Following copied from class:
org.mmbase.security.Authorization
- Parameters:
user - The UserContext, containing the information
about the user.nodeid - The id of the MMObjectNode, which has to be asserted.- Returns:
- a
java.util.HashSet of Strings which
represent a context in readable form.. - Throws:
org.mmbase.SecurityException - maybe
MMBase 2001