|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.security.implementation.cloudcontext.builders.Contexts
Representation of a 'context', which can be read as a valid value of the 'owner' field of any object in MMBase. Rights are distributed using this thing. This is part of cloud context security, so the 'context' values need to be present in the cloud.
Verify,
Authorization| Nested Class Summary | |
protected static class |
Contexts.OperationsCache
|
| Field Summary | |
protected static Cache |
allowingContextsCache
|
static Parameter[] |
ALLOWS_PARAMETERS
|
protected static Cache |
contextCache
|
static Parameter[] |
GRANT_PARAMETERS
|
protected static java.util.Map |
invalidableObjects
|
static Parameter[] |
MAY_PARAMETERS
|
static Parameter[] |
MAYGRANT_PARAMETERS
|
static Parameter[] |
MAYREVOKE_PARAMETERS
|
protected static Contexts.OperationsCache |
operationsCache
|
static Parameter |
PARAMETER_GROUPORUSER
|
static Parameter |
PARAMETER_OPERATION
|
static Parameter[] |
PARENTSALLOW_PARAMETERS
|
static Parameter[] |
REVOKE_PARAMETERS
|
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadcastChanges, database, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, fields, GUI_PARAMETERS, listCache, nodeCache, OBJ2TYPE_MAX_SIZE, oType, REPLACE_CACHE, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual |
| Fields inherited from class org.mmbase.module.core.MMTable |
mmb, tableName |
| Constructor Summary | |
Contexts()
|
|
| Method Summary | |
protected boolean |
allows(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
Wether users of the given group may do operation on a node of given context (so no following) |
Authorization.QueryCheck |
check(User userContext,
Query query,
Operation operation)
Implements check function with same arguments of Authorisation security implementation |
protected java.lang.Object |
executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
Executes a function on the field of a node, and returns the result. |
protected java.util.SortedSet |
getAllContexts()
Returns a Set (of Strings) of all existing contexts |
protected java.util.SortedSet |
getAllowingContexts(User user,
Operation operation)
|
static Contexts |
getBuilder()
Staticly receives the MMObjectBuilder instance (casted to Contexts). |
java.lang.String |
getContext(User user,
int nodeId)
Returns this Context node as a String (so the name field) |
protected MMObjectNode |
getContextNode(java.lang.String context)
|
protected java.util.SortedSet |
getDisallowingContexts(User user,
Operation operation)
Returns a Set (of Strings) of all existing contexts for which the given operation is not allowed for the given user. |
protected MMObjectNode |
getGroupOrUserNode(Parameters a)
|
protected java.util.Set |
getGroupsAndUsers(MMObjectNode contextNode,
Operation operation)
|
protected java.util.Collection |
getGroupsOrUsers(MMObjectNode contextNode,
Operation operation,
MMObjectBuilder groupsOrUsers)
|
Parameter[] |
getParameterDefinition(java.lang.String function)
perhaps we need something like this |
java.util.SortedSet |
getPossibleContexts(User user,
int nodeId)
Wraps getPossibleContexts of Authorisation implementation Verify. |
protected MMObjectNode |
getUserNode(User bridgeUser)
util |
protected boolean |
grant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
protected boolean |
isOwnNode(User user,
MMObjectNode node)
Returns wether the given node is an 'own' node. |
protected boolean |
mayDo(MMObjectNode user,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
|
boolean |
mayDo(User user,
int nodeId,
int sourceNodeId,
int destinationNodeId,
Operation operation)
Implements check function with same arguments of Authorisation security implementation. |
boolean |
mayDo(User user,
int nodeId,
Operation operation)
Implements check function with same arguments of Authorisation security implementation |
protected boolean |
mayDo(User user,
MMObjectNode contextNode,
Operation operation)
Returns wether user may do operation on a node with given context. |
protected boolean |
mayGrant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
protected boolean |
mayRevoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
protected boolean |
parentsAllow(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
Wether users of the given group may do operation on a node of given context, because (one of) the parents of this group allow it. |
protected boolean |
revoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
MMObjectNode |
setContext(User user,
int nodeId,
java.lang.String context)
Sets the context of a node to a certain String Value |
void |
setDefaults(MMObjectNode node)
Makes sure unique values and not-null's are filed |
java.lang.String |
toString(MMObjectNode n)
Implements for MMObjectNode |
| Methods inherited from class org.mmbase.module.core.MMTable |
created, getFullTableName, getTableName, size |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Parameter PARAMETER_OPERATION
public static final Parameter PARAMETER_GROUPORUSER
public static final Parameter[] ALLOWS_PARAMETERS
public static final Parameter[] PARENTSALLOW_PARAMETERS
public static final Parameter[] GRANT_PARAMETERS
public static final Parameter[] REVOKE_PARAMETERS
public static final Parameter[] MAYGRANT_PARAMETERS
public static final Parameter[] MAYREVOKE_PARAMETERS
public static final Parameter[] MAY_PARAMETERS
protected static Cache contextCache
protected static Cache allowingContextsCache
protected static Contexts.OperationsCache operationsCache
protected static java.util.Map invalidableObjects
| Constructor Detail |
public Contexts()
| Method Detail |
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()public static Contexts getBuilder()
public boolean mayDo(User user,
int nodeId,
int sourceNodeId,
int destinationNodeId,
Operation operation)
throws SecurityException
SecurityExceptionVerify#check(user, nodeId, sourceNodeI, destinationNodeI, operation)
public boolean mayDo(User user,
int nodeId,
Operation operation)
throws SecurityException
SecurityExceptionVerify#check(user, nodeId, operation)
protected boolean isOwnNode(User user,
MMObjectNode node)
protected boolean mayDo(User user,
MMObjectNode contextNode,
Operation operation)
protected boolean mayDo(MMObjectNode user,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
protected java.util.SortedSet getAllContexts()
protected java.util.SortedSet getDisallowingContexts(User user,
Operation operation)
protected java.util.SortedSet getAllowingContexts(User user,
Operation operation)
public Authorization.QueryCheck check(User userContext,
Query query,
Operation operation)
Verify#check(user, query, operation)
protected java.util.Collection getGroupsOrUsers(MMObjectNode contextNode,
Operation operation,
MMObjectBuilder groupsOrUsers)
protected java.util.Set getGroupsAndUsers(MMObjectNode contextNode,
Operation operation)
protected final MMObjectNode getContextNode(java.lang.String context)
public java.lang.String getContext(User user,
int nodeId)
throws SecurityException
SecurityException
public MMObjectNode setContext(User user,
int nodeId,
java.lang.String context)
throws SecurityException
user - The user doing this.nodeId - The number of the node which' context must be changedcontext - The String describing the desired new context
SecurityException
public java.util.SortedSet getPossibleContexts(User user,
int nodeId)
throws SecurityException
SecurityExceptionVerify.getPossibleContexts(org.mmbase.security.UserContext, int)
protected boolean allows(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
protected boolean parentsAllow(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
protected boolean mayGrant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
protected boolean grant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
public void setDefaults(MMObjectNode node)
setDefaults in class MMObjectBuildernode - The node to set the defaults of.
protected boolean mayRevoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
protected boolean revoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
protected MMObjectNode getUserNode(User bridgeUser)
protected MMObjectNode getGroupOrUserNode(Parameters a)
public Parameter[] getParameterDefinition(java.lang.String function)
MMObjectBuilder
getParameterDefinition in class MMObjectBuilder
protected java.lang.Object executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
MMObjectBuilderMMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String) method.
Derived builders should override this method to provide additional functions.
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List)public java.lang.String toString(MMObjectNode n)
MMObjectBuilder
toString in class MMObjectBuilder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||