|
|||||||||
| 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.Groups
Groups of users. A group can also contain other groups. Containing is arranged by the 'containsrel' relations type.
| Field Summary | |
protected static Cache |
containsCache
|
| 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 | |
Groups()
|
|
| Method Summary | |
protected boolean |
contains(MMObjectNode containingGroupNode,
int containedObject)
Checks wether group or user identified by number is contained by group (also indirectly) |
protected boolean |
contains(MMObjectNode containingGroupNode,
int containedObject,
java.util.Set recurse)
Checks wether group or user identified by number is contained by group. |
protected boolean |
contains(MMObjectNode containingGroup,
MMObjectNode groupOrUser)
|
boolean |
contains(MMObjectNode group,
User user)
Checks wether a a certain user is part of a certain group, either directly or indirectly. |
boolean |
equals(MMObjectNode o1,
MMObjectNode o2)
Implements equals for nodes (this is in MMObjectBuilder because you cannot override MMObjectNode) |
static Groups |
getBuilder()
|
java.util.SortedSet |
getGroups(int containedObject)
Returns all groups, which are (directly or indirectly) containing the given object (user/group) |
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
void |
setDefaults(MMObjectNode node)
unused, ie untested public void addGroup(User user, MMObjectNode group, Verify verify) { for (Enumeration enumeration = user.getNode().getRelations(); enumeration.hasMoreElements();) { MMObjectNode relation = getNode(((MMObjectNode)enumeration.nextElement()).getNumber()); if (relation.parent instanceof ContainsRel) { MMObjectNode source = relation.getNodeValue("snumber"); MMObjectNode destination = relation.getNodeValue("dnumber"); if (destination.getNumber() == user.getNode().getNumber() && source.getBuilder() == this) { MMObjectNode newRelation = ContainsRel.getBuilder().grantRightsTo(group, source); verify.create(user, newRelation.getNumber()); } } } } |
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 |
protected static Cache containsCache
| Constructor Detail |
public Groups()
| Method Detail |
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()public static Groups getBuilder()
public boolean contains(MMObjectNode group,
User user)
protected boolean contains(MMObjectNode containingGroup,
MMObjectNode groupOrUser)
protected boolean contains(MMObjectNode containingGroupNode,
int containedObject)
protected boolean contains(MMObjectNode containingGroupNode,
int containedObject,
java.util.Set recurse)
public java.util.SortedSet getGroups(int containedObject)
public void setDefaults(MMObjectNode node)
setDefaults in class MMObjectBuildernode - The node to set the defaults of.public java.lang.String toString(MMObjectNode n)
MMObjectBuilder
toString in class MMObjectBuilder
public boolean equals(MMObjectNode o1,
MMObjectNode o2)
MMObjectBuilder
equals in class MMObjectBuilder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||