org.mmbase.security.implementation.cloud
Class Verify

java.lang.Object
  |
  +--org.mmbase.security.Authorization
        |
        +--org.mmbase.security.implementation.cloud.Verify

public class Verify
extends Authorization

Security from within MMBase

Version:
$Id: Verify.java,v 1.11 2002/09/26 12:25:11 eduard Exp $
Author:
Eduard Witteveen

Fields inherited from class org.mmbase.security.Authorization
configFile, fileWatcher, manager
 
Constructor Summary
Verify()
           
 
Method Summary
 boolean check(UserContext user, int nodeid, int srcnodeid, int dstnodeid, Operation operation)
          This method could be overrided by an extending class.
 boolean check(UserContext user, int nodeid, Operation operation)
          This method could be overrided by an extending class.
 void create(UserContext user, int nodeid)
          This method could be overrided by an extending class.
 java.lang.String getContext(UserContext user, int nodeid)
          This method could be overrided by an extending class.
 java.util.Set getPossibleContexts(UserContext user, int nodeid)
          This method could be overrided by an extending class.
protected  void load()
          This method could be overrided by an extending class.
 void remove(UserContext user, int nodeid)
          This method could be overrided by an extending class.
 void setContext(UserContext user, int nodeid, java.lang.String context)
          This method could be overrided by an extending class.
 void update(UserContext user, int nodeid)
          This method could be overrided by an extending class.
 
Methods inherited from class org.mmbase.security.Authorization
load, verify, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Verify

public Verify()
Method Detail

load

protected 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 nodeid)
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 nodeid)
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 nodeid)
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 nodeid,
                     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,

check

public boolean check(UserContext user,
                     int nodeid,
                     int srcnodeid,
                     int dstnodeid,
                     Operation operation)
Description copied from class: Authorization
This method could be overrided by an extending class. This method checks if the creation of a certain relation or changing the source or destination of a certain relation done by a certain user is permitted.
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 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).
Returns:
true if the operation is permitted, false if the operation is not permitted,

getContext

public java.lang.String getContext(UserContext user,
                                   int nodeid)
                            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 nodeid,
                       java.lang.String context)
                throws SecurityException
Description copied from class: Authorization
This method could be overrided by an extending class. This method changes the rights on a node, by telling the authorization that it should use the context which is defined.
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 allowed
org.mmbase.SecurityException - If context is not known

getPossibleContexts

public java.util.Set getPossibleContexts(UserContext user,
                                         int nodeid)
                                  throws SecurityException
Description copied from class: Authorization
This method could be overrided by an extending class. This method returns a list of contexts which can be used to change the node.
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 Set of Strings which represent a context in readable form..
Throws:
org.mmbase.SecurityException - maybe


MMBase build 1.6.5.20030923