|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.security.implementation.cloudcontext.BasicContextProvider
public class BasicContextProvider
This is a basic implemention of ContextProvider that implements all the methods in a default way.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.mmbase.security.implementation.cloudcontext.ContextProvider |
|---|
ContextProvider.AllowingContexts |
| Constructor Summary | |
|---|---|
BasicContextProvider(MMObjectBuilder... b)
|
|
BasicContextProvider(NodeSearchQuery... q)
|
|
BasicContextProvider(String... b)
|
|
| Method Summary | |
|---|---|
protected boolean |
allows(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
|
protected boolean |
canReadAll()
|
Authorization.QueryCheck |
check(User userContext,
Query query,
Operation operation)
|
protected boolean |
disableContextChecks()
|
protected SortedSet<String> |
getAllContexts()
Returns a Set (of Strings) of all existing contexts |
protected SortedSet<String> |
getAllowingContexts(User user,
Operation operation)
|
String |
getContextName(MMObjectNode contextNode)
Returns the name of the context belonging to a certain context node. |
protected String |
getContextNameField(String table)
For the given context- builder return which field contains the 'context'. |
MMObjectNode |
getContextNode(MMObjectNode node)
Returns the MMObjectNode representing the 'context' of a certain other node |
MMObjectNode |
getContextNode(String context)
Returns the MMObjectNode representing the 'context' which is identifier with the given name. |
Collection<NodeSearchQuery> |
getContextQueries()
|
protected SortedSet<String> |
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. |
Set<MMObjectNode> |
getGroupsAndUsers(MMObjectNode contextNode,
Operation operation)
|
protected Collection<MMObjectNode> |
getGroupsOrUsers(MMObjectNode contextNode,
Operation operation,
MMObjectBuilder groupsOrUsers)
|
protected int |
getMaxContextsInQuery()
|
Set<String> |
getPossibleContexts(User user)
|
Set<String> |
getPossibleContexts(User user,
MMObjectNode node)
|
boolean |
grant(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
|
protected boolean |
isAllContextsPossible()
|
boolean |
mayDo(User user,
MMObjectNode node,
Operation operation)
|
boolean |
mayDoOnContext(MMObjectNode userNode,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
|
protected boolean |
mayDoOnContext(User user,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
|
boolean |
mayGrant(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
Whether, or not, the user is allowed to grant the security operation to the group or user on the context node. |
boolean |
mayRevoke(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
Whether, or not, the user is allowed to revoke the security operation to the group or user on the context node. |
boolean |
revoke(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
|
void |
setContext(User user,
MMObjectNode node,
String context)
Sets the context of the given ode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicContextProvider(NodeSearchQuery... q)
public BasicContextProvider(MMObjectBuilder... b)
public BasicContextProvider(String... b)
| Method Detail |
|---|
protected boolean isAllContextsPossible()
protected boolean canReadAll()
protected int getMaxContextsInQuery()
protected boolean disableContextChecks()
protected String getContextNameField(String table)
public Collection<NodeSearchQuery> getContextQueries()
getContextQueries in interface ContextProvider
public String getContextName(MMObjectNode contextNode)
throws SecurityException
ContextProvider
getContextName in interface ContextProviderSecurityException
public void setContext(User user,
MMObjectNode node,
String context)
ContextProvider
setContext in interface ContextProviderprotected SortedSet<String> getAllContexts()
protected SortedSet<String> getDisallowingContexts(User user,
Operation operation)
protected SortedSet<String> getAllowingContexts(User user,
Operation operation)
public MMObjectNode getContextNode(MMObjectNode node)
ContextProvider
getContextNode in interface ContextProviderpublic MMObjectNode getContextNode(String context)
ContextProvider
getContextNode in interface ContextProvider
public Set<String> getPossibleContexts(User user,
MMObjectNode node)
throws SecurityException
getPossibleContexts in interface ContextProviderSecurityException
public Set<String> getPossibleContexts(User user)
throws SecurityException
getPossibleContexts in interface ContextProviderSecurityException
public boolean mayDo(User user,
MMObjectNode node,
Operation operation)
mayDo in interface ContextProvider
protected boolean mayDoOnContext(User user,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
public boolean mayDoOnContext(MMObjectNode userNode,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
mayDoOnContext in interface ContextProvider
public boolean mayGrant(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
ContextProvider
mayGrant in interface ContextProvider
public boolean mayRevoke(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
ContextProvider
mayRevoke in interface ContextProvider
public Set<MMObjectNode> getGroupsAndUsers(MMObjectNode contextNode,
Operation operation)
protected Collection<MMObjectNode> getGroupsOrUsers(MMObjectNode contextNode,
Operation operation,
MMObjectBuilder groupsOrUsers)
public Authorization.QueryCheck check(User userContext,
Query query,
Operation operation)
check in interface ContextProvider
protected boolean allows(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
public boolean grant(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
grant in interface ContextProvider
public boolean revoke(User user,
MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
revoke in interface ContextProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||