|
||||||||||
| 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
org.mmbase.security.implementation.cloudcontext.Verify
public class Verify
Implementation of Authorization. Most implementation is delegated to the Contexts builder.
Contexts| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmbase.security.Authorization |
|---|
Authorization.QueryCheck |
| Field Summary |
|---|
| Fields inherited from class org.mmbase.security.Authorization |
|---|
COMPLETE_CHECK, NO_CHECK |
| Fields inherited from class org.mmbase.security.Configurable |
|---|
configResource, configWatcher, manager |
| Constructor Summary | |
|---|---|
Verify()
|
|
| Method Summary | |
|---|---|
boolean |
check(UserContext user,
Action ac,
Parameters parameters)
Checks whether user may do a certain action. |
boolean |
check(UserContext userContext,
int nodeId,
int sourceNodeId,
int destinationNodeId,
Operation operation)
This method should be overrided by an extending class. |
boolean |
check(UserContext userContext,
int nodeId,
Operation operation)
This method should be overrided by an extending class. |
Authorization.QueryCheck |
check(UserContext userContext,
Query query,
Operation operation)
Checks rights on a query. |
void |
create(UserContext userContext,
int nodeId)
This method should be overrided by an extending class. |
String |
getContext(UserContext userContext,
int nodeId)
This method could be overrided by an extending class. |
protected MMObjectNode |
getContextNode(int nodeId,
boolean exception)
For a certain node, returns the node representing its 'context'. |
ContextProvider |
getContextProvider()
|
static Verify |
getInstance()
|
protected MMObjectNode |
getNode(int nodeId,
boolean exception)
For a certain node number , return the MMObjectNode representing it |
Set<String> |
getPossibleContexts(UserContext userContext)
This method could be overrided by an extending class. |
Set<String> |
getPossibleContexts(UserContext userContext,
int nodeId)
This method could be overrided by an extending class. |
protected void |
load()
This method should be overridden by an extending class. |
void |
remove(UserContext userContext,
int nodeId)
This method should be overrided by an extending class. |
void |
setContext(UserContext user,
int nodeId,
String context)
This method could be overrided by an extending class. |
void |
update(UserContext userContext,
int nodeId)
This method should be overrided by an extending class. |
| Methods inherited from class org.mmbase.security.Authorization |
|---|
verify, verify, verify |
| Methods inherited from class org.mmbase.security.Configurable |
|---|
load |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Verify()
| Method Detail |
|---|
protected void load()
Configurable
load in class Configurablepublic static final Verify getInstance()
public ContextProvider getContextProvider()
public void create(UserContext userContext,
int nodeId)
Authorization
create in class AuthorizationuserContext - The UserContext, containing the information
about the user.nodeId - The id of the MMObjectNode, which has just been added to
the MMBase cloud.
public void update(UserContext userContext,
int nodeId)
Authorization
update in class AuthorizationuserContext - The UserContext, containing the information about the user.nodeId - The id of the MMObjectNode, which has just been changed
in the cloud.
public void remove(UserContext userContext,
int nodeId)
Authorization
remove in class AuthorizationuserContext - The UserContext, containing the information
about the user.nodeId - The id of the MMObjectNode, which has just been removed
in the cloud.
public boolean check(UserContext userContext,
int nodeId,
Operation operation)
Authorization
check in class AuthorizationuserContext - 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 boolean check(UserContext userContext,
int nodeId,
int sourceNodeId,
int destinationNodeId,
Operation operation)
Authorization
check in class AuthorizationuserContext - 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.sourceNodeId - The id of the (new) source node of the relation.destinationNodeId - 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 String getContext(UserContext userContext,
int nodeId)
throws SecurityException
Authorization
getContext in class AuthorizationuserContext - 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 void setContext(UserContext user,
int nodeId,
String context)
throws SecurityException
Authorization
setContext in class Authorizationuser - 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
public Set<String> getPossibleContexts(UserContext userContext,
int nodeId)
throws SecurityException
Authorization
getPossibleContexts in class AuthorizationuserContext - 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 Set<String> getPossibleContexts(UserContext userContext)
throws SecurityException
Authorization
getPossibleContexts in class AuthorizationuserContext - The UserContext, containing the information
about the user.
Set of Strings which
represent a context in readable form..
SecurityException
public Authorization.QueryCheck check(UserContext userContext,
Query query,
Operation operation)
Authorization
check in class AuthorizationuserContext - 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).
public boolean check(UserContext user,
Action ac,
Parameters parameters)
Authorization
check in class Authorization
protected MMObjectNode getContextNode(int nodeId,
boolean exception)
nodeId - exception - If true throw a security exception if a node which such a
number could not be found. Otherwise, in that case only log a warning.
protected MMObjectNode getNode(int nodeId,
boolean exception)
nodeId - exception - If true throw a security exception if a node which such a
number could not be found. Otherwise, in that case only log a warning.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||